evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.38k stars 209 forks source link

Error handling in Sankey diagram #678

Open hughess opened 1 year ago

hughess commented 1 year ago

The Sankey diagram should have error handling to stop the page from crashing when an error is encountered, and to supply a helpful error message. This should cover:

Severity

Expected Behavior An ErrorChart should be printed to the page.

ud3sh commented 9 months ago

When the dataset is empty, we can end up with undefined errors here: https://github.com/evidence-dev/evidence/blob/6baafc11f7568aedf8845809144087ce61d15fe3/packages/core-components/src/lib/unsorted/viz/sankey/SankeyDiagram.svelte#L122

image