Customize the chart in the android version


#1

I would like to know if it is possible to customize the nativescript-pro-ui chart, I want to remove the zeros after the comma where it is marked in red.

I know that this is the standard customization for android but I wanted to know if it is possible to customize to let ios equal that does not show the zeros after the comma.


#2

I’m not sure how you’re getting your data for the axis, but instead of formatting your axis, you could convert your data to an integer rather than a float.


#3

I was able to solve the problem using this solution:

To remove the zeros we can apply the labelFormat property as follows:

<chart: BarSeries.verticalAxis>
<chart: LinearAxis labelFormat = “%. 0f” />
</chart:BarSeries.verticalAxis>

An example of the chart in android and ios: http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/Chart/Series/bar?_ga=2.48852262.1865789645.1517398443-694269629.1511302896#example


#4