0
我正在绘制使用highcharts的多边形系列,但我无法为其添加边框。我试图使用plotOptions.series.borderWidth但没有效果。如何在多边形图中添加边框?
代码:
$(function() {
$('#container').highcharts({
title: {
text: 'Height vs Weight'
},
subtitle: {
text: 'Polygon series in Highcharts'
},
xAxis: {
gridLineWidth: 1,
title: {
enabled: true,
text: 'Height (cm)'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true
},
yAxis: {
title: {
text: 'Weight (kg)'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
series: [{
name: 'Target',
type: 'polygon',
data: [[153, 42], [149, 46], [149, 55], [152, 60], [159, 70], [170, 77], [180, 70],
[180, 60], [173, 52], [166, 45]],
color: Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0.5).get(),
enableMouseTracking: false
}],
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x} cm, {point.y} kg'
}
});
});
我如何添加情节多边形系列?