Quantcast
Channel: How can I hide dataset labels in Chart.js v2? - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by mpen for How can I hide dataset labels in Chart.js v2?

$
0
0

You can also put the tooltip onto one line by removing the "title":

this.chart = new Chart(ctx, {    type: this.props.horizontal ? 'horizontalBar' : 'bar',    options: {        legend: {            display: false,        },        tooltips: {            callbacks: {                label: tooltipItem => `${tooltipItem.yLabel}: ${tooltipItem.xLabel}`,                 title: () => null,            }        },    },});

enter image description here


Viewing all articles
Browse latest Browse all 23

Trending Articles