You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "winsmith (via GitHub)" <gi...@apache.org> on 2023/02/27 16:27:06 UTC

[GitHub] [echarts] winsmith commented on issue #9763: How to hide Null values showing in tooltip for ECharts?

winsmith commented on issue #9763:
URL: https://github.com/apache/echarts/issues/9763#issuecomment-1446643093

   Updated @ihakh's answer for 2023:
   
   ```javascript
         formatter: function (params) {
           var output = params[0].axisValueLabel + '<br/>';
           console.log(params);
   
           output += '<table class="w-full">';
   
           params.reverse().forEach(function (param) {
             const value = param.data[param.seriesIndex];
             if (value !== 0) {
               output += `<tr>
                 <td>${param.marker}</td>
                 <td>${param.seriesName}</td>
                 <td class="text-right font-bold tabular-nums">${value}</td>
               </tr>`;
             }
           });
   
           return output + '</table>';
         },
   ```
   
   Thanks a lot Ihakh!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org