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