log2lin(value: Number);
value. Logarithmic value of the chart axis.
The log2lin method converts log value of the chart axis to linear value.
The method returns value of the Number type.
Executing the example requires that the HTML page contains the Chart component named chart (see Example of Creating a Scatter Chart). Determine linear and logarithmic values corresponding to the chart axis coordinate equal to 100:
// Get Y axis on the chart var yAxis = chart.getYAxis(); // Get axis value corresponding to the coordinate 100 var coord = 100; var axisValue = yAxis.getAxisValue(coord, true); console.log("Coordinate %s on the chart axis corresponds to the following values: ", coord); var logValue = yAxis.lin2log(axisValue); console.log("- on the logarithmic axis: %s,", logValue); var linValue = yAxis.log2lin(logValue); console.log("- on the linear axis: %s", linValue);
After executing the example the browser console shows linear and log values corresponding to the coordinate 100:
Coordinate 100 on the chart axis corresponds to the following values:
- on the logarithmic axis: 1.3774404986134837e+49,
- on the linear axis: 49.139072847682115
See also: