Canvas 移除单点悬停时的彩色框,并在多个点相交时显示

Canvas 移除单点悬停时的彩色框,并在多个点相交时显示,canvas,charts,chart.js,tooltip,Canvas,Charts,Chart.js,Tooltip,我希望它的功能与此类似[ 基本上,只有当有点重叠并且需要根据线条进行区分时,彩色框才会显示。有什么想法吗 tooltips: { enabled: true, mode: 'point', displayColors: true, backgroundColor: 'rgba(252, 252, 252, 1)', bodyFontColor: 'rgba(102, 102, 102, 1)', cornerRadius: 2, xPad

我希望它的功能与此类似[ 基本上,只有当有点重叠并且需要根据线条进行区分时,彩色框才会显示。有什么想法吗

tooltips: {

    enabled: true,
    mode: 'point',
    displayColors: true,
    backgroundColor: 'rgba(252, 252, 252, 1)',
    bodyFontColor: 'rgba(102, 102, 102, 1)',
    cornerRadius: 2,
    xPadding: 10,
    yPadding: 12,
    caretSize: 10,
    callbacks: {
      title: () => null,
      label: t => t.yLabel.toLocaleString() + ' kBtu/GSF',
      afterLabel: (t, d) => (typeof footnotes[d.datasets[t.datasetIndex].label] !== 'undefined' && typeof footnotes[d.datasets[t.datasetIndex].label][t.xLabel] === 'string')
        ? footnotes[d.datasets[t.datasetIndex].label][t.xLabel].replace(/\n\s+/g, '\n')
        : null
    }
  },
  // Note: set this on the global variable
  hover: {
    mode: 'point',
    onHover: 
  }