MCPcopy Index your code
hub / github.com/codemistic/Web-Development / At

Function At

chart/js/chart.js:3127–3155  ·  view source on GitHub ↗
(t, e, n)

Source from the content-addressed store, hash-verified

3125 var Ct = V._deprecated,
3126 Pt = V.valueOrDefault;
3127 function At(t, e, n) {
3128 var i,
3129 a,
3130 r = n.barThickness,
3131 o = e.stackCount,
3132 s = e.pixels[t],
3133 l = V.isNullOrUndef(r)
3134 ? (function (t, e) {
3135 var n,
3136 i,
3137 a,
3138 r,
3139 o = t._length;
3140 for (a = 1, r = e.length; a < r; ++a)
3141 o = Math.min(o, Math.abs(e[a] - e[a - 1]));
3142 for (a = 0, r = t.getTicks().length; a < r; ++a)
3143 (i = t.getPixelForTick(a)),
3144 (o = a > 0 ? Math.min(o, Math.abs(i - n)) : o),
3145 (n = i);
3146 return o;
3147 })(e.scale, e.pixels)
3148 : -1;
3149 return (
3150 V.isNullOrUndef(r)
3151 ? ((i = l * n.categoryPercentage), (a = n.barPercentage))
3152 : ((i = r * o), (a = 1)),
3153 { chunk: i / o, ratio: a, start: s - i / 2 }
3154 );
3155 }
3156 z._set("bar", {
3157 hover: { mode: "label" },
3158 scales: {

Callers 1

chart.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected