Skip to content

Sanuich/chartjs-plugin-downloaddata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 = &#128190 - 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.

About

Chart.js plugin download data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published