plotly.js
Version:
The open source javascript graphing library that powers plotly
58 lines (57 loc) • 2.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MINUS_SIGN = exports.LOG_CLIP = exports.ALMOST_EQUAL = exports.EPOCHJD = exports.ONEMICROSEC = exports.ONEMILLI = exports.ONESEC = exports.ONEMIN = exports.ONEHOUR = exports.ONEDAY = exports.ONEWEEK = exports.ONEMINMONTH = exports.ONEAVGMONTH = exports.ONEMAXMONTH = exports.ONEMINQUARTER = exports.ONEAVGQUARTER = exports.ONEMAXQUARTER = exports.ONEMINYEAR = exports.ONEAVGYEAR = exports.ONEMAXYEAR = exports.FP_SAFE = exports.BADNUM = void 0;
/**
* Standardize all missing data in calcdata to use undefined
* never null or NaN.
* That way we can use !==undefined, or !== BADNUM,
* to test for real data
*/
exports.BADNUM = undefined;
/*
* Limit certain operations to well below floating point max value
* to avoid glitches: Make sure that even when you multiply it by the
* number of pixels on a giant screen it still works
*/
exports.FP_SAFE = Number.MAX_VALUE * 1e-4;
/*
* Conversion of date units to milliseconds
* year and month constants are marked "AVG"
* to remind us that not all years and months
* have the same length
*/
exports.ONEMAXYEAR = 31622400000; // 366 * ONEDAY
exports.ONEAVGYEAR = 31557600000; // 365.25 days
exports.ONEMINYEAR = 31536000000; // 365 * ONEDAY
exports.ONEMAXQUARTER = 7948800000; // 92 * ONEDAY
exports.ONEAVGQUARTER = 7889400000; // 1/4 of ONEAVGYEAR
exports.ONEMINQUARTER = 7689600000; // 89 * ONEDAY
exports.ONEMAXMONTH = 2678400000; // 31 * ONEDAY
exports.ONEAVGMONTH = 2629800000; // 1/12 of ONEAVGYEAR
exports.ONEMINMONTH = 2419200000; // 28 * ONEDAY
exports.ONEWEEK = 604800000; // 7 * ONEDAY
exports.ONEDAY = 86400000; // 24 * ONEHOUR
exports.ONEHOUR = 3600000;
exports.ONEMIN = 60000;
exports.ONESEC = 1000;
exports.ONEMILLI = 1;
exports.ONEMICROSEC = 0.001;
/*
* For fast conversion btwn world calendars and epoch ms, the Julian Day Number
* of the unix epoch. From calendars.instance().newDate(1970, 1, 1).toJD()
*/
exports.EPOCHJD = 2440587.5;
/*
* Are two values nearly equal? Compare to 1PPM
*/
exports.ALMOST_EQUAL = 1 - 1e-6;
/*
* If we're asked to clip a non-positive log value, how far off-screen
* do we put it?
*/
exports.LOG_CLIP = 10;
/*
* Not a number, but for displaying numbers: the "minus sign" symbol is
* wider than the regular ascii dash "-"
*/
exports.MINUS_SIGN = '\u2212';