使用保存高度Highcharts更改步骤

时间:2014-02-17 12:42:24

标签: highcharts height

我在Highcharts上有一个简单的折线图:

enter image description here

我需要将高度更改为250px,但是当我更改图表的高度时 - Y轴上的步骤(50)也发生了变化(100):

enter image description here

如何在不改变步骤的情况下改变身高?

$(function () {
$('#container').highcharts({

    chart: {
        renderTo: 'container',
        alignTicks: true,
        type: 'line',
        reflow: false,
        height: 250 //how i can do it in this case?
    },

  labels: { 
    style: { 
      left: '100px',
      top: '50px'
    }},
    credits: {
      enabled: false
    },

    xAxis: {
        categories: [2012, 2013, 2014, 2015, 2016],
        gridLineWidth: 1,
        title: {
            text: null
        }
    },

    yAxis: {
        minTickInterval: 50,
        gridLineWidth: 1,
        min: 0,
        max: 350,
        startOnTick: false,
        showFirstLabel: false,
        title: {
            text: null
        }
    },

    exporting: { 
        enabled: false,
        printButton: {
            enabled: false
        }
    },

    series: [{
        data: [313.75, 323.75, 313.75, 323.75,313.75],
        showInLegend: false
    }]

});
});

感谢您的回答!

0 个答案:

没有答案