gpt4 book ai didi

chart.js - 删除 Chartjs 折线图中的背景颜色

转载 作者:行者123 更新时间:2023-12-02 19:57:28 28 4
gpt4 key购买 nike

我已经像这样设置了折线图:
I want to remove the green color from the background and make it transparent

如何从背景中去除绿色并使其透明

最佳答案

在数据集选项中将填充属性设置为 false

 datasets: [
{
label: "",
fill: false,
.....
.......
data: [65, 59, 80, 0, 56, 55, 40],
}
]

你可以引用这个 fiddle : https://jsfiddle.net/red_stapler/u5aanta8/1/

另请参阅chartJs 文档 https://www.chartjs.org/docs/latest/charts/line.html

关于chart.js - 删除 Chartjs 折线图中的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56724275/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com