sxmpasch commented on issue #9257: echarts4.0 grid自定义多个tooltip无效的问题
URL: 
https://github.com/apache/incubator-echarts/issues/9257#issuecomment-433171770
 
 
   好。然后,您可以在全局设置中实现工具提示格式化程序。您可以使用params.seriesIndex来获取正确的 grid。
   
   Ok. Then you could implement the tooltip formatter in global settings. You 
can use the params.seriesIndex to get the correct grid:
   
   ```
   option = {
     title: [
             {
               text: 'grid自定义多个tooltip无效的复现',
               subtext: '',
               left: 'center',
               top: '0',
               textStyle: {
                 color: '#fff'
               }
             }
           ],
           tooltip : {
               show: true,
               formatter: function(params) {
                   if (params[0].seriesIndex<2) {
                       return '123'
                   } else {
                       return '456'
                   }
               }
           },        
   ...
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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