Skip to content

iameetshah/HorizontalBarChartDemo

Repository files navigation

Horizontal Bar Chart with X-Axis Custom Renderer

Chart Library Used :- https://github.com/danielgindi/Charts

Actual Result

horizontalBarChart horizontalBarChart

Expected Result

horizontalBarChart horizontalBarChart

Default : Right Alignment

For Left Aligment :-

     let maxWidth:CGFloat = 96// Update as per your needs
     let actualSize = label.size(withAttributes: [.font: xAxis.labelFont]
     let newPositionX = pos - (maxWidth - actualSize.width)

For Center Alignment :- label.padding(toLength: 16, withPad: " ", startingAt: 0)// Update from 16 as per your needs

Link:-https://iameetshah.github.io/jekyll/2021/11/29/horizontalChart.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published