ChartDirector 5.1 (PHP Edition)

WebChartViewer.syncLogAxisWithViewPort


Usage

syncLogAxisWithViewPort(id, axis)

Description

Synchronizes a logarithmic 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 logarithmic interpolation, and then sets the axis to that logarithmic 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 logarithmic 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