deqingli commented on issue #10991: themeRiver get all data of the river in the 
formatter.  主题河流图获取某一河流在所有时间点的数据
URL: 
https://github.com/apache/incubator-echarts/issues/10991#issuecomment-553402247
 
 
   Sorry, I don't understand your problem, I wonder if the following code can 
meet your question:
   ```js
   // the raw data you input into echarts
   
   var initialData = 
[['2015/11/08',10,'DQ'],['2015/11/09',15,'DQ'],['2015/11/10',35,'DQ'],
                         
['2015/11/08',35,'TY'],['2015/11/09',36,'TY'],['2015/11/10',37,'TY'],
                         
['2015/11/17',36,'SS'],['2015/11/18',33,'SS'],['2015/11/19',43,'SS']];
   
   formatter: function (params) {
       var name = params[0].name;
       var riverName = [];
       for (var i = 0; i < initialData.length; i++) {
           if (initialData[i][2] === name) {
               riverName.push(initialData[i]);
           }
       }
       console.log(riverName)   // All the data of a river
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to