MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / parse

Function parse

static/plugins/chart.js/Chart.bundle.js:14164–14180  ·  view source on GitHub ↗
(scale, input)

Source from the content-addressed store, hash-verified

14162}
14163
14164function parse(scale, input) {
14165 if (helpers$1.isNullOrUndef(input)) {
14166 return null;
14167 }
14168
14169 var options = scale.options.time;
14170 var value = toTimestamp(scale, scale.getRightValue(input));
14171 if (value === null) {
14172 return value;
14173 }
14174
14175 if (options.round) {
14176 value = +scale._adapter.startOf(value, options.round);
14177 }
14178
14179 return value;
14180}
14181
14182/**
14183 * Figures out what unit results in an appropriate number of auto-generated ticks

Callers 1

Chart.bundle.jsFile · 0.70

Calls 1

toTimestampFunction · 0.70

Tested by

no test coverage detected