如何删除谷歌图表中的彩色线条示例?我的意思是附图右侧的线条示例
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/