【问题标题】:Google Bar Chart Unable Show Float Numbers谷歌条形图无法显示浮点数
【发布时间】:2015-02-05 16:34:26
【问题描述】:

我有一些问题,我来自谷歌图表的条形图没有显示浮点数,而我使用谷歌图表提供的其他类型的条形图可以工作。但只有这种类型的图表不会显示浮点数。

这是我写的代码:http://jsfiddle.net/2nf8x41g/1/

我希望解决的办法是不要改变声明的类型var data 比如:

var data = new google.visualization.DataTable();
      data.addColumn("Unit", "February", "Previous Month", "Previous 2 months");

提前致谢

【问题讨论】:

  • 先生,您好,您真的需要垂直显示您的表格吗?
  • 水平显示没关系,但必须是Material条形图

标签: javascript css charts


【解决方案1】:

可能是这个修复,但我不知道你是否会喜欢它,替换

var chart = new google.charts.Bar(document.getElementById('SLA_ONLINE'));

var chart = new google.visualization.BarChart(document.getElementById('SLA_ONLINE'));

我尝试过使用 vAxis.format(用于垂直条),但是基于 google 文档“此选项仅支持连续轴。” https://developers.google.com/chart/interactive/docs/gallery/barchart#Data_Format

【讨论】:

  • 感谢您的回复,我之前尝试过,但那是更改条形图的类型
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-07-26
  • 1970-01-01
  • 2019-09-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-01
相关资源
最近更新 更多