Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

413
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda