|
Re: chart Zooming [message #1008494 is a reply to message #1008340] |
Tue, 12 February 2013 17:52 |
|
I do not have an example of doing this, but you could probably use a callback event and trap all the info you need. I modified an example from the source that prints out the mouse event and chart x,y values in a callback example. I am attaching it. It should get you started.
Jason
BIRT-Exchange
|
|
|
|
|
|
|
|
Re: chart Zooming [message #1008734 is a reply to message #1008540] |
Wed, 13 February 2013 18:41 |
Savitha Sundaramoorthi Messages: 18 Registered: November 2012 |
Junior Member |
|
|
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 19:18] Report message to a moderator
|
|
|
Re: chart Zooming [message #1009204 is a reply to message #1008734] |
Thu, 14 February 2013 16:47 |
|
The plot does not support triggers. You can add them to the main chart block:
yourchart.getBlock().getTriggers( ) The issue is that you will not be able to get your data point values. You either have to add the trigger to the axis or the series to get some data values.
In the example I did in JavaScript I used x-axis and allowed the user to select a new range on the axis. I have not tried to do this in Swing but you may want to look at this post:
http://www.xtremevbtalk.com/showthread.php?t=238496
Jason
BIRT-Exchange
|
|
|
|
Powered by
FUDForum. Page generated in 0.04202 seconds