VEuPathDB / EdaNewIssues

0 stars 0 forks source link

Faceting: x-axis labels shrink area available for rendering mosaic plots #84

Closed danicahelb closed 2 years ago

danicahelb commented 2 years ago

x-axis labels appear on a slant, positioned in the middle of the section (column) of the mosaic plot they represent. If the right-most column of the mosaic plot represents small counts, the plot area shrinks to be able to accommodate the length of the angled label. This is problematic when mosaic plots (both 2x2 and RxC) are faceted. Since the width of each column represents the size of the data making up that column, the plot area for each faceted plot must be equal.

This is a showstopper for releasing faceted mosaic plots in b55. An easy (perhaps temporary) fix would be to have x-axis labels run directly vertical instead of on an angle.

https://github.com/VEuPathDB/web-eda/issues/617 asks us to thoroughly revisit how x-axis labels are handled for mosaic plots, post-b55

danicahelb commented 2 years ago

@bobular had a thought on slack:

A simple for-now solution to the mosaic diagonal x-axis label problem would be to increase the right hand margin. This would work (I've measured the plots and they are all pretty much the same size). We'd have to revisit after adding back the y-axis legend/labels. in MosaicVisualization.tsx

const facetedPlotSpacingOptions = {
  marginRight: 125,
  ...
}

This approach is fine with me, since it will be a temporary fix until the x-axis labels are updated in #617

danicahelb commented 2 years ago

this ticket duplicates https://github.com/VEuPathDB/web-components/issues/257