Chartjs – tooltip – different corner radius

πŸ‘:-1

ChartJS (actual version 3.5.0) doesn’t offer a way to specify a different cornerRadius for every corners. For setting different values for border radius of a tooltip you can enable external tooltips in the global or chart configuration and use your custom CSS code for that purpose. Speaking about the native ChartJS code, I recently filed an issue on their GitHub repository to discuss the implementation of this new feature. There you will find the code that allows the kind of functionality you are asking for. It involves changing just a few lines of code in a single function. Hope to have been of help for the community and for ChartJS users like you that need a cornerRadius object

{topLeft: 50, topRight: 50, bottomLeft: 0, bottomRight: 0} 

instead of a single value to customize the chart tooltip.

Leave a comment