[hotfix] xAxis broken on time series viz

This commit is contained in:
Maxime Beauchemin
2017-06-21 16:35:50 -07:00
parent bd706ebbd1
commit 6eba6cac0b
3 changed files with 21 additions and 11 deletions

View File

@@ -15,10 +15,11 @@ export function d3FormatPreset(format) {
return d3.format('.3s');
}
export const d3TimeFormatPreset = function (format) {
if (format === 'smart_date') {
const effFormat = format || 'smart_date';
if (effFormat === 'smart_date') {
return formatDate;
}
const f = d3.time.format(format);
const f = d3.time.format(effFormat);
return function (dttm) {
const d = UTC(new Date(dttm));
return f(d);