According example image I want to create my chart like that. My data entries have both positive and negative values, I want to set 0 in the middle of y-axis everytime.
Is impossible to do that? Ps. I use Charts library with swift version 5.
According example image I want to create my chart like that. My data entries have both positive and negative values, I want to set 0 in the middle of y-axis everytime.
Is impossible to do that? Ps. I use Charts library with swift version 5.
Calculate the biggest number on the Y-axis in the chart's dataSet.
let maxValue = max(dataSet)
chart.setChartMinMaxYValues(chartYMin: -(maxValue), chartYMax: maxValue)