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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ messages.mo
docker/requirements-local.txt

cache/
.aider*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.aider*

6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
onContextMenu,
emitCrossFilters,
} = props;

const timestampFormatter = useCallback(
value => getTimeFormatterForGranularity(timeGrain)(value),
[timeGrain],
Expand Down Expand Up @@ -410,6 +411,7 @@
const getColumnConfigs = useCallback(
(column: DataColumnMeta, i: number): ColumnWithLooseAccessor<D> => {
const { key, label, isNumeric, dataType, isMetric, config = {} } = column;

const columnWidth = Number.isNaN(Number(config.columnWidth))
? config.columnWidth
: Number(config.columnWidth);
Expand Down Expand Up @@ -438,7 +440,7 @@
(config.showCellBars === undefined
? showCellBars
: config.showCellBars) &&
(isMetric || isRawRecords) &&
(isMetric || isRawRecords || key[0] == '%') &&

Check failure on line 443 in superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Expected '===' and instead saw '=='
getValueRange(key, alignPositiveNegative);

let className = '';
Expand Down Expand Up @@ -550,6 +552,7 @@
}
// If cellProps renders textContent already, then we don't have to
// render `Cell`. This saves some time for large tables.

return (
<StyledCell {...cellProps}>
{valueRange && (
Expand Down
Loading