m-chart icon indicating copy to clipboard operation
m-chart copied to clipboard

[Request] Enable Array Input Values

Open buffaloseven opened this issue 7 years ago • 2 comments

For those using custom Highcharts themes, they may want to utilize the arearange plot type. The input for this series requires a 2-item numerical array. Unfortunately, m-chart won't accept an array or CSV entry as a valid input in the spreadsheet.

Ideally, we could enter values into the spreadsheet like:

[2.1,-14.2]
[3.2,-12.2]
[-1.2,-18.2]

And those values would be parsed and supplied as the values for the series of the format: [[2.1,-14.2],[3.2,-12.2],[-1.2,-18.2]].

I haven't looked too carefully at the code yet; if I have time in the next while I can take a peak to see if I can come up with a solution, but I thought I'd log the request here in case it's relatively simple for you. I suppose you could quickly apply a regex of something like \[[0-9\,\-\.]*\] (perhaps using language settings for the decimal symbol?) to match? Since you don't support arearange in the front-end, I don't think it would be much of a problem if it was very specific how you have to format it as I think if you're writing custom themes, you can format your output data in the required format.

buffaloseven avatar Apr 21 '17 18:04 buffaloseven

@buffaloseven I'm assuming you're using a theme to switch the plot type?

methnen avatar May 03 '17 16:05 methnen

Yes, I am.

buffaloseven avatar May 08 '17 01:05 buffaloseven