highcharts-export-server
Version:
Convert Highcharts.JS charts into static image files.
24 lines (23 loc) • 1.06 kB
JSON
{
"options": {
"title": {
"text": "The default value of the 'allowCodeExecution' allows stringified resources"
},
"xAxis": {
"categories": ["Jan", "Feb", "Mar", "Apr"]
},
"series": [
{
"type": "column",
"data": [5, 6, 7, 8]
},
{
"type": "line",
"data": [1, 2, 3, 4]
}
]
},
"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 stringified object, js section'}}});\",\"css\":\".highcharts-yaxis .highcharts-axis-line{stroke-width:2px;stroke:#FF0000;}\"}"
}