Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart3D for Java
 this should work, right?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]


T O P I C    R E V I E W
Peter Posted - 10 Nov 2010 : 18:56:49
I've got a SimpleBarPlot and I'm trying to attach data values to each bar a la SimpleBars.java.

The plot works great just no data labels. What am I missing? I didn't see anything else in the example fill that looked like it pertained to labeling the bars.

Color plotColor = someColorOtherThanBlack;
ChartAttribute attrib = new ChartAttribute( plotColor, 1, ChartConstants.LS_SOLID, plotColor );
attrib.setFillFlag( true );

SimpleBarPlot sbp = new SimpleBarPlot( pTransform1, sd, barwidth, 0.0, attrib, barjust );

NumericLabel bardatavalue = sbp.getPlotLabelTemplate();
bardatavalue.setTextFont( theFont );
bardatavalue.setNumericFormat( ChartConstants.CURRENCYFORMAT );
bardatavalue.setDecimalPos( 0 );
bardatavalue.setColor( Color.BLACK );
sbp.setBarDatapointLabelPosition( ChartConstants.INSIDE_BAR );
sbp.setPlotLabelTemplate( bardatavalue );
sbp.setShowDatapointValue( true );

chartView.addChartObject( sbp );
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 10 Nov 2010 : 19:17:07
Sorry, we cannot tell what the problem is based on inspection. The problem must associated with something you don't show. You will need to send us the complete program to debug and display. You can see a half dozen examples which display data values in the Bargraphs example.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07