Integer Tick Units in Bar Chart 3D

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
zulfikaralib
Posts: 14
Joined: Thu Sep 22, 2005 5:38 am
Location: Mumbai, India
Contact:

Integer Tick Units in Bar Chart 3D

Post by zulfikaralib » Wed Jul 05, 2006 8:04 am

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

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Jul 05, 2006 1:22 pm

David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

karanmercy
Posts: 1
Joined: Fri Jul 14, 2006 10:28 am

NEGATIVE VALUES

Post by karanmercy » Fri Jul 14, 2006 10:34 am

Hi,

We are using this code for generating 3d bar chart.

Also we have set the following:
rangeAxis.setRangeType(RangeType.POSITIVE);
rangeAxis.setAutoRangeStickyZero(true);

But when my dataset is empty the bar chart has -1 and 0 in the Y axis.
Now when one value is present the bar chart has -1,0,1 in the Y axis.

I want to eliminate the -gative values from appearing in the range axis.

Locked