apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Can't export CSV getting errror "i.split is not a function" when series name is an array

Open ordago opened this issue 3 years ago • 1 comments

Description

Steps to Reproduce

  1. Open sandbox
  2. click toolbox
  3. click Download CSV

Expected Behavior

Downloads CSV

Actual Behavior

Error in console: "i.split is not a function"

Screenshots

image

Reproduction Link

https://codesandbox.io/s/bitter-browser-5z3qc8

ordago avatar Jul 03 '22 14:07 ordago

I'm having the same error when series name is number:

https://codepen.io/andreabrioschi/pen/PoRNXKr

AndreFra96 avatar Jul 09 '22 10:07 AndreFra96

@ordago Why are you setting the name of the series to an array? It should be a string. The series name is not expecting an array.

@AndreFra96 the name is expecting a string, not a number.

brianlagunas avatar Aug 11 '22 18:08 brianlagunas

@brianlagunas I remember seeing in the docs somewhere. Using an array for series whose name were too long would place the second item on the array in a new line.

ordago avatar Aug 11 '22 19:08 ordago

@ordago I was unable to find any code that handled the name as an array. If you can find that doc, I would appreciate it. It's possible is was a feature that wasn't implemented fully.

brianlagunas avatar Aug 11 '22 19:08 brianlagunas

hey @brianlagunas, maybe I mixed series names with categories

https://apexcharts.com/docs/multiline-text-and-line-breaks-in-axes-labels/

ordago avatar Aug 11 '22 20:08 ordago

@ordago yeah, it looks like it. Glad we figured it out.

brianlagunas avatar Aug 11 '22 21:08 brianlagunas