Add d3-polygon.
This commit is contained in:
Родитель
5db0abdbb6
Коммит
696f794d82
11
README.md
11
README.md
|
@ -22,6 +22,7 @@ If you use NPM, `npm install d3@4.0.0-alpha.4`. Otherwise, download the [latest
|
|||
* [Interpolators](#interpolators)
|
||||
* [Number Formats](#number-formats)
|
||||
* [Paths](#paths)
|
||||
* [Polygons](#polygons)
|
||||
* [Random Numbers](#random-numbers)
|
||||
* [Requests](#requests)
|
||||
* [Scales](#scales) ([Continuous](#continuous), [Sequential](#sequential), [Quantize](#quantize), [Ordinal](#ordinal), [Categorical](#categorical))
|
||||
|
@ -315,6 +316,16 @@ Serialize Canvas path commands to SVG.
|
|||
* [*path*.rect](https://github.com/d3/d3-path#path_rect) - draw a rectangle.
|
||||
* [*path*.toString](https://github.com/d3/d3-path#path_toString) - serialize to an SVG path data string.
|
||||
|
||||
## [Polygons](https://github.com/d3/d3-polygon)
|
||||
|
||||
Geometric operations for two-dimensional polygons.
|
||||
|
||||
* [d3.polygonArea](https://github.com/d3/d3-polygon#polygonArea) - compute the area of the given polygon.
|
||||
* [d3.polygonCentroid](https://github.com/d3/d3-polygon#polygonCentroid) - compute the centroid of the given polygon.
|
||||
* [d3.polygonHull](https://github.com/d3/d3-polygon#polygonHull) - compute the convex hull of the given points.
|
||||
* [d3.polygonContains](https://github.com/d3/d3-polygon#polygonContains) - test whether a point is inside a polygon.
|
||||
* [d3.polygonLength](https://github.com/d3/d3-polygon#polygonLength) - compute the length of the given polygon’s perimeter.
|
||||
|
||||
## [Random Numbers](https://github.com/d3/d3-random)
|
||||
|
||||
Generate random numbers from various distributions.
|
||||
|
|
8
index.js
8
index.js
|
@ -83,6 +83,14 @@ export {
|
|||
easeElasticInOut
|
||||
} from "d3-ease";
|
||||
|
||||
export {
|
||||
polygonArea,
|
||||
polygonCentroid,
|
||||
polygonHull,
|
||||
polygonContains,
|
||||
polygonLength
|
||||
} from "d3-polygon";
|
||||
|
||||
export {
|
||||
path
|
||||
} from "d3-path";
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"d3-format": "0.5.0",
|
||||
"d3-interpolate": "0.4.0",
|
||||
"d3-path": "0.1.3",
|
||||
"d3-polygon": "0.2.0",
|
||||
"d3-random": "0.2.0",
|
||||
"d3-request": "0.3.0",
|
||||
"d3-scale": "0.5.0",
|
||||
|
|
Загрузка…
Ссылка в новой задаче