HighCharts:将xAise线渲染为yAise线

时间:2017-03-29 06:36:25

标签: highcharts

我正在尝试将xAise线渲染为yAise线,但我不知道哪个配置属性会显示它?如何降低HighCharts的高度呢?我试过了“maxPadding:0'在yAxis但没有seccuss。

https://jsfiddle.net/ow6hqmu3/

Highcharts.chart('container',
{
    chart: {
        type: 'columnrange',
        inverted: true
    },
    credits: {
        enabled: false
    },
    title: {
        text: null
    },
    subTitle: {
        text: null
    },
    legend: {
        enabled: false,
    },
    plotOptions: {
        series: {
            pointWidth: 30
        }
    },
  xAxis: {
    min: 0,
    max: 3,
    categories: [' ',' ',' ','Woring time'],
    title: {
      text: null
    },
          gridLineWidth: 0      
    },
    yAxis: {
        type: 'datetime',
        title: {
            text: null
        },
        labels: {
            rotation: -45
        },
        tickInterval: 1800000,
        gridLineWidth: 0 
    },
    series: [{
      data: [
            [3, 1483337940000, 1483338000000],
            [3, 1483338300000, 1483339740000],
            [3, 1483340580000, 1483340640000],
            [3, 1483340820000, 1483341000000],
            [3, 1483342860000, 1483342920000],
            [3, 1483346460000, 1483346520000],
            [3, 1483347180000, 1483348440000],
            [3, 1483348620000, 1483348740000],
            [3, 1483350180000, 1483350240000],
            [3, 1483350420000, 1483351380000],
            [3, 1483353300000, 1483353420000],
            [3, 1483355280000, 1483355340000],
            [3, 1483358580000, 1483359780000],
        ]
    }]
 }
);

1 个答案:

答案 0 :(得分:0)

要降低高度,您必须在div的CSS中指定它,或者直接如下:

<div id="container" style="height: 100px;"></div>

你可以对宽度做同样的事情:

<div id="container" style="height: 100px; width=300px"></div>