无法移动我的范围选择器

时间:2014-03-20 22:34:33

标签: javascript jquery html css chart.js

我无法移动范围... 我正在尝试使用图表js库和构建范围选择器..我已经关闭了所有库..但仍然范围选择器没有显示...你们可以告诉我为什么它没有出现...证明我的小提琴下面.. 。这个代码的nopt workimg ..

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
    },
    //...
});

1 个答案:

答案 0 :(得分:0)

您需要在演示中设置dataSource或startValue,endValue。 jsfiddle已更新:http://jsfiddle.net/v5LTM/3/

使用DataSource:

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

使用startValue / endValue:

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