You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ar...@apache.org on 2024/03/25 17:17:21 UTC
(superset) 06/10: Table with Time Comparison:
This is an automated email from the ASF dual-hosted git repository.
arivero pushed a commit to branch table-time-comparison
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 5fc10a3b36525bdd7cc7f451511ceb27d7cee571
Author: Antonio Rivero <an...@gmail.com>
AuthorDate: Mon Mar 4 18:28:35 2024 +0100
Table with Time Comparison:
- Align text of comparison metrics to the left
---
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
index a41001a446..ab75914c97 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@@ -362,11 +362,10 @@ export default function TableChart<D extends DataRecord = DataRecord>(
const getSharedStyle = (column: DataColumnMeta): CSSProperties => {
const { isNumeric, config = {} } = column;
- const textAlign = config.horizontalAlign
- ? config.horizontalAlign
- : isNumeric
- ? 'right'
- : 'left';
+ const textAlign =
+ config.horizontalAlign ||
+ (isNumeric && !enableTimeComparison ? 'right' : 'left');
+
return {
textAlign,
};