我使用 chart.js 版本 3.x 实现了以下图表。
https://jsfiddle.net/Lxya0u98/12/
我的图表中有多个数据集来实现我想要的行为。
我面临数据集重叠的问题。在图表中,我已经结束了blue color line
与数据集的重叠green color dot
。有没有办法避免这个问题?
我有以下两个数据集:
// Data set for the Big Dot
{
showLine: false,
borderWidth: 0,
lineTension: 0,
borderColor: colorVal,
backgroundColor: colorVal,
pointBackgroundColor: colorVal,
pointBorderColor: colorVal,
pointBorderWidth: 2,
pointRadius: 15,
};
// Data set for the Connecting Lines
{
showLine: true,
lineTension: 0,
borderWidth: 5,
borderColor: colorVal,
pointRadius: 0,
pointBorderWidth: 0,
spanGaps: true,
};
数据集是否有 Z 索引,以便它们出现在堆栈中前一个的顶部?