We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

User selection of series in the chart

Is it possible to allow the user to select a series by clicking in the chart? One thing I was considering to implement is to allow the user to remove curves from the chart by dragging them off the chart. For this to be possible, I belive the chart should handle selection of the curve in response to user mouse actions, and I should handle the appropriate drag/drop events and finally remove the series from the chart. Do you think this is feasible?

1 Reply

AD Administrator Syncfusion Team June 23, 2005 07:14 PM UTC

Hi, The ChartRegionMouseXXX events can be handled to provide any custom actions. Please refer to the sample linked to below for an example: ChartSelectSeries_1936.zip The above sample does the selection by handling the ChartRegionMouseDown and ChartRegionMouseUp events. The series is made to appear selected by turning on a symbol for all the points. When the Mouse is released outside the ChartArea, the series is removed. Currently the code checks the Description property of the ChartRegion to make this distinction. We will change this to be more robust by adding support for a ChartRegionType enum (that specifies clearly if the ChartRegion is the ChartControl). Thanks, Davis

Loader.
Live Chat Icon For mobile
Up arrow icon