Chart.valueToPixel Method

Converts an axis value to a position along the axis used to plot it.
 

Parameters

axis

Type: ChartAxis
The axis the value is plotted against.
value

Type: Object
The value plotted by the axis. This may need to be converted from the original data source value using dundas.controls.ChartAxis.dataValueToValue. This can also be Number.NEGATIVE_INFINITY to represent the beginning of the axis or Number.POSITIVE_INFINITY to represent the end of the axis.
series

Type: ChartSeries
(optional) The series displaying the value on an X axis where data point series are offset from the values into clusters, as with clustered bar charts.
Optional: True
groupingIndex

Type: Number (Integer)
(optional) The zero-based index of the grouping of points within series, if any.
Optional: True

Return Value


Type: Object - May be null
A plain object with properties:
     axisPosition    [type: Number]      - The position of the value along the axis relative to the axis between zero and one.
     isVisible       [type: Boolean]     - A value indicating whether the value is visible on the axis.
     position        [type: Number]      - The plotting position along the axis relative to the top-left corner of the chart for rectangular charts, or the center for circular charts. This is an angle if axis is angular.
 
 

Remarks

If the chart is about to draw, Chart.draw can be called to ensure the returned positions correspond with the next positions of the chart elements.