【问题标题】:Is it possible to revert x-axe values in line chart with chart.js是否可以使用 chart.js 反转折线图中的 x 轴值
【发布时间】:2015-03-07 15:03:11
【问题描述】:

我正在使用chart.js,我有line chart 的值from 10 to 100。 我的最高点的值为 100,但这对我的数据不正确。对我来说,100 是不好的结果。有没有办法revert x-axe to start from 100 to 10

如果不可能,有人可以推荐 javascript (NO jQuery) 图表,可以解决我的问题吗?

【问题讨论】:

    标签: javascript charts chart.js


    【解决方案1】:

    在您的图表选项中试试这个:

    scaleOverride: true,   
    scaleSteps: 10,
    scaleStartValue: 100,
    scaleStepWidth: -10
    

    它应该只是做的伎俩。

    a jsfiddle of it here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多