ChartDirector 7.1 (.NET Edition)

WinChartViewer.setPlotAreaMouseMargin2


Usage

[C#]public void setPlotAreaMouseMargin2(int leftMargin, int rightMargin, int topMargin, int bottomMargin);
[VB]Public Sub setPlotAreaMouseMargin2(leftMargin As Integer, rightMargin As Integer, topMargin As Integer, bottomMargin As Integer)

Description

Sets the margins of the plot area mouse event region.

Plot area events are often used for implementing track cursors. For example, a track line can be drawn that follows the mouse cursor when the mouse cursor is moving on the plot area. For these usages, it is important to be able to put the mouse cursor at the edge of the plot area, because the latest data points are usually plotted at the edge.

In practice, it is difficult to put the mouse cursor exactly on the edge, as it is hard to move the mouse cursor precisely. To address this issue, ChartDirector supports extending the plot area event region by a configuration margin. A mouse cursor on that extended region will be treated as if it is on the nearest edge of the plot area for the purpose of trigger plot area events.

By default, the left, right, top and bottom margins of the plot area event region are 5 pixels.

Arguments

ArgumentDefaultDescription
leftMargin(Mandatory)The left margin in pixels.
rightMargin(Mandatory)The right margin in pixels.
topMargin(Mandatory)The top margin in pixels.
bottomMargin(Mandatory)The bottom margin in pixels.

Return Value

None