Hide Negative Values in Chart Y Axis Swift

150 Views Asked by At

I am using library https://github.com/danielgindi/Charts for displaying data fetched from server.

Now everything is working as expected but when there is zero values coming from server I get negative values on Y-Axis (PS image)

enter image description here but i could not get it done.

Can you please guide me how to remove negative values from Y-Axis.

I did try to Link1 Link2

1

There are 1 best solutions below

0
berbaspin On

The easiest way to hide negative values is to add the minimum value for Y axis.

chartOutlet.leftAxis.axisMinimum = 0