Add Chart.js charts to the dashexample module - #255
Merged
kpodemski merged 1 commit intoAug 6, 2026
Conversation
Contributor
Author
nicosomb
marked this pull request as ready for review
July 27, 2026 17:01
tleon
approved these changes
Jul 29, 2026
Charts are rendered with the Chart.js bundle provided by the core dashboard page (global Chart + psChart palette mirroring the modern PrestaShop branding) — the module ships no charting library. Blocks now use the new-theme Bootstrap card markup, and each hook template loads its own assets so hooks can be unregistered independently. Zone One shows an auto-colored doughnut, Zone Two a line chart with previous-period overlay and a goals bar chart using explicit palette tokens, Zone Three an auto-colored polar area chart.
jolelievre
force-pushed
the
add/dashexamplechartjs-module
branch
from
August 5, 2026 19:15
d3d0143 to
7055995
Compare
jolelievre
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds Chart.js charts to the existing
dashexamplemodule (merged in #254) instead of shipping a second demo module: the earlierdashexamplechartjsPoC validated Chart.js for spike PrestaShop/PrestaShop#41970, and its learnings are now folded into the single reference module for the migrated (Symfony) Back Office Dashboard (PrestaShop/PrestaShop#41968 / #254).The module ships no charting library: it consumes the Chart.js bundle provided by the core dashboard page (global
Chart+ thepsChartPrestaShop palette) from PrestaShop/PrestaShop#42135.What it demonstrates
psChart.colors(dashtrends / dashgoals equivalents);psCharttokens (a chart that defines any color is left untouched by the auto-coloring).card/card-header/card-body/card-footer), the supported markup of the new BO theme.date_from/date_to) surfaced in each card footer.Requirements
dashboardfeature flag enabled.Chart.js benchmark (from the spike)
Chart.js was selected among Chart.js / ApexCharts / Billboard.js: MIT license, ~67.5k★, ~54M downloads/month, ~68 KB gzip — over ApexCharts (proprietary relicensing in June 2025) and Billboard.js (heavier, keeps a D3 v7 dependency). Chart.js renders on
<canvas>, invisible to screen readers by default: every canvas here carriesrole="img"+aria-labelas a minimal baseline.How to test
dashboardfeature flag.php bin/console prestashop:module install dashexample.