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

Method getTitle

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

Source from the content-addressed store, hash-verified

569 }
570
571 getTitle(context, options) {
572 const {callbacks} = options;
573
574 const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);
575 const title = invokeCallbackWithFallback(callbacks, 'title', this, context);
576 const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);
577
578 let lines = [];
579 lines = pushOrConcat(lines, splitNewlines(beforeTitle));
580 lines = pushOrConcat(lines, splitNewlines(title));
581 lines = pushOrConcat(lines, splitNewlines(afterTitle));
582
583 return lines;
584 }
585
586 getBeforeBody(tooltipItems, options) {
587 return getBeforeAfterBodyLines(

Callers 1

updateMethod · 0.95

Calls 3

pushOrConcatFunction · 0.85
splitNewlinesFunction · 0.85

Tested by

no test coverage detected