highcharts-export-server
Version:
Convert Highcharts.JS charts into static image files.
100 lines (99 loc) • 2.89 kB
JSON
{
"infile": {
"chart": {
"type": "column"
},
"title": {
"text": "Styling axes"
},
"yAxis": [
{
"className": "highcharts-color-0",
"title": {
"text": "Primary axis"
}
},
{
"className": "highcharts-color-1",
"opposite": true,
"title": {
"text": "Secondary axis"
}
}
],
"series": [
{
"data": [1, 3, 2, 4]
},
{
"data": [324, 124, 547, 221],
"yAxis": 1
}
]
},
"type": "png",
"scale": 2,
"width": 800,
"height": 800,
"callback": "function callback(chart) {chart.renderer.label('This label is added in the stringified callback.<br>Highcharts version ' + Highcharts.version,75,75).attr({fill: '#90ed7d', padding: 10, r: 10, zIndex: 10}).css({color: 'black', width: '100px'}).add();}",
"resources": {
"js": "Highcharts.charts[0].update({title: {text: 'Resources title'}});",
"css": ".highcharts-color-0 {fill: #7cb5ec; stroke: #7cb5ec;} .highcharts-axis.highcharts-color-0 .highcharts-axis-line {stroke: #7cb5ec;} .highcharts-axis.highcharts-color-0 text {fill: #7cb5ec;}.highcharts-color-1 {fill: #90ed7d; stroke: #90ed7d;} .highcharts-axis.highcharts-color-1 .highcharts-axis-line {stroke: #90ed7d;} .highcharts-axis.highcharts-color-1 text {fill: #90ed7d;}.highcharts-yaxis .highcharts-axis-line {stroke-width: 2px;}"
},
"constr": "chart",
"b64": false,
"noDownload": false,
"globalOptions": {
"chart": {
"borderWidth": 2,
"plotBackgroundColor": "rgba(255, 255, 255, .9)",
"plotShadow": true,
"plotBorderWidth": 1
},
"subtitle": {
"text": "Global options subtitle"
}
},
"themeOptions": {
"colors": [
"#058DC7",
"#50B432",
"#ED561B",
"#DDDF00",
"#24CBE5",
"#64E572",
"#FF9655",
"#FFF263",
"#6AF9C4"
],
"chart": {
"backgroundColor": {
"linearGradient": [0, 0, 500, 500],
"stops": [
[0, "rgb(255, 255, 255)"],
[1, "rgb(240, 240, 255)"]
]
}
},
"title": {
"style": {
"color": "#000",
"font": "bold 16px Trebuchet MS, Verdana, sans-serif"
}
},
"subtitle": {
"text": "Theme options subtitle",
"style": {
"color": "#666666",
"font": "bold 12px Trebuchet MS, Verdana, sans-serif"
}
},
"legend": {
"itemStyle": {
"font": "9pt Trebuchet MS, Verdana, sans-serif",
"color": "black"
}
}
},
"customCode": "function () {Highcharts.setOptions({chart: {borderWidth: 2, plotBackgroundColor: 'rgba(255, 255, 255, .9)', plotShadow: true, plotBorderWidth: 1, events: {render: function() {this.renderer.image('https://www.highcharts.com/samples/graphics/sun.png', 250, 120, 20, 20).add();}}}});}"
}