Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 755 Bytes

File metadata and controls

36 lines (24 loc) · 755 Bytes

Highcharts tooltip synchronization

Show tooltips on multiple charts if xAxis value are same. Works well for both line and column charts.

Demo

  1. Line chart

    line chart

  2. Column chart

    column chart

  • Usage
syncTooltip(highchartsInstance);
  • Example
import syncTooltip from 'highcharts-tooltip-synchronization';

const Chart = () => {
  let chartRef = React.createRef();
  let config = getConfig();

  React.useEffect(() => {
    const chart = Highcharts.chart(chartRef.current, config);
    syncTooltip(chart);
  }, []);
  return <div ref={chartRef} />;
};