chartjs-adapter-temporal
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

npm badge npm bundle size

Time adapter for Chart.js using the Temporal API (Stage 3 proposal) and the Intl.DateTimeFormat API.

Getting started

Install

npm install chartjs-adapter-temporal

Polyfill

Currently the Temporal API is not yet available in browsers. You can install one of multiple polyfills to use this adapter:

Register the adapter

Either explicitly register the adapter:

import { _adapters } from 'chart.js/auto';
import temporalAdapter from 'chartjs-adapter-temporal';

_adapters._date.override(temporalAdapter);

Or use the register import:

import 'chartjs-adapter-temporal/register';

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i chartjs-adapter-temporal

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

44.5 kB

Total Files

16

Last publish

Collaborators

  • schummar