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

1.1.1 • 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';

Package Sidebar

Install

npm i chartjs-adapter-temporal

Weekly Downloads

7

Version

1.1.1

License

MIT

Unpacked Size

46.4 kB

Total Files

17

Last publish

Collaborators

  • schummar