我有一个带有两个数据属性的堆积条形图。我想让第二个条形看起来变灰并带有虚线边框。我试过 "dashStyle: 'longdash' 但这和我试过的其他任何东西都不起作用。
这是我要的外观:

通常它不受支持,但简单的 hack 可以启用它:http : //jsfiddle.net/ztRF5/132/(注意:需要来自 github 的最新版本)。
// mapping between SVG attributes and the corresponding options
Highcharts.seriesTypes.bar.prototype.pointAttrToOptions.dashstyle = 'dashStyle';
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
plotOptions: {
bar: {
stacking: 'percent'
}
},
series: [{
data: [29.9],
borderColor: 'black',
borderWidth: 2,
dashStyle: 'dash'
}, {
data: [13]
}]
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2687 次 |
| 最近记录: |