bold points in line graph

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Del

bold points in line graph

Post by Del » Tue Dec 31, 2002 5:52 am

Hi all,

I have created a line graph with dates on the horizontal axis and some quantity values on the vertical axis. The problem is the data I am entering for the dates in the horizontal axis isn't constant, therefore, I am unable to determine where readings have been entered on the graph. Is there any way of making the points on the line graph bold so it can be seen on the graph where data has been entered? Thanks in advance.

David Gilbert

Re: bold points in line graph

Post by David Gilbert » Thu Jan 02, 2003 12:01 pm

Hi Del,

You can get the renderer to display shapes at each data point. Try something like this:

XYPlot plot = myChart.getXYPlot();
XYItemRenderer renderer = plot.getRenderer();
if (renderer instanceof StandardXYItemRenderer) {
StandardXYItemRenderer r = (StandardXYItemRenderer) renderer;
r.setPlotShapes(true);
}

Regards,

Dave Gilbert

Locked