Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart3D for Java
 this should work, right?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


17 Posts

Posted - 10 Nov 2010 :  18:56:49  Show Profile  Reply with Quote
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 );


1569 Posts

Posted - 10 Nov 2010 :  19:17:07  Show Profile  Reply with Quote
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07