2014-03-14 4 views
0

막대 차트에서 막대 사이의 거리를 설정하는 방법이 있습니까? 모든 막대의 설명으로 이미지를 추가하여 막대를 이미지의 중심에 배치해야합니다. 순간 차트에서 막대 사이의 거리 설정

나는 레이블로 HTML을 사용하지만 결과는 예상대로되지 않습니다 :

http://jsfiddle.net/troynt/KrTbz/3/

xAxis: { 
    tickLength: 0, 
    lineWidth: 0, 
    categories: ['Awesome', 'Awesome Previous'], 
    title: { 
    text: null 
    }, 
    labels: { 
    //     enabled: false, 
    color: '#fff', 
    x: 5, 
    useHTML: true, 
    formatter: function() { 
     return { 
     'Awesome': '<img class="" src="http://dummyimage.com/60x200/ff6600/ffffff"/>', 
     'Awesome Previous': '<img class="" src="http://dummyimage.com/60x200/ff3300/ffffff"/>', 
     'Good': '<img class="" src="http://dummyimage.com/60x200/ff6644/ffffff"/>' 
     }[this.value]; 
    } 
    } 
}, 

enter image description here

답변

0

는 유일한 방법은 차트의 높이를 설정하는 것입니다 보인다 ,이 경우에는 이미지 높이의 3 배에 약간의 패딩을 더한 것입니다.

관련 문제