🤖 Create a chatbot for your NativeScript app! Learn more at our upcoming webinar.

NativeScript Angular

RadChart Negative Values

By default the LinearAxis supports the use of negative values. You can set the minimum minimum and/or the maximum to negative values

Example

<RadCartesianChart tkExampleTitle tkToggleNavButton>
    <LinearAxis tkCartesianVerticalAxis allowZoom="true" minimum="-50" maximum="50"></LinearAxis>
    <CategoricalAxis tkCartesianHorizontalAxis allowZoom="true"></CategoricalAxis>

    <SplineAreaSeries tkCartesianSeries [items]="negativeValues" categoryProperty="Period" valueProperty="Amount"></SplineAreaSeries>
</RadCartesianChart>

This is how the chart will look like with negative values on the Y axis:

Cartesian chart: Negative Values Cartesian chart: Negative Values