gon250
Posts: 1
Joined: Mon Nov 23, 2015 9:31 am

Chart download error!

Some users report when they try to export (png, jpg..) a chart they get the following error:

413 Request Entity Too Large

i.e. when I export a chart within a range of 5000 data points the system would allow me to complete the request; the above error appears when I double the data points (around 10000).

As we noticed that the chart does not fail when we export less data points , is there a way to make the system skip the data point request and download only the chart image?
User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Chart download error!

It is possible to change chart's options when exporting.
API: http://api.highcharts.com/highcharts#ex ... artOptions

Other option is to load series data in load event and in case chart is being exported chart.renderer.forExport will return true. In load event chart is the 'this' variable.
API: http://api.highcharts.com/highcharts#chart.events.load
Example with a label being added only for exported image: http://jsfiddle.net/3172ryb9/

Another solution might be to create and use a private exporting server (so entity limits can be changed) or use client side exporting.
Setting up the export server: http://www.highcharts.com/docs/export-m ... the-server
Client side export: http://www.highcharts.com/docs/export-m ... ide-export
Client-side export module: http://www.highcharts.com/plugin-regist ... clientside
Kacper Madej
Highcharts Developer
TommyBrady
Posts: 1
Joined: Thu Nov 26, 2015 6:39 pm

Re: Chart download error!

The best solution is to use a private exporting server. I had a similar error. But you should carefully check the server settings both on your part and on the part of clients

Regards,
Tommy
Software developer - Intechcore
bxlxux
Posts: 19
Joined: Sat Oct 31, 2015 12:30 am

Re: Chart download error!

KacperMadej wrote:It is possible to change chart's options when exporting.
API: http://api.highcharts.com/highcharts#ex ... artOptions

Other option is to load series data in load event and in case chart is being exported chart.renderer.forExport will return true. In load event chart is the 'this' variable.
API: http://api.highcharts.com/highcharts#chart.events.load
Example with a label being added only for exported image: http://jsfiddle.net/3172ryb9/

Another solution might be to create and use a private exporting server (so entity limits can be changed) or use client side exporting.
Setting up the export server: http://www.highcharts.com/docs/export-m ... the-server
Client side export: http://www.highcharts.com/docs/export-m ... ide-export
Client-side export module: http://www.highcharts.com/plugin-regist ... clientside
Hello - I've tried using this recommended client side export plugin highlighted, but get a console error associated with canvas-tools.js because it's loaded with the other scripts (under dependencies), and not in the global configuration setting as highcharts recommends: http://api.highcharts.com/highcharts#gl ... asToolsURL. There's a github issue discussing: https://github.com/highcharts/highcharts/issues/2311

I tried removing the canvas-tools.js from the dependencies and loading it in the global option, but then I don't have any export options when clicking the button. What's the best way to have client side exporting, not get console errors and still have all of those options shown in that plugin? Thanks!
User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Chart download error!

This looks like an error of the plugin, so it should be reported on plugin's bug tracker - https://github.com/A----/highcharts-exp ... ide/issues
Kacper Madej
Highcharts Developer

Return to “Highcharts Usage”