I have got a complex task. Before I start to code, maybe someone has an advice on how to do this:
- via the ZoomDragTool you can click into the chart and draw a rectangle
- my task is to provide the same rectangle drawing method but to select chart data:
For example I have 5 series in a chart, the user draws a rectangle in the chart. Then a dialog pops up to select a series. The user says e.g. to take series number 4. Then all data of series 4 that is within the drawn rectangle is taken and exported as text file/list etc. The aim is that the user gets statistics for the selected range - mean, standard deviation, maximum, minimum.
What do you propose or does anyone knows maybe a forum thread where a users had a similar problem?
The approach I have in mind is this one:
1. user presses a button "select chart section"
2. the user clicks twice, I take the xy-coordinates of the clicks and draw a visible rectangle into the chart (I hope this is possible somehow)
3. a dialog pops up to select the series that should be used
4. a second dialog pops up showing the statistical data of the selected series withing the selection rectangle