Polyline with multiple attributes per axis
sc28 opened this issue · 4 comments
Is there any way for a polyline to "branch" off to multiple attributes on an axis?
This could be useful in some cases, in particular for nominal type axes.
For example, here is a mock-up using the cars data set.
In this example, each car could be produced in several locations, and the corresponding polyline would be displayed something like this:
I'm fairly new to D3 and JS, so I'm not sure how complex this would be to implement (or if it would be in fact useful).
This is a great idea. It's complex because it requires rendering a nested data structure.
I suggest implementing this as plain D3 code. There is much less overall complexity in some of the examples on bl.ocks.org than in d3.parcoords.js.
Two possible starting places:
http://bl.ocks.org/mbostock/1341021
http://bl.ocks.org/syntagmatic/c9fb69e425a3c07cfbd09169941fbf46
And great mockup by the way! It's very helpful to have a visual of the ideal behavior
I guess the common workaround is to have three lines for the car (that's probably how you created the mockup?).
Thanks for the quick responses!
@julianheinrich in fact the mock-up is just visual (edited in Gimp), but duplicating the line and editing the attribute would indeed produce this result.
However, this might cause some undesired side-effects in some cases (e.g. when using density to show number of lines; by changing the rank of the attribute (the more lines go through it, the higher it is ranked); artificially changing the average axis value as in #282 ).
What would be nicer is indeed a nested structure, for example interpreting multiple values for a given column in the .csv, if separated by a defined delimiter such as "/".
The .csv for the mock up would look like:
A bit out of reach for now, but thanks for pointing out the bl.ocks codes which are indeed probably a better place to start.