我正面对一个相当麻烦的图表问题如下:
发布于 2022-06-22 11:36:33
设置scales选项如下:
scales: {
y: {
grid: {
drawBorder: false, // <-- this removes y-axis line
lineWidth: function (context) {
return context?.index === 0 ? 0 : 1; // <-- this removes the base line
}
}
},
x: {
grid: {
drawBorder: false,
lineWidth: 0 // <-- this removes vertical lines between bars
}
}
}应该达到预期的外观。看看这个代码沙箱有一个例子。
您可以找到有关图表这里样式的更多信息。
https://stackoverflow.com/questions/72695005
复制相似问题