|
Show/Hide data plot |
Posted by Claude Kane on Jan-08-2010 02:24 |
|
On loading a basic line chart, I want to load about 15 data series, but have the abilty to show or hide each data sereis based on a checkbox status. Can this be done? |
Re: Show/Hide data plot |
Posted by Peter Kwan on Jan-08-2010 04:34 |
|
Hi Claude,
Yes. Simply draw the chart based on the state of the check box. If a check box is checked, add the corresponding data series to the chart. If it is not checked, do not add the corresponding data series to the chart.
If the user changes the check box, just repeat the above procedure again (the above procedure can be put into a subroutine) to update the chart.
There is a sample code "Interactive Financial Chart" included in ChartDirector that allows the user to use check boxes and other controls to add/remove lines and perform other things. It is using the method I mentioned above. You can try it to see how it works.
Hope this can help.
Regards
Peter Kwan |
|