2014-09-26 2 views
2

이것은 아마도 간단한 문제 일 뿐이며 잘못된 점을 알 수 없습니다. Candlesticks is always on top of lines in combo chart google charthttps://google-developers.appspot.com/chart/interactive/docs/gallery/candlestickchart의 코드를 사용하려고합니다. 내 HTML 코드 (이 다른 예제에서는 작동) 배치 할 시도했지만이 경우 작동하지 않습니다. 디버깅을 도와 줄 수 있는지 궁금합니다.Google 차트 - 콤보 차트 예 문제

<html> 
    <head> 
    <script type="text/javascript" src="https://www.google.com/jsapi"></script> 
    <script type="text/javascript"> 
     google.load("visualization", "1", {packages:["corechart"]}); 
google.setOnLoadCallback(drawVisualization); 



function drawVisualization() { 
    // Create and populate the data table. 
    var data = new google.visualization.DataTable(); 
    data.addColumn('string', 'Day'); 
    data.addColumn('number', 'Dummy'); 
    data.addColumn('number', 'Range'); 
    data.addColumn({type: 'number', role: 'interval'}); 
    data.addColumn({type: 'number', role: 'interval'}); 
    data.addColumn('number', 'Trend'); 
    data.addRows([ 
    ['Mon', 28, 10, -8, 17, 42.8], 
    ['Tue', 38, 17, -7, 28, 47.5], 
    ['Wed', 55, 22, -5, 25, 52.2], 
    ['Thu', 66, 11, -16, 11, 56.9], 
    ['Fri', 22, 44, -7, 44, 61.6], 
    ]); 

    // Create and draw the visualization. 
    var ac = new google.visualization.ComboChart(document.getElementById('visualization')); 
    ac.draw(data, { 
    title : 'Monthly Coffee Production by Country', 
    width: 600, 
    height: 400, 
    vAxis: {title: "Cups"}, 
    hAxis: {title: "Month"}, 
    isStacked: true, 
    seriesType: "bars", 
    series: {0: {color: 'transparent'}, 2: {type: "line"}} 
    }); 
} 



    </script> 
    </head> 
    <body> 
    </body> 
</html> 

답변

4
시각화라는 요소가 포함되지 않습니다 HTML 본문

-이이 차트는 아래 라인에 삽입됩니다 http://jsfiddle.net/s2nya2Lv/

이 해결합니까 : 여기

var ac = new google.visualization.ComboChart(document.getElementById('visualization')); 

은 바이올린의 귀하의 문제 또는 다른 문제가 있습니까? 귀하의 질문은 명확하게 문제가 무엇인지 설명하지 않습니다.