【问题标题】:not able to move my range slector无法移动我的范围选择器
【发布时间】:2014-03-20 22:34:33
【问题描述】:

我无法移动范围选择器... 我正在尝试使用图表 js 库并构建范围选择器..我已经排除了所有库..但范围选择器仍然没有出现......你们能告诉我为什么它没有出现......在下面证明我的小提琴...... . 它不适用于此代码..

http://chartjs.devexpress.com/Documentation/Tutorial/Configure_RangeSelector?version=13_2

小提琴不工作 http://jsfiddle.net/v5LTM/2/

var clientWidth = $('#rangeSelectorContainer').width();
$("#rangeSelectorContainer").dxRangeSelector({
    size: {
       height: (clientWidth - 2*65) / 4 + 20+30
    },
    scale: {
        //...
        placeholderHeight: 20
    },
    sliderMarker: {
        placeholderSize: {
            width: 65,
            height: 30
        }
    },
    margin: {
        top: 0,
        bottom: 0,
        left: 0,
        right: 0
    },
    //...
});

【问题讨论】:

    标签: javascript jquery html css chart.js


    【解决方案1】:

    你需要设置一个dataSource或startValue,endValue就像在demo中一样。 jsfiddle 更新:http://jsfiddle.net/v5LTM/3/

    使用数据源:

    dataSource: [
        {arg: 0},
        {arg: 1},
        {arg: 2},
        {arg: 3}
    ],
    

    使用 startValue/endValue:

    scale: {
        //...
        startValue: 10,
        endValue: 20,
        placeholderHeight: 20
    },
    

    【讨论】:

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