superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] branch master updated: Changing time table viz to pass formatTime a date (#7020)
Date Wed, 13 Mar 2019 16:35:09 GMT
This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f3c145  Changing time table viz to pass formatTime a date (#7020)
7f3c145 is described below

commit 7f3c145b1f5a4e2d8b95982119503e98772e2c47
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Wed Mar 13 09:34:51 2019 -0700

    Changing time table viz to pass formatTime a date (#7020)
---
 superset/assets/src/visualizations/TimeTable/TimeTable.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/TimeTable/TimeTable.jsx b/superset/assets/src/visualizations/TimeTable/TimeTable.jsx
index 38b9d22..c895d46 100644
--- a/superset/assets/src/visualizations/TimeTable/TimeTable.jsx
+++ b/superset/assets/src/visualizations/TimeTable/TimeTable.jsx
@@ -23,6 +23,7 @@ import { scaleLinear } from 'd3-scale';
 import { Table, Thead, Th, Tr, Td } from 'reactable-arc';
 import { formatNumber } from '@superset-ui/number-format';
 import { formatTime } from '@superset-ui/time-format';
+import moment from 'moment';
 
 import MetricOption from '../../components/MetricOption';
 import InfoTooltipWithTrigger from '../../components/InfoTooltipWithTrigger';
@@ -148,7 +149,7 @@ class TimeTable extends React.PureComponent {
           renderTooltip={({ index }) => (
             <div>
               <strong>{formatNumber(column.d3format, sparkData[index])}</strong>
-              <div>{formatTime(column.dateFormat, entries[index].time)}</div>
+              <div>{formatTime(column.dateFormat, moment.utc(entries[index].time).toDate())}</div>
             </div>
           )}
         />


Mime
View raw message