chart Zooming [message #1008340] |
Mon, 11 February 2013 22:19  |
Eclipse User |
|
|
|
Hello all,
I am using the BIRT charting engine in an RCP application where the chart
is rendered in Swing . I would like to be able to zoom in to the chart by using the mouse to draw a rectangle
around the data of interest. Is there a way to add interactivity to the
chart that would return the corresponding label values of the xmin, ymin, xmax, ymax of the rectangle ?
I need those label values to fix the max and min scale value to zoom the plot.
Thanks,
Savitha
|
|
|
|
|
|
|
|
|
Re: chart Zooming [message #1008734 is a reply to message #1008540] |
Wed, 13 February 2013 13:41   |
Eclipse User |
|
|
|
Hello Jason,
Am adding trigger to the plot(chart.getPlot().getTriggers().addTrigger(.....) ).
Looks like it is not working. If you could give suggestion on how to make this work, it would be great.
So, I added mouseListener to the JPanel and performing the necessary Logic in MousePressed and Released.
I got access to the datapointhints from GeneratedChartState object and is working fine so far, but if you could suggest a better way of doing this, it'll be helpful.
Finally, I want to draw the rectangle(rubber band zooming) on the plot while zooming. I saw your previous post
where you have implemented in javascript. If you could point me to some material on how to do it in swing, it would be great.
Thanks,
Savitha
[Updated on: Wed, 13 February 2013 14:18] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02996 seconds