I was trying to download the highcharts.js line graph in the black and white image during downloading in spite of the colors which are randomly generated in the graph. But I am not getting how can I achieve this.
以下是图表的链接。
https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/line-basic/
I want the graph to be black and white during downloading only and I want them to stay colorful during the rendering. Right now it is downloading as a colorful image.
Thanks in advance because I am a novice in the highcharts. I am stuck in this position. Please help me out.
使用导出选项将默认颜色更改为黑色:
exporting: {
chartOptions: {
colors: ['#000000', '#000000', '#000000', '#000000', '#000000'],
}
},
这是一个demo
您可以通过chartOptions
属性更改导出的颜色:
exporting: {
chartOptions: {
...
}
}
现场演示:http://jsfiddle.net/BlackLabel/8typuasx/
API参考:https://api.highcharts.com/highcharts/exporting.chartOptions