Skip to content

Conversation

@gelicia
Copy link

@gelicia gelicia commented Dec 11, 2024

This does not fix every axis/alignment scenario

  • Adds an example with axes on the top, right, bottom and left. Each axes example has an example with the text being left or right aligned
  • adds an optional ability to align text in the grouped bar plugin
  • Adds logic to uplot where if the orientation is horizontal, it will align text to 0 or the chart width when the text is aligned left or right.

Left set of examples is before the change, right is after the change.
Screenshot 2024-12-11 at 9 22 49 AM

Related to grafana/grafana#94344

else
else {
if (axis.side === 1 && axis.align === 2)
x = can.width;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing 0 to canvas width is not the correct boundaries we want - what are the best offsets?

@leeoniya leeoniya closed this in 63a9b4a Mar 6, 2025
@leeoniya
Copy link
Owner

leeoniya commented Mar 6, 2025

hey, thanks for this PR!

i took a slightly different approach in 63a9b4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants