How To Make Interactive Google Charts In Angular (ui-event)?
I wonder if there is a good way to handle google charts API events in Angular? (Dont have enough reputation to make proper links out of these references:) I'm using [bouil.github.
Solution 1:
I dropped the ui-event part and injected eventlisteners directly to the chart-object that I'm passing into the directive.
function bindChartEvents(scope) {
if(typeof $scope.chart.methods !== "undefined" && typeof $scope.chart.methods.select !== "undefined"){
$scope.selectListener = google.visualization.events.addListener($scope.chartWrapper, "select", function (event) {
$scope.chart.methods.select($scope.chartWrapper.getChart().getSelection(), event);
});
}
});
Post a Comment for "How To Make Interactive Google Charts In Angular (ui-event)?"