Apexcharts.js: Cant handle more than 4 series

Created on 3 Oct 2018  路  3Comments  路  Source: apexcharts/apexcharts.js

Trying to add more than 4 series results in this error:

colorSeries.push is not a function ; Zone: <root> ; Task: null ; Value: TypeError: colorSeries.push is not a function
     if (colorSeries.length < len) {
        var diff = len - colorSeries.length;
        for (var i = 0; i < diff; i++) {
          colorSeries.push(colorSeries[i]);  // heres where it fails
        }
      }

adding more than 4 colors in my colors array. didn't help

bug

Most helpful comment

I'm so sorry about this issue. for some reason, I had a string in the property colors indataLabels. and this causes the chart to fail on more than 4 series.

...
dataLabels: {
  enabled: true,
  style: {
    colors: '#000'
},
...

All 3 comments

I cannot reproduce this.
Can you please create a codepen?

I'm so sorry about this issue. for some reason, I had a string in the property colors indataLabels. and this causes the chart to fail on more than 4 series.

...
dataLabels: {
  enabled: true,
  style: {
    colors: '#000'
},
...

No worries :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ismaildervisoglu picture ismaildervisoglu  路  3Comments

piyushSinghalDemo picture piyushSinghalDemo  路  3Comments

rcoundon picture rcoundon  路  3Comments

drummad picture drummad  路  3Comments

rudeayelo picture rudeayelo  路  3Comments