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.

Disable legends shown since last update

See original GitHub issue

Since I updated the package to it’s last version, legends are shown even if they are disabled

react-chartjs-2 version : 2.5.1 chartjs options :

{
    cutoutPercentage: 80,
    maintainAspectRatio: false,
    legend: {
        display: false
    },
    animation: {
        animateRotate: false
    }
}

I rolled back to 2.4.0 and everything is fine

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
jerairrestcommented, Jul 18, 2017

Oops. There’s was an accidental breaking change on:

https://github.com/jerairrest/react-chartjs-2/blob/master/src/index.js#L253

If you pass your legend in as props to the chart component that should resolve your issue.

Sorry!

1reaction
jerairrestcommented, Jul 20, 2017

I just released 2.5.3 that should give the ability to use either prop. https://github.com/jerairrest/react-chartjs-2/releases/tag/2.5.3

Thanks again guys for pointing this out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I prevent the legend from Auto Updating? - MathWorks
The legend has been changed so that by default it updates when data is added to or removed from a plot automatically. To...
Read more >
Show or hide a chart legend or data table - Microsoft Support
Show or hide a legend · To hide the legend, click None. Tip: To quickly remove a legend or a legend entry from...
Read more >
Remove the legend on a matplotlib figure - Stack Overflow
As of matplotlib v1.4.0rc4 , a remove method has been added to the legend object. Usage: ax.get_legend().remove(). or legend = ax.legend(.
Read more >
How to Remove Legend from a GGPlot - Datanovia
This article describes how to remove legend from a plot created using the ggplot2 package. You will learn how to: Hide the entire...
Read more >
How To: Remove the legend heading in an ArcGIS Pro layout
In the Format Legend pane, under Legend Item, expand Show, and uncheck Headings. To remove the heading, uncheck the Heading option under the ......
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