How Echart4 implements another array of tooltip (not associated with X or Y axis)

in my echart4, the X axis is the project name, and the Y axis is the value, BAR type. I want to implement that when moving to the project to which the corresponding X axis belongs, the prompt (tooltip) displayed is the project number. Different items have different numbers. This item number does not appear in the X-axis classification. Is a completely separate field. May I ask how to achieve it? I have looked up a lot of information on the Internet, all according to different categories, the definition of tooltip format.

Jun.06,2021

refer to the example of tooltip.formatter 's documentation,

   formatter: function (params, ticket, callback) {
   // $.get('detail?name=' + params.name, function (content) {
   //    callback(ticket, ticket);
   // });
    return  JSON.stringify (params);

tooltip:{
    formatter:params => {
        //params 
        
        return '';  //  
    }
}

but this is multiple data, if your echarts chart shows the trend of one of the factors in multiple projects

Menu