Skip to content

draft: replace ApexCharts with Chart.js - #1264

Draft
Arnold Stoba (arnoldstoba) wants to merge 1 commit into
mainfrom
feat/integrate-chartjs
Draft

draft: replace ApexCharts with Chart.js#1264
Arnold Stoba (arnoldstoba) wants to merge 1 commit into
mainfrom
feat/integrate-chartjs

Conversation

@arnoldstoba

Copy link
Copy Markdown
Contributor

What?

Replaces ApexCharts with Chart.js as the mt-chart rendering engine.

Why?

ApexCharts changed its license (#1183).

How?

The public props keep their ApexCharts-style shape; an internal adapter translates them to a Chart.js config, so consuming code is unchanged. Visual output was matched against measured ApexCharts rendering: smooth curve (reproduced exactly via a small plugin), gradient fill, y-axis scale, label geometry, and plot-area padding. Types line, area, bar, pie, donut, radar, polarArea, scatter, and bubble map natively.

Not supported (fail soft): Apex formatter callbacks, datetime axes, dataLabels.

Also fixes Storybook theme switching on docs pages (channel-based ThemeProvider).

Testing?

29 unit tests (adapter, component, tooltip). Curve verified numerically against Apex's SVG path (RMS 0.001), gradient pixel-matched (±1 RGB), axis/plot geometry measured from Apex output.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor-component-library Ready Ready Preview, Comment Jul 10, 2026 7:36am
meteor-docs Error Error Jul 10, 2026 7:36am

Request Review

ApexCharts changed its license, so mt-chart now renders with Chart.js.
The public props keep their ApexCharts-style shape; an adapter translates
them, so consuming code is unchanged.

Visual parity was matched against measured ApexCharts output: the smooth
curve (Apex's horizontal-tangent bezier, reproduced via a small plugin),
gradient fill colors, y-axis nice scale, axis label geometry and plot-area
padding. Types line, area, bar, pie, donut, radar, polarArea, scatter and
bubble map natively; circular charts accept Apex's numeric series shape.

Storybook: theme switching now works on docs pages (channel-based
ThemeProvider instead of a decorator) with themed docs preview cards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arnoldstoba Arnold Stoba (arnoldstoba) changed the title feat(mt-chart): replace ApexCharts with Chart.js feat: replace ApexCharts with Chart.js Jul 21, 2026
@arnoldstoba Arnold Stoba (arnoldstoba) changed the title feat: replace ApexCharts with Chart.js draft: replace ApexCharts with Chart.js Jul 21, 2026
@arnoldstoba Arnold Stoba (arnoldstoba) added the major release Intended to be released with the a major release. label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major release Intended to be released with the a major release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant