javascript - 是否可以将 y 轴标签复制到谷歌图表的右侧?
问题描述
有没有人对谷歌图表有一些经验,之前遇到过类似的问题?我基本上需要在图形的两侧显示相同的 y 轴标签,如图所示: 图形的图像
这是我的数据集:
['Date', 'Drilling', 'Stacked', 'Cold stacked', 'Construction', 'Repair']
['2020-09-16', 406, 171, 135, 67, 3]
['2020-09-17', 407, 170, 135, 67, 3]
['2020-09-18', 408, 169, 135, 67, 3]
['2020-09-19', 408, 169, 135, 67, 3]
['2020-09-20', 409, 168, 135, 67, 3]
['2020-09-21', 408, 169, 135, 67, 3]
['2020-09-22', 406, 171, 135, 67, 3]
['2020-09-23', 407, 170, 135, 67, 3]
...and so on...
和图表设置:
{
isStacked: true,
colors: ['#ff4852', '#005BFF', '#FFAB2E', '#af5ddf', '#00A580'],
vAxis: {
format: '######',
},
chartArea: {
top: '30',
height: '75%',
width: '80%',
},
series: {
0: {
textPosition: 'none',
},
},
vAxes: {
1: {
textPosition: 'none',
},
},
hAxes: {
0: {
gridlines: { color: 'transparent' },
},
},
}
解决方案
推荐阅读
- javascript - 带有 React 的 SurveyJS - 加载 JSON 时出现问题
- r - 是否可以使用 for 循环和 mutate()?
- r-markdown - 在 HUGO 的学术主题上运行 .Rmd 帖子?
- excel - 合并整个工作表中的所有重复单元格 - Excel VBA
- python-3.x - 从非结构化文本文件中读取数据并使用 python 写入 pandas 的方法
- r - 使用 LOCF 进行条件插补
- node.js - 本地原生节点模块导致错误:未捕获的错误:未找到平台=win32 arch=x64 runtime=electron abi=75 uv=1 libc=glibc 的原生构建
- c# - 如何使用 Entity Framework Core 3.0 创建所需的拥有类型
- image - 在python中读取多个图像
- database-design - Presto vs Impala:架构、性能、功能