-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix not displaying all lines in graph #4687
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me, and I need it too. It may be clearer to write:
let low = Swift.max(chart.lowestVisibleX, dataSet.xMin)
let high = Swift.min(chart.highestVisibleX, dataSet.xMax)
…r a X position. Solution found at ChartsOrg#4687
Please merge this, it works and the bug breaks our product 🥲 |
@danielgindi Please merge this 🙏 we can't update to the latest version as it breaks our line charts |
@danielgindi Here's my workaround:
|
Hi, is it possible to merge this in? I am also stuck at version 3 because of charts with multiple LineChartDataSets aren't working. |
Github discussion: ChartsOrg#4687 (review)
Making sure that lowerBound is <= upperBound Github discussion: ChartsOrg#4687 (review)
Issue Link 🔗
#4662
Goals ⚽
When multiple lines with different xMin and xMax values are present and the view port includes all lines then all of the lines should be drawn.
Implementation Details 🚧
Calculating Xbounds for the "shorter" line fails, due to not finding a valid index for highestVisibleX or lowestVisibleX.
Modifying the low and high marks for .entryForXValue() solves the issue.
Testing Details 🔍
Observing to display lines that
a) have a higher xMin value than the lowestVisibleXValue
b) have a lower xMax value than the highestVisbleXValue