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

202
Views
Amcharts 4 : Disable single legend item programmatically

I just need to know how to disable a single legend item programmatically on chart reload (disable means: legend is shown greyed out and its linked curve is hidden), as I need to reload a chart with some new data using some back and forward arrows, but still need to remember the user preference or the state of legend items (on/off)

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can just call hide on the series associated with that legend marker to hide the series/grey out the marker:

series.hide();
about 4 years ago · Juan Pablo Isaza Report

0

Thanks @xorspark that's really it, it's about controlling the series not legend.

It happened to work specifically with the appeared or inited events, not shown event as it seemed to be, like this:

series.events.on("inited", () => {
  reactState ? series.show() : series.hide();
});

inited event even works better, as disabled legends will not show a glimpse of their color on the curve when using appeared.

about 4 years ago · Juan Pablo Isaza Report
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!