Open julianheinrich opened 9 years ago
Julian, I've been starting from scratch to establish a new pattern for defining new data types and setting dimension metadata (scale, type, axis, etc). I'm curious what you think of the types
and dimensions
objects in this example:
http://bl.ocks.org/syntagmatic/8ff691209324f1814257
Also related to #90 and #91. One of the goals is to remove all of the autoscaling functionality currently baked into the core of d3.parcoords, which is the root cause of several classes of bug in the library.
That's a great start @syntagmatic !
After skimming through your example, I can't think of anything missing in the types
and dimensions
objects. Do you want to make the dimensions
a required input together with the data, or are we going to set some defaults if dimensions
are not supplied by the user?
Dimensions/types need a compare
or defaultSort
property to know how to order values.
I don't necessarily want to get rid of detecting dimensions and autoscaling entirely. But it should be built in a more modular way to allow testing, and to disentangle automatic settings from rendering/interaction.
I'm going to keep trying this pattern against datasets with complex labelling to see how flexible it is. Here's another example.
Creating a set of axes with the same scale (e.g. by calling pc.commonScale()) but just one value (line) doesn't work because as of #79 axes with single values are converted to ordinal scales.
For example, I want to go from this: to that:
which I am currently achieving by assigning a domain to every dimension:
But this is not ideal, as I am actually having numeric, continuous data.