Styling Charts
To pass Column Value Colors for Charts
For a given column with limited distinct values (qualifies for grouping),
give each value it's own color in the charts (pie, bar, line)
In the .ts component you want to use the data grid in
import { ColumnValueColors, NgxDeebodata } from 'ngx-deebodata';
In the exported class
valueColors: ColumnValueColors[] = [
{
column: "party",
valueColors: [
{ value: "Republican", color: "rgb(255, 0, 0)" },
{ value: "Democrat", color: "rgb(0, 0, 255)" },
{ value: "Independent", color: "rgb(0, 255, 0)" }
]
}
]
In the template of the component
<ngx-deebodata
[data]="signalArrayOfObjects()"
[myColumnValueColors]="valueColors"
></ngx-deebodata>
The column value colors configuration above yields graphs like below for all graphs (line, bar, pie) where party is the independent variable