Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Tooltips Cutoff - Seeking Example of Pie Chart Padding or Custom HTML Tooltip #93

Open
matheso opened this issue Apr 2, 2019 · 1 comment

Comments

@matheso
Copy link

matheso commented Apr 2, 2019

I've been able to implement JS callbacks on the tooltips but can't figure out how to add padding to my overall pie chart. The tooltips are getting cut off on the top/bottom because there's no chart padding. I don't want to make the actual pie chart any larger though.

Referencing the exact issue solved here with Javascript, how do I implement the same layout padding in your Vaadin add-on?

Here's a similar solution on StackOverflow: link

I don't have the ability to rollout my own solution so am hoping I'm overlooking a feature. Otherwise, perhaps a custom tooltip is the solution?

The git commenter here indicates that the ideal solution is custom HTML tooltips outside the canvas, but I don't see any examples of this for your add-on either. There are tons of ChartJS docs but I don't know where to write the JS code inside my Java code, same as the chart layout/padding issue.

config.options() doesn't seem to have any 'layout' method at all.

Any feedback/code would be great, thank you.

@NevenLiang
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants