Home forums Using CanvasJS How to add Tooltip Functionality to X-axis labels in in canvajs

Tagged: ,

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

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

    mahesh
    Member

    how can i add Tool-tip functionality to x-axis labels here is my code

    window.onload = function() {
    var chart = new CanvasJS.Chart(“chartContainer”, {
    title: {
    //text: “Line Chart”
    },
    axisY2: {
    includeZero: false,
    title: “Accuracy”
    },
    axisY: {
    title: “Speed”
    },
    data: [{
    type: “line”,
    name: “Average Speed(in sec)”,
    showInLegend: true,
    dataPoints: [
    { label: ‘Test1 simple test simple test ‘, y: 3 },
    { label: ‘Test2’, y: 5 },
    { label: ‘Test3’, y: 6 },
    { label: ‘Test4’, y: 4.5 },
    { label: ‘Test5’, y: 6.8 },
    { label: ‘Test6’, y: 7.9 },
    { label: ‘Test7’, y: 8 },
    { label: ‘Test8’, y: 4.5 },
    ]
    },
    {
    type: “line”,
    name: “Accuracy(in %)”,
    showInLegend: true,
    axisYType: “secondary”,
    dataPoints: [
    { label: ‘Test1’, y: 50 },
    { label: ‘Test2’, y: 60 },
    { label: ‘Test3’, y: 99 },
    { label: ‘Test4’, y: 78 },
    { label: ‘Test5’, y: 56 },
    { label: ‘Test6’, y: 44 },
    { label: ‘Test7’, y: 67 },
    { label: ‘Test8’, y: 70 },
    ]
    },
    ]
    });
    chart.render();
    }
    in my x-axis label when the text name so long i seems like not good, so i want to add specified content to the label, when user mouse over we are we show total test name

    #14057

    Vishwas R
    Keymaster

    @mahesh,

    Sorry, this feature is not available as of now.


    Vishwas R

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

You must be logged in to reply to this topic.