【发布时间】:2019-04-29 22:34:26
【问题描述】:
我创建了一个带有高图的雷达图。数据标签总是在图表中(在边框中),但我希望它们在外面。
最好的情况是,它们的数据标签(在我的示例中为点 1-5)在其饼图中有一条线(如饼图),并且它们垂直位于饼图的中间。所以我不知道如何编码数据标签。
这是我的小提琴:https://jsfiddle.net/ghu21x0e/
Highcharts.chart('container', {
chart: {
polar: true
},
title: {
text: 'Goals'
},
subtitle: {
text: 'Goals'
},
pane: {
startAngle: 0,
endAngle: 360
},
xAxis: {
tickInterval: 72,
min: 0,
max: 360,
labels: {
format: false
}
},
yAxis: {
min: 0
},
plotOptions: {
series: {
pointStart: 0,
pointInterval: 73,
dataLabels: {
enabled: true,
crop: true,
overflow: 'none',
padding: 50,
verticalAlign: 'middle',
format: '{point.name}'
}
},
column: {
pointPadding: 0,
groupPadding: 0,
pointPlacement: 'between'
}
},
series:
[{
type: 'column',
name: 'Goal',
data: [
{
name: 'Point 1',
y: 1
},
{
name: 'Point 2',
y: 2
},
{
name: 'Point 3',
y: 3
},
{
name: 'Point 4',
y: 4
},
{
name: 'Point 5',
y: 5
},
],
pointPlacement: 'between'
}]
});
【问题讨论】:
标签: javascript highcharts radar-chart