You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/03/02 05:02:05 UTC
[GitHub] graceguo-supercat closed pull request #4511: Fix how the annotation layer interpretes the timestamp string without?
graceguo-supercat closed pull request #4511: Fix how the annotation layer interpretes the timestamp string without?
URL: https://github.com/apache/incubator-superset/pull/4511
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js
index b60c32a0e5..1b1ba8decc 100644
--- a/superset/assets/visualizations/nvd3_vis.js
+++ b/superset/assets/visualizations/nvd3_vis.js
@@ -4,6 +4,7 @@ import throttle from 'lodash.throttle';
import d3 from 'd3';
import nv from 'nvd3';
import mathjs from 'mathjs';
+import moment from 'moment';
import d3tip from 'd3-tip';
import { getColorFromScheme } from '../javascripts/modules/colors';
@@ -624,7 +625,7 @@ function nvd3Vis(slice, payload) {
const tip = tipFactory(e);
const records = (slice.annotationData[e.name].records || []).map((r) => {
- const timeColumn = new Date(r[e.timeColumn]);
+ const timeColumn = new Date(moment.utc(r[e.timeColumn]));
return {
...r,
[e.timeColumn]: timeColumn,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services