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

setAxesLayout() does not allow the user to change the order of axes #24

Open wraseman opened 5 years ago

wraseman commented 5 years ago

@joshhjacobson, we don't need to change this before submitting the paper, but with setAxesLayout(), I can now specify which variables are displayed on which chart, but I cannot specify the order that those variables appear.

For instance, say a .csv file has the following columns: a,b,c,d,e,f. Say I want to create two plots the first with b, c, and a (in that order) and f, e, and d (in that order). I would create the following variable:

var layout = {
  0: ['b', 'c', 'a'], 
  1: ['f', 'e', 'd']
}

I would then apply that to a Parasol object as follows:

var ps = Parasol(data)('.parcoords').setAxesLayout(layout)

The resulting plot would be this... plot 0: a b c plot 1: d e f

The expected plot would be this.... plot 0: b c a plot 1: f e d

Currently, the order of these axes appears to be dependent on the order the columns are arranged in the .csv file. It would be more intuitive if the order of the layout variable was taken into account.

Thoughts?

joshhjacobson commented 5 years ago

Agreed, I think that would be the ideal functionality. It may be possible using the dimesions() function, but I'll have to investigate more.