google-visualization - 谷歌图表未在轴上显示垂直线
问题描述
不知何故,我的图表上没有显示轴线我怎样才能让它们显示,这是我下面的代码,我知道这个解决方案已经提出了谷歌图表:如何为 LineChart 绘制垂直轴?
但它与我的不同,因为我使用ES6 Spread 运算符“ ...realYears ”映射我的数据以动态访问我的数据
var {{ place.id.toString() }}data = new google.visualization.arrayToDataTable([
['Year', 'Total People in IS', 'Backlog With Growth Rate', 'Backlog With Current Delivery Pace'],
...realYears]);
var {{ place.id.toString() }}options = {
title: '',
lineWidth: 5,
height: 330,
width: 750,
curveType: 'function',
legend: {
position: 'top',
textStyle: { color: '#4A4A4A',
fontName: 'Source Sans Pro',
fontSize: '14' }
},
series: {
0: {
color: '#F85C59'
},
1: {
color: '#FFAC55'
},
2: {
color: '#38B99F'
},
},
vAxis: {
format:'0',
basline: 0,
gridlines: {
color: 'transparent'
},
textStyle: { color: '#4A4A4A',
fontName: 'Source Sans Pro',
fontSize: '22' }
},
hAxis: {
format:'0',
baseline: 0,
textStyle: { color: '#4A4A4A',
fontName: 'Source Sans Pro',
fontSize: '22' }
},
};
这就是我希望我的图表看起来的样子
解决方案
推荐阅读
- nginx - 如何在 nginx 服务器中只监听 443
- reporting-services - SSRS - 分隔字符串的一部分并返回
- php - array_key_exists 和 ?? 在 php 7.x 中
- javascript - 如果它们有索引,如何登录控制台javascript数组项目属性
- azure - 一对一处理服务总线队列消息
- kubernetes - Helm chart 在 configmap 更改时重新启动 pod
- c - C、MPI:程序未终止且未打印数字
- mysql - Laravel 更新获取更新的 id
- entity-framework-core - SQLite 与 SQLServer 之间的实体框架核心数据类型转换差异
- tensorflow - 如何从 TFRecordDataset parse_single_example 生成的张量板上删除/重命名函数