monk
monk

Reputation: 163

How to display labels at vertical axis left (using Charts)?

How to set vertical axis labels on the left using Charts?
My coding here:

let labels = ["V1", "V2", "V3","V4","V5","V6","V7"]
barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: labels)
barChartView.xAxis.labelCount = 7

But the normal labels are showing at the right.
How can I move the labels to left?

Thanks!

Labels should move to left

Upvotes: 0

Views: 66

Answers (2)

Pramod Tapaniya
Pramod Tapaniya

Reputation: 1266

Horizontal Bar Chart

barChartView.xAxis.labelPosition = .bottom

Other Graph

barChartView.rightAxis.enabled = false 
barChartView.leftAxis.enabled = true

Upvotes: 1

monk
monk

Reputation: 163

I got the solution.

barChartView.xAxis.labelPosition = .bottom

It works OK.labels at left

Upvotes: 0

Related Questions