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

415
Vistas
xlsx-chart getting error (setting 'c:ser') when add multiple charts option

I have struggling while using xlsx-chart… I'm using xlsx-chart to create a chart in Excel, but when I add multiple charts in opts I have an issue like this below

 TypeError: Cannot set properties of undefined (setting 'c:ser')
at /node_modules/xlsx-chart/chart/base.js:508:83
at Function.each (/node_modules/underscore/underscore-node-f-pre.js:1321:7)

this is my opts object

        const xlsxChart = new XLSXChart();
        const opts = {
          charts: [
            {
              chart: 'line',
              titles: ['inside', 'outside'],
              fields: [
                '29-06-2022, 14:15:01',
                '29-06-2022, 14:30:10',
              ],
              data: {
                outside: {
                  '29-06-2022, 14:15:01': 44,
                  '29-06-2022, 14:30:10': 42,
                },
                inside: {
                  '29-06-2022, 14:15:01': 37,
                  '29-06-2022, 14:30:10': 35,
                },
              },
              chartTitle: 'Temperature',
            },
            {
              chart: 'column',
              titles: ['inside', 'outside'],
              fields: [
                '29-06-2022, 14:15:01',
                '29-06-2022, 14:30:10',
              ],
              data: {
                outside: {
                  '29-06-2022, 14:15:01': 66,
                  '29-06-2022, 14:30:10': 67,
                },
                inside: {
                  '29-06-2022, 14:15:01': 91,
                  '29-06-2022, 14:30:10': 92,
                },
              },
              chartTitle: 'humidity',
            },
          ],
        };

Can anyone please help me

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

0

I've been found a pull request can resolve this problem in this commit

you just add this block code below into base.js file in package

else if (chart == "line") {
                o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"] = o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"] || o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:barChart"];
                delete o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:barChart"];
                delete o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"]["c:barDir"];
                o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"]["c:grouping"] = { $: { val: 'standard' } };
                if (me.tplName == "charts") {
                    o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"][1]["c:ser"] = ser;
                } else {
                    o ["c:chartSpace"]["c:chart"]["c:plotArea"]["c:lineChart"]["c:ser"] = ser;
                };
            }

into callback _.each (ser, function (ser, chart) {

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