Search code examples
ios-charts

Make barWidth fix in barchart


I am using Charts library. I want to keep chart max width fix. I didn't find any way to restrict to some width.

enter image description here


Solution

  • Finally, I am able to find the problem in my code. I was adding long value for X, which was creating the problem. I corrected the X value and everything is perfect :)

    BarChartDataEntry(x: Double(x_Value), y: Double(y_Value))