ChartsOrg / ChartsOrg/Charts

Grid lines labels disappearing when set to granularity iOS-charts

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

Description

I have incoming data of temperature. I round values of incoming temperature data to "%.1f" on Y axis, so if I get [21.734, 21, 737, 21.731], they are rounded to 21.7. And so the chart shows these repeated values. I try using:

```
chart.leftAxis.forceLabelsEnabled = true
chart.leftAxis.setLabelCount(3, force: true)
chart.leftAxis.granularityEnabled = true
chart.leftAxis.granularity = 1.0
```

If I remove a forced labels count, the grid lines will disappear the moment when data is received, and setting ```chart.leftAxis.drawGridLinesEnabled = true``` doesn't help.

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.