MCPcopy Create free account
hub / github.com/codemistic/Web-Development / hn

Function hn

chart/js/chart.js:6547–6603  ·  view source on GitHub ↗
(t, e, n, i)

Source from the content-addressed store, hash-verified

6545 return o;
6546 }
6547 function hn(t, e, n, i) {
6548 var a,
6549 r,
6550 o,
6551 s,
6552 l,
6553 u,
6554 d,
6555 h,
6556 c,
6557 f,
6558 g,
6559 p,
6560 m,
6561 v = n.length,
6562 b = [],
6563 x = [],
6564 y = [];
6565 for (a = 0; a < v; ++a) {
6566 if (
6567 ((s = n[a].label),
6568 (l = n[a].major ? e.major : e.minor),
6569 (t.font = u = l.string),
6570 (d = i[u] = i[u] || { data: {}, gc: [] }),
6571 (h = l.lineHeight),
6572 (c = f = 0),
6573 sn(s) || on(s))
6574 ) {
6575 if (on(s))
6576 for (r = 0, o = s.length; r < o; ++r)
6577 (g = s[r]),
6578 sn(g) ||
6579 on(g) ||
6580 ((c = V.measureText(t, d.data, d.gc, c, g)), (f += h));
6581 } else (c = V.measureText(t, d.data, d.gc, c, s)), (f = h);
6582 b.push(c), x.push(f), y.push(h / 2);
6583 }
6584 function _(t) {
6585 return { width: b[t] || 0, height: x[t] || 0, offset: y[t] || 0 };
6586 }
6587 return (
6588 (function (t, e) {
6589 V.each(t, function (t) {
6590 var n,
6591 i = t.gc,
6592 a = i.length / 2;
6593 if (a > e) {
6594 for (n = 0; n < a; ++n) delete t.data[i[n]];
6595 i.splice(0, a);
6596 }
6597 });
6598 })(i, v),
6599 (p = b.indexOf(Math.max.apply(null, b))),
6600 (m = x.indexOf(Math.max.apply(null, x))),
6601 { first: _(0), last: _(v - 1), widest: _(p), highest: _(m) }
6602 );
6603 }
6604 function cn(t) {

Callers 1

chart.jsFile · 0.85

Calls 1

_Function · 0.70

Tested by

no test coverage detected