question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(Beta2) How i can remove the top label / dataset label in Bar/Scatter/Line Chart?

See original GitHub issue

Hey guys,

how i can remove/hide the dataset-label in the topic headline chart types?

datasets: [ { label: '', .... } ]

empty string or undefined doesnt work for me!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

29reactions
etimbergcommented, Feb 23, 2016

Are you wanting to disable the entire legend or just the text in the legend?

To disable the entire legend, add this in your config

legend: {
    display: false,
}

Off the top of my head, I don’t know exactly where to edit to remove only the text. You could try setting the font size to 0 and see what happens, but i can’t guarantee that it would work

legend: {
    labels: {
        fontSize: 0
    }
}
16reactions
pleinxcommented, Feb 23, 2016

Hey @etimberg , thank you very much!

This works for me:

new Chart.Scatter(ctx, { data: scatterChartData, options: { legend: { display: false }}});

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart.js v2 hide dataset labels - Stack Overflow
The code looks simple, but I cannot remove the label from the graph. I tried a lot of solutions I found online, but...
Read more >
Data structures | Chart.js
If the labels property of the main data property is used, it has to contain the same amount of elements as the dataset...
Read more >
Deleting labels | BigQuery - Google Cloud
You can delete a label from a dataset, table, or view by: Using the Google Cloud console; Using SQL DDL statements; Using the...
Read more >
Removing All Labels and Formats in a Data Set
PROC DATASETS statement options: LIB= MEMTYPE= CONTENTS statement: MODIFY statement. CONTENTS procedure. FORMAT procedure. OPTIONS statement.
Read more >
Data Labeling: The Authoritative Guide - Scale AI
The machine learning model will then learn to identify patterns across the labeled dataset. These models then make predictions on never before ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found