MCPcopy Create free account
hub / github.com/chartjs/Chart.js / getBody

Method getBody

src/plugins/plugin.tooltip.js:592–611  ·  view source on GitHub ↗
(tooltipItems, options)

Source from the content-addressed store, hash-verified

590 }
591
592 getBody(tooltipItems, options) {
593 const {callbacks} = options;
594 const bodyItems = [];
595
596 each(tooltipItems, (context) => {
597 const bodyItem = {
598 before: [],
599 lines: [],
600 after: []
601 };
602 const scoped = overrideCallbacks(callbacks, context);
603 pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));
604 pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));
605 pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));
606
607 bodyItems.push(bodyItem);
608 });
609
610 return bodyItems;
611 }
612
613 getAfterBody(tooltipItems, options) {
614 return getBeforeAfterBodyLines(

Callers 1

updateMethod · 0.95

Calls 5

eachFunction · 0.85
overrideCallbacksFunction · 0.85
pushOrConcatFunction · 0.85
splitNewlinesFunction · 0.85

Tested by

no test coverage detected