Home forums Using CanvasJS How to show multiple apostrophes in LegendText?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28274

    Hi,

    I’m trying to use multiple apostrophes (straight single quotes) in a single Legend item. However, if I use 2, they both aren’t displayed. If I add a 3rd one, only this one appears, and a 4th one makes them both disappear again. I tried using html entities, but they are not converted for Legend text.

    I tried on both v1.8 and 2.3, and I got the same result.

    Sample page where that happens. The first Legend item of the second graph should read “Tout à fait d’accord/D’accord”.
    https://tout-petits.org/donnees/environnement-familial/%C3%A9tat-de-sante-physique-et-mentale-des-parents/stress-parental/difficile-accompagner/

    Any idea how to correct that?

    Any

    #28296

    @antoine-bergeron,

    You can achieve the above requirement by using escape sequences as shown in this JSFiddle.


    Shashi Ranjan
    Team CanvasJS

    #28299

    Thanks!

    I did try escaping the value in the LegendText itself, but that didn’t work. I didn’t know about using the curly brackets and using the value of another field.

    By the way, any reason why escaping is not allowed in the LegendTest field itself?

    Cheers!

    #28328

    @antoine-bergeron,

    Thanks for sharing the use-case, we will reconsider this behavior in future versions.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.