我想画一个下面的堆积柱形图,可以画这种图吗?提前感谢。
xn1cxnb41#
您可以为最后一个系列启用colorByPoint选项:
colorByPoint
series: [..., { ..., colorByPoint: true }]
现场演示:https://jsfiddle.net/BlackLabel/fdwbLzan/API引用:https://api.highcharts.com/highcharts/series.column.colorByPoint
或者为每个点定义单独的颜色:
series: [..., { ..., data: [{ y: 3, color: 'black' }, { y: 4, color: 'purple' }, { y: 4, color: 'green' }, { y: 2, color: 'orange' }, { y: 5, color: 'blue' }] }]
现场演示:https://jsfiddle.net/BlackLabel/r87mv6n3/API参考:https://api.highcharts.com/highcharts/series.column.data.color
1条答案
按热度按时间xn1cxnb41#
您可以为最后一个系列启用
colorByPoint
选项:现场演示:https://jsfiddle.net/BlackLabel/fdwbLzan/
API引用:https://api.highcharts.com/highcharts/series.column.colorByPoint
或者为每个点定义单独的颜色:
现场演示:https://jsfiddle.net/BlackLabel/r87mv6n3/
API参考:https://api.highcharts.com/highcharts/series.column.data.color