Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPolygon Series #339
Polygon Series #339
Conversation
| const DEFAULT_COLOR = '#12939A'; | ||
|
|
||
| function generatePath(data, xFunctor, yFunctor) { | ||
| const path = data.reduce((res, row, i) => { |
This comment has been minimized.
This comment has been minimized.
balthazar
Apr 3, 2017
Contributor
nit?
const generatePath = (data, xFunctor, yFunctor) =>
`${data.reduce((res, row, i) => `${res} ${i ? 'M' : 'L'}${xFunctor(row)}${yFunctor(row)}`)} Z`;| onMouseOut: this._seriesMouseOutHandler, | ||
| onClick: this._seriesClickHandler, | ||
| fill: color || DEFAULT_COLOR, | ||
| style: { |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

mcnuttandrew commentedApr 3, 2017
•
edited
The polygon series allows users to specify arbitrary polygons in coordinates. This may seem un-useful, but it allows for easy creation of radar charts (#299), fancy mark series dots, and any variety of additional things you might need polygons for!