Chart Option {display: false} doesn't work


Topic: Chart Option {display: false} doesn't work

Yvonne Findeis pro premium priority asked 2 years ago

Expected behavior I want to hide the chart legend with chart option {display: false}.

options: {
legend: {
  display: false
}

Actual behavior Chart option {display: false} doesn't work. Other options don't work either, such as setting the color of the labels.

Resources (screenshots, code snippets etc.) Snippet: https://mdbootstrap.com/snippets/standard/officecegeka-de/4224694


mlazaru staff answered 2 years ago

I can't open your snippet. Probably you didn't press 'publish' button or snippet was deleted.

anyway I think it will help: https://mdbootstrap.com/snippets/standard/mlazaru/4225030#js-tab-view

use:

options: {
    plugins: {
        legend: {
          display: false
        },
    },
},

Yvonne Findeis pro premium priority answered 2 years ago

Thank you very much, that work's. I take your own example from your docs. At these example the color of legend-text should bei set to green. In your docs snippet it doesn't work. (https://mdbootstrap.com/docs/standard/data/charts/#section-bar-chart-custom-options)


mlazaru staff commented 2 years ago

Thank you. We will fix this example soon.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: PC
  • Browser: Firefox
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes