BarChart : Domain Axis : Custom Number Display

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rajagopal.Yendluri
Posts: 1
Joined: Mon Oct 24, 2016 6:52 pm
antibot: No, of course not.

BarChart : Domain Axis : Custom Number Display

Post by Rajagopal.Yendluri » Mon Oct 24, 2016 7:04 pm

Hi,

I am creating a barchart with 1,2,3,4,5,...etc., in domain axis, but i do not want to display it in sequence , but i want to customize it , for example 5,10,15,20, etc., still showing all the bars, but from 1-4 no lable, for 5th bar i will show 5, then 6-9 no label, for 10th bar i will show , so onnnn....


any idea what can help me ?

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

Re: BarChart : Domain Axis : Custom Number Display

Post by david.gilbert » Mon Oct 24, 2016 10:00 pm

If your x-axis scale is really numerical, then you might want to consider creating a bar chart using XYBarRenderer (which uses XYPlot and a numerical x-axis rather than CategoryPlot and its categorical axis).
David Gilbert
JFreeChart Project Leader

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

Locked