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