VEuPathDB / web-components

Library of React components for plotting data
Apache License 2.0
1 stars 0 forks source link

Boxplot vertical x-axis labels are tough to read #452

Open asizemore opened 1 year ago

asizemore commented 1 year ago
Screen Shot 2023-01-03 at 4 23 14 PM

I'm guessing plotly is making the decision about spacing and when to put text horizontal, 45 deg, and vertical? Is it possible to prevent it from going all the way vertical? Horizontal and 45 deg is fine.

moontrip commented 1 year ago

@asizemore IIRC, there is an option for making the angle of the tick label. But at the same time, it may cause another issue: e.g., the width of the plot will become narrower when implementing the angle.

moontrip commented 1 year ago

@asizemore One question. Do you want to have the angled label for non-faceted plot (i.e., without facet variable) as well or only for faceted plot?

asizemore commented 1 year ago

Thanks @moontrip ! To clarify, the current behavior is that the labels are in one of three positions: horizontal, angled, or vertical. Based on the number of labels, size of labels, and/or size of plot, the labels get rotated into one of these three positions. I think the current behavior does a good job of deciding when the labels should be angled. My proposal is just to remove that vertical option. So then the labels still go either horizontal or 45deg angle as they do now, but they just don't ever get rotated into the vertical position.

moontrip commented 1 year ago

@asizemore Thank you for your clarification 👍 The current behavior is automatically decided by plotly, so perhaps we may need to set a condition like the number of labels to set the 45 deg angle, and/or reducing the number of characters for the ellipsis, etc.

asizemore commented 7 months ago

I think it's worth putting this issue in the Backlog until we revisit faceting more completely.