In NOV Chart for .NET hit testing is achieved by subscribing to one of the keyboard or mouse events exposed by the NChartElement class. This class is similar to the Input element class in NOV UI and for more information you can visit the Input Elements topic. The following code snippet shows how to implement an interactive pie chart:
C# |
Copy Code
|
---|---|
NChartView chartView = new NChartView(); // create a dock panel with label and chart // crete a docked label // create a new cartesian chart ... private NPieDataPoint CreateDataPoint(double value) { NPieDataPoint pieDataPoint = new NPieDataPoint(value); } void pieDataPoint_MouseDown(NMouseButtonEventArgs arg) { NPieDataPoint pieDataPoint = (NPieDataPoint)arg.TargetNode; } |