VEuPathDB / microbiomeComputations

1 stars 0 forks source link

Return display order with ranked abundance #13

Closed asizemore closed 2 years ago

asizemore commented 2 years ago

The ordering is getting all wonky when we send results to plot.data because somewhere inside it sorts the boxes. End result is they come out alphabetically instead of ordered by their rank.

Either we need to

  1. Send displayOrder along with the outputted json or compute config that then the front end reads - or -
  2. Have plot.data respect ordering of collection vars when they come in.

When writing the plot.data collection code, i recall 2 being really difficult. If we go with 1, should name it the same as the displayOrder annotation for categorical vars

asizemore commented 2 years ago

@d-callan

d-callan commented 2 years ago

the recent pie plot has a similar concept.. a new attr called 'rankedValues'. think this should follow suit.

that means well be taking option 1 above, and it will require some updates to any plots in plot.data that take ranked collection values (box and scatter i think?) at a minimum. youll have to update the api in the data service accordingly as well, and i might start there so we are confident we know what we want as our final result before starting implementing anything.

d-callan commented 2 years ago

also, you should feel free to propose updates to pie as needed to make sure these two similar needs are represented consistently. and once were sure we have what we need for box, scatter and pie we should think about if the concept is able to be more generally applied to other plot components or if wed like to stop there for now. but i think those questions can be addressed as part of the data service PR.

asizemore commented 2 years ago

Works for me!!

asizemore commented 2 years ago

Will be handled on the front end. See https://github.com/VEuPathDB/web-eda/issues/1084

Nothing to QA