ChartDirector 5.1 (.NET Edition)

WebChartViewer.syncDateAxisWithViewPort


Usage

[VB] Public Sub syncDateAxisWithViewPort(id As String, axis As Axis)
[C#] public void syncDateAxisWithViewPort(string id, Axis axis);

Description

Synchronizes a date/time Axis with the part of the data scale in view port.

If the data scale has already been defined (see WebChartViewer.setFullRange on how to define a data scale), this method will compute the visible data scale based on the view port coordinates using date/time interpolation, and then sets the axis to that date/time scale.

If the data scale has not been defined, this method will define the data scale based on the axis scale and the the view port coordinates using date/time extrapolation. Because the axis scale may not be known at the time of calling this method (the axis could be auto-scaled by ChartDirector, which may not occur until the chart is rendered), the definition of the data scale will not occur immediately, but will be pending until the chart is to be displayed.

If your charting code calls this method but never defines the full data scale or the view port coordinates (in which case the view port defaults to showing the complete data scale), then the first time the code is executed, the data scale will be defined to be equal to the axis scale. Subsequently, when the user zooms into the chart (which means the view port coordinates are changed), the same charting code will set up the axis scale to the range that the user has zoomed to.

Arguments

ArgumentDefaultDescription
id(Mandatory)The name of the data scale.
axis(Mandatory)The Axis object to synchronize with.

Return Value

None