Skip to content

Commit 701d89b

Browse files
committed
fix: support color customization per data point
1 parent 1150e80 commit 701d89b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/observability/src/shared/components/cartesian/cartesian-chart.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ export class CartesianChartComponent<TData> implements OnChanges, OnDestroy {
175175
label: singleValue.context.name,
176176
value: defaultYDataAccessor<number | string>(singleValue.dataPoint),
177177
units: singleValue.context.units,
178-
color: singleValue.context.color
178+
color:
179+
singleValue.context.getColor !== undefined
180+
? singleValue.context.getColor(singleValue.dataPoint)
181+
: singleValue.context.color
179182
}))
180183
};
181184
}

0 commit comments

Comments
 (0)