大家好,我在更改基于 y 轴值的图形线的颜色时遇到问题。我想为 Y 轴设置一个限制。例如,如果y轴点的值在最大y轴为100的情况下在40到60之间,我希望线条的颜色为红色,否则为蓝色。
if (y-axis is between 40 to 60) {
the colour of the line should be red on that points
}
else {
on other points it should be blue
}
代码笔: https://codesandbox.io/s/recharts-playground-forked-tc0xf?file=/index.js