highcharts / pattern-fill

MIT License
20 stars 23 forks source link

Pattern disappears after exporting. #19

Open sebastianbochan opened 8 years ago

sebastianbochan commented 8 years ago

Steps to reproduce: 1) http://jsfiddle.net/2tsdnr8o/ 2) Export to png 3) resize chart 4) bars disappears

The issue is only in the Chrome (current version 48.0.2564.103)

tbcshifter commented 7 years ago

I just encountered this issue in a slightly different scenario. Only appears in Chrome on both Mac and PC.

It occurs when swapping tabs. Interestingly, the chart itself isn't being hidden or shown, but completely outside of the tab. But the patterns on the bars disappear nonetheless. It occurs no matter where the chart is displayed on the page. If I use a solid color instead of a pattern, the bars stay visible.

This issue is 10 months old. Is there any progress towards a fix?

TorsteinHonsi commented 7 years ago

The problem is that for each chart, all the pattern definitions are added again, with the same id. So when a chart is generated for export in the background, the internal url pointers point to the other chart, which is then removed. We have resolved this for tooltip shadows etc by adding a unique page and chart identifier. The downside is that it would break the current configuration of simple url statements. Alternatively we could post-process the id's, but we lose the possibility to set it in CSS.

tbcshifter commented 7 years ago

Thank you for the reply. Knowing the issue has enabled me to come up with a workaround for my situation. I have multiple charts on the page and dynamically loading a new chart was wiping out the patterns on the other charts. I simply will use different IDs for the patterns on each chart.

baljeetkalsi commented 6 years ago

I have same issue

I created a demo for problem. You can have look at Link: https://jsfiddle.net/Rickysingh2000/xa8weufd/

Github LINK : https://github.com/highcharts/highcharts/issues/8391

Issue is with export . If I try to get JPEG , PNG or PDF export file the pattern is not coming in export file.