Integer Ticks on BarChart3D

Discussion about JFreeChart related to stockmarket charts.
Locked
zulfikaralib
Posts: 14
Joined: Thu Sep 22, 2005 5:38 am
Location: Mumbai, India
Contact:

Integer Ticks on BarChart3D

Post by zulfikaralib » Tue Jul 04, 2006 1:10 pm

Hi David,

Following is the code by which I am generating a 3D BarChart.

Code: Select all

chart = ChartFactory.createBarChart3D("Total Tasks Vs Users", "Resource Name", "Tasks", dataset, PlotOrientation.HORIZONTAL, true, true, false);
CategoryPlot categoryplot = (CategoryPlot)chart.getPlot();
categoryplot = chart.getCategoryPlot();
renderer = (BarRenderer) categoryplot.getRenderer(0);
renderer.setSeriesPaint(0,Color.GREEN);
renderer.setSeriesPaint(1,Color.BLUE);
renderer.setSeriesPaint(2,Color.RED);
info = new ChartRenderingInfo(new StandardEntityCollection());

filename = ServletUtilities.saveChartAsPNG(chart, width, height, info, session);
The issue with this is that, how can i set the NumberAxis as createIntegerTicksOnly?

The Graph looks like this:
http://www.orkut.com/AlbumZoom.aspx?uid ... 6689&pid=6

How can we disable decimal values and have only integers?
Zulfikarali Barodawala

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Fri Jul 07, 2006 10:13 pm

Code: Select all

axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

Locked