subratdash8

Members
  • Content count

    1
  • Joined

  • Last visited

About subratdash8

  • Rank
    Forum Newbie
  1. Fusion_angular with RESTApi

    HI all, I am using fusionchart angular js plugin..My data coming from database through rest api and stored as JSON format in client...While displaying the data it is showing correct..But while assigning dis data with graph data part no output.. Output is showing no data display... var app=angular.module("myApp",["ng-fusioncharts"]) app.controller("MyController",function($scope,$http){ $scope.visibleflag=false; $scope.myDataSource = { //alert("hi") chart: { // "subCaption": "Harry's SuperMart", }, data:[{ label: "Bakersfield Central", value: "880000" }, { label: "Garden Groove harbour", value: "730000" }, { label: "Los Angeles Topanga", value: "590000" }, { label: "Compton-Rancho Dom", value: "520000" }, { label: "Daly City Serramonte", value: "330000" }] }; $scope.visible=function(data){ $scope.visibleflag=true; var res=$http.get("http://localhost:8080/Accelerate1/api/RestAPI"); res.then(function(response) { $scope.data1=response.data; alert("hi") console.log(response.data); }, function(response) { alert("error") }); $scope.myDataSource = { chart: { "caption": "Error Count For Message Family", // "subCaption": "Harry's SuperMart", "xAxisName": "Name", "yAxisName": "Count In Numbers", "numberPrefix": "", "paletteColors": "#0075c2", "bgColor": "#ffffff", "borderAlpha": "20", "canvasBorderAlpha": "0", "usePlotGradientColor": "0", "plotBorderAlpha": "10", "placevaluesInside": "1", "rotatevalues": "1", "valueFontColor": "#ffffff", "showXAxisLine": "1", "xAxisLineColor": "#999999", "divlineColor": "#999999", "divLineIsDashed": "1", "showAlternateHGridColor": "0", "subcaptionFontBold": "0", "subcaptionFontSize": "14" }, data:$scope.data1 }; } }); please help me... value of $scope.data1 =[{'label':'item','value':'4200'}] if I give direct value to data part..it is working.. But above code is not working if i give as $scope.data1.. I need the solution asap.