我正在使用角度 4,我想显示在我们加载页面时默认选择的系列 1 值,并且它应该始终显示没有鼠标悬停,但是当我将鼠标悬停在第二个圆时,它应该显示相应的值。
this.chart = new Chart({
chart: {
type: 'solidgauge',
marginTop: 50,
backgroundColor: 'transparent'
},
title: {
text: 'Incremental Price Monitor',
style: {
fontSize: '24px',
color: 'ghostwhite',
display: 'none'
}
},
credits: {
enabled: false
},
tooltip: {
borderWidth: 0,
backgroundColor: 'none',
shadow: false,
style: {
fontSize: '16px',
color: 'ghostwhite'
},
// pointFormat: '<span style="font-size:5em; color: {point.color}; font-weight: bold">{point.y}%</span><br><span style="font-size:1em; color: {point.color}; font-weight: bold">{series.name}</span>',
pointFormat: '<span style="font-size:2em; color: {point.color}; font-weight: bold">{point.y}mw</span>',
positioner: function (labelWidth) {
return {
x: 200 - labelWidth / 2,
y: 210
};
}
},
pane: {
startAngle: 0,
endAngle: 360,
background: [{ // Track for Move
outerRadius: '112%',
innerRadius: '88%',
backgroundColor: '#1B5795',
borderWidth: 0
}, { // Track for Exercise
outerRadius: '87%',
innerRadius: '63%',
backgroundColor: '#33683C',
borderWidth: 0
}]
},
yAxis: {
min: 0,
max: 100,
lineWidth: 0,
tickPositions: []
},
plotOptions: {
solidgauge: {
dataLabels: {
enabled: false
},
linecap: 'round',
stickyTracking: false
}
},
series: [{
name: 'Target Ramp',
data: [{
color: this.forecasted_he_target_generation_Color,
radius: '112%',
innerRadius: '88%',
y: this.forecasted_he_target_generation
}]
}, {
name: 'MW Actual',
data: [{
color: this.current_generation_Color,
radius: '87%',
innerRadius: '63%',
y: this.current_generation
}]
}]
});