-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
bugfix/improve-fix-toogling-inverted-packedbubble #20434
bugfix/improve-fix-toogling-inverted-packedbubble #20434
Conversation
File size comparisonSizes for compiled+gzipped (bold) and compiled files.
|
Visual test results - No difference found |
ts/Core/Series/Series.ts
Outdated
series.invertible = seriesTypes[newType].prototype.invertible; | ||
|
||
if (!series.invertible) { | ||
preserve.splice(preserve.indexOf('invertible'), 1); | ||
} | ||
|
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.
I don't quite get this. Now that you correctly moved the invertible
property to the prototype instead of the instance, I expected this to sort itself out. I expected that we could remove invertible
from the preserve
array, and every series regardless of update, remove or destroy would have the correct value of invertible
from its prototype....
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.
I've added this code for this kind of situation: https://jsfiddle.net/BlackLabel/ya9sjxLv/ Init load bar chart (inverted) and then update the series to the packedbubble and then update chart to inverted. If you remove those lines, then the invertible
in preserve
array will take over and the logic will be broken: https://jsfiddle.net/BlackLabel/06zjL4wo/
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.
And if we remove the invertible
from preserve
array, then the unit-tests/series-xrange/xrange
and unit-tests/chart/chart-update-chart-1
are failing.
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.
That's because invertible
was set on the instance of the Series class, while all others had it in the prototype. Moved it to the prototype and now it seems to pass without the hack: c67581a
Improved
series.invertible
logic due to failed tests in #20328.