Home Forums Chart Support tooltipcontent

tooltipcontent

Viewing 3 posts - 1 through 3 (of 3 total)
  • #34590

    how we can add icon in tooltipcontent

    #34591

    data:[
    {
    type: “stackedBar100″,
    toolTipContent:”{z}<hr/>a”,
    name: “Accaptable”,
    dataPoints: [
    {y: 450,z: “20”, color: “#2ca8e0”, indexLabel: “Accaptable”,indexLabelFontColor: “white”,indexLabelFontSize: 20},
    ]
    },
    i want to add icon in toolTipContent:”{z}<hr/>a”,in a word place when am write a its show but i want icon to write here and work properly

    #34599

    @amir-muneer,

    You can use toolTipContent to add image inside the toolTip as shown in the code snippet below –

    toolTipContent: "<img src=\"https://canvasjs.com/wp-content/uploads/images/gallery/javascript-column-bar-charts/\"{url}\"\" style=\"width:40px; height:20px;\"> <b>{label}</b><br>Budget: ${y}bn<br>{gdp}% of GDP",

    Please take a look at this gallery page for an example along with working code on the same.

    Display icon inside toolTip

    ___________
    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.