Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chartjs-adapter-dayjs-3

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chartjs-adapter-dayjs-3

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-12.12%
Maintainers
1
Weekly downloads
 
Created
Source

chartjs-adapter-dayjs

Overview

This adapter allows the use of day.js with Chart.js time scale.

Requires Chart.js 2.8.0 or later and dayjs 1.9.7 or later.

NOTE: This adapter was designed for Chart.js v3 (which requires a separate date adapter for time scales to work properly), using this adapter in any version prior to 3 will override the default date-adapter

Installation

npm

npm install dayjs chartjs-adapter-dayjs --save
import Chart from 'chart.js';
import 'chartjs-adapter-dayjs';

CDN

By default, https://cdn.jsdelivr.net/npm/chartjs-adapter-dayjs 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:

<script src="https://cdn.jsdelivr.net/npm/chart.js@3.3.2"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1.9.7"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-dayjs@1.2.0"></script>

Read more about jsDelivr versioning on their website.

Configuration

v2 Chart.js documention

Read the Chart.js documention v2 | v3 for possible date/time related options. For example, the time scale time.* options v2 | v3 can be overridden using the Day.js formats.

Development

You first need to install node dependencies (requires Node.js):

NPM

> npm install

Yarn

> yarn add

License

chartjs-adapter-dayjs is available under the MIT license.

Credits


Moment Adapter source && README template

Ben McCann

Evert Timberg

stockiNail


FAQs

Package last updated on 09 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc