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

How to tooltip align #64

Open
fglueck opened this issue Aug 17, 2022 · 4 comments
Open

How to tooltip align #64

fglueck opened this issue Aug 17, 2022 · 4 comments
Assignees

Comments

@fglueck
Copy link

fglueck commented Aug 17, 2022

Hi, i try to align the text inside a custom tooltip_callback to left. But I don't find any setting for that. I there currently a way to do that?
Thx

@fglueck
Copy link
Author

fglueck commented Aug 18, 2022

At first, you make a real good work! I like your charts.
I work at first in the last days this week with it.
I don't find any option to "align"-text elements or to format this.
I like the ..._callback-method to customize the content, but I miss it for bar_label (bar_label_callback?) and a way to "format" the content :-)

<g id="tooltiptext"   fill="black"   font-size="12px"   font-family="Arial"
   font-weight="normal"   text-anchor="middle"   visibility="visible"   transform="translate(60,0)">
	<text y="15px">Region X</text>
	<text y="30px">479 XY</text>
	<text y="45px">27.6.2022</text>
	<text y="60px">KW: 26</text>
	<text y="75px">rechts klick für Menü</text>
</g>

align='left' => x="-?px"
align='right' => x="?px"
or/and
text-anchor="start"
text-anchor="end"

Thanks!

@goat1000 goat1000 self-assigned this Aug 18, 2022
@goat1000
Copy link
Owner

Formatting text in SVG is a bit tricky - I have added text align options for some things but not for everything. I'll add alignment for tooltips and labels to my list of things to look at.

The bar_label_* options are really old and now just pass through to the newer data_label_* options. There is a data_label_callback option which should do what you want.

@fglueck
Copy link
Author

fglueck commented Aug 19, 2022

OK, thanks.

@fglueck
Copy link
Author

fglueck commented Sep 20, 2022

"tooltip_align = left" works fine ! Thx!

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

No branches or pull requests

2 participants