Project

General

Profile

Actions

Patch #44018

open

Update Chart.js to 4.5.1 and migrate to ES Modules

Added by Takashi Kato 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Third-party libraries
Target version:
-

Description

This patch updates Chart.js to version 4.5.1 . Along with the update, the library has been migrated to ES Module (ESM) format, and the chart rendering logic has been refactored into a Stimulus controller.

To optimize performance, the Stimulus controller implements dynamic imports for Chart.js. If we were to import Chart.js at the top level, all users would be forced to download the library upon accessing Redmine. By using dynamic imports, the library is only downloaded when a chart actually needs to be rendered.

Since the official Chart.js distribution does not provide a pre-bundled ESM version suitable for this use case, I have modified the build settings in the following fork:

https://github.com/redmine-ui/Chart.js/tree/esm_bundle


Files

No data to display

Actions

Also available in: Atom PDF