Code: Select all
Highcharts.chart("container", {
chart: {
events: {
render() {
const chart = this;
const point = chart.series[0].points[3];
const rectWidth = 8;
const lowPos = point.pos(true, point.plotLow);
const highPos = point.pos(true, point.plotHigh);
if (!chart.customSVG) {
chart.customSVG = chart.renderer
.rect()
.attr({ fill: "#008d80" })
.add();
}
chart.customSVG.attr({
x: lowPos[0] - (rectWidth / 2),
y: highPos[1],
width: rectWidth,
height: lowPos[1] - highPos[1],
});
}
}
}
})
< /code>
Meine Frage bezieht sich auf diese beiden Codezeilen: < /p>
const lowPos = point.pos(true, point.plotLow);
const highPos = point.pos(true, point.plotHigh);