[英]Highcharts border around plot
因此,我正在尝试制作一个如下所示的图表:
但我似乎无法让边界只包扎条。 这是我所能获得的最接近的:
有人知道我该怎么做吗? 这是我的选择:
highcharts({
chart: {
backgroundColor: 'transparent',
plotBorderColor: '#9E9E9E',
plotBorderWidth: 2,
height: 200,
type: 'bar'
},
title: {
text: null
},
credits: {
enabled: false
},
yAxis: {
title: {
text: null
},
labels: {
enabled: false
},
tickLength: 0,
lineColor: 0,
lineWidth: 0,
gridLineWidth: 0
},
xAxis: {
title: {
text: null
},
labels: {
enabled: false
},
tickLength: 0,
lineColor: 0,
lineWidth: 0
},
plotOptions: {
bar: {
borderColor: '#000000'
}
},
legend: {
// reversed: true,
symbolHeight: 0,
symbolWidth: 0,
floating: true,
useHTML: true,
itemDistance: 10,
y: -10,
labelFormatter:
function() {
if (this.name === "HIDDEN")
{
return '';
}
return '<div class="insp360-widgetLegendItemContainer">' +
'<div class="insp360-widgetLegendNumber" style="background-color: ' + this.color + '">' + this.yData[0] + '</div>' +
'<div class="insp360-widgetLegendName">' + this.name + '</div>' +
'</div>';
}
},
plotOptions: {
series: {
stacking: 'percent',
pointWidth: 50
}
},
series: [
{
name: 'New Business',
data: [chartData['New Business'] || 0],
color: '#ADD8E6'
},
{
name: 'Re-Underwriting',
data: [chartData['Re-Underwriting'] || 0],
color: '#FFBC57'
},
{
name: 'Consultative Visit',
data: [chartData['Consultative Visit'] || 0],
color: '#FF5200'
},
{
name: 'Recommendation Check',
data: [chartData['Recommendation Check'] || 0],
color: '#B084FF '
},
{
name: 'Other',
data: [chartData['Other'] || 0],
color: '#27AC4C'
}
];
});
有很多事情需要改变以影响这一点。
工作example
:
我更新了什么:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.