ChartsOrg / ChartsOrg/Charts

setting xAxis.granularity to 1 doesn't seem to work

Open
#4,483 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

## What did you do?

trying to get xAxis.granularity = 1 doesn't seem to work
```
barChartView.xAxis.valueFormatter = IndexAxisValueFormatter(values: ["A","B","C","D","E","F","G","H","I","J","K","L"])
barChartView.xAxis.granularityEnabled = true
barChartView.xAxis.granularity = 1
```

## What did you expect to happen?
expected the label to appear under every bar in the Barchart

## What happened instead?
the label appears under every other Bar in the chart ("A", "C", "E"...)
setting granularity to 2 or above works as expected
photos of this behaviour are in my SO question [https://stackoverflow.com/questions/64055920/simple-xaxis-granularity-setting-in-ios-charts-framework](url) which unfortunately didn't get any follow-ups
## Charts Environment

**Charts version/Branch/Commit Number:** 3.5.0
**Xcode version:** 12.0.1
**Swift version:** 5.3
**Platform(s) running Charts:** iOS 14
**macOS version running Xcode:** 10.15.7

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.