Skip to content

Commit 41685bd

Browse files
committed
pass in textColor through databar
1 parent efba92c commit 41685bd

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

plugins/ui/src/js/src/elements/UITable/UITableModel.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,23 @@ class UITableModel extends IrisGridModel {
402402
negativeColor = this.colorMap.get(negativeColor) ?? negativeColor;
403403
}
404404

405+
const formatColor = this.getFormatOptionForCell(
406+
columnIndex,
407+
rowIndex,
408+
'color'
409+
);
410+
const textColor =
411+
formatColor != null
412+
? this.colorMap.get(formatColor) ?? formatColor
413+
: undefined;
414+
405415
return {
406416
columnMin: minRowValue,
407417
columnMax: maxRowValue,
408418
axis,
409419
color: value >= 0 ? positiveColor : negativeColor,
420+
// @ts-expect-error TODO: bump web version
421+
textColor,
410422
valuePlacement,
411423
opacity,
412424
markers,
@@ -511,14 +523,6 @@ class UITableModel extends IrisGridModel {
511523
);
512524
}
513525

514-
formatColorForCell(column: ModelIndex, row: ModelIndex): string | null {
515-
const color = this.getFormatOptionForCell(column, row, 'color');
516-
if (color != null) {
517-
return this.colorMap.get(color) ?? color;
518-
}
519-
return null;
520-
}
521-
522526
override colorForCell(
523527
column: ModelIndex,
524528
row: ModelIndex,

0 commit comments

Comments
 (0)