1.0.3 • Published 10 months ago

chartjs-plugin-downloaddata v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

chartjs-plugin-downloaddata

A download data plugin for Chart.js

Adds a hover button in the top right corner of the chart area

Usage

npm i chartjs-plugin-downloaddata

import DownloadDataPackage from 'chartjs-plugin-downloaddata';

Chart.register( DownloadDataPackage );

Nova Chart JS (coroowicaksono/chart-js-integration)

In order to use this plugin with coroowicaksono/chart-js-integration package add these lines to vendors/coroowicaksono/chart-js-integration/resources/js/chart-js-integration.js

import DownloadDataPackage from 'chartjs-plugin-downloaddata'; ... Chart.register(DownloadDataPackage);

Then run npm run dev from vendors/coroowicaksono/chart-js-integration folder

In the ChartCard add

->options([ ... 'plugins' => [ 'download' => true ] ]) ...

Config

buttonTitle: button title (default = 💾 - disk html special char) top: top position px (default = 28) right: right position px (default = 26) opacity: background transparency from 0 to 1 (default = .4)

Documentation

No documentation yet

License

chartjs-plugin-downloaddata.js is available under the MIT license.

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago