ParasolJS / parasol-es

ES6 module for interactive visualization of multi-objective optimization problems
https://parasoljs.github.io/
MIT License
26 stars 5 forks source link

Thoughts on name change for .cluster({chartIDs}) to .cluster({colored_chartIDs}) #15

Closed wraseman closed 5 years ago

wraseman commented 5 years ago

@joshhjacobson, going through the parallel coordinate literature, I've noticed that clusters can be represented both geometrically and through color. Right now, our implementation of clustering is very color-centric and assumes that's what the user is going to use it for. For example, the chartIDs argument is entirely related to which charts are colored, not which charts are included in the clustering. I think this might be confusing, so I'm advocating for a changed to 'colored_chartIDs' or something like that.

Please suggest a better name if you can think of one!

Also, what would be the best way to implement the case where no charts are colored based on cluster? And what should the default be? It might intuitive for a user to do the following:

ps.cluster({k: 3, colored_chartIDs: []})  // don't color charts based on cluster
ps.cluster({k: 3, colored_chartsIDs: [0,2]})  // color charts 1 and 3 based on cluster
ps.cluster({k: 3})  // default to coloring charts based on clustering
joshhjacobson commented 5 years ago

I agree with your point and actually think it extends beyond just clusters. Currently, we have two methods that create additional data to be visualized ( cluster and weightedSum) and in the future we may add more. We need a universal variable name that communicates: "display this data I'm creating on this list of charts." I'm thinking displayIDs. I'll implement that for now, and please feel free to open this issue again if you have another name.

I like the usage you've outlined above, I'll make sure that's how it's done across the board.