Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table chart): Show Cell Bars correctly #25625 #25707

Merged
merged 13 commits into from
Nov 6, 2023
12 changes: 10 additions & 2 deletions superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,15 @@ export default function TableChart<D extends DataRecord = DataRecord>(

const getColumnConfigs = useCallback(
(column: DataColumnMeta, i: number): ColumnWithLooseAccessor<D> => {
const { key, label, isNumeric, dataType, isMetric, config = {} } = column;
const {
key,
label,
isNumeric,
dataType,
isMetric,
isPercentMetric,
config = {},
} = column;
const columnWidth = Number.isNaN(Number(config.columnWidth))
? config.columnWidth
: Number(config.columnWidth);
Expand Down Expand Up @@ -438,7 +446,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
(config.showCellBars === undefined
? showCellBars
: config.showCellBars) &&
(isMetric || isRawRecords) &&
(isMetric || isRawRecords || isPercentMetric) &&
getValueRange(key, alignPositiveNegative);

let className = '';
Expand Down