Gathering detailed insights and metrics for chartjs-adapter-date-fns
Gathering detailed insights and metrics for chartjs-adapter-date-fns
Gathering detailed insights and metrics for chartjs-adapter-date-fns
Gathering detailed insights and metrics for chartjs-adapter-date-fns
npm install chartjs-adapter-date-fns
Typescript
Module System
Node Version
NPM Version
99.3
Supply Chain
93.3
Quality
75.6
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
113 Stars
57 Commits
34 Forks
4 Watchers
4 Branches
12 Contributors
Updated on Jun 03, 2025
Latest Version
3.0.0
Package Id
chartjs-adapter-date-fns@3.0.0
Unpacked Size
280.84 kB
Size
52.62 kB
File Count
8
NPM Version
8.19.2
Node Version
16.18.1
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
19
This adapter allows the use of date-fns with Chart.js.
Requires Chart.js 2.8.0 or later and date-fns 2.0.0 or later.
Note: once loaded, this adapter overrides the default date-adapter provided in Chart.js (as a side-effect).
1npm install date-fns chartjs-adapter-date-fns --save
1import { Chart } from 'chart.js'; 2import 'chartjs-adapter-date-fns';
By default, https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns
returns the latest (minified) version, however it's highly recommended to always specify a version in order to avoid breaking changes. This can be achieved by appending @{version}
to the url:
1<script src="https://cdn.jsdelivr.net/npm/chart.js/dist/chart.min.js"></script> 2<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.bundle.min.js"></script>
Read more about jsDeliver versioning on their website.
date-fns requires a date-fns locale object to be tagged on to each format()
call, which requires the locale to be explicitly set via the adapters.date
option: Chart.js documentation on adapters.date
For example:
1// import date-fns locale: 2import {de} from 'date-fns/locale'; 3 4 5// scale options: 6{ 7 adapters: { 8 date: { 9 locale: de 10 } 11 } 12}
Further, read the Chart.js documentation for other possible date/time related options. For example, the time scale time.*
options can be overridden using the date-fns tokens.
You first need to install node dependencies (requires Node.js):
1> npm install
The following commands will then be available from the repository root:
1> npm run build // build dist files 2> npm run lint // perform code linting
chartjs-adapter-date-fns
is available under the MIT license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/13 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More