2013-07-12 2 views
0

하이 차트에 문제가 생겼습니다. 전체 그래프를 따라 공간을 채우고 싶지만, 데이터와 내 div의 꼭대기 사이에는 항상 간격이 있습니다.Highcharts : 열 그래프에서 위쪽 간격을 사용하지 않습니다.

여기 경우 내 바이올린 : 여기 http://jsfiddle.net/w2bz5/35/

내 자바 스크립트 코드 :

사전에
jQuery(function() { 
    jQuery('#container').highcharts({ 
      chart: { 
       type: 'column', 
       backgroundColor: '#3d3d3d', 
       margin: [0, 0, 0, 0], 
       width: 100, 
       height: 100, 
      }, 
      title: { 
       text: null, 
       margin: 0, 
       floating: true, 
       verticalAlign: 'bottom', 
       x: 0, 
       y: 0 
      }, 
      plotOptions: { 
       column: { 
        stacking: 'normal', 
        dataLabels: { 
         enabled: false 
        } 
       } 
      }, 
      yAxis: { 
       title: { 
        text: null, 
        margin: 0 
       }, 
       labels: { 
        enabled: false 
       }, 
       gridLineWidth: 0, 
       lineWidth: 0, 
       minorGridLineWidth: 0, 
       lineColor: 'transparent', 
       minorTickLength: 0, 
       tickLength: 0 
      }, 
      tooltip: { 
       enabled: false 
      }, 
      xAxis: { 
       title: { 
        text: null 
       }, 
       labels: { 
        enabled: false 
       }, 
       gridLineWidth: 0, 
       lineWidth: 0, 
       minorGridLineWidth: 0, 
       lineColor: 'transparent', 
       minorTickLength: 0, 
       tickLength: 0 
      }, 
      legend: { 
       enabled: false 
      }, 
      credits: { 
       enabled: false 
      }, 
      series: [{ 
       data: [1298], 
       color: '#00FF00', 
       borderColor: null 
      }, { 
       data:[4302], 
       color: '#FF0000', 
       borderColor: null 
      }] 
     }); 
    }); 

감사합니다!

Snite 설정할 수 있습니다

답변

4

스태킹%에보다는 정상.

plotOptions: { 
    column: { 
     stacking: 'percent', 
     dataLabels: { 
      enabled: false 
     } 
    } 
}, 

문서 : High Charts Documentation

정상 스태킹 당신이 컬럼의 크기가 다른 것 의미 각 열, 다양한 가치가있을 것입니다 가정 - 그것은 상단에있는 공간 나뭇잎 그 이유는. 백분율로 설정하면 모든 열이 포함하는 값에 관계없이 모든 열의 높이가 같아집니다. 당신이 그 (것)들에게이 작은 유지에하려는 경우 보조 노트에

수출 버튼는 그래프의 방법으로 될 것입니다. 이것을 옵션 목록에 추가하여 제거 할 수 있습니다.

exporting: { 
    enabled: false 
} 

Fiddle Link

관련 문제