Highchart JS将min Y Axis设置为0到1

时间:2013-04-22 20:08:02

标签: javascript highcharts

我尝试将Y轴的min设置为1,如我在js小提琴中所示:http://jsfiddle.net/e2XPx/

任何人都知道默认情况下如何将0值设为1?

$(function () {
    $('#container0').highcharts({
        chart: {
            type: 'line'
        },
        title: {
            text: 'Keyword: test'
        },
        xAxis: {
            categories:['04-14-2013','04-15-2013','04-16-2013','04-17-2013','04-18-2013','04-19-2013','04-20-2013']
        },
        yAxis: {
            allowDecimals: false,
            min: 1,


            title: {
                text: 'Number'

            },
            reversed: true
        },
        series: [{
            name: 'test',
            data:   [1,4,5,2,6,7,8]
        }],
    });
});

1 个答案:

答案 0 :(得分:0)