ChartDirector 7.1 (.NET Edition)

RazorChartViewer.MouseUsage


Declaration

[C#]public WebChartMouseUsage MouseUsage {get; set;};
[VB]Public Property MouseUsage As WebChartMouseUsage

Description

Gets or sets the mouse usage mode.

Note: This property is applicable only if the browser side JsChartViewer is included in the web page.

The following table describes the supported mouse usage modes and the mouse behaviour in each mode.

ConstantValueDescription
WebChartMouseUsage.Default0This represents the default mouse behaviour, which is to support tool tips and hot spot events as defined by the image map.

See RazorChartViewer.ImageMap on how to define an image map for a chart.
WebChartMouseUsage.Scroll2The mouse is used for drag scrolling the chart.

When the mouse drags on the plot area, the mouse cursor will change to a scroll cursor, and a selection rectangle representing the shifted plot area will be displayed to reflect the amount dragged. When the mouse is released, the viewport coordinates will be updated to reflect the amount dragged, and a JsChartViewer.ViewPortChanged event will be fired.

If the mouse is not dragging inside the plot area, its behaviour is the same as the default mouse behaviour.
WebChartMouseUsage.ZoomIn3The mouse is used for zoom in actions.

When the mouse is inside the plot area, the following behaviour will apply:

  • The mouse cursor will change to a zoom in cursor (a magnifying glass cursor with a '+' sign inside).

  • When the mouse drags on the plot area, a selection rectangle will be visible. When the mouse button is subsequently released, the viewport coordinates will be updated to reflect the selection rectangle, and a JsChartViewer.ViewPortChanged event will be fired.

  • When the mouse clicks on the plot area without dragging, the viewport will be updated to reflect zooming into the clicked point by a ratio specified in RazorChartViewer.ZoomInRatio, and a JsChartViewer.ViewPortChanged event will be fired.
If the mouse is not inside the plot area, its behaviour is the same as the default mouse behaviour.
WebChartMouseUsage.ZoomOut4The mouse is used for zoom out actions.

When the mouse is inside the plot area, the following behaviour will apply:

  • The mouse cursor will change to a zoom out cursor (a magnifying glass cursor with a '-' sign inside).

  • When the mouse clicks on the plot area , the viewport will be updated to reflect zooming out from the clicked point by a ratio specified in RazorChartViewer.ZoomOutRatio, and a JsChartViewer.ViewPortChanged event will be fired.
If the mouse is not inside the plot area, its behaviour is the same as the default mouse behaviour.

Note: It is known that mouse cursors for scrolling and zooming work on IE 6.0 or above, and FireFox. Due to the different capabilities of the various browsers, the mouse cursors may or may not appear in other browsers.