ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading from 3.5.0 to 4.0.2 breaks highlighting

Ludotrico opened this issue · comments

I am using a super simple Bar Chart.

Highlighting works fine in 3.5.0 but is definitely broken in 4.0.2. By broken I mean it doesn't highlight on tap and barely highlights on drag.

Same for me, even broken in sample app, maybe related to these:
#4795
#4804
Downgraded to 3.6.0 for the time being

@kallik @Ludotrico This has been reported as #4719 and there is a fix PR pending merge. If you could test this branch that would be wonderful.

@kcome It works ok. The issue is that your branch have lost the ability to unhighlight!

@Ludotrico Thanks for your feedback. I've found the reason of unable to unhighlight. The fix is pushed to this branch already. Could you have a try?

@danielgindi @pmairoldi @liuxuan30 @jjatie please review the branch fix from @kcome

When will this “4719-highlighter-fix” branch be released

@danielgindi, @pmairoldi, @liuxuan30:
It would be very welcomed if this PR 4719 - Highlighter Fix could be given priority and merged into the release as soon as possible. The line chart interaction/highlighting functionality is integral to our app, like many others, and has been broken since updating to 4.0.2 and downgrading back to 3.6.0 is really no longer an option for many.

@kcome This solution doesn't work well with stackbar, Please check the attached gif

Simulator Screen Recording - iPhone 13 - 2022-04-11 at 12 45 55
r

@dimohamdy Thanks for your feedback. I found the issue and fixed it in a new commit in that PR. Could you please try the fix branch and let me know the result?

Think I have a proper fix open for this #4817
#4719 (comment)

@dimohamdy I would be a bit weary to change the stacked bar, if by doesn't work well with stacked bar do you mean highlighting the entire bar? If so there are a few lines of code that actually implement this behavior specifically https://github.com/danielgindi/Charts/blob/e91ba716190836b013ef8a9ca53e220ad5051e21/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift#L241-L264 but at the least if we merge something then we can having a working selection. Think someone was mentioning in issues to create a way to highlight the whole bar, makes me think it should be a part of the api or just an override