Home › forums › Using CanvasJS › How to restrict width of shared tooltip when data series has a long name?
Tagged: maxWidth, name, tooltip
This topic contains 1 reply, has 2 voices, and was last updated by Vishwas R 4 months, 3 weeks ago.
I have a line chart that has a long name for the data series, so when using a shared tooltip, the tooltip exceeds the width of the screen on mobile devices (width of 270px).
See my example here: https://jsfiddle.net/pigottm/06gh5ncy/22/
You can see how the tooltip exceeds the black-coloured area.
How do I set a max width for the tooltip, while still using the names of each data series?
You can customize the width of tooTip by adding style to ‘canvasjs-chart-tooltip’ class. Please take a look at this JSFiddle.
You must be logged in to reply to this topic.