MCPcopy
hub / github.com/chartjs/Chart.js / getTitle

Method getTitle

src/plugins/plugin.tooltip.js:533–546  ·  view source on GitHub ↗
(context, options)

Source from the content-addressed store, hash-verified

531 }
532
533 getTitle(context, options) {
534 const {callbacks} = options;
535
536 const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);
537 const title = invokeCallbackWithFallback(callbacks, 'title', this, context);
538 const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);
539
540 let lines = [];
541 lines = pushOrConcat(lines, splitNewlines(beforeTitle));
542 lines = pushOrConcat(lines, splitNewlines(title));
543 lines = pushOrConcat(lines, splitNewlines(afterTitle));
544
545 return lines;
546 }
547
548 getBeforeBody(tooltipItems, options) {
549 return getBeforeAfterBodyLines(

Callers 1

updateMethod · 0.95

Calls 3

pushOrConcatFunction · 0.85
splitNewlinesFunction · 0.85

Tested by

no test coverage detected