Home forums Using CanvasJS How to restrict width of shared tooltip when data series has a long name?

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 6 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25038

    Hi,

    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?

    Kind regards
    Michael

    #25044

    Michael,

    You can customize the width of tooTip by adding style to ‘canvasjs-chart-tooltip’ class. Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.