Gathering detailed insights and metrics for m2m-chartjs-plugin-crosshair
Gathering detailed insights and metrics for m2m-chartjs-plugin-crosshair
Gathering detailed insights and metrics for m2m-chartjs-plugin-crosshair
Gathering detailed insights and metrics for m2m-chartjs-plugin-crosshair
npm install m2m-chartjs-plugin-crosshair
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
78 Commits
1 Branches
Updated on Sep 13, 2022
Latest Version
1.0.5
Package Id
m2m-chartjs-plugin-crosshair@1.0.5
Unpacked Size
81.38 kB
Size
17.05 kB
File Count
6
NPM Version
9.6.2
Node Version
18.14.2
Published on
Apr 13, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
958
1
21
1
Chart.js plugin to draw vertical crosshair, zoom, interpolate values and sync chart interactions.
Requires Chart.js 3.9.0 or later.
1new Chart(ctx, { 2 // ... data ... 3 options: { 4 // ... other options ... 5 plugins: { 6 tooltip: { 7 mode: 'interpolate', 8 intersect: false 9 }, 10 crosshair: { 11 line: { 12 color: '#F66', // crosshair line color 13 width: 1 // crosshair line width 14 }, 15 sync: { 16 enabled: true, // enable trace line syncing with other charts 17 group: 1, // chart group 18 suppressTooltips: false // suppress tooltips when showing a synced tracer 19 }, 20 zoom: { 21 enabled: true, // enable zooming 22 zoomboxBackgroundColor: 'rgba(66,133,244,0.2)', // background color of zoom box 23 zoomboxBorderColor: '#48F', // border color of zoom box 24 zoomButtonText: 'Reset Zoom', // reset zoom button text 25 zoomButtonClass: 'reset-zoom', // reset zoom button class 26 }, 27 callbacks: { 28 beforeZoom: () => function(start, end) { // called before zoom, return false to prevent zoom 29 return true; 30 }, 31 afterZoom: () => function(start, end) { // called after zoom 32 } 33 } 34 } 35 } 36 } 37});
You first need to install node dependencies (requires Node.js):
> npm install
The following commands will then be available from the repository root:
> gulp build // build dist files
> gulp build --watch // build and watch for changes
> gulp lint // perform code linting
> gulp docs // generate GitBook documentation (`dist/docs`)
> gulp samples // prepare samples for release (`dist/samples`)
> gulp package // create an archive with dist files and samples
> gulp netlify // prepare Netlify artifacts (`dist/www`)
chartjs-plugin-crosshair
is available under the MIT license.
No vulnerabilities found.
No security vulnerabilities found.