I want to use string template to get data, but I did’t.
Here is the official example.
enter image description here
This is my example,I get An array by using template.I want it is similar width the official.
enter image description here
echarts example
It seems like the string template formatting doesnt work with dataset. In your example without dataset the string template formatting works just fine (see here).
But you can still use the callback function which could look like the following for your example:
Example:
formatter: function(params) {
const x = params[0].data[0];
const data = params[0].data;
const dimensions = params[0].dimensionNames;
let formatString = x + "<br/>";
[1,2,3].map(index => formatString += dimensions[index] + ": " + data[index] + "<br/>")
return formatString;
}