-1

There is the possibility of rotating the texts that are in the upper part of the graphical bars I am using Charts3.2.2 of CocoaPods. Attached image

enter image description here

Dharmesh Kheni
  • 71,228
  • 33
  • 160
  • 165

1 Answers1

1

if you are using label for that then you can do this

In 90 degree:

youLabelName.transform = CGAffineTransform(rotationAngle:CGFloat.pi/2)

In 180 degree:

youLabelName.transform = CGAffineTransform(rotationAngle:CGFloat.pi)

you can add - sign infront of cgfloat (-cgfloat.pi/2) or (-cgfloat.pi)

this may be the solution for your problem.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Lokesh
  • 9
  • 1
  • I do not use labels, I use CHARTS properties or there is another way to do it. I sent you the code that I use -----> let chartDataSet = BarChartDataSet(values: dataEntries, label: "Ingresos") chartDataSet.valueFormatter = formtValor() -------------> final class formtValor: IValueFormatter{ func stringForValue(_ value: Double, entry: ChartDataEntry, dataSetIndex: Int, viewPortHandler: ViewPortHandler?) -> String { let intVal = String(format: "%.2f", value) return "$\(intVal)" } } – WILLIAM MOROCHO Mar 16 '19 at 14:46