When using tooltips, the right most point’s tooltip seems to be cut off. It seems as if it is out of bounds of the actual canvas.
11 thoughts on “Tool tip is cut off on rightmost point”
Comments are closed.
When using tooltips, the right most point’s tooltip seems to be cut off. It seems as if it is out of bounds of the actual canvas.
Comments are closed.
Copyright © 2021 Fantas...hit
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Also having this issue with my pie chart.
I’m sure that this is due to the fact that the tooltips are generated within the confines of the canvas, making it difficult to fix.
I had the same issue on my doughnut chart and solved it by implementing custom tooltips as per the example on the samples folder – worked in conjunction with my existing tooltip fontsize and template settings in the chart initialisation code:
var myDoughnutChart = new Chart(donut).Doughnut(donutdata, {
tooltipFontSize: 10,
tooltipTemplate: “<%%if (label){%%><%%=label%%>: <%%}%%><%%= value %%>hrs”,
percentageInnerCutout : 70
});
Check out samples/pie-customTooltips.html for the custom tooltip code. Copy/paste and it worked straight away. Very happy!
Tooltip displayed well outside the bounds of the canvas:
PS: there’s a line chart example too, which I’m guessing will work fine with bar charts.
Interestingly, by setting the “tooltipCaretSize” option to “0” solves the issue
{ tooltipCaretSize: 0, … }
Ok, sorry about this. I realized I didn’t have an empty div on the page just for the tooltip
#chartjs-tooltip
rather crucial div I suppose.Thank you @akocmark. Nice and simple solution👍
You can add internal padding to the chart. For instance in my case I had a cut of tooltips on the right.
@Eshva It’s not a solution, it doesn’t solve the problem for every possible label. Tooltips should be outside of canvas by default, this is the only acceptable solution.
I’m closing this issue since it doesn’t appear to happen anymore
@benmccann: I still experience the issue with

chart.js@2.9.3
:I followed #1731 here as well, and am encountering a similar issue:
. Please let me know if you’d like me to open a new issue or something!
One improvment for the current case when there are too many lines, like in my case 50, it is always below the line picked instead of the side where the biggest tooltip can be shown.
In my case it would be good to show the tooltip above the line, to see more, even if not all tooltips