ChartDirector 7.1 (.NET Edition)

RazorChartViewer


RazorChartViewer is a component for viewing charts and for handling chart user interactions in ASP.NET web pages. It is primarily intended to be used for ASP.NET MVC and ASP.NET Core applications with Razor as the view engine.

RazorChartViewer works with the JsChartViewer Javascript control on the browser side to support advanced chart user interactions, such as programming track cursors, zooming and scrolling and AJAX chart updates. It provides chart information needed by the JsChartViewer, and handles the AJAX chart update requests and responses between the server and the browser.

Properties
NameDescription
IDGets or sets the ID of the RazorChartViewer.
ImageRepresent the chart image to be viewed.
ImageUrlGets or sets the URL used by the <IMG> tag to load the chart image.
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.
ContentDispositionThe suggested filename to use when user saves the chart image as a file on the browser side.
ImageSessionIdThe name of the session variable to temporarily store the chart image.
ViewPortLeftGets or sets the position of the left side of the viewport.
ViewPortTopGets or sets the position of the top side of the viewport.
ViewPortWidthGets or sets the width of the viewport.
ViewPortHeightGets or sets the height of the viewport.
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 viewport width at maximum zoom in.
ZoomOutWidthLimitGets or sets the viewport width at maximum zoom out.
ZoomInHeightLimitGets or sets the viewport height at maximum zoom in.
ZoomOutHeightLimitGets or sets the viewport height at maximum zoom out.
MinimumDragGets or sets the minimum mouse drag distance before it is considered as an intentional drag.

Methods
NameDescription
RazorChartViewerCreates a new RazorChartViewer object.
RenderHTMLGenerates the HTML tags to represent the chart.
PartialUpdateChartSends the response to a partial chart update request.
StreamChartReturns the chart image as an array of bytes.
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.
IsAttachmentRequestChecks if the current partial update request (AJAX request) is an attachment request sent using JsChartViewer.partialUpdateAsAttachment.
GetSenderClientIdGets the id of the JsChartViewer that sends the current HTTP request.
SetCustomAttrSets a custom attribute.
GetCustomAttrGets a custom attribute.
setFullRangeDefines the full range of a viewport data scale.
getValueAtViewPortConverts a viewport coordinate to a value of the specified data scale.
getViewPortAtValueConverts a value of the specified data scale to a viewport coordinate.
syncLinearAxisWithViewPortSynchronizes a linear Axis with the part of the data scale in viewport.
syncLogAxisWithViewPortSynchronizes a logarithmic Axis with the part of the data scale in viewport.
syncDateAxisWithViewPortSynchronizes a date/time Axis with the part of the data scale in viewport.