Skip to content

Commit 82e79c6

Browse files
committed
update the event and use scope.
1 parent 5f3dafa commit 82e79c6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ng-fusioncharts.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function () {
2-
var fc = angular.module('ngFusionCharts', []);
2+
var fc = angular.module('ng-fusioncharts', []);
33

44

55
fc.directive('fcChart', function ($http) {
@@ -10,14 +10,16 @@
1010
fcDataset: '@',
1111
fcCategories: '@',
1212
fcChartAttrs: '@',
13-
fcChartClick: '@'
13+
fcDataplotClick: '@'
1414
},
1515
link: function (scope, element, attrs) {
1616
var chart = null,
1717
events = {
18-
chartClick: function (ev, props) {
19-
if(attrs.fcChartClick) {
20-
scope.$parent[attrs.fcChartClick](ev, props);
18+
dataplotClick: function (ev, props) {
19+
if(attrs.fcDataplotClick) {
20+
scope.$apply(function () {
21+
scope.$parent[attrs.fcDataplotClick](ev, props);
22+
})
2123
}
2224
}
2325
};

0 commit comments

Comments
 (0)