-
-
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
Candlestick Chart Issue with Version 4.0.2 (Pod was updated from 3.6.0) #4792
Comments
I have the same situation with a multiple-set line chart. Debugging shows multiple datasets in the LineChartData object, but only the first will be displayed. There was some sort of breaking change that's not apparent to me in the 4.x update. The demo version of the multiple line charts still works correctly, but it's the same example code I used in my original implementation. |
@Spencer-Villarreal, use the fix that's in this PR: #4687 I realized that I'd manually fixed this back in the 3.x days and pulling the new 4.0.2 on a new machine doesn't my manual change. |
Same issue. When will we see a fix for this? |
Here's the issue and (not thoroughly tested) fix. Sorry, I'm not a Swift guy, so I'm not comfortable pulling/posting this fix... The drawDataset method in CandleStickRenderer.swift sets the min, max and range values for _xBounds
The XBounds setter is found in BarLineScatterCandleBubbleRenderer.swift. The entryTo value is what's not getting set correctly.
This method calls the entryIndex method in ChartDataSet.swift that tries to find the closest X value.
The problem is that it's greater than the number of dataset elements, so it returns -1.
Again, sorry for my lack of Swift experience. I'm sure there's a more elegant solution to this. I think I'm the last Objective-C holdout... |
I run 'pod update' about every single day just to make sure I am up-to-date on the latest releases. Today the Charts pod got updated from version 3.6.0 to 4.0.2 and now my candlestick chart is unusable.
When I was using the 3.6.0 version I followed the swift demo to get everything set up, but once I updated to 4.0.2 the whole chart does not show data correctly anymore. As of right now, only one candlestick is showing on the far left side and no other candles are shown on the screen. I cannot tell if all of the candles are being rendered on the far left side or if only one candle is being shown.
There are 19 chart values but only 1 value is being shown on the far left side. I set the x-axis to be the same amount of chart values + 2 for some spacing.
I have downgraded back to 3.6.0 and it goes back to normal/works completely fine. Does anyone know what could possibly be happening from the update?
If it is possible could you create a new candlestick chart demo for the new 4.0.0 update?
The text was updated successfully, but these errors were encountered: