-
Notifications
You must be signed in to change notification settings - Fork 3.6k
-
Notifications
You must be signed in to change notification settings - Fork 3.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
When creating the chart for the second time, patterns don't appear (pattern-fill.js 7.1.3+) #12053
Comments
@oysteinmoseng Can you explain the change you did with the chart index? Is this a bug? |
Ah, well this is a scenario we didn't anticipate. The issue was that we got pushback from customers on having duplicate IDs on a page, so the chart index is added to the IDs for the default patterns. We kept the original IDs for the first chart in order to preserve backwards compatibility. And as a quirk, it is perfectly possible to refer to patterns in previous charts, meaning the original IDs will work for all charts. Unless of course you destroy that chart, which is what is happening here. We might have to introduce an adapter layer between the IDs referenced and the actual IDs in order to solve this properly. That way we could have a mapping between unique IDs and the way to reference them in options. |
Any movement on this issue? This happens for me when using the fill in a treemap built in React. When i change the data of the treemap and rerender the component, the treemap is created/rendered without the fill. |
@MagneH Will look at this in depth this week and see if we can add a fix |
Sounds good! :D |
@MagneH A quick head's up that it looks like our fix will break backwards compatibility for default patterns: #12577 (comment) |
When the chart is created for the first time, everything works fine.
Actual behaviour
Since 7.1.3, when we create the chart again, pattern fill is not applied.
Live demo with steps to reproduce
https://jsfiddle.net/BlackLabel/mq4Ltkvd
Product version
Highcharts 7.1.3+
Works fine in 7.1.2
The text was updated successfully, but these errors were encountered: