有谁知道为什么这是一个糟糕的请求?
http://chart.apis.google.com/chart?cht=lxy&
chd=t:0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100&
chco=3072F3,ff0000,00aaaa,541269&chs=1000x200&chxt=x,y&
chxl=0:|18|18|18|18|18|19|19|19|19|19|19|20|20|20|20|20|20|21|21|21|21|21|21|22|22|22|22|22|22|23|23|23|23|23|23|0|0|0|0|0|0|1|1|1|1|1|1|2|2|2|2|2|2|3|3|3|3|3|3|4|4|4|4|4|4|5|5|5|5|5|5|6|6|6|6|6|6|7|7|7|7|7|7|8|8|8|8|8|8|9|9|9|9|9|9|10|10|10|10|10|10|11|11|11|11|11|11|12|12|12|12|12|12|13|13|13|13|13|13|14|14|14|14|14|14|15|15|15|15|15|15|16|16|16|16|16|16|17|17|1:||3.5|7|10.5|14
尝试在图表上绘制四条线
感谢
答案 0 :(得分:7)
Google图表具有最大长度的URL,无需提供错误即可处理。我不确定这个限制是什么,但是你的URL长度是4774个字符,我认为限制只是超过2000个字符。
您可能需要使用简单或扩展数据编码而不是文本编码。文本编码是为Google Charts API编码数据的空间效率最低的方法。有关详细信息,请参阅Data Formats API文档。
答案 1 :(得分:3)
正如格雷格所说,你的网址太长了。
网址的最大长度不是由Google Chart API决定的,而是由网络浏览器和网络服务器考虑决定的。目前,不推荐在URL编码时(例如,|变为%7C)长度超过2048个字符的URL。随着Web浏览器和服务器的发展,这个数字可能会发生变化。有关更深入的讨论,请参阅http://www.boutell.com/newfaq/misc/urllength.html。
查看Google Chart API FAQ以获取更多信息
答案 2 :(得分:0)
虽然这已经得到了正确回答,但我认为使用您的数据提供实用的解决方案可能很有用:
<form id='graphform' name='graphform' action='https://chart.googleapis.com/chart' method='POST' target='graph_target'>
<input type="hidden" name="cht" value='lxy' />
<input type="hidden" name="chd" value="t:0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|0,0.7,1.4,2.2,2.9,3.6,4.3,5,5.8,6.5,7.2,7.9,8.6,9.4,10.1,10.8,11.5,12.2,12.9,13.7,14.4,15.1,15.8,16.5,17.3,18,18.7,19.4,20.1,20.9,21.6,22.3,23,23.7,24.5,25.2,25.9,26.6,27.3,28.1,28.8,29.5,30.2,30.9,31.7,32.4,33.1,33.8,34.5,35.3,36,36.7,37.4,38.1,38.8,39.6,40.3,41,41.7,42.4,43.2,43.9,44.6,45.3,46,46.8,47.5,48.2,48.9,49.6,50.4,51.1,51.8,52.5,53.2,54,54.7,55.4,56.1,56.8,57.6,58.3,59,59.7,60.4,61.2,61.9,62.6,63.3,64,64.7,65.5,66.2,66.9,67.6,68.3,69.1,69.8,70.5,71.2,71.9,72.7,73.4,74.1,74.8,75.5,76.3,77,77.7,78.4,79.1,79.9,80.6,81.3,82,82.7,83.5,84.2,84.9,85.6,86.3,87.1,87.8,88.5,89.2,89.9,90.6,91.4,92.1,92.8,93.5,94.2,95,95.7,96.4,97.1,97.8,98.6,99.3|100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100" />
<input type="hidden" name="chco" value="3072F3,ff0000,00aaaa,541269" />
<input type='hidden' name='chs' value='1000x200' />
<input type="hidden" name="chxt" value="x,y" />
<input type="hidden" name="chxl" value="0:|18|18|18|18|18|19|19|19|19|19|19|20|20|20|20|20|20|21|21|21|21|21|21|22|22|22|22|22|22|23|23|23|23|23|23|0|0|0|0|0|0|1|1|1|1|1|1|2|2|2|2|2|2|3|3|3|3|3|3|4|4|4|4|4|4|5|5|5|5|5|5|6|6|6|6|6|6|7|7|7|7|7|7|8|8|8|8|8|8|9|9|9|9|9|9|10|10|10|10|10|10|11|11|11|11|11|11|12|12|12|12|12|12|13|13|13|13|13|13|14|14|14|14|14|14|15|15|15|15|15|15|16|16|16|16|16|16|17|17|1:||3.5|7|10.5|14" />
</form>
<iframe name='graph_target' src='' style='width:1000px;height:200px;'></iframe>
<script type="text/javascript">
document.forms["graphform"].submit();
</script>
这会产生一个相当无信息的图形!