mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[explore] improve bubble viz (#2927)
* [explore] improve bubble viz * allow for custom axis formatters * reorg the control panels * Addressing comments
This commit is contained in:
committed by
GitHub
parent
591e512327
commit
3e51c61dbf
@@ -2,7 +2,7 @@ import moment from 'moment';
|
||||
|
||||
const d3 = require('d3');
|
||||
|
||||
function UTC(dttm) {
|
||||
export function UTC(dttm) {
|
||||
return new Date(
|
||||
dttm.getUTCFullYear(),
|
||||
dttm.getUTCMonth(),
|
||||
@@ -67,13 +67,6 @@ export const formatDate = function (dttm) {
|
||||
// d = new Date(d.getTime() - 1 * 60 * 60 * 1000);
|
||||
return tickMultiFormat(d);
|
||||
};
|
||||
export const timeFormatFactory = function (d3timeFormat) {
|
||||
const f = d3.time.format(d3timeFormat);
|
||||
return function (dttm) {
|
||||
const d = UTC(new Date(dttm));
|
||||
return f(d);
|
||||
};
|
||||
};
|
||||
export const fDuration = function (t1, t2, f = 'HH:mm:ss.SS') {
|
||||
const diffSec = t2 - t1;
|
||||
const duration = moment(new Date(diffSec));
|
||||
|
||||
Reference in New Issue
Block a user