i am trying to draw a google chart based one some data i am getting above error
my html is --------------------------- <!DOCTYPE html> <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> </head> <div ng-controller="ExecutionController as ctrl" style="margin-right: 5%;"> <!-- //ng-controller="UserController as ctrl" --> <div class="panel panel-default"> <div class="panel-heading"> <span class="lead">Execution</span> </div> <div class="formcontainer"> <form> <section class="form-block"> <div class="form-group"> <label style="padding-left:0px;"class="col-md-2 control-lable">Select the Test Bed Configuration:</label> <div class="select" style="display: inline;"> <div class="select" style="display: inline;"> <select ng-model="selectedTestBed" style="min-width:12%;" id="aForm_3"> <option ng-repeat="item in ctrl.testbeds" value="{{item.testBedName}}">{{item.testBedName}}</option> </select> </div> </div> </div> <div class="row"> <div class="form-group"> <label class="col-md-2">Select Faultset List:</label> <div class="select" style="display: inline;"> <select ng-model="selectedFaultset" style="min-width:12%;margin-left:0.5%;" id="aForm_3"> <option ng-repeat="item in ctrl.falutsets" value="{{item.faultSetName}}">{{item.faultSetName}}</option> </select> </div> </div> </div> <div class="row"> <div class="form-group col-md-email"> <label class="col-md-2 control-lable" for="executerEmail">Send Report To:</label> <div class="col-md-7"> <input type="email" ng-model="ctrl.executerEmail" id="executerEmail" class="email form-control-execution input-sm" placeholder="Enter your Email" required/> <div class="has-error" ng-show="myForm.$dirty"> <span ng-show="myForm.executerEmail.$invalid">This field is invalid </span> </div> </div> </div> </div> <button type="submit" ng-click="ctrl.execution(selectedTestBed,selectedFaultset,ctrl.executerEmail)" class="btn btn-primary">Click Here For Execution</button> </section> </form> <div style="margin-top:1%;"><label>Execution Status:</label><label>{{ctrl.executionStatuses.statusMessage}}</label></div> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <span class="lead">Current Execution Status</span><button type="submit" ng-click="ctrl.fetchExecutionStaus()" style="margin-left:1%;float:right;"class="btn btn-primary">Refresh</button> </div> <div> <div style="width:40%;height:70%;display:inline-block;" class="tablecontainer"> <table class="table table-hover"> <thead> <tr> <th>ExecutionName</th> <th>Total Test</th> <th>Passed Test</th> <th>Failed Test</th> <th>Skipped Test</th> </tr> </thead> <tbody> <tr ng-repeat="u in ctrl.executionStatuses | filter:ctrl.paginate"> <td><span ng-bind="u.executionName"></span></td> <td><span ng-bind="u.testngresults.totalTestCount"></span></td> <td><span ng-bind="u.testngresults.passedTestCount"></span></td> <td><span ng-bind="u.testngresults.failedTestCount"></span></td> <td><span ng-bind="u.testngresults.skippedTestCount"></span></td> </tr> </tbody> </table> <pagination total-items="ctrl.executionStatuses.length" ng-model="ctrl.currentPage" max-size="5" boundary-links="true" items-per-page="ctrl.numPerPage" class="pagination-sm"> </pagination> </div> <script type='text/javascript'> //<![CDATA[ google.setOnLoadCallback(drawVisualization); function convertObjectToGraphArr(obj) { var arr = []; arr.push(obj.executionName); arr.push(obj.testngresults.passedTestCount); arr.push(obj.testngresults.failedTestCount); arr.push(obj.testngresults.skippedTestCount); return arr; } function convertArr(arr) { var newArr = arr.slice(0); newArr = newArr.map(function(arrO) { return convertObjectToGraphArr(arrO); }); newArr.unshift([ 'Execution Name', 'PASSED', 'FAILED', 'SKIPPED' ]); return newArr; } function drawVisualization(event, data) { var defaultData = [ [ 'Version', 'PASSED', 'FAILED', 'SKIPPED' ], [ '', 0, 0, 0 ]]; data = data ? convertArr(data) : defaultData; data = google.visualization.arrayToDataTable(data); var options = { title : 'Execution versus failure ', vAxis : { title : "Count" }, colors: ['rgb(107, 199, 57)', 'rgb(243, 10, 10)', 'rgb(239, 166, 10)'], hAxis : { title : "Execution Name" }, seriesType : "bars", series : { 5 : { type : "line" } } }; var chart = new google.visualization.ComboChart(document .getElementById('chart_div_1')); chart.draw(data, options); } //]]> </script> <div id="chart_div_1" style="float:right;display:inline;height:70%;"></div> <div style="clear:both"></div> </div> </div> </div> </div> </div> </html> my controller code ------------------------------------- self.fetchStaus = function() { Service .fetchStaus() .then( function(response) { self.Statuses = response; drawVisualization(null,self.Statuses); }, function() { console .error('Error while fetching data'); }); }; please help me on this i ahve very urgent requirement Thanks Uma -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
