1

i am using angularjs to develop an app and i want to use charts for it .Hence i couldnt change the colour of charts bar. i want to code either in controller or css.

<div class="container-fluid" ng-show="PieChart">
  <div class="well well-sm">
  <div class="row">
    <form action="" method="">
    <div class="col col-sm-14" id="canvas">
    <div class="col col-sm-0.5">
      <span style="cursor:pointer"><div class="pull-right"><i class="material-icons" data-toggle="tooltip" data-placement="bottom" title="Close" style="color:black; align-self: top; margin-left: 90px;" ng-click="closeAll()">clear</i></div>
    </span></div>
    <canvas id="pie" class="chart chart-pie"
        chart-data="data" chart-labels="labels" chart-options="options" chart-colours="colors">

    </canvas> 
    </div>
    </form>
  </div>
</div>
</div>

//controller

$scope.PieChart=false;
 $scope.AllUsersPieChart = function(){
     $scope.labels = ['leads','member','past member'];
     $scope.series = $scope.temparr;
     $scope.data = [$scope.lead,$scope.member,$scope.pastmember];
     $scope.BarChart=false;
     $scope.PieChart=true;
     $scope.coachTable=false;
     $scope.options = {legend: {display: true},
        //                position: 'bottom',
        //                title: {display: true,
        //                fontsize: 19,
        //                text: 'PieChart for Coaches'
        // }
        responsive: true
     };

// i tried with $scope.colours = ["#1E824C", "#1E824C", "#1E824C"];but it doesnt work.!!!

Frk
  • 11
  • 2

1 Answers1

0

You wanted to say: "colours"

  $scope.colours = ['#FD1F5E','#1EF9A1','#7FFD1F','#68F000'];

Also we can see the other attributes That we can change , like : legend , series, hover .

Next to each chart you can see an option called "settings ", that's all what you can change.

Kondal
  • 2,870
  • 5
  • 26
  • 40