Skip to content

Custom toolltips

Choose a tag to compare

@graphieros graphieros released this 07 Mar 07:48
· 3276 commits to master since this release

All charts with tooltips now have a customFormat tooltip config option, allowing to customize the tooltip contents.
This config option is set to null by default, resulting in the default tooltip behavior.

customFormat: ({ seriesIndex, datapoint, series, config }) => {
  // use the args to build your custom content
  return `<div>...your content here</div>`
}

customFormat must return a string.