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

Function parse

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

Source from the content-addressed store, hash-verified

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

Callers 1

Chart.jsFile · 0.70

Calls 1

toTimestampFunction · 0.70

Tested by

no test coverage detected