twan
twan

Reputation: 2659

Remove tooltip from charts.js

I am using a plugin: charts.js

On hovering a radar chart (the bullets in it) a tooltip is shown. How can I remove it?

Upvotes: 2

Views: 5413

Answers (3)

shiramy
shiramy

Reputation: 833

In ChartJS version 3.4.1 the tooltip configuration is located under options.plugins.tooltip - source

So a chart without tooltips would look like this:

var chart = new Chart(ctx, {
    type: 'line',
    data: data,
    options: {
        plugins: {
            tooltip: { enabled: false },
            ...
        }
    }
})

Upvotes: 3

Brett Jeffreson
Brett Jeffreson

Reputation: 563

A layout for a chart with no tooltips would look like this:

var chart = new Chart(ctx, {
    type: 'line',
    data: data,
    options: {
        tooltips: { enabled: false },
        ...
        }
     })

I know some others have said exactly this, but this is a more complete example.

Upvotes: 9

jsjq-finder
jsjq-finder

Reputation: 165

This is the code to Disable the tooltip option..

Chart.defaults.global.tooltips.enabled = false;

Upvotes: 5

Related Questions