This sample shows how to use the tooltip position mode setting.
const config ={type:'line',data: data,options:{interaction:{intersect:false,mode:'index',},plugins:{title:{display:true,text:(ctx)=>'Tooltip position mode: '+ ctx.chart.options.plugins.tooltip.position,},}}};
// Create a custom tooltip positioner to put at the bottom of the chart area
components.Tooltip.positioners.bottom=function(items){const pos = components.Tooltip.positioners.average(items);// Happens when nothing is foundif(pos ===false){returnfalse;}const chart =this.chart;return{x: pos.x,y: chart.chartArea.bottom,xAlign:'center',yAlign:'bottom',};};