Есть ли возможность скрыть пустую подсказку в круговой диаграмме? - PullRequest
0 голосов
/ 23 апреля 2019

Я пытаюсь скрыть всплывающую подсказку html в 3D Pie, когда она пуста, например, это изображение:

enter image description here

при нажатии на легенду,подсказка заполнена так:

enter image description here

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 />`;
...