-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,3 +111,4 @@ messages.mo | |
docker/requirements-local.txt | ||
|
||
cache/ | ||
.aider* | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 | ||
---|---|---|---|---|
|
@@ -256,7 +256,7 @@ | |||
"@types/jquery": "^3.5.8", | ||||
"@types/js-levenshtein": "^1.1.0", | ||||
"@types/json-bigint": "^1.0.1", | ||||
"@types/mousetrap": "^1.6.11", | ||||
"@types/mousetrap": "^1.6.12", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a good practice to have a separate PR for bumping a package unless it's related to the fix. This practice facilitates reverting only the package bump if needed.
Suggested change
|
||||
"@types/react": "^16.9.43", | ||||
"@types/react-dom": "^16.9.8", | ||||
"@types/react-gravatar": "^2.6.8", | ||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -233,6 +233,7 @@ export default function TableChart<D extends DataRecord = DataRecord>( | |||||
onContextMenu, | ||||||
emitCrossFilters, | ||||||
} = props; | ||||||
|
||||||
const timestampFormatter = useCallback( | ||||||
value => getTimeFormatterForGranularity(timeGrain)(value), | ||||||
[timeGrain], | ||||||
|
@@ -410,6 +411,7 @@ 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 columnWidth = Number.isNaN(Number(config.columnWidth)) | ||||||
? config.columnWidth | ||||||
: Number(config.columnWidth); | ||||||
|
@@ -438,7 +440,7 @@ export default function TableChart<D extends DataRecord = DataRecord>( | |||||
(config.showCellBars === undefined | ||||||
? showCellBars | ||||||
: config.showCellBars) && | ||||||
(isMetric || isRawRecords) && | ||||||
(isMetric || isRawRecords || key[0] === '%') && | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
getValueRange(key, alignPositiveNegative); | ||||||
|
||||||
let className = ''; | ||||||
|
@@ -550,6 +552,7 @@ export default function TableChart<D extends DataRecord = DataRecord>( | |||||
} | ||||||
// If cellProps renders textContent already, then we don't have to | ||||||
// render `Cell`. This saves some time for large tables. | ||||||
|
||||||
return ( | ||||||
<StyledCell {...cellProps}> | ||||||
{valueRange && ( | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.