Skip to content

No dependency date adapter for Chart.js (using browser Intl API)

License

Notifications You must be signed in to change notification settings

cbrianball/chartjs-adapter-date-std

 
 

Repository files navigation

chartjs-adapter-date-std

Overview

An adaptor for the Chart.js library enabling usage of time series without dependencies to any 3rd party libraries.

Requires Chart.js 2.8.0 or later.

Note: once loaded, this adapter overrides the default date-adapter provided in Chart.js (as a side-effect).

Installation

npm

npm install chartjs-adapter-date-std --save

Usage

You need to register the Adaptor manually once:

import { _adapters } from 'chart.js';
import {StdDateAdapter} from 'chartjs-adapter-date-std';

_adapters._date.override( StdDateAdapter.chartJsStandardAdapter());

Development

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

> npm install

The following commands will then be available from the repository root:

> npm run build         // build dist files
> npm run test          // run karma tests

License

chartjs-adapter-date-std is available under the MIT license.

About

No dependency date adapter for Chart.js (using browser Intl API)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.5%
  • JavaScript 13.5%