I've created a histogram using ChartFactory.createHistogram() using data the following type of data:
x y
0 10
100 20
200 5
300 12
.
.
.
and so on. When I show the chart the bars are really thin (1 in width I think). How can I set the width to the maximum possible, or a fixed amount, say 100?
Thanks,
Ville
Histogram bar width
how do I call setIntervalWidth
I see your code:
data.setIntervalWidth()
What class is data? I am unable to get an instance of an object in a category chart or a TimeSeries chart where I can call setIntervalWidth. Can you point me in the right direction here?
thank you,
Flori
fc@clever-soft.com
http://www.clever-soft.com/
data.setIntervalWidth()
What class is data? I am unable to get an instance of an object in a category chart or a TimeSeries chart where I can call setIntervalWidth. Can you point me in the right direction here?
thank you,
Flori
fc@clever-soft.com
http://www.clever-soft.com/
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
There are several solutions. One is you could use the XYBarDataset class to wrap your dataset.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

