Home Forums Chart Support For Custom Colors Of Pie chart

For Custom Colors Of Pie chart

Viewing 2 posts - 1 through 2 (of 2 total)
  • #21326

    var BindPieData = function () {

    var user = {

    };
    AngularService.get(user, ‘OrderDetail’).success(function (response) {
    //alert(response.logMasterLoginResult);
    $scope.datalist1 = JSON.parse(response.OrderDetailResult);

    //———-Sample data for Pie chart———–//
    $scope.labels2 = [];
    $scope.data2 = [];
    angular.forEach($scope.datalist1, function (val,key) {
    //alert(val.name);
    $scope.labels2[key] = val.name + ” – ( ” + val.itemName+” )”;
    $scope.data2[key] = val.salary;

    });

    });

    }

    #21334

    @ankitpilania,

    You can add custom colorSet, which is an array of colors, to render chart data with custom colors.

    custom color set

    Can you kindly create JSFiddle or share sample project reproducing the issue you are facing over Google-Drive or Onedrive so that we can understand your code & scenario better and help you out.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.