dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Improper data source detection

Open kbidata opened this issue 4 years ago • 1 comments

Dygraphs automatically detects if a CSV is the data source by means of checking the file name for a line break. If a line break isn't present, then it decides it's a CSV and looks for the file on the system.

Instead of having this automatic detection, it would make more sense to specify the data source.

This would make it possible to use JavaScript strings containing CSV data as a data source. Currently these variables are treated as files rather than strings and are searched for on the system. (returning 404)

kbidata avatar Apr 06 '22 08:04 kbidata

Can you provide an example where a multiline CSV is being treated as a file name? dygraphs should work in the way you describe:

https://github.com/danvk/dygraphs/blob/6d28d02b257402b8b1eba943b1d0d3ad6b008a2b/auto_tests/tests/multi_csv.js#L22-L38

danvk avatar Apr 06 '22 13:04 danvk