Din*_*nga 14 javascript css highcharts
使用高图时,我需要在堆栈图表中更改列的不透明度.因为我需要透明
<script type="text/javascript">
$(function () {
$('#trend').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Weight Oscillation Projection'
},
xAxis: {
categories: ['1st Week', '2nd Week', '3rd Week', '4th Week', '5th Week', '6th Week']
},
yAxis: {
title: {
text: 'Weight (Kg)'
},
stackLabels: {
enabled: false,
}
},
legend: {
enabled: false,
},
tooltip: {
enabled: false,
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: false,
}
},
},
series: [{
name: 'Jane',
data: [2, 2, 3, 2, 1],
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5],
color: '#fff',
style: {opacity: 0.0}
}]
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
我知道系列 - >数据对象没有改变样式的属性.我们怎么做这样的事情?
R3t*_*tep 29
使用rgba格式更改不透明度.
例:
color: 'rgba(255, 255, 255, 0.50)'
Run Code Online (Sandbox Code Playgroud)
参考
Highcharts中的半透明颜色以rgba格式rgba(255,255,255,1)给出.最后一个参数是alpha或opacity,范围从0,完全透明到1,完全不透明.因此,Highcharts API中没有单独的不透明度选项.
| 归档时间: |
|
| 查看次数: |
14314 次 |
| 最近记录: |