How to use the @antv/scale/lib/time-util.toTimeStamp function in @antv/scale

To help you get started, we’ve selected a few @antv/scale examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / F2 / src / plugin / filter.js View on Github external
Util.each(fields, field => {
        let value = obj[field];
        if (value) {
          const colDef = colDefs[field];
          if (colDef.type === 'timeCat') {
            const values = colDef.values;
            if (Util.isNumber(values[0])) {
              value = TimeUtil.toTimeStamp(value);
            }
          }

          if ((colDef.values && colDef.values.indexOf(value) === -1)
            || (colDef.min && (value < colDef.min))
            || (colDef.max && (value > colDef.max))) {
            flag = false;
          }
        }
      });
      if (flag) {
github antvis / G2 / src / interaction / helper / filter-data.js View on Github external
Util.each(fields, field => {
        let value = obj[field];
        if (value) {
          const colDef = colDefs[field];
          if (colDef.type === 'timeCat') {
            const values = colDef.values;
            if (Util.isNumber(values[0])) {
              value = TimeUtil.toTimeStamp(value);
            }
          }

          if ((colDef.values && !colDef.values.includes(value))
            || (colDef.min && (value < colDef.min))
            || (colDef.max && (value > colDef.max))) {
            flag = false;
          }
        }
      });
      if (flag) {
github antvis / F2 / src / interaction / util / plugin.js View on Github external
Util.each(values, (v, i) => {
      values[i] = TimeUtil.toTimeStamp(v);
    });
    values.sort(function(v1, v2) {
github antvis / F2 / src / interaction / helper.js View on Github external
Util.each(values, (v, i) => {
        values[i] = TimeUtil.toTimeStamp(v);
      });
      values.sort(function(v1, v2) {
github antvis / G2 / src / interaction / helper / get-limit-range.js View on Github external
Util.each(values, (v, i) => {
      values[i] = TimeUtil.toTimeStamp(v);
    });
    values.sort((v1, v2) => v1 - v2);

@antv/scale

Toolkit for mapping abstract data into visual representation.

MIT
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis