Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions dist/angular-fusioncharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@
scope: scope,
link: function(scope, element, attrs) {
function updateData(key, data) {
scope.datasourceDt.key = data;
chart.setJSONData(scope.datasourceDt);
if (key) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is key here ???? @rohanoid5

scope.datasourceDt.key = data;
chart.setJSONData(scope.datasourceDt);
}
}

function createWatchersForAttrs(datasource) {
Expand Down Expand Up @@ -689,6 +691,7 @@
}
}
}

for (i = 0; i < attribs.length; i++) {
attr = attribs[i];
if (attr.match(/^on/i)) {
Expand Down Expand Up @@ -719,7 +722,7 @@
if (scope.datasource) {
attrs.datasource = scope.datasource;
chartConfigObject.dataSource = scope.datasource;
dataStringStore.dataSource = attrs.datasource;
dataStringStore.dataSource = scope.datasource;

scope.$watch(
'datasource',
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-fusioncharts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/angular-fusioncharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@
scope: scope,
link: function(scope, element, attrs) {
function updateData(key, data) {
scope.datasourceDt.key = data;
chart.setJSONData(scope.datasourceDt);
if (key) {
scope.datasourceDt.key = data;
chart.setJSONData(scope.datasourceDt);
}
}

function createWatchersForAttrs(datasource) {
Expand Down Expand Up @@ -689,6 +691,7 @@
}
}
}

for (i = 0; i < attribs.length; i++) {
attr = attribs[i];
if (attr.match(/^on/i)) {
Expand Down Expand Up @@ -719,7 +722,7 @@
if (scope.datasource) {
attrs.datasource = scope.datasource;
chartConfigObject.dataSource = scope.datasource;
dataStringStore.dataSource = attrs.datasource;
dataStringStore.dataSource = scope.datasource;

scope.$watch(
'datasource',
Expand Down