From f6bae3929200a03c1af50e74b3ae010c3c0f148d Mon Sep 17 00:00:00 2001 From: quanhm Date: Wed, 19 Jan 2022 09:19:19 +0700 Subject: [PATCH 1/2] fix histogram percentile value not displaying correctly --- superset-frontend/.prettierignore | 1 + .../plugins/legacy-plugin-chart-histogram/src/Histogram.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/.prettierignore b/superset-frontend/.prettierignore index 70521871e99b1..73d3bcbe63567 100644 --- a/superset-frontend/.prettierignore +++ b/superset-frontend/.prettierignore @@ -26,3 +26,4 @@ CHANGELOG.md *-topo.json temporary_superset_ui/ storybook-static/ +plugins/legacy-plugins-chart-histogram/src/Histogram.jsx \ No newline at end of file diff --git a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx index b231b0ae6ea6d..7ba6974b2fd74 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx @@ -122,7 +122,7 @@ class CustomHistogram extends React.PureComponent {
{t('percentile (exclusive)')} - {`{((datum.cumulativeDensity - datum.density) * 100).toPrecision(4)}th`} + {`${((datum.cumulativeDensity - datum.density) * 100).toPrecision(4)}th`}
)} From ab067bdac95072dbf6cd1d654a1b903197488112 Mon Sep 17 00:00:00 2001 From: quanhm Date: Wed, 9 Feb 2022 10:38:48 +0700 Subject: [PATCH 2/2] reenable prettier, reformated Histogram.jsx --- superset-frontend/.prettierignore | 1 - .../plugins/legacy-plugin-chart-histogram/src/Histogram.jsx | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/.prettierignore b/superset-frontend/.prettierignore index 73d3bcbe63567..70521871e99b1 100644 --- a/superset-frontend/.prettierignore +++ b/superset-frontend/.prettierignore @@ -26,4 +26,3 @@ CHANGELOG.md *-topo.json temporary_superset_ui/ storybook-static/ -plugins/legacy-plugins-chart-histogram/src/Histogram.jsx \ No newline at end of file diff --git a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx index 7ba6974b2fd74..518272afdff2e 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/Histogram.jsx @@ -122,7 +122,10 @@ class CustomHistogram extends React.PureComponent {
{t('percentile (exclusive)')} - {`${((datum.cumulativeDensity - datum.density) * 100).toPrecision(4)}th`} + {`${( + (datum.cumulativeDensity - datum.density) * + 100 + ).toPrecision(4)}th`}
)}