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

154
Vistas
Hide a specific legend only from FusionChart

How to hide a specific legend from multi-series fusionChart. Actually I want to remove a specific series from chart, when exporting I need to show that on excel sheet. So my plan is initial time hide from the chart then remove that legend from legend section.

I have used 'initiallyhidden' => 1, property, that time it will not shown in the chart. Now I want to remove that series name from legend also.

JSFiddle: http://jsfiddle.net/oL2u3vbd/1/

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can manipulate the categories within the datasource and dynamically change the chart's datasource when readying to export to excel. You just have to make sure to revert the change so it doesn't affect the visible chart.

document.getElementById("export").addEventListener("click", function() {
  // december 2013 isn't shown but is included in excel export
  let oldDataCategories = [...fusionData.dataSource.categories[0].category]
  
  // Add Dec back to the categories && export
  fusionData.dataSource.categories[0].category.push({ label: "Dec 2013" });
  FusionCharts("myChartId").setChartData(fusionData.dataSource, 'json');
  FusionCharts("myChartId").exportChart({ exportFormat: "csv" })
  
  //revert categories back
  fusionData.dataSource.categories[0].category = oldDataCategories;
  console.log(fusionData.dataSource.categories[0].category)
  FusionCharts("myChartId").setChartData(fusionData.dataSource, 'json');
});

Here is a example, You'll see there's not series for Dec. 2013 on the chart but when you export it that data is included.

https://jsfiddle.net/xv3ps9b5/3/

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