Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!