How do you hide the title of a chart tooltip?

前端 未结 1 1382
旧巷少年郎
旧巷少年郎 2021-02-19 12:38

I\'m using chart js to show grouped bar chart and try to hide the title of the tooltip

Code to generate bar

var ctx = document.getElementById(\"myChart\         


        
相关标签:
1条回答
  • 2021-02-19 13:03

    To hide the title of tooltip, you need to return an empty function on tooltips title­'s callback, like so ...

    options: {
       tooltips: {
          callbacks: {
             title: function() {}
          }
       },
       ...
    }
    
    0 讨论(0)
提交回复
热议问题