Topic: Registering custom controller on ChartJS

develcti priority asked 1 year ago


Expected behavior I'm trying to register a custom controller in the ChartJS instance that will be rendered by your Chart directive. I expect to do that inside a constructor but it seems that the controller it's not registered anywhere.

// my component constructor() { Chart.register(CustomController); }

Actual behavior The controller is not registered. https://www.chartjs.org/docs/latest/developers/charts.html

Maybe I'm accessing the wrong Chart global instance? Is it a global variable once chartjs is loaded in Angular?


Arkadiusz Idzikowski staff commented 1 year ago

It looks like there is a problem that we need to fix on our end. I added that to our to-do list. We will need to take a closer look at that and make some additional tests.


develcti priority commented 1 year ago

Ok thank you, please reach me as soon as you fixed it.



We added some improvements to the chart directive in the 4.0.0 update. You should be able to register a custom controller after upgrading to the new version.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 3.0.1
  • Device: macbook
  • Browser: chrome
  • OS: macos
  • Provided sample code: No
  • Provided link: Yes