ChartDirector 5.1 (.NET Edition)

JsChartViewer.setPlotAreaMouseMargin2


Usage

setPlotAreaMouseMargin2(leftMargin, rightMargin, topMargin, bottomMargin)

Description

Sets the margins of the plot area mouse event region.

Plot area mouse 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 mouse 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 mouse events.

By default, the left, right, top and bottom margins of the plot area mouse 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