Tick Label of BarChart..

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kidwolf

Tick Label of BarChart..

Post by kidwolf » Thu Nov 14, 2002 8:12 am

hi..~

I am right now displaying the tick label of range axis.. ;;

rangeaxis.setRange( 0, 1000000000 );
DecimalFormat formatter = new DecimalFormat("0,000");
rangeaxis.setTickUnit(new NumberTickUnit( "10000000", formatter));

but.. ticksize is too big. ;;

so I would like to display.. like this. 10000000 => 10M .
( 10M, 20M, 30M, .. )

can I do that? ;;


Thanks.

David Gilbert

Re: Tick Label of BarChart..

Post by David Gilbert » Fri Nov 15, 2002 4:19 pm

I can't think of a way to do that. Ideally, there would be a subclass of NumberFormat that could do it. Anyone know of one, or care to develop one? The less elegant approach would be to modify the JFreeChart source code and have it divide the values by 1000000 before displaying them on the axis.

Regards,

DG

Locked