【问题标题】:Set Range for axis with google image charts使用谷歌图像图表设置轴范围
【发布时间】:2015-02-09 10:00:38
【问题描述】:

我正在尝试使用 chxr 更改图形范围。

我的代码是

<img class="image_graph" width="170px" height="180px" src="https://chart.googleapis.com/chart?chs=170x180&cht=ls&chco=0000FF&chd=t:<?php echo $test ?>&chxr=x,y,r&chxr=0,0,30|1,0,10|2,1000,0"/>

默认情况下它从0 to 100获取y轴。

我该如何纠正这个问题并允许更改我的范围?

我推荐了Image Charts。它说它已弃用。我应该使用其他 Google 库吗?

【问题讨论】:

    标签: charts google-api linechart


    【解决方案1】:

    Data Formats | Image Charts 是您正在寻找的。

    基本文本格式似乎只支持 0-100 范围。尝试Text Format with Automatic Scaling or Text Format with Custom Scaling 定义您自己的范围。

    您只需添加chds=a 即可使用自动缩放功能。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多