Ng2-charts: Colors - Pie chart

Created on 13 Jun 2016  路  3Comments  路  Source: valor-software/ng2-charts

Sorry I am trying to put color like the Line chart example in a pie chart but i am unable it only takes the first color for all the pie part :
capture_5

Code html base-chart: [data]="pieChartData"
[labels]="pieChartLabels"
[colors]="pieChartColor"
[chartType]="pieChartType"
(chartHover)="chartHovered($event)">

color array : pieChartColor:any = [
{ // blue
backgroundColor: '#00285e'
},
{ // purple
backgroundColor: '#b4108b'
},
{ // green
backgroundColor: '#89ba17'
}];

Most helpful comment

Check this comment about doughnut charts, it's almost the same input: https://github.com/valor-software/ng2-charts/issues/251#issuecomment-225581645

All 3 comments

Check this comment about doughnut charts, it's almost the same input: https://github.com/valor-software/ng2-charts/issues/251#issuecomment-225581645

Thank you, it works well.

Then close the issue :) 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexcastillo picture alexcastillo  路  5Comments

raychenfj picture raychenfj  路  3Comments

tssobe picture tssobe  路  4Comments

mrpotato3 picture mrpotato3  路  5Comments

edarev picture edarev  路  5Comments