This sample shows a logarithmic axis in a chart with data about the sales of a product between 1995 and 2005.
Logarithmic axis uses logarithmic scale and it is very useful in visualizing when the data has values with both lower order of magnitude (eg: 10^-6) and higher order of magnitude (eg: 10^6).
To render Logarithmic axis, set valueType
in axis to Logarithmic.
Tooltips
are enabled in this example. To see a tooltip in action, hover over or tap on the chart.
Injecting Module
Chart component features are segregated into individual feature-wise modules. To use Logarithmic axis, we need to inject
Logarithmic
module using servives
.
More information on the Logarithmic axis can be found in this documentation section.