ChartsOrg / ChartsOrg/Charts

How adding vertical lines on X-axis with some intervals?

Open
#5,221 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?

I added those code when I init a BarChartView object.
```
chart.xAxis.drawGridLinesEnabled = true
chart.xAxis.gridColor = UIColor(EngageColors.textTertiaryBody)
chart.xAxis.gridLineWidth = 0.5
```
## What did you expect to happen?

I want add vertical lines on X-axis with intervals, like this:
Screenshot 2025-01-15 at 16 55 59

## What happened instead?

Now I get this:
Screenshot 2025-01-15 at 17 08 45
The vertical lines on X-axis is continuous.

## DGCharts Environment

**DGCharts version/Branch/Commit Number: 5.0.0 with SPM in Xcode
**Xcode version: 16.2
**Swift version: 6.0
**Platform(s) running DGCharts: iOS 18.2.1
**macOS version running Xcode: 15.1.1

Thank you!

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.