2013-06-05 1 views

답변

3

의가 분명히 만들어 보자 :

  • 예 : 일부 클릭 그것은 드릴처럼 행동하게 결합하여 http://jsfiddle.net/neFYY/2/는 플러그인을받지 못하면, 단순한 Highcharts 차트입니다.

  • 이 예를 들어 : http://jsfiddle.net/highcharts/Vf3yT/가 작동하도록 일부 특정 구조를 필요로 플러그인, IS는 (참조 : drilldown 개체) 그래서

을 먼저 차트 플러그인을 사용하려는 경우, 당신은 적절한 통과해야 입니다 플러그인 구조 :

drilldown: { 
    activeAxisLabelStyle: { 
     cursor: 'pointer', 
     color: '#039', 
     fontWeight: 'bold', 
     textDecoration: 'underline'    
    }, 
    activeDataLabelStyle: { 
     cursor: 'pointer', 
     color: '#039', 
     fontWeight: 'bold', 
     textDecoration: 'underline'    
    }, 
    animation: { 
     duration: 500 
    }, 
    series: [{ 
     id: 'fruits', 
     name: 'Fruits', 
     data: [ 
      ['Apples', 4], 
      ['Pears', 6], 
      ['Oranges', 2], 
      ['Grapes', 8] 
     ] 
    }, { 
     id: 'cars', 
     name: 'Cars', 
     data: [{ 
      name: 'Toyota', 
      y: 4, 
      drilldown: 'toyota' 
     }, 
     ['Volkswagen', 3], 
     ['Opel', 5] 
     ] 
    }, { 
     id: 'toyota', 
     name: 'Toyota', 
     data: [ 
      ['RAV4', 3], 
      ['Corolla', 1], 
      ['Carina', 4], 
      ['Land Cruiser', 5] 
     ] 
    }] 
}, 

그리고 시리즈 :

series: [{ 
    name: 'Overview', 
    colorByPoint: true, 
    data: [{ 
     name: 'Fruits', 
     y: 10, 
     drilldown: 'fruits' 
    }, { 
     name: 'Cars', 
     y: 12, 
     drilldown: 'cars' 
    }, { 
     name: 'Countries', 
     y: 8 
    }] 
}] 
+0

두 번째 예에서 말하는 플러그인에 대해 설명해 주시겠습니까? –

+0

물론, 하이 차트에 대한 drilldown.js 플러그인은 [API] (http://api.highcharts.com/highcharts#drilldown) (맨 위)를 참조하십시오. –

1

잘 모르겠어요, 당신은 fisrt 예에서 pluginhttp://jsfiddle.net/Vf3yT/62

톱 차트를 사용할 수있는 버튼을 추가하는 두 번째 바이올린과 동일합니다.

+0

이 차트에 드릴 다운 모듈을 추가하면 http://jsfiddle.net/neFYY/1/ – breq

+0

이 첫 번째 차트는 동일하지만 유일한 차이점은 datalabel (백분율)이므로 http://jsfiddle.net/Vf3yT입니다./63/너와 똑같아. –

+0

좋아, 그럼 http://jsfiddle.net/neFYY/1/가 작동하지 않는 이유는 무엇입니까? 뭐가 문제 야? – breq

관련 문제