Skip to content

Commit

Permalink
Changing time table viz to pass formatTime a date (#7020)
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas authored Mar 13, 2019
1 parent d308c84 commit 7f3c145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/src/visualizations/TimeTable/TimeTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>
)}
/>
Expand Down

0 comments on commit 7f3c145

Please sign in to comment.