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
chartjs-adapter-moment
Chart.js adapter to use Moment.js for time functionalities
@date-io/date-fns
Abstraction over common javascript date management libraries
date-fns
Modern JavaScript date utility library
@date-io/date-fns-jalali
Abstraction over common javascript date management libraries
npm install chartjs-adapter-date-fns
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
108 Stars
57 Commits
34 Forks
5 Watching
4 Branches
12 Contributors
Updated on 23 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-2.4%
53,022
Compared to previous day
Last week
1.3%
275,149
Compared to previous week
Last month
6.4%
1,154,553
Compared to previous month
Last year
61.5%
11,637,914
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 binaries found in the repo
Reason
no dangerous workflow patterns detected
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
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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