Home forums Using CanvasJS For Custom Colors Of Pie chart

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 2 months, 3 weeks ago.

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

    AnkitPilania
    Member

    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

    Vishwas R
    Keymaster

    @ankitpilania,

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

    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.