2

I'm trying to customise pie chart's colors using angular-nvd3 extension.

This is what I caught in plunker here. As you can see the color of the legend was being customised but the chart wasn't.

I need the colors being passed inside the data object. Do you have any ideas how I can fix it?

shabeer90
  • 5,161
  • 4
  • 47
  • 65
Alex Berdyshev
  • 761
  • 2
  • 7
  • 21

1 Answers1

8

It's not that hard, try this -

$scope.options = {
            chart: {
                type: 'pieChart',
                height: 500,
                ...
                ... // You code
                ...
                color:['#C620D2','#528BE8','#45B29D']
            }
        };
halfer
  • 19,824
  • 17
  • 99
  • 186
shabeer90
  • 5,161
  • 4
  • 47
  • 65