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

Center x-axis labels #150

Merged

Conversation

Rodrigoplp-work
Copy link
Contributor

@Rodrigoplp-work Rodrigoplp-work commented Aug 12, 2021

Currently the labels of the x-axis are aligned to the left, 5 pixels after their corresponding tick in the axis.

This commit centers the labels according to their ticks. The position of the text is calculated by using the position of the tick, minus half the width of the text.

Before the change:
Screenshot 2021-08-12 at 16 39 47

After the change:
Screenshot 2021-08-12 at 16 34 44

After the change in theia-trace-extension:
Center x-axis label

Fixes issue 440 in theia-ide/theia-trace-extension.

Signed-off-by: Rodrigo Pinto rodrigo.pinto@calian.ca

Currently the labels of the x-axis are aligned to the left, 5 pixels
after their corresponding tick in the axis.

This commit centers the labels according to their ticks. The position of
the text is calculated by using the position of the tick, minus half the
width of the text.

Fixes [issue 440 in theia-ide/theia-trace-extension](eclipse-cdt-cloud/theia-trace-extension#440).

Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
@Rodrigoplp-work Rodrigoplp-work marked this pull request as ready for review August 16, 2021 15:51
Copy link
Contributor

@MatthewKhouzam MatthewKhouzam left a comment

Choose a reason for hiding this comment

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

LGTM

@PatrickTasse PatrickTasse merged commit a39cdba into eclipse-cdt-cloud:master Aug 19, 2021
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.

Center X axis labels in relation to tick
4 participants