Alex Berdyshev
Alex Berdyshev

Reputation: 761

custom pie chart colors in nvd3-angular

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?

Upvotes: 2

Views: 1938

Answers (1)

shabeer90
shabeer90

Reputation: 5151

It's not that hard, try this -

$scope.options = {
            chart: {
                type: 'pieChart',
                height: 500,
                ...
                ... // You code
                ...
                color:['#C620D2','#528BE8','#45B29D']
            }
        };

Upvotes: 8

Related Questions