I made a chart with Morris.js link
I put it inside a query return, so that's fine, but when I call that query again to generate other data in the graph, it generates another graph, it's duplicating, instead of just exchanging information, it creates another graphic and gets 2
AsIchangetheoption,itwillgenerateanewgraphic...
Mycode
$scope.selectAction=function(myOption){$http.get('http://localhost/Angularjs/php/TotalAlunos.php?cod='+$scope.myOption.id).then(function(result){Morris.Donut({element:'donut-example',data:[{label:"In-Store Sales", value: result.data.total},
{label: "Mail-Order Sales", value: 20}
]
});
});
};