Skip to content

Nfinished/chartjs-adapter-spacetime

Repository files navigation

chartjs-adapter-spacetime

npm npm peer dependency version npm peer dependency version

Spacetime support for Chart.js TimeScale plugin.

$ npm install spacetime chartjs-adapter-spacetime

$ yarn add spacetime chartjs-adapter-spacetime

$ pnpm add spacetime chartjs-adapter-spacetime
import { Chart as ChartJS, TimeScale } from 'chart.js'

import 'chartjs-adapter-spacetime'

ChartJS.register(TimeScale)

When providing your own formats via Chart.JS options, use Spacetime's unixFmt options. Localization is not currently supported.

Some portions of this project are based on chartjs-adapter-luxon.