Getting Access To Already Created Chart.js Chart February 04, 2024 Post a Comment I have created a BarChart with angular-chart like this: To figure out which chart object is the one you want, just look for the chart directive id (or chart type) in the chart object.Example:Use an object as an associative array$scope.myCharts = {}; CopySave object reference in the associative array$scope.$on('chart-create', function(event, chart) { console.log(chart.chart.canvas.id); console.log(chart.chart.config.type); //If id is the same, reference will be updated $scope.myCharts[chart.chart.canvas.id] = chart; }); CopyAccess chart object by its directive idconsole.log($scope.myCharts[id]); Copy Share You may like these postsOrder By Elements Based On Input Text, AngularjsAngularjs Ngcontroller To Be Reloading Data PeriodicallyUsing Angularjs Function In PhantomjsSelecting Group Level Row On Selecting All Event On Ui-grid Post a Comment for "Getting Access To Already Created Chart.js Chart"
Post a Comment for "Getting Access To Already Created Chart.js Chart"