You must be logged in to post your query.
Home › Forums › Chart Support › For Custom Colors Of Pie chart
Tagged: How to give customise color to my pie chart?
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;
});
}
@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
You must be logged in to reply to this topic. Login/Register