swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.3k stars 1.15k forks source link

Empty string as X value causes "Cannot read property `toString` of undefined #1076

Open DonaldAlan opened 5 years ago

DonaldAlan commented 5 years ago

I'm submitting a ... (check one with "x")

Current behavior

If I use the empty string (''), which has truthiness of false, as the X value in a chart (e.g., a Tree Map), ColorHelper.push generates a 'ERROR TypeError: Cannot read property 'toString' of undefined."

Expected behavior

Empty strings should be allowed as X. Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

chriszrc commented 1 year ago

total bug for sure, I use " " (note the space) in various places in ngx-charts to circumvent these issues (which should get addressed)