highcharts-export-server
Version:
Convert Highcharts.JS charts into static image files.
49 lines (48 loc) • 1.39 kB
JSON
{
"export": {
"options": {
"chart": {
"type": "column"
},
"title": {
"text": "Allow code execution"
},
"yAxis": [
{
"title": {
"text": "Primary axis"
}
},
{
"opposite": true,
"title": {
"text": "Secondary axis"
}
}
],
"plotOptions": {
"column": {
"borderRadius": 5
}
},
"series": [
{
"data": [1, 3, 2, 4]
},
{
"data": [324, 124, 547, 221],
"yAxis": 1
}
]
}
},
"customLogic": {
"allowCodeExecution": true,
"callback": "function callback(chart){chart.renderer.label('This label is added in the stringified callback.<br>Highcharts version '+Highcharts.version,75,75).attr({id:'renderer-callback-label',fill:'#90ed7d',padding:10,r:10,zIndex:10}).css({color:'black',width:'100px'}).add();}",
"customCode": "Highcharts.setOptions({chart:{events:{render:function (){this.renderer.image('https://www.highcharts.com/samples/graphics/sun.png',75,50,20,20).add();}}}});",
"resources": {
"js": "Highcharts.charts[0].update({xAxis:{title:{text:'Title from the resources object, js section'}}});",
"css": ".highcharts-yaxis .highcharts-axis-line{stroke-width:2px;stroke:#FF0000}"
}
}
}