【问题标题】:Convert my google chart to google line chart将我的谷歌图表转换为谷歌折线图
【发布时间】:2011-09-17 16:24:12
【问题描述】:

我想改变这个:

chxl=1:|04:00|05:30|2:|Time|3:|Calories|
&chxr=0,28,362.59
&chxt=y,x,x,y
&chs=900x300
&cht=bvg
&chco=A2C180
&chds=28,362.59
&chbh=a
&chd=t:359,56

折线图,像这样:

chs=440x220
&chxt=y,x,x,y
&cht=lc
&chco=3072F3
&chd=t:931.4,23.5,572.4,0,0,0,0
&chds=0,2500
&chxr=0,0,2500|1,1,7,1
&chxl=2:|Time|3:|Calories|
&chdl=Energi
&chdlp=b
&chls=2
&chma=5,5,5,25
&chm=o,000000,0,-1,5

我不知道把小时值放在哪里,04:00 和 05:30。

我想做的是在 X 上显示小时数,在 Y 上显示卡路里,然后在图表中为每个小时制作一个“点”,例如 04:00。

如何将当前图表更改为折线图?

【问题讨论】:

    标签: charts google-visualization


    【解决方案1】:

    我有点困惑,因为您的折线图示例中的数据与您的条形图示例非常不同(这是故意的吗?)。

    你在寻找这样的东西吗?

    https://chart.googleapis.com/chart?
    chxl=1:|04:00|05:30|2:|Time|3:|Calories|&
    chxr=0,28,362.59&
    chxt=y,x,x,y&
    chs=900x300&
    cht=lc&
    chco=A2C180&
    chds=28,362.59&
    chd=t:359,56&
    chdl=Energi&
    chm=s,000000,0,-1,4
    

    参数键(来自Google Chart Tools: Image Charts):

    chxl - Custom Axis Labels
    chxr - Axis Range 
    chxt - Visible Axes
    chs - Chart Size
    cht - Chart Type (bvg - vertical bar chart with grouped bars, lc - line chart)
    chco - Series color
    chds - Custom scaling
    chbh - Bar Width and Spacing (not needed for line chart)
    chd - Chart data
    chdl - Series display legend. 
    chm - Chart marker
    

    【讨论】:

      猜你喜欢
      • 2022-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-27
      • 2020-08-06
      • 1970-01-01
      相关资源
      最近更新 更多