Package Exports
- d3-symbol-extra
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (d3-symbol-extra) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
d3-symbol-extra
Additional D3 symbol types.
For use with D3 version 4+.
Demo
A demo is available here.
Installing
If you use NPM, npm install d3-symbol-extra. Otherwise, download the
latest release.
AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global is exported:
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="d3-symbol-extra.js"></script>
<svg width="100" height="100"></svg>
<script>
var symbol = d3.symbol().size(1000).type(d3.symbolPentagon);
d3.select('svg').append('path')
.attr('transform', 'translate(50, 50)')
.attr('d', function(d, i) {
return symbol();
});
</script>API Reference
Symbols
The triangle symbol type rotated 180°. See d3.symbolTriangle.
The triangle symbol type rotated 90° counterclockwise. See d3.symbolTriangle.
The triangle symbol type rotated 90° clockwise. See d3.symbolTriangle.
The diamond symbol type laid horizontally. See d3.symbolDiamond.
The square symbol type rotated 45°. See d3.symbolSquare.
The pentagon symbol type.
The hexagon symbol type.
The hexagon symbol type rotated to have horizontal top and bottom edges.
The octagon symbol type.
The octagon symbol type rotated to have horizontal top and bottom edges.
The Greek cross symbol type rotated 45°. Alias: d3.symbolCrossAlt. See d3.symbolCross.







