Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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

Yvonne Findeis 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


Yvonne Findeis 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)


Mateusz Lazaru staff commented 2 years ago

Thank you. We will fix this example soon.


Mateusz Lazaru 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
        },
    },
},


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

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