Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda