我使用简单的Google图表来描绘基准:
由于大多数数据位于50到100之间,我试图使范围变小,但这会导致图形不正确。
红线的第一个值从第一个图表的72开始,但在第二个图表的第87个。 HTML代码如下所示:
<img src="http://chart.apis.google.com/chart?chxr=0,50,100|1,0,50&chxt=y,x&chs=900x300&cht=ls&chco=DA3B15,3072F3&chd=s:stt3rp3ts7rp2ut7uz7tt5rr5rw5rs2qr2qr2tq5rr3qp3rr2q,uqq2sp0nqnzoop3qq2tt4tr2sr2rw1rq2rr2qs3pozpoo4rp2p&chdl=With+lock|Without+lock&chg=50,20&chls=2|2&chtt=FluorineFx+-+FactoryInstance+with%2Fwithout+lock&chts=676767,13" width="1000" height="300" alt="FluorineFx - FactoryInstance with/without lock" />
有没有人可以帮助正确缩放图表?
答案 0 :(得分:0)
为了使其工作,我必须将输入数据更改为纯数据格式:
chd=t:72,73,... // char data
定义轴范围的所需范围:
chxr=0,60,100,10|1,0,50,5
指定字符自定义缩放值:
chds=60,100
结果是:
<img src="https://chart.googleapis.com/chart?chs=900x300&cht=ls&chd=t:72,73,73,90,71,68,90,73,72,97,71,68,88,76,74,97,76,84,96,74,74,94,70,70,94,71,78,93,71,72,89,69,70,89,69,70,88,74,69,94,71,71,90,69,68,90,71,70,89,69|75,69,69,89,72,67,85,64,69,64,84,65,65,67,90,69,69,89,73,73,92,74,70,88,72,70,88,71,78,87,70,69,88,70,71,88,69,72,90,68,65,84,67,66,66,91,71,68,89,68&chxt=y,x&chds=60,100&chxr=0,60,100,10|1,0,50,5&chbh=35&chg=10,10&chco=DA3B15,3072F3&chdl=With+lock|Without+lock&chtt=FluorineFx+-+FactoryInstance+with%2Fwithout+lock"/>