javascript - 为 3d 条形图添加边框颜色和宽度
问题描述
我想更改 3d bar highchart 的边框颜色和宽度...
我尝试了什么:
// Set up the chart
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
},
yAxis:{
gridLineWidth:0,
visible:false,
},
xAxis: {
gridLineWidth:0,
categories:['Jan','feb']
},
title: {
text: 'Chart rotation demo'
},
subtitle: {
text: 'Test options by dragging the sliders below'
},
plotOptions: {
column: {
depth: 25,
color:'blue,
},
series: {
showInLegend: false,
dataLabels: {
enabled: true,
align: 'center',
color: 'black',
x: 0,
y:2
},
pointPadding: 0.2,
groupPadding: 0
}
},
series: [{
data: [0, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
}]
});
获取输出: 输出屏幕的链接
我想为条形和边框获得不同的颜色.....
我也试过:
列{边框宽度:3,边框颜色:'红色'}
提前致谢!!!
解决方案
用途edgeColor
及edgeWidth
性能:
series: [{
edgeColor: 'red',
edgeWidth: 5,
...
}]
现场演示: https ://jsfiddle.net/BlackLabel/yx9n43os/
API参考:
https://api.highcharts.com/highcharts/series.column.edgeColor
https://api.highcharts.com/highcharts/series.column.edgeWidth
推荐阅读
- java - 如何通过 Junit 测试 Web Service 调用
- python - 我们如何更新 matplotlib 中椭圆补丁的参数?
- wordpress-gutenberg - 如何在 React 应用程序中使用 front/gutenberg-js?
- html - 文本框宽度默认小于父容器宽度
- javascript - 如何正确地使 A-Frame 动画轻松进出?
- r - 用特定字符之间的键分隔(dplyr)(在空格之后和大写字母之前)
- typescript - 从打字稿界面创建形状
- vba - 文本框是对另一个文本框的引用,需要返回第二个文本框中的内容的值
- python - ValueError: `sequences` 在 Keras 中必须是可迭代的
- reactjs - React router V4 - 同一页面上有 2 条差异路由的问题