Highcharts: destroyExport on export module should check if extra button exists first

Created on 10 Sep 2015  ·  3Comments  ·  Source: highcharts/highcharts

Hi,

I'm currently using the export module to export my charts to png/pdf's external from the chart (by calling chart.exportChartLocal) . I have exporting:false on the chart itself.

When i call chart.destroy() the destroyExport() is eventually called (exporting.js line 715 on v4.1.8). I'm getting the error Cannot read property 'length' of undefined within this method because chart.exportSVGElements does not exist. To workaround, i'm manually setting this to an empty array, however this should probably be handled internally by checking it's existence before calling .length on it.

Not a bug

Most helpful comment

I guess this happens when setting exporting: false, while should be exporting: { enabled: false } (misconfigured options), example: http://jsfiddle.net/x75ft843/1/

All 3 comments

Can you help us reproduce that? Here's my try: http://jsfiddle.net/highcharts/x75ft843/

I guess this happens when setting exporting: false, while should be exporting: { enabled: false } (misconfigured options), example: http://jsfiddle.net/x75ft843/1/

whoops @pawelfus was right. I think i was reading old documentation on exporting: false because we've had that set for years now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

madreason picture madreason  ·  3Comments

jocage picture jocage  ·  3Comments

balupton picture balupton  ·  3Comments

vivekk123 picture vivekk123  ·  3Comments

deanshub picture deanshub  ·  3Comments