0.2.1 • Published 6 years ago

chartjs-plugin-select v0.2.1

Weekly downloads
181
License
MIT
Repository
github
Last release
6 years ago

chartjs-plugin-select npm downloads

A Chartjs plugin to provide drag select event callbacks.

This is inspired mostly from https://github.com/chartjs/Chart.js/issues/5283.

Usage

In chart options, supply the following:

select: {
  events: ['mousedown', 'mouseup'], // this is important!
  selectCallback: (startPoint, endPoint) => {
    /*
      Callback after drag select has completed.
    */
  }
}

Doc

selectCallback

This is called after mouse point is released at the end of select.

Advantages of using this plugin

  • Limitless... :-)

Limitations

  • I have tested this only on a line chart

Follow this repo for updates.

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago