0

I have tried Chart JS custom tooltip option? and How to show tooltips in Chart.js?

One among many attempts of mine are:

    new Chart(document.getElementById("location").getContext("2d")).Bar(barChartData2,{
    showTooltip: true,
    tooltipTemplate: "<%= value %>",
     //Option for title font size in pixels
     tooltipTitleFontSize: 14, 

     //Option for tooltip title color
     tooltipTitleFontColor: "#eee",
     });

but both of no use to me I have tried every possibility and I'm not able to know what is stopping the tooltip from working. Nothing there in the console to debug so any suggestion would be thankful

  • I'm a newbie so it will take me a few days to learn making fiddle of my program @ℊααnd –  Jun 05 '17 at 10:46
  • The best thing for me was to change to the new version it will take me some days to fix the projects but I think that'll be helpful later on. –  Jun 05 '17 at 13:42

1 Answers1

0
 new Chart(document.getElementById("location").getContext("2d")).Bar(barChartData2**)**,{
showTooltip: true,
tooltipTemplate: "<%= value %>",
 //Option for title font size in pixels
 tooltipTitleFontSize: 14, 

 //Option for tooltip title color
 tooltipTitleFontColor: "#eee",
 });

See the above code....are you missing a parenthesis after barChartData2?

Cat Fox
  • 144
  • 1
  • 4
  • OMG how can I forget that ? O yeah I think I'm passing the second object as a json to the function so no need to close it beforehand –  Jun 05 '17 at 10:48