Skip to content
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

chart-update-moving-bar-incorrectly #17438

Closed
joelsherriff opened this issue Jun 24, 2022 · 2 comments · Fixed by #17461
Closed

chart-update-moving-bar-incorrectly #17438

joelsherriff opened this issue Jun 24, 2022 · 2 comments · Fixed by #17461

Comments

@joelsherriff
Copy link

joelsherriff commented Jun 24, 2022

Expected behaviour

using chart.update() with similar, but not Exactly the same, values, the changed value (bar) is updated in it's correct place.

More detail and a workaround at https://stackoverflow.com/questions/72736226/chart-update-moving-bar-incorrectly, but the jsfiddle demonstrates the issue.

Actual behaviour

Value (bar) is re-ordered and layered on top of the first identical value in the series.

Live demo with steps to reproduce

https://jsfiddle.net/wxpe6v2r/28/

Product version

9.3.3, but reproduced in 10.0

Affected browser(s)

Chrome

@raf18seb
Copy link
Contributor

Hi @joelsherriff, thank you for reporting the issue.

Simplified demo: https://jsfiddle.net/BlackLabel/zqv96n5w/

Internal note:
Looks like a regression after 8919d73
It will be hard to find the cause because the above commit is huge.

Worked fine in 8.0.0, broken since 8.0.1.

Workaround: update your series' data values without updating xAxis.type: 'category' (the xAxis is already category type): https://jsfiddle.net/BlackLabel/245wjme3/

@karolkolodziej
Copy link
Contributor

The 8919d73 introduced to Point object:

public name: string = void 0 as any;

and now the fist condition in the if statement is allways giving true while not allways it should do that.

        if (
            'name' in point &&
            typeof x === 'undefined' &&
            series.xAxis &&
            series.xAxis.hasNames
        ) {
            point.x = series.xAxis.nameToX(point);
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants