dbtomy
Posts: 1
Joined: Mon Oct 25, 2021 12:37 pm

Not able to export chart programatically

Hi! Since 10/21, when I try to export programmatically, I am getting the error in 90% of the requests:
Cannot GET /charts/chart.eecdaa36c056475fa0f52dcfe3a823df.png

My code:

Code: Select all

var exportUrl = 'https://export.highcharts.com/'
var dataToSend = {
	type: 'POST',
	options: JSON.stringify(optionsExport),
	filename: 'test.png',
	type: 'image/png',
	async: true

};
$.ajax({
	async: false,
	url: exportUrl,
	type: "POST",
	data: dataToSend,
	success: function (data) {
		var imageUrl = exportUrl + data
		fetch(imageUrl).then(response => response.blob()).then(data => {
			//My implementation
		});
This is the optionsExport content:

Code: Select all

{"chart":{"renderTo":"container_Demand"},"title":{"text":"Demand"},"tooltip":{"shared":true},"legend":{"enabled":false},"credits":false,"xAxis":{"type":"category","categories":["296243360","296224518AB","296250401","296225797","296275325AC","296275289","296274034","296275304AD","296275122AC","296272407","296286109","YZ01003730_MAN","296286542AB","296225945AD","296257947AB","296197659","296221554AC","296280800AC","YZ01003339_MAN","YZ01003338","YZ14000256","296282713AB","296227957AD","296274881AB","296275292AD"],"title":{"text":null},"min":0,"max":24,"scrollbar":{"enabled":false},"minRange":24},"exporting":{"enabled":true,"sourceWidth":1250,"sourceHeight":400,"chartOptions":{"scrollbar":{"enabled":false},"xAxis":{"scrollbar":{"enabled":false},"min":0,"max":24,"minRange":24}}},"yAxis":[{"title":{"text":""},"stackLabels":{"enabled":true},"index":0},{"title":{"text":"%+of+Total"},"minPadding":0,"maxPadding":0,"max":100,"min":0,"opposite":true,"labels":{"format":"{value}%"},"index":1}],"series":[{"name":"Quantity","type":"column","zIndex":2,"data":[[383537],[305754],[298764],[239708],[239708],[227493],[135177],[118292],[94101],[85159],[85159],[70766],[58790],[51802],[42071],[41215],[41215],[34567],[33876],[33000],[33000],[32100],[25562],[20620],[20000]],"dataLabels":{"enabResDataTableed":true,"style":{"fontWeight":"bold"}}},{"name":"%+of+Total","type":"line","negativeColor":"#800080","color":"#ff0000","lineWidth":2,"marker":{"enabled":true,"radius":1},"yAxis":1,"zIndex":10,"baseSeries":1,"dataLabels":{"color":"#ff0000"},"tooltip":{"valueDecimals":2,"valueSuffix":"%"},"data":[13.58,24.41,35,43.49,51.98,60.03,64.82,69.01,72.35,75.36,78.38,80.88,82.97,84.8,86.29,87.75,89.21,90.44,91.64,92.8,93.97,95.11,96.02,96.75,97.45]}],"plotOptions":{"series":{"cursor":"pointer","point":{"events":{}},"dataLabels":{"enabled":true},"line":{"dataLabels":{"color":"#ff0000"},"tooltip":{"valueDecimals":2,"valueSuffix":"%"}}}}}
Appreciate any help.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Not able to export chart programatically

Hello dbtomy,

Welcome to our forum and thanks for contacting us with your question!

Here you can find related forum topic: viewtopic.php?f=9&t=47583#p171427
Our export server experts are already looking into that issue so please follow that topic for any upcoming updates on this problem.

Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”