Page 1 of 1

Integer Ticks on BarChart3D

Posted: Tue Jul 04, 2006 1:10 pm
by zulfikaralib
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?

Posted: Fri Jul 07, 2006 10:13 pm
by skunk

Code: Select all

axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());