gpt4 book ai didi

javascript - Highcharts - 对于具有任何 endAngle 的极坐标图,x 轴标签消失

转载 作者:行者123 更新时间:2023-11-30 16:55:43 26 4
gpt4 key购买 nike

对于具有除默认值 (360) 以外的任何 endAngle 的极坐标图表,x 轴标签消失

没有 endAngle 的作品:http://jsfiddle.net/qs5v601b/1/

$(function () {
$('#container').highcharts({
chart: {
polar: true,
type: 'line'
},
title: {
text: 'Budget vs spending',
x: -80
},
pane: {
size: '80%'
},
xAxis: {
categories: ['Sales', 'Marketing'],
tickmarkPlacement: 'on',
lineWidth: 0
},
yAxis: {
gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0
},

tooltip: {
shared: true,
pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
},

legend: {
align: 'right',
verticalAlign: 'top',
y: 70,
layout: 'vertical'
},

series: [{
name: 'Allocated Budget',
data: [43000, 19000],
pointPlacement: 'on'
}, {
name: 'Actual Spending',
data: [50000, 39000],
pointPlacement: 'on'
}]

});
});

不适用于 endAngle :http://jsfiddle.net/qtpq84nw/

$(function () {

$('#container').highcharts({

chart: {
polar: true,
type: 'line'
},

title: {
text: 'Budget vs spending',
x: -80
},

pane: {
size: '80%',
endAngle: 90
},

xAxis: {
categories: ['Sales', 'Marketing'],
tickmarkPlacement: 'on',
lineWidth: 0
},

yAxis: {
gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0
},

tooltip: {
shared: true,
pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
},

legend: {
align: 'right',
verticalAlign: 'top',
y: 70,
layout: 'vertical'
},

series: [{
name: 'Allocated Budget',
data: [43000, 19000],
pointPlacement: 'on'
}, {
name: 'Actual Spending',
data: [50000, 39000],
pointPlacement: 'on'
}]

});
});

有人知道是什么原因造成的吗?

最佳答案

您需要启用 showLastLabel参数。

关于javascript - Highcharts - 对于具有任何 endAngle 的极坐标图,x 轴标签消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29754610/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com