Hi,
I've started use jfreechart.
My doubts:
How can I get small rectangles for the values in a line chart?
Can I restrict the range of the values for my chart?
Regards,
Kolb.
A line chart with dots
Re: A line chart with dots
Hi Kolb,
To draw shapes on a line chart in 0.9.4, you need to create a new LineAndShapeRenderer class, then set it with the setRenderer(...) method in the CategoryPlot class.
You can control the range of values displayed on your chart using the setRange(...) method in the ValueAxis class. Use something like this:
CategoryPlot plot = myChart.getCategoryPlot();
ValueAxis axis = plot.getRangeAxis();
axis.setRange(10.0, 25.0);
Regards,
Dave Gilbert
To draw shapes on a line chart in 0.9.4, you need to create a new LineAndShapeRenderer class, then set it with the setRenderer(...) method in the CategoryPlot class.
You can control the range of values displayed on your chart using the setRange(...) method in the ValueAxis class. Use something like this:
CategoryPlot plot = myChart.getCategoryPlot();
ValueAxis axis = plot.getRangeAxis();
axis.setRange(10.0, 25.0);
Regards,
Dave Gilbert