Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Highcharts组合图表:如何将行置于列上方(shift/offset)_Charts_Highcharts_Position_Line_Combinations - Fatal编程技术网

Highcharts组合图表:如何将行置于列上方(shift/offset)

Highcharts组合图表:如何将行置于列上方(shift/offset),charts,highcharts,position,line,combinations,Charts,Highcharts,Position,Line,Combinations,我有一个有效的组合图。行+列 这条线位于图表底部,因为数字很低(在5-10%之间)。列数约为80%,因此它们位于图表顶部。这是正常的行为 我知道在Excel中,您可以将这一行移动或偏移到图表顶部,使其位于列的顶部。。。这在海图上可能吗?如何在Highcharts中进行此偏移?我在文档中到处查找,但找不到解决方案 提前感谢, Bart您可以使用第二个yAxis,这样您就可以设置极值,作为偏移量,请参见: var chart = new Highcharts.Chart({ chart:

我有一个有效的组合图。行+列

这条线位于图表底部,因为数字很低(在5-10%之间)。列数约为80%,因此它们位于图表顶部。这是正常的行为

我知道在Excel中,您可以将这一行移动或偏移到图表顶部,使其位于列的顶部。。。这在海图上可能吗?如何在Highcharts中进行此偏移?我在文档中到处查找,但找不到解决方案

提前感谢,


Bart

您可以使用第二个yAxis,这样您就可以设置极值,作为偏移量,请参见:

var chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container'
    },
    xAxis: {
        categories: ['01/02/2012', '01/03/2012', '01/04/2012', '01/05/2012', '01/06/2012', '01/07/2012']
    },
    yAxis: [{
        // default options
    }, {
        opposite: true,
        min: 0,
        max: 5
    }],
    series: [{
        type: 'column',
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0]
    }, {
        type: 'line',
        data: [4, 4, 4, 4, 4, 4],
        yAxis: 1
    }]
});