This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.
Forked from https://gist.github.com/veltman/403f95aee728d4a043b142c52c113f82
Implementing a variation of Joachim Ungar's curved label placement method described here. The basic process is:
- Turn the shape into a polygon of evenly-spaced points.
- Generate a Voronoi diagram of those points.
- Clip the edges.
- Turn the edges into a graph.
- Find the "longest shortest path" between any pair of perimeter nodes.
- Smooth/simplify that path a bit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |