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

412
Views
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 answers
Answer question

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 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!