1
{
   colors: ['red','#009966'],
   chart: {
          height: 150,
          width: 350,
          type: 'bar',
          backgroundColor: '#efefef',
          marginLeft:150
         },
   title: {
          text: 'Workgroup Ticket in SLA',
          style: {
          color: 'black',
          fontWeight: 'bold',
          fontSize: '16px'
          }
    },
    xAxis: {
           x:-15,
           y:2,
           lineColor: '#82CAFF',
           lineWidth: 1,
           categories: ['AS Front End Eng.', 'AS FFE Support', 'AS UI Transaction','AS UI Merchandizing','AS UI Infrastructure','AS Website Festures'],
           labels: {
           style: {
                   color: 'black',
                   fontSize: '8px',
                   fontWeight: 'bold',
                   fontFamily: 'Verdana, sans-serif'
                  }
                }
            },
            yAxis: {
                lineColor: '#82CAFF',
                lineWidth: 1,
                gridLineDashStyle: 'dot',
                tickPositions: [0,20,40,60,80,100],
                width:160,
                title: {
                    text: ''
                },
                labels: {
                style: {
                    color: 'black',
                    fontSize: '9px',
                    fontWeight: 'bold',
                    fontFamily: 'Verdana, sans-serif'
                }
                }
            },
            legend: {
                enabled: false,
                backgroundColor: '',
                reversed: true
            },
            plotOptions: {

                series: {
                    stacking: 'normal',                      
                }
            },
                series: [ {
                name: '',
                data: [0, 5, 62, 50, 22,22]
            },
                         {
                name: '',
                data: [100,95,38,50,78,78]
           }
     ]
 }

这是 jsfiddle 链接http://jsfiddle.net/SMrKu/

我想删除在高图表的左右两侧创建的额外空间。

但是在减小宽度时,它在高图表中显示错误。

4

2 回答 2

2

你可以设置spacingLeft 和spacingRight 属性。

chart: {
        type: 'bar',
        spacingLeft:0,
        spacingRight:0,
    },

您可以查看以下链接中的示例:

http://jsfiddle.net/vpL0j2av/1/

于 2016-10-15T09:38:54.723 回答
1

而不是减少宽度,减少边距-Left

http://api.highcharts.com/highcharts#chart

编辑:你可以减少spacingLeft和spacingRight http://api.highcharts.com/highcharts#chart.spacingLeft

于 2013-06-04T06:31:18.160 回答