Remove series value from x-axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ranyeng
Posts: 13
Joined: Fri May 22, 2009 6:53 am

Remove series value from x-axis

Post by ranyeng » Wed Jun 03, 2009 11:03 am

Following is the part of Line chart:

// create the dataset...
final DefaultCategoryDataset dataset = new DefaultCategoryDataset();

dataset.addValue(15.0, series1, "type1");
dataset.addValue(4.0, series1, "type2");
dataset.addValue(3.0, series1, type3);
dataset.addValue(5.0, series1, type4);
return dataset;
..........................

After drawing Line chart, values, type1, type2,type3, type4 are shown on x-axis
How can I remove these values from x-axis.

Thanks in advance

Ranjan Yengkhom

ranyeng
Posts: 13
Joined: Fri May 22, 2009 6:53 am

Re: Remove series value from x-axis

Post by ranyeng » Thu Jun 04, 2009 5:14 am

I have explore many articles on net... i hope there is no solution for the above problem...

can anybody tell me how to change the font color of the above values to make it simulation

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

Re: Remove series value from x-axis

Post by david.gilbert » Mon Jun 08, 2009 3:20 pm

To hide the labels, just call setTickLabels(false) on the axis.
David Gilbert
JFreeChart Project Leader

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

Locked