I am ploting XY Series plots in a JSp page ,Now i am able to use the tool tip feature of
JFreeChart.Now i want to highlight all the data points of a series once any of the points of the series is clicked
How to do this can any one suggest ?
Thanks in Advance
How to highlight The dataPoints Of A series ?
-
- Posts: 8
- Joined: Fri May 15, 2009 1:07 pm
Re: How to highlight The dataPoints Of A series ?
There is no way to do this automatically, the chart does not supply this exact functionality by default.
The only way to do this is to identify the x, y values from the mouse event and manually draw a XYShapeAnnotation as a circle (or another shape) around each point you want to highlight. This of course means you have to save each point you want highlighted yourself and draw a new XYShapeAnnotation for each one.
The only way to do this is to identify the x, y values from the mouse event and manually draw a XYShapeAnnotation as a circle (or another shape) around each point you want to highlight. This of course means you have to save each point you want highlighted yourself and draw a new XYShapeAnnotation for each one.
Re: How to highlight The dataPoints Of A series ?
...just re-read your post. Just in case you mean that you want to change every single point in a series once you select only one of them, the easiest way to accomplish this is to reset the parameters of the actual series renderer such as:
renderer.setSeriesShape
renderer.setSeriesPaint
renderer.setSeriesShape
renderer.setSeriesPaint
-
- Posts: 8
- Joined: Fri May 15, 2009 1:07 pm
Re: How to highlight The dataPoints Of A series ?
snoopygee wrote:There is no way to do this automatically, the chart does not supply this exact functionality by default.
The only way to do this is to identify the x, y values from the mouse event and manually draw a XYShapeAnnotation as a circle (or another shape) around each point you want to highlight. This of course means you have to save each point you want highlighted yourself and draw a new XYShapeAnnotation for each one.
I am Actually new To JFree Chart Can You send a sample code supporting your comments ?
-
- Posts: 8
- Joined: Fri May 15, 2009 1:07 pm
Re: How to highlight The dataPoints Of A series ?
snoopygee wrote:...just re-read your post. Just in case you mean that you want to change every single point in a series once you select only one of them, the easiest way to accomplish this is to reset the parameters of the actual series renderer such as:
renderer.setSeriesShape
renderer.setSeriesPaint
I guess it wil not heighlight the series coz,this code i will write in the java class but i want this dynamicity at the JSP page.
Where actually i am showing the plots