You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Google Chart directive in a project. I have an issue wherein all ng-repeats are repeated a number of times equal to the number of rows being iterated across.
I have tried selectively removing all functionality from my script, and this problem only appears after I turn on the google charts directive.
What is happening is this: I have a chart that is attached to a controller. I have another controller that has data. I use a service to communicate the currently selected data from the user-editable controller into the chart-drawing controller. If I turn off the chart directive, my ng-repeats loop through each element correctly and everything is displayed appropriately.
When I turn on the chart directive, all my charts render initially correctly, then the chart is drawn, and then all of my ng-repeats are iterated over again. Only this time, they are iterated over multiple times. For instance,
when I have the chart directive turned off. When I turn the directive back on, I get this:
Test 1 (1)
Test 1 (1)
Test 1 (1)
Test 2 (2)
Test 2 (2)
Test 2 (2)
Test 3 (3)
Test 3 (3)
Test 3 (3)
This is obviously not correct. I tried sticking some data into a plunkr, but it does not seem to understand or interpret standard angular correctly. (It only seems to work when setting functions and variables in the global scope, possibly due to the way it is interpreted on plunkr) As such I do not have any code that you can see this issue happen with.
Any suggestions on fixing this would be great, as I do not want to have to write a custom set of functionality to use either google charts or another chart library.
The text was updated successfully, but these errors were encountered:
I am using the Google Chart directive in a project. I have an issue wherein all ng-repeats are repeated a number of times equal to the number of rows being iterated across.
I have tried selectively removing all functionality from my script, and this problem only appears after I turn on the google charts directive.
What is happening is this: I have a chart that is attached to a controller. I have another controller that has data. I use a service to communicate the currently selected data from the user-editable controller into the chart-drawing controller. If I turn off the chart directive, my ng-repeats loop through each element correctly and everything is displayed appropriately.
When I turn on the chart directive, all my charts render initially correctly, then the chart is drawn, and then all of my ng-repeats are iterated over again. Only this time, they are iterated over multiple times. For instance,
$scope.dataset.rows = [ {label: 'Test 1', value: 1}, {label: 'Test 2', value: 2}, {label: 'Test 3', value: 3} ];
normally will display
Test 1 (1)
Test 2 (2)
Test 3 (3)
when I have the chart directive turned off. When I turn the directive back on, I get this:
Test 1 (1)
Test 1 (1)
Test 1 (1)
Test 2 (2)
Test 2 (2)
Test 2 (2)
Test 3 (3)
Test 3 (3)
Test 3 (3)
This is obviously not correct. I tried sticking some data into a plunkr, but it does not seem to understand or interpret standard angular correctly. (It only seems to work when setting functions and variables in the global scope, possibly due to the way it is interpreted on plunkr) As such I do not have any code that you can see this issue happen with.
Any suggestions on fixing this would be great, as I do not want to have to write a custom set of functionality to use either google charts or another chart library.
The text was updated successfully, but these errors were encountered: