Skip to content

robertrachita/chartjs-plugin-annotation

 
 

Repository files navigation

This is a simple update to the existing chartjs-plugin-annotation.js, to allow it to work when using Typescript/node16 or nodenext. Specifically, this solves this error: Error: node_modules/chartjs-plugin-annotation/types/index.d.ts(2,218): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

All the credits go the original authors and package: https://github.com/chartjs/chartjs-plugin-annotation. For all intents and purposes, you probably want to use that package.

Original README below:

chartjs-plugin-annotation.js

GitHub Workflow Status Coverage Status release npm (latest) documentation Awesome

An annotation plugin for Chart.js >= 4.0.0


This plugin needs to be registered. It does not function as inline plugin.


For Chart.js 3.7.0 to 3.9.1 support, use version 2.2.1 of this plugin

For Chart.js 3.0.0 to 3.6.2 support, use version 1.4.0 of this plugin

For Chart.js 2.4.0 to 2.9.x support, use version 0.5.7 of this plugin

This plugin draws lines, boxes, points, labels, polygons and ellipses on the chart area.

Annotations work with line, bar, scatter and bubble charts that use linear, logarithmic, time, or category scales. Furthermore you can use a doughnut label annotation which can be used to add contents (text, image, canvas) in the middle area of the doughnut charts.

Example Screenshot

View this example

Documentation

You can find documentation for chartjs-plugin-annotation at www.chartjs.org/chartjs-plugin-annotation.

Contributing

Before submitting an issue or a pull request to the project, please take a moment to look over the contributing guidelines first.

License

Chart.Annotation.js is available under the MIT license.

About

Annotation plugin for Chart.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Other 1.2%