Google图表中的断轴 [英] Broken axis in Google charts

查看:110
本文介绍了Google图表中的断轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以在Google Charts api上打破垂直比例吗?

Is there any way to create a break in my vertical scale on the Google charts api?

除了一个值几乎为300,000,我在y轴上有几十个数据点,所有这些点都在600-2000左右.这使得所有较小的数据点几乎不可读.我需要代表所有这些数据,对数刻度不是一个选择.

I have a couple of dozen data points all about 600-2000 on the y-axis except for one value which is almost 300,000; this makes all the smaller data points nearly unreadable. I need to represent all this data and a logarithmic scale is not an option.

推荐答案

简单的答案:不,不可能.

Simple answer: no, it is not possible.

在可视化社区中,断轴(通常)不被接受,因此大多数情况下不受各种软件的支持.

Breaking axes is (generally) frowned upon in the visualization community and therefore isn't supported most of the time in various software.

如果您想变得棘手,可以创建一个函数来查找离群值,然后将其移动到数据的第二个序列中.在第二个轴上绘制该系列,并使其具有不同的颜色.这就是说,这个数字是不同的,并不适合",这引起了人们的更多关注,同时仍然允许其余数据以相同的比例显示.

If you want to be tricky, you can create a function to find outliers, and then move them to a second series in your data. Plot that series on the second axis, and have it with a different color. This says, "This figure is different and does not fit" which brings added attention to it, while still allowing the rest of the data to be seen in the same scale.

就我个人而言,我只是将图形截断为一个任意值,将该点的值设置为最大值,然后添加一个工具提示,指出离群值:300,000"或诸如此类.这样一来,人们就可以看到其他数字,但可以显示该数字本身是一个离群值,而无需对其进行不同的着色或将其从单个系列中删除.

Personally I would just cut off the graph at an arbitrary value, set the value of that point to the maximum value, and add a tooltip saying, "Outlier: 300,000" or whatever it is. This will allow people to see the other numbers, but show that this number itself is an outlier without coloring it differently or removing it from the single series.

这两种方法都是可行的.

Either way is doable.

这篇关于Google图表中的断轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆