OnMouseUp()

View as Markdown

Definition

An event driven method is called any time the mouse pointer is over the chart control and a mouse button is being released.

Method Return Value

This method does not return a value.

For a combined single click operation, i.e. mouse down click, move and release the dataPoint reported will always be the initial starting one.

Syntax

You must override the method with the following syntax.

public override void OnMouseUp(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, ChartAnchor dataPoint)

Method Parameters

ParameterDescription
chartControlA ChartControl representing the x-axis
chartPanelA ChartPanel representing the the panel for the chart
chartScaleA ChartScale representing the y-axis
dataPointA ChartAnchor representing a point where the user is releasing the mouse

Examples

1public override void OnMouseUp(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, ChartAnchor dataPoint)
2{
3 //when the user releases the mouse, ensure the drawing state is set to normal
4 if (DrawingState == DrawingState.Editing || DrawingState == DrawingState.Moving)
5 DrawingState = DrawingState.Normal;
6}