evidence
evidence copied to clipboard
Error handling in Sankey diagram
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:
- Missing props
- Incorrectly named props
- Rows where the contents of
sourceCol
andtargetCol
are the same - Circular references
Severity
- [ ] High - I'm not able to use Evidence until this bug is fixed
- [x] Medium - I'm able to use Evidence, but a feature I need to use is not working
- [ ] Low - I'm able to keep using Evidence as normal, but flagging this for the team to fix
Expected Behavior
An ErrorChart
should be printed to the page.
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