Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
Piechart removing when click on slice in amcharts

I have created the amchart with piechart as follows:

am4core.useTheme(am4themes_animated);
var chart = am4core.create("venue_ap_health_chart", am4charts.PieChart);
chart.innerRadius = am4core.percent(60);
var count = chart.createChild(am4core.Label);
count.text = return_first[0];
count.isMeasured = false;
count.fontSize = 25;
count.x = am4core.percent(50);
count.horizontalCenter = "middle";
count.y = am4core.percent(45);
count.verticalCenter = "middle";
var count_text = chart.createChild(am4core.Label);
count_text.text = "AP(s)";
count_text.isMeasured = false;
count_text.fontSize = 15;
count_text.x = am4core.percent(50);
count_text.horizontalCenter = "middle";
count_text.y = am4core.percent(60);
count_text.verticalCenter = "middle";

var series = chart.series.push(new am4charts.PieSeries());

series.dataFields.value = "count";
series.dataFields.category = "health_label";


series.colors.list = [
    am4core.color("#1D3557"),
    am4core.color("#457B9D"),
    am4core.color("#E63946"),
    am4core.color("#FCCA46"),
    am4core.color("#C0C0C0"),
];
series.ticks.template.disabled = true;
series.labels.template.disabled = true;
series.hiddenState.properties.opacity = 1;
series.hiddenState.properties.endAngle = -90;
series.hiddenState.properties.startAngle = -90;
series.labels.template.fill = am4core.color("white");
series.slices.template.strokeOpacity = 1;

It returns me the pie chart where I have one data right now. Example graph

So the issue is when I click on the chart (at the color area), It hides and I can check the g tag there display:none css is adding there. Can anyone please let me know how I can disable the hide on click on the chart or disable the click event..

I have tried:

`series.slices.template.event.disableType('hit');`

also I tried

    series.slices.template.interactionsEnabled = false;

it worked for me, but it disabled everything like hover, click and so on and I only need the click event to be disabled.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda