Google visualization 如何使Google图表正确缩放扩展编码线图?

Google visualization 如何使Google图表正确缩放扩展编码线图?,google-visualization,Google Visualization,就我个人而言,我无法用扩展编码正确显示此图形 如果将轴范围从0更改为15,则看起来是正确的,但如果将轴范围从9更改为15,则数据打印不正确 事实证明,这是正确的: <img src="http://chart.apis.google.com/chart?cht=lc&amp;chco=125292&amp;chm=B,cee1f5,0,0,0&amp;chls=2&amp;chs=408x237&amp;chxt=x,y&amp;chxl=0

就我个人而言,我无法用扩展编码正确显示此图形

如果将轴范围从0更改为15,则看起来是正确的,但如果将轴范围从9更改为15,则数据打印不正确

事实证明,这是正确的:

<img src="http://chart.apis.google.com/chart?cht=lc&amp;chco=125292&amp;chm=B,cee1f5,0,0,0&amp;chls=2&amp;chs=408x237&amp;chxt=x,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&amp;chxr=1,0,15&amp;chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />

但这一比例不正确:

<img src="http://chart.apis.google.com/chart?cht=lc&amp;chco=125292&amp;chm=B,cee1f5,0,0,0&amp;chls=2&amp;chs=408x237&amp;chxt=x,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&amp;chxr=1,9,15&amp;chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />    

我花了好几个小时试图弄明白这一点,我觉得我错过了一些非常简单的事情。我必须使用扩展编码,因为我的程序最终要处理的数字范围很广,所以更改为“具有自定义缩放的文本格式”不是一个选项。

请阅读以下内容:

这是:

当使用简单编码或扩展编码时,无论您使用什么,数据都会以0-100的比例显示。这使得GoogleChart可以减少url长度,并将更多dat放入GET HTTP请求中

作为副作用,您必须缩放数据而不是轴。因为打印这些图表时不使用轴数据