Chart line is jagged with dense, nearly-flat data
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using this library to chart dense, nearly-flat data. The y-value of the data is not exactly the same every time, but is very close. When the data gets very dense, strange jagged spikes appear on the graph. What's stranger is that these spikes go away when I increase the height of the graph.
I've pushed a branch which changes the ChartDemo to demonstrate this bug: https://github.com/junelife/Charts/commit/e56cd589209986758218b095483884d8f7d11e7f
Here are screenshots. The first shows the bug, the second has identical data and configuration, but the chartView is twice as tall and the bug doesn't manifest.


Contributor guide
Research direction
Inspect the linked commit e56cd589209986758218b095483884d8f7d11e7f and run its ChartDemo changes with the dense, nearly-flat data. Compare the chart at the two reported heights and trace the rendering path responsible for the jagged spikes. Done means the same data renders without height-dependent spikes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- data-visualization, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100