Comments (2)
index
is used internally when it comes to produce the final cells (in convexHull.js).
edit (13/11/2020): I admit I don't put effort on distinguishing stable attributes that user can use and rely on (as site.initialObject), to internal attributes that may change over releases.
from d3-weighted-voronoi.
If c
is a cell, c.site.originalObject
references the underlying data, and is the stable way to link cells and data. Hence, if cells
the set of all cells, cells.map(c => c.site.originalObject)
is an array of the subset of data that produces a cell. You can use it to check if a datum produces (or not) a cell.
The order of the cells are not the same as the order of the data because some data may not produce any cell. In such a situation, the length of the cells array is lower than the length of the data array. Hence, I don't even try to order the cell array with regards to the data array.
Regarding the index ===0
in all cell issue, I guess this is relic of an old version of the code. Let me check.
from d3-weighted-voronoi.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-weighted-voronoi.