NativeScript Core

Chart LogarithmicAxis

If you followed the getting started article, you now know how to create a chart and add it to a NativeScript page. In this article, you will learn more about the logarithmic axis and how to use it in your chart.

Getting Started

RadCartesianChart needs an axis that can represent the values of the data points. The LogarithmicAxis is used to display values that cover several orders of magnitude in a more manageable way. This is a special NumericalAxis that transforms the actual values of the data points using logarithm function with a specific base. For example if the base of the logarithm is 10, then the axis will be scaled to show equally spaced powers of 10. The Richter scale and the Decibel scale are examples of logarithmic scale.

Properties

You can easily modify the base of the logarithmic function used to calculate the value by using the logarithmBase property. You can also specify the exponent step between the axis ticks with the exponentStep property.

References

Want to see this scenario in action? Check our SDK Examples repository on GitHub. You will find this and many other practical examples with NativeScript UI.

Related articles you might find useful: