Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Service Portal custom widget not reading the chart-create event in $scope.$on

Arti Kumar
Tera Contributor

I have created a custom bar chart widget using angular and chartjs libraries based on the recommendation in the following post. 

https://www.servicenow.com/community/developer-forum/what-is-the-recommended-way-to-display-simple-l...

I am trying to get the chart-instance using the below so that I can use the chartjs OOB functions.

$scope.$on('chart-create', function (evt, chart) {
  console.log(chart);
});

The chart-create event is not being called in my widget despite the $scope variable already defined in my widget controller. Not sure what I am missing. No error in the console but it does not get the chart instance too.

0 REPLIES 0