Hello,I would like to make a comparison between 2 pie charts with the same labels.I would like to be able to assign the same colour in the 2 charts for the same items.In the example below, I have an offset in the colours because I have an additional item (CARBURANT 5%)
Is this possible?
Best regards,
Philippe DUFEIL
Hello and thank you for contacting Infragistics. Yes, each pie chart can have it's own brushes collection assigned to it. Keep in mind the PieChart’s Brushes collection are associated with the visible slices by the index of the brushes in the collection. This means the slice's brush is not fixed.
eg.
<igx-pie-chart [dataSource]="energyGlobalDemand" valueMemberPath="value" labelMemberPath="category" labelsPosition="OutsideEnd" radiusFactor="0.7" [legend]="legend" labelExtent="30" startAngle="0" brushes="rgba(247, 210, 98, 1) rgba(168, 168, 183, 1) rgba(224, 81, 169, 1) rgba(248, 161, 95, 1) rgba(115, 86, 86, 1)" outlines="white" name="chart" #chart> </igx-pie-chart>