Skip to content

Mini charts click events

Compare
Choose a tag to compare
@graphieros graphieros released this 08 Mar 06:17
· 1662 commits to master since this release

This version adds click events to all mini charts:

VueUiSparkline
VueUiSparkbar
VueUiSparkStackbar
VueUiSparkHistogram

use the @selectDatapoint event on the component to retrieve the selected datapoint and index

<VueUiSparkbar
  :dataset="dataset"
  :config="config"
  @selectDatapoint="selectDatapoint"
/>

function selectDatapoint({ datapoint, index }) {
  console.log({ datapoint, index })
}