Bar Chart - X-axis as a certain int values ???

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sesar
Posts: 12
Joined: Fri Jul 13, 2007 10:57 am

Bar Chart - X-axis as a certain int values ???

Post by sesar » Fri Oct 26, 2007 12:20 pm

How to do that, the X-axis is not a string category, but like a integer values.

for example I have a values:
as points (x,y):

(1,10) (2, 14) (5, 9) (8, 4)

and I want to present that as bar chart. (4 bars)

Thanks

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 » Fri Oct 26, 2007 4:03 pm

You can do this using an XYBarRenderer. If you have the JFreeChart Developer Guide, there are a bunch of demos (XYBarChartDemo1-7) you can look at.
David Gilbert
JFreeChart Project Leader

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

sesar
Posts: 12
Joined: Fri Jul 13, 2007 10:57 am

Post by sesar » Thu Nov 22, 2007 1:05 pm

Thanks,

Some of charts provide 'an outlook' of values while I put cursor at them, and some don't.

It depends on dataset? or it can work for all charts?

Locked