2017-02-15 106 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