evidence icon indicating copy to clipboard operation
evidence copied to clipboard

Error handling in Sankey diagram

Open hughess opened this issue 1 year ago • 1 comments

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 and targetCol 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.

hughess avatar Mar 11 '23 15:03 hughess

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

ud3sh avatar Jan 25 '24 15:01 ud3sh