Chart.js with factory and webservices (Ionic)

๐Ÿ‘:0

so if you are using $scope.statPros to hold your data and your data is a array of objects then I would also add your lables to statPros. so that each object has statPros.data object and a statPros.labels it would look like this:

[{data: {//data object}, labels: {//label object}}, {data: {//data object}, labels: {//label object}}]

in your html you can do

 <div ng-repeat="item in statPros">
            <canvas id="pie" class="chart chart-pie" legend="true" data="item.data" labels="item.labels"></canvas>
        </div>

Leave a comment