有没有办法设置图表的YSTEP?
我们正在尝试使用以下数据显示图表
g = new Dygraph(
document.getElementById("graph"),
[
[1,10,10],
[2,20.11,20],
**[3,10.111,10]**,
[4,20,20]],
{labels: [ "x", "A", "B" ]});
但是输出的结果是0.01,我们正在
g = new Dygraph(
document.getElementById("graph"),
[
[1,10,10],
[2,20.11,20],
**[3,10.11,10]**,
[4,20,20]],
{labels: [ "x", "A", "B" ]});
如何纠正?
答案 0 :(得分:1)
您想将digitsAfterDecimal
选项设置为3(默认为2):
g = new Dygraph(
document.getElementById("graph"),
[
[1,10,10],
[2,20.11,20],
[3,10.111,10],
[4,20,20]],
{
labels: [ "x", "A", "B" ],
digitsAfterDecimal: 3
});