layerchart
layerchart copied to clipboard
Annotations / Links
Ideas
- How best to support
Svg,Html, andCanvasfor drawing links and text - Labels
- Best to use
Html(by default) for richer text styling and word wrapping, but supportingCanvasis nice once we support creating PNGs of a chart to make sure everything is captured.
- Best to use
- Should the
Annotationcomponent be defined outside of a specific rendering context (likeTooltip) to allow mixing rendering contexts inside (draw links with Svg, text with Html, for example) - Determine what is available with components like Highlight, Link, Rule, and Point
- Examples:
- https://www.layerchart.com/docs/examples/Columns#highlight_individual_bar
- https://www.layerchart.com/docs/examples/Columns#highlight_individual_bar_(line)
- https://www.layerchart.com/docs/examples/Columns#average_annotation_rule
- https://www.layerchart.com/docs/examples/Area#multiple_series
- Examples:
Types
- [x] Annotate axis (point with tooltip)
- [ ] Highlight range
- [ ] Horizontal (threshold)
- [ ] above / below
- [ ] with label (point)
- [ ] Vertical
- [ ] before / after
- [ ] with label (point)
- [ ] Pattern
- [ ] Gradient
- [ ] Horizontal (threshold)
- [ ] Callout specific point (circle with line to text)
- [ ] Above / below marks
Reference
- https://d3-annotation.susielu.com/
- https://d3-annotation.susielu.com/#examples
- https://airbnb.io/visx/annotation
- https://github.com/airbnb/visx/tree/master/packages/visx-annotation
- https://github.com/airbnb/visx/tree/master/packages/visx-shape/src/shapes/link
- https://airbnb.io/visx/linktypes
- Corner connectors
- https://observablehq.com/@saneef/056-connections
- D3 curve explorer
- https://observablehq.com/@harrystevens/rounded-polyline?collection=@harrystevens/components
- Link types
- [ ] Curved Edges (step)
- Vertical / Compact Vertical
- Horizontal / Compact Horizontal
- https://observablehq.com/@nitaku/tangled-tree-visualization
- https://observablehq.com/@zzzev/tangled-tree-visualization-ii-w-adjusted-leaf-labels
- [ ] Curved Edges (step)
- Band/range
- Examples
- https://pfa-1yr.loyolaccj.org/
- d3.ringNote
- swoopyDrag
- https://www.chartjs.org/chartjs-plugin-annotation/
See also Highlight component
See discussion with some thoughts