简体   繁体   中英

iOS-charts bar chart with negative values

I am using the great iOS-charts pod for doing my graphics. Now I have to display a bar chart with y-value in a range from -120 to 0. When I add those values, I get the bars displays from the top - 0 - to the bottom. What I am looking for is a way to let the bar be drawn from the bottom of the chart up to it's value, because 0 means a lot for the application while -120 means nothing. So I would like to get a big bar for 0 and nothing for -120 like this.

0

 X
 X        X
 X   X    X

-120 x XX

Any idea how I can achieve this behavior?

Thanks a lot Andy

You need to set logical values for the correct visibility - and the use a formatter for showing the values as negative values.

In Charts 3.0 it is easier to format the values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM