試圖創建一個3列系列和1個分散系列的組合圖;列應爲100%並散佈在其上。當我使用plotOptions:{column:{stacking:「percent」}時,列在繪圖區域中最大化,但分散系列移至圖表底部;當用plotOptions替換時:{column:{stacking:「normal」},它顯示良好,但列不能最大化繪圖區域。想法?如何讓highcharts combo column scatter工作?
Highcharts.chart('container', {
chart: {
ignoreHiddenSeries: false,
backgroundColor: "#FFFFFF",
width: 509,
height: 400,
borderColor: "#FFFFFF",
borderWidth: 1,
plotShadow: false
},
title: {
text: "Your organization in comparison",
style: {color: "#333333", fontFamily: "Arial", fontSize: 16, fontWeight: "bold"}
},
legend: {
enabled: true,
verticalAlign: "bottom",
align: "center",
symbolRadius: 0,
style: {color: "#333333", fontFamily: "Arial", fontSize: 13}
},
plotOptions: {
column: {stacking: "percent"},
// column: {stacking: "normal"},
series: {animation: true}},
tooltip: {enabled: false},
yAxis: {title: {text: null}, labels: {enabled: false}, gridLineWidth: 0, reversedStacks: false},
xAxis: {
title: {text: null},
categories: ['Experience', 'Security', 'Management'],
labels: {enabled: true, style: {color: "#333333", fontFamily: "Arial", fontSize: 13}},
gridLineWidth: 0,
reversedStacks: false
},
series: [{
type: "column",
name: "Low",
invertIfNegative: false,
color: "#002E73",
showInLegend: true,
data: [{y: 0.42}, {y: 0.42}, {y: 0.48}],
dataLabels: {
enabled: false,
verticalAlign: "top",
style: {color: "#FFFFFF", fontFamily: "Arial", fontSize: 13, textOutline: ""}
}
}, {
type: "column",
name: "Medium",
invertIfNegative: false,
color: "#297EFF",
showInLegend: true,
data: [{y: 0.37}, {y: 0.47}, {y: 0.36}],
dataLabels: {enabled: false}
}, {
type: "column",
name: "High",
invertIfNegative: false,
color: "#B8D4FF",
showInLegend: true,
data: [{y: 0.21}, {y: 0.11}, {y: 0.16}],
dataLabels: {enabled: false}
}, {
type: "scatter",
name: "Your organization today",
invertIfNegative: false,
color: "#FFC000",
lineWidth: 0,
marker: {enabled: true, radius: 14},
states: {hover: {lineWidthPlus: 0}},
showInLegend: true,
data: [{y: 0.21}, {y: 0.21}, {y: 0.24}],
dataLabels: {enabled: false}
}],
credits: {enabled: false}
})
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width: 600px; height: 300px; margin: 0 auto"></div>
你試過用100乘以散射值?列自行縮放範圍爲0-100(因爲「堆疊:」百分比「'),但散點仍然很小(0.21或0.24)。 –