-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
standardized data input #2080
Comments
hi @ConstantinoSchillebeeckx. Is it possible to help in contribution to migration to d3js v4? We can discuss about this change as well during the migration and include. d3js has long moved away from v3 and if nvd3 moves to v4 as well it will be really great. there is a PR which is actually looking at migration to v4 now. #2082 |
In addition to this, I'd really like to move to using key functions... https://bost.ocks.org/mike/constancy/#key-functions Making people have to meticulously keep their data structure the same when changing values has been a constant stream of questions/bugs... |
Couldn't we just manually add in an index key as a standard data ingest practice? Looks like you're already doing it in a few charts. @bgth - I just noticed @liquidpele created a branch for v4, I'd be down for helping; any thoughts on where to begin or how to organize ourselves? |
No, that's basically just so the series index gets passed to the tooltip/eventHandlers. Using the key functions is the "right" way and even allows for transitions/etc in data updates. |
Would it make sense to think about standardizing the format for data input, perhaps one that is more in line with columnar data?
Currently, input formats seem to vary across the various charts. For example, the scatterChart does not have explicit accessors for
x
ory
, instead you attach the data withdatum()
in a format likeOn the other hand, cumulativeLineChart does have explicit accessors for
x
andy
which access thevalues
property of the attached data, formatted asSimilarly, discreteBarChart also has accessors for
x
andy
, but expects a different data format:The charts on a whole might be more flexible if the expected data format is standardized, and if each plot always has (at least) an
x
andy
accessor.A proposed data format might be in the form of
This is a more natural fit to data originating from, say, a CSV. The
x
andy
accessors could then directly access any of the attributes of the data. Labels or keys could simply be taken from the attribute name.If there's interest, I'm willing to help convert charts over. 🍻
The text was updated successfully, but these errors were encountered: