如何在graphael y轴上设置最大值以及为什么?

时间:2014-01-13 14:33:14

标签: javascript raphael graphael

我尝试使用graphael折线图表示几点。几乎所有这些都低于0.03。但是,图表将1设置为最大值,并且所有点在图表中显示为非常低。当我有一个超过0.03的点时,graphael将最大值设置为大于0.03,因此图表显示正确。对于我的所有积分都低于0.03的其他情况,我该怎么办?这真的非常糟糕,根本没用。

有没有办法自动设置y轴的最大值?

如果你无法帮助我,请你运行它,告诉我他是否可以正常运行?这不会花费太多时间......

这就是我的意思 enter image description here

我注意到它也可能产生非常错误的y轴标签......

我的代码如下所示

var lines = r.linechart(30, 30, 600, 440,[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]],[[0.02046,0.00635,0.02813,0.02808,0.02385,0.00729,0.02145,0.01978,0.02683,0.03006,0.03105,0.01211,0.0083,0.0022,0.02172,0.01541,0.01181,0.02418,0.00552,0.02708,0.01011,0.0105,0.0294,0.00132,0.00615,0.02303,0.00065,0.00967,0.00381,0.02167,0.01357,0.0221,0.02512,0.00918,0.01072,0.01083,0.00598,0.00195,0.01716,0.00347,0.03058,0.01815,0.02899,0.01537,0.0241,0.0241,0.00451,0.00088,0.01574,0.00688,0.0143,0.0024,0.03047,0.02876,0.00528,0.00996,0.00865,0.02681,0.02194,0.00082,0.00664,0.01178,0.01596,0.00516,0.0165,0.00895,0.01869,0.03082,0.02318,0.01089,0.00943,0.00986]], {axisxstep : 12,axisystep : 5,nostroke: false, axis: "0 0 1 1", symbol: "circle", smooth: true }).hoverColumn(function () {
    this.tags = r.set();


    for (var i = 0, ii = this.y.length; i < ii; i++) {
        this.tags.push(r.tag(this.x, this.y[i], this.values[i], 160, 10).insertBefore(this).attr([{ fill: "#fff" }, { fill: this.symbols[i].attr("fill") }]));
    }
}, function () {
    this.tags && this.tags.remove();
});

0 个答案:

没有答案