Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add side to grouped bar plugin, fix alignment with different sides #1022

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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?

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.

1 participant