2017-02-15 130 views
0

我已經創建了一個包含多個座標軸的圖表。 x軸是最小週期「秒」的日期。 問題是,它只同時顯示一個氣球。它應該顯示所有氣球。 (在這種情況下 - > 2)在數據提供程序AmCharts:在圖表中顯示所有氣球到x軸

日期屬性:d.date(新日期(年,毫米,DD,HH,毫米,SS,0);

... 
valueAxes.push({ 
         "id": "v" + i, 
         "axisColor": '#' + farbcode[i], 
         "axisThickness": 2, 
         "offset": offset, 
         "gridAlpha": 0, 
         "axisAlpha": 1, 
         "position": pos 
        }); 
... 
graphs.push({ 
         "valueAxis": "v" + i, 
         "lineColor": valueAxes[i].axisColor, 
         "bullet": "round", 
         "balloonText": "<span style='font-size:13px;'><b>[[value]]</b><br>[[dateformated]]</span>", 
         "bulletBorderThickness": 1, 
         "hideBulletsCount": 30, 
         "title": window.bezei[i], 
         "valueField": window.bezei[i], 
         "fillAlphas": 0 
        }); 
... 


window.chart = AmCharts.makeChart(chartid[0].id, { 
        "type": "serial", 
        "theme": "light", 
        "legend": { 
         "useGraphSettings": true 
        }, 
        "dataProvider": chartData, 
        "valueAxes": valueAxes, 
        "graphs": graphs, 
        "synchronizeGrid": true, 
        "chartScrollbar": {}, 
        "chartCursor": { 
         "cursorPosition": "mouse" 
        }, 
        "categoryField": "date", 
        "categoryAxis": { 
         "minPeriod": "ss", 
         "parseDates": true, 
         "axisColor": "#DADADA", 
         "minorGridEnabled": true 
        }, 
        "export": { 
         "enabled": true, 
         "dateFormat": "YYYY-MM-DD HH:NN:SS", 
         "position": "bottom-right" 
        } 
       }); 

enter image description here enter image description here

+0

您的代碼對我的作品[我的小提琴(http://jsfiddle.net/2xrcjpfw/)。你能提供一個可以重現你的問題的小提琴嗎? – xorspark

回答

0

從來就發現我的問題。

我在添加的元素我chartData []爲每個變量。

我具有與本二者結合起來元素。

enter image description here