iOS-Charts Float to Integer YAxis

后端 未结 5 625
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 04:38

I\'m building a chart using iOS-charts \"IOS

I\'m trying to convert the floats into int, but iOS-charts

5条回答
  •  攒了一身酷
    2020-12-19 05:04

    For Swift 3.0 and Charts 3.0 you need to enable and set granularity for the axis.

    Example:

    barChart.leftAxis.granularityEnabled = true
    barChart.leftAxis.granularity = 1.0
    

提交回复
热议问题