gpt4 book ai didi

javascript - 如何删除谷歌图表中的彩色线条示例标签

转载 作者:行者123 更新时间:2023-11-29 23:35:05 25 4
gpt4 key购买 nike

如何删除谷歌图表中的彩色线条示例?我的意思是附图右侧的线条示例

enter image description here

exampleChart.draw(view, {
vAxis: {
viewWindow: {
min: 0
},
viewWindowMode: "explicit"
}
}, {
legends: "none",
curveType: "function",
backgroundColor: "#000",
fontSize: "18",
colors: ["#000"],
series: {
1: {
lineDashStyle: [0, 0]
}
},
lineWidth: 1,
chartArea: {
width: "100%"
});

最佳答案

您的选项定义中有额外的花括号
导致两个对象而不是一个
所以图表仅使用 vAxis 定义

{
vAxis: {
viewWindow: {
min: 0
},
viewWindowMode: "explicit"
}
}, { // <-- remove these, add comma above
legend: "none",
curveType: "function",
backgroundColor: "#000",
fontSize: "18",
colors: ["#000"],
series: {
1: {
lineDashStyle: [0, 0]
}
},
lineWidth: 1,
chartArea: {
width: "100%"
});

请看下面的片段...

chart.draw(view, {
vAxis: {
viewWindow: {
min: 0
},
viewWindowMode: "explicit"
},
legend: "none",
curveType: "function",
backgroundColor: "rgb(238, 238, 238)",
fontSize: "10",
colors: ["#176bad"],
series: {
1: {
lineDashStyle: [0,0]
}
},
lineWidth: 0,
chartArea: {
width: "100%"
}
});

关于javascript - 如何删除谷歌图表中的彩色线条示例标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46486036/

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