Skip to content

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

Open
@kami-kgu

Description

@kami-kgu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions