我正在尝试将3d Pie中的html工具提示隐藏为空,就像这张图片一样:
当我单击图例时,工具提示将被填充,如下所示:
var series = chart.series.push(new am4charts.PieSeries3D());
series.dataFields.value = "litres";
series.numberFormatter = new am4core.NumberFormatter();
series.numberFormatter.numberFormat = "#.###,##";
series.dataFields.category = "country";
series.slices.template.propertyFields.url = "url";
series.slices.template.urlTarget = "_blank";
series.slices.template.stroke = am4core.color("#fff");
series.slices.template.strokeWidth = 2;
series.slices.template.strokeOpacity = 1;
series.tooltip.pointerOrientation = "vertical";
series.tooltipHTML = `<center><strong>{country}</strong></center>
<hr />
<table>
<tr>
<th align="left">Litri</th>
<td>{litres}</td>
</tr>
<tr>
<th align="left">Ultimo aggiornamento</th>
<td>{ultimoaggiornamento}</td>
</tr>
</table>
<hr />`;