ChartDirector 5.1 (.NET Edition)

WebChartViewer


The WebChartViewer control is a Web Forms control for viewing charts and for handling advanced chart user interactions. It is a subclass of the ASP.NET Image control.

WebChartViewer Features

The WebChartViewer control enhances the Image control in the following ways:

Special Considerations for Creating WebChartViewer Dynamically

Normally, controls are specified at design time by using ASP.NET tags, or by dragging and dropping the controls onto the Web Form in Visual Studio.

However, some applications may create controls dynamically on the fly during runtime (eg. during the Page Load event of the Web Form). In this case, the controls may not see the "Page Init" event, as they are created after the event. The WebChartViewer requires seeing this event for certain functions. If you are creating WebChartViewer controls dynamically, please refer to WebChartViewer.OnPageInit on how to properly initialize the WebChartViewer controls.

WebChartViewer Output Methods

In addition to sending chart images directly from memory to the browser, the WebChartViewer also supports storing the chart images as image files first, and sending the links to those files to the browser. Please refer to Output Methods for WebChartViewer for additional information.

WebChartViewer Members

The followings list out the members that are specific to the WebChartViewer control. Members inherited from the Image control are omitted. Please refer to Microsoft .NET documentation for members of the Image control.

Properties
NameDescription
ImageRepresent the chart image to be viewed.
ImageMapGets or sets the image map associated with the chart.
ChartModelGets or sets the Javascript Chart Model of the chart for the purpose of support track cursors.
ChartMetricsGets or sets the chart metrics of the chart.
ChartSizeModeDetermine the sizing method of the WebChartViewer control.
ImageSessionIdThe session variable name used to temporarily store the chart image.
ViewPortLeftGets or sets the position of the left side of the view port.
ViewPortTopGets or sets the position of the top side of the view port.
ViewPortWidthGets or sets the width of the view port.
ViewPortHeightGets or sets the height of the view port.
MouseUsageGets or sets the mouse usage mode.
ZoomDirectionGets or sets the zoom direction for mouse zoom in/out actions.
ScrollDirectionGets or sets the scroll direction for mouse scroll actions.
ZoomInRatioGets or sets the magnification ratio for each zoom in click of the mouse.
ZoomOutRatioGets or sets the magnification ratio for each zoom out click of the mouse.
ZoomInWidthLimitGets or sets the view port width at maximum zoom in.
ZoomOutWidthLimitGets or sets the view port width at maximum zoom out.
ZoomInHeightLimitGets or sets the view port height at maximum zoom in.
ZoomOutHeightLimitGets or sets the view port height at maximum zoom out.
MinimumDragGets or sets the minimum mouse drag distance before it is considered as an intentional drag.
SelectionBorderWidthGets or sets the border width of the zoom selection box.
SelectionBorderColorGets or sets the border color of the zoom selection box as an HTML color.
ZoomInCursorGets or sets the mouse cursor to be used when the mouse is used for zoom in.
ZoomOutCursorGets or sets the mouse cursor to be used when the mouse is used for zoom out.
NoZoomCursorGets or sets the mouse cursor to be used when the mouse is used for zoom in/out, but the zoom in/out limits has been reached.
ScrollCursorGets or sets the mouse cursor to be used when the mouse is used for scrolling.
Note: Properties inherited from System.Web.UI.WebControls.Image are omitted.

Methods
NameDescription
OnPageInitConnects the WebChartViewer system to the Web Form to support dynamically created WebChartViewer controls.
GetPostBackURLCreates a special URL to represent post back operation for use in image maps.
MakeDelayedMapCreates a delayed image map suitable for use in JsChartViewer.
IsPartialUpdateRequestChecks if the current HTTP Request is a partial update request (AJAX request) sent using JsChartViewer.partialUpdate.
IsStreamRequestChecks if the current HTTP request is a stream update request sent using JsChartViewer.streamUpdate.
IsViewPortChangedEventChecks if the JsChartViewer.ViewPortChanged event has occurred.
GetSenderClientIdGets the id of the JsChartViewer that sends the current HTTP request.
LoadViewerStateLoads the state of the JsChartViewer into the WebChartViewer in partial chart updates (AJAX chart updates).
PartialUpdateChartSends the response to a partial chart update request.
StreamChartSends the chart image out as a MIME stream of image type.
SetCustomAttrSets a custom attribute.
GetCustomAttrGets a custom attribute.
setFullRangeDefines the full range of a view port data scale.
getValueAtViewPortConverts a view port coordinate to a value of the specified data scale.
getViewPortAtValueConverts a value of the specified data scale to a view port coordinate.
syncLinearAxisWithViewPortSynchronizes a linear Axis with the part of the data scale in view port.
syncLogAxisWithViewPortSynchronizes a logarithmic Axis with the part of the data scale in view port.
syncDateAxisWithViewPortSynchronizes a date/time Axis with the part of the data scale in view port.
Note: Methods inherited from System.Web.UI.WebControls.Image are omitted.

Events
NameDescription
ClickHotSpotThis event occurs when the mouse is clicked on a hot spot of the chart image.
ViewPortChangedThis event occurs when the view port is changed by mouse actions in the browser side Javascript ChartViewer (JsChartViewer).
Note: Events inherited from System.Web.UI.WebControls.Image are omitted.