Adjusting the bar width on a jfree chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
newbie321
Posts: 2
Joined: Sun Aug 25, 2019 7:52 pm
antibot: No, of course not.

Adjusting the bar width on a jfree chart

Post by newbie321 » Mon Aug 26, 2019 8:04 pm

I have a x,y dataset of floats that spans the x-interval [0,1]. I need to render my data as bars. However, the bars are drawn with constant width and overlay on top of each other. I read other posts saying it is impossible to change the bars' width. I almost gave up and then I saw that in the example
HistogramDemo1.java, the bars do adjust to a proper width.

What classes to I need to override to get a control of bars; width in JfreeChart. I am using XYPlot and XYBarRenderer.

thanks

Locked