Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scatterplot): Support DerivedNodeProp for nodeSize prop #1134

Merged
merged 1 commit into from
Oct 10, 2020

Conversation

spinloop
Copy link
Contributor

Adds support for DerivedNodeProp so when a function is passed to nodeSize the id of the node can be referenced. The current implementation uses only DerivedDatumProp and the Datum type only has x and y fields where as Node also contains its id.

Also, the nivo docs at https://nivo.rocks/scatterplot/ specify "it will receive the current node and must return a number" which is consistent with the proposed type.

…onsiveScatterPlot

Adds support for DerivedNodeProp<number> so when a function is passed to nodeSize
the id of the node can be referenced. The current implementation uses only DerivedDatumProp<number>
and the Datum type only has x and y fields where as Node also contains its id.

Also, the nivo docs at https://nivo.rocks/scatterplot/ specify
"it will receive the current node and must return a number"
which is consistent with the proposed type.
@wyze wyze changed the title Support DerivedNodeProp<number> for passing nodeSize function to ResponsiveScatterPlot fix(scatterplot): Support DerivedNodeProp for nodeSize prop Oct 10, 2020
@wyze wyze merged commit 42adacd into plouc:master Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants