error bars on scatterplot

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

error bars on scatterplot

Post by Birgir Palsson » Tue Mar 04, 2003 6:05 pm

Hi,
I'm creating a scatterplot using the ChartFactory.createScatterPlot(...mydata...).
I then want to access each of the dots on my scatterplot to add specific tooltip and errorbar for each point.
Can someone help me with this?
thanks,
Birgir

David Gilbert

Re: error bars on scatterplot

Post by David Gilbert » Tue Mar 04, 2003 6:11 pm

To customise the tooltips, you need to create a class that implements the XYToolTipGenerator interface (look at StandardXYToolTipGenerator for one example) and then use the setToolTipGenerator(...) method in your plot's renderer to install it.

To draw error bars, you would have to develop a custom renderer class. Start with the StandardXYItemRenderer class, and look at modifying the drawItem(...) method.

Regards,

Dave Gilbert

Locked