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

Yvonne Findeis priority asked 4 months 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


Yvonne Findeis priority answered 4 months 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 4 months ago

Thank you. We will fix this example soon.


mlazaru staff answered 4 months 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
        },
    },
},


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: Priority
  • 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