About Baidu echarts tooltip >

this is my data format

{
  "data":[{
    "yData": [1,4,5,7,11,20,30],
    "name": ["","","","","","",""]
  },{
    "yData": [2,5,9,12,22,28,31],
    "name": ["","","","","","",""]
  },{
    "yData": [1,7,13,16,18,23,25],
    "name": ["","","","","","",""]
  }],
  "name": ["","",""]
}
The

chart is as follows:

I think the broken line displays the corresponding name, in the data at each point. What should I do?

Thank you!


http://echarts.baidu.com/exam.
to see if it's the effect you want


there is a way:

tooltip: {
            trigger: 'item',
            formatter: function (data) {
                for(var i=0;i<data.seriesName.split(',').length;iPP) {
                    console.log(data)
                    return data.seriesName.split(',')[data.dataIndex]
                }
            }
        }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43b0b-44a48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43b0b-44a48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?