ChartsOrg / ChartsOrg/Charts

Word wrap can't see bottom label xAxis

Open
#3,734 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hi, I've enabled wordWrap in my xAxis and it seems not to word-wrap at all. Here is my xAxis code:

`let xAxis = chartView.xAxis
xAxis.labelPosition = .bottom
xAxis.granularity = 1
xAxis.labelCount = 4
let xAxisLabel = ["< 75", "75 >= <100", "100 >= <125", "125 >= <137.5", ">= 137.5"]
let xFormatter = CustomXAxisLabelValueFormatter()
xFormatter.Xlabels = xAxisLabel
xAxis.valueFormatter = xFormatter
xAxis.labelFont = AIAMetrics.barChartTitleFont
xAxis.wordWrapEnabled = true
xAxis.wordWrapWidthPercent = 2.0
xAxis.granularityEnabled = true
xAxis.drawGridLinesEnabled = false`

And the result I get is:

screen shot 2018-11-07 at 5 14 03 pm

If I reduce the wordWrapWidthPercent to 1.0, it becomes like this:

screen shot 2018-11-07 at 5 19 37 pm

So how I can achieve word wrap? seems like its cut off and I can't see the bottom

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.