删除栏栏上方的填充

时间:2014-03-24 12:18:04

标签: highcharts

我们有一个条形图,其中列未到达图形容器的顶部。我们怎样才能删除它?

{
data: {
    chart: {
        type: 'column',
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false,
        margin: [0, 0, 0, 0],
        backgroundColor:'rgba(255,255,255,0.002)'
    },
    colors: TallPoppies.templateColours, 
    legend: {
        enabled: false
    },
    title: null,
    plotOptions: {
        series: { 
            animation: false
        }, 
        column: {
            cursor: 'pointer',
            dataLabels: {
                enabled: false
            },
            groupPadding: 0,
            pointPadding: 0.1,
            borderColor: 'pink'
        }
    },
    series: [{
        type: 'column',
        name: 'Skill',
        data: [
            { name:'blah 1', 
              color: 'red',
              y: 2
            },
            { name:'blah 2', 
              color: 'yellow',
              y: 4
            },
        ]
    }],
    xAxis: {
       lineWidth: 0,
       minorGridLineWidth: 0,
       lineColor: 'transparent',
       labels: {
           enabled: false
       },
       minorTickLength: 0,
       tickLength: 0
    },
    yAxis:{ 
      gridLineWidth: 0,
      minorGridLineWidth: 0
    }
}

}

1 个答案:

答案 0 :(得分:3)

集:

请参阅:

yAxis:{ 
  endOnTick: false,
  maxPadding: 0,
  gridLineWidth: 0,
  minorGridLineWidth: 0
}