简体   繁体   English

Google Charts条形图-很高和很低的值

[英]google charts bar chart - very high and low values

I have a problem with displaying the low values in my charts. 我在图表中显示低值时遇到问题。

条形图

The values for this chart are: 该图表的值为:

total: 210155
reads: 48759
clicks: 9284
hb: 88
sb: 66
spam: 13

I need to have a very low first gridline, around a 100. So I would get 100, 100K 200K. 我需要有一个非常低的第一方格线,大约100。因此,我将得到100,100K 200K。

I tried adding the: hAxis.logScale option, but this didn't work. 我尝试添加:hAxis.logScale选项,但这没有用。

Does anybody know how I would go about this? 有人知道我会怎么做吗?

I was able to get the hAxis.logScale working when I changed back to the old google charts instead of the material design charts. 当我改回旧的Google图表而不是材料设计图表时,我能够使hAxis.logScale工作。 The option doesn't seem to be working yet. 该选项似乎尚未起作用。

I changed this: 我改变了这个:

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

To: 至:

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

And it worked straight away, this did change to look of my chart tho. 它立即起作用,这确实改变了我的图表的外观。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM