Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chartjs hovering over one Chart, shows tooltip across all charts

i am using chartjs with angular (https://jtblin.github.io/angular-chart.js/) i am able to get vertical line in my chart when hovering using How to render a vertical line on hover in chartjs example.

I tired looking for any examples for curved line chart where X-axis has shared date range between all chart in DOM but Y-axis has different values. hovering over any chart will trigger hover over all available charts and display that vertical line like above with tool-tip on all charts

like image 845
Justin Homes Avatar asked Dec 10 '22 15:12

Justin Homes


1 Answers

    tooltips: {
      mode: 'x-axis'
    },

If I understand what you want correctly, this should do it.

like image 56
Jeff Schwarting Avatar answered Jan 26 '23 00:01

Jeff Schwarting