使用Chart.js自定义y轴

时间:2017-03-16 15:12:59

标签: javascript jquery chart.js

我有这个条形图,我需要自定义" y"如果说半边和全面,它会让杆一直向上,一半。我读到了自定义比例,但无法找到关于如何做我正在尝试的事情。

parsing_file

提前谢谢!

2 个答案:

答案 0 :(得分:0)

chartJS中有一些选项可以帮助您缩放Y轴:

以下是一个例子:

   {
        scaleSteps: 3,
        scaleStepWidth: 1,
        scaleStartValue: 0,
    }

这会给你:

enter image description here

因此,对于您使用的半步:scaleStepWidth:0.5

答案 1 :(得分:0)

是的,你想要的是可能的。您只需使用比例git checkout <source> # fill index with contents of <source> git symbolic-ref HEAD <target> # tell git we're committing on <target> git commit -m "Setting contents to <source>" # make an ordinary commit with the contents of <source> 选项。这是一个例子。

ticks.callback