简体   繁体   中英

AmCharts: Show all balloons in chart to x-axis

I´ve created an chart with several axis. The x-axis is a date with the min period "seconds". The problem is, that it only shows one balloon at the same time. It should display all balloons. (In that case --> two)

Date property in dataProvider: d.date(new Date(year, mm, dd, hh, mm, 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"
                    }
                });

在此处输入图片说明 在此处输入图片说明

I´ve found my problem.

I added an element in my chartData[] for each variable.

I have to combine this two elements.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM