]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Using the dynamic absolute position of the canvas, even for relative placement of... 2263/head
authorAman Sharma <20aman@gmail.com>
Fri, 15 Apr 2016 04:11:09 +0000 (00:11 -0400)
committerAman Sharma <20aman@gmail.com>
Fri, 15 Apr 2016 04:11:09 +0000 (00:11 -0400)
commite251d06ef5a73b94baecf338a26e10835d9177c4
tree019e313cef7219847aec333dc8d056f76bfefbd0
parent1232a913007fa5b50c14460abe1970aee8e6fd1c
Using the dynamic absolute position of the canvas, even for relative placement of the chart

This will work with both relative and absolute position for the chart and will apply the tooltips appropriately. I have tested in a normal context and then also using the chart in the second column of two column table i.e. in a different position on the screen. Without this, the default tooltips will appear at the same position no matter where the chart is placed. They will appear misplaced. The fix I have provided allows the tooltips to appear smoothly with the chart, no matter where it is placed on the web page.
samples/line-customTooltips.html