我想像在高图栏上那样填充高图的子弹。 如果有人知道高位图表,请帮助我。 这是我正在使用的highchart函数。 我想将第一种颜色设为第一条,将第二种颜色设为第二条。 如果您知道任何解决方案,请告诉我。谢谢
var chart = new Highcharts.Chart({
chart: {
renderTo:'DimensionsChartfirst',
type:'column'
},
colors: ['#0070C0', '#C00000'],
title: {
text: 'Office data'
},
subtitle: {
text: ''
},
credits:{enabled:false},
legend:{
},
plotOptions: {
series: {
shadow:false,
borderWidth:0
}
},
xAxis:{
categories: [
'Weight',
'Height'
],
lineColor:'#999',
lineWidth:1,
tickColor:'#666',
tickLength:3,
title:{
text:'Part Counts'
}
},
yAxis:{
lineColor:'#999',
lineWidth:1,
tickColor:'#666',
tickWidth:1,
tickLength:3,
gridLineColor:'#ddd',
title:{
text:'Office data',
// rotation:90,
margin:10
}
},
series: [{
name: 'MAX',
data: MaxVal,
colors: ['#0070C0'],
type: 'column',
colorByPoint: true
},{
name: 'MIN',
data: MinVal,
colors: ['#C00000'],
type: 'column',
colorByPoint: true
}]
});
答案 0 :(得分:5)
您只需要删除系列中的colorByPoint: true
个属性即可。
jsFiddle:https://jsfiddle.net/4zu28aqk/
API参考:https://api.highcharts.com/highcharts/series.column.colorByPoint
答案 1 :(得分:-1)
series: [{
name: 'MAX',
data: MaxVal,
color: '#0070C0'
},{
name: 'MIN',
data: MinVal,
color: '#C00000'
}]