Highstock X-Axis: Categories in Place of Time

前端 未结 3 1760
猫巷女王i
猫巷女王i 2020-12-21 15:39

Is it possible to use categories as x-values in Highstock? I don\'t need a time bar as x-axes, but something like numbered ratings.

This works in Highcharts, but i

3条回答
  •  旧时难觅i
    2020-12-21 16:12

    You can use highstock release, but use highcharts and scrollbar.

    Take look at example:

    var chart = new Highcharts.Chart({
    
        chart: {
            renderTo: 'container'
        },
        xAxis:{
            min:0,
            max:2,
            categories:['first','second','third','fourth']
        },
        scrollbar: {
            enabled: true
        },
    
        rangeSelector: {
            enabled:false
        },
    
        series: [{
            name: 'USD to EUR',
            data: [1,3,4,6]
        }]
    });
    

    http://jsfiddle.net/b826C/

提交回复
热议问题