LineChart disappears when zoom on X axe
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
## What did you do?
I have a LineChartView to display temperatures over a day.
```
self.lineChartView.gridBackgroundColor = .white
self.lineChartView.borderLineWidth = 2
self.lineChartView.borderColor = .systemGray
self.lineChartView.chartDescription.text = ""
self.lineChartView.gridBackgroundColor = .clear
self.lineChartView.backgroundColor = .clear
self.lineChartView.pinchZoomEnabled = false
self.lineChartView.doubleTapToZoomEnabled = false
self.lineChartView.delegate = self
self.lineChartView.scaleYEnabled = false
self.lineChartView.scaleXEnabled = true
self.lineChartView.extraBottomOffset = 10
```

## What did you expect to happen?
Since I have a lot of values for a single day, and all single value is really important, I need to zoom over the X axe disabling zoom on Y axe.
## What happened instead?
The problem is that the line disappears when I zoom-in. If I set y-zoom to true the line remains on screen, but If I set it to false, when zooming it disappears.


## Charts Environment
**Charts version: 4.1.0**
**Xcode version: 14.2**
**Swift version: 5**
**Platform(s) running Charts: macOS**
**macOS version running Xcode: Ventura 13.0**
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported LineChartView configuration in Charts 4.1.0 with scaleXEnabled true and scaleYEnabled false, using the temperature data described in the issue. Trace the X-only zoom path and verify that the line remains visible after zooming; done means horizontal zoom works without requiring Y-axis zoom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100