Add dashexamplechartjs module for the new Symfony dashboard hooks - #255
Open
nicosomb wants to merge 2 commits into
Open
Add dashexamplechartjs module for the new Symfony dashboard hooks#255nicosomb wants to merge 2 commits into
nicosomb wants to merge 2 commits into
Conversation
PoC for PrestaShop/PrestaShop#41970 (chart library benchmark): validates Chart.js as the D3 v3 + NVD3 replacement, using the same integration contract as dashexample (displayAdminDashboard* hooks, module Twig templates, no Smarty/HelperForm/Db::getInstance()).
Contributor
Author
nicosomb
marked this pull request as ready for review
July 27, 2026 17:01
tleon
approved these changes
Jul 29, 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
PoC for spike PrestaShop/PrestaShop#41970 (chart library benchmark) — validates Chart.js as the replacement for D3 v3 + NVD3 on the migrated (Symfony) Back Office Dashboard, using the same integration contract as the reference
dashexamplemodule from PrestaShop/PrestaShop#41968 / #254.What it demonstrates
displayAdminDashboardZoneOne,displayAdminDashboardZoneTwo,displayAdminDashboardToolbar. No legacy Smarty/HelperForm/Db::getInstance().$this->get('twig')), self-hosts Chart.js v4.5.1 (MIT, no CDN dependency).Requirements
dashboardfeature flag enabled.Known issues on the dependency (PrestaShop/PrestaShop#42077)
Building this PoC surfaced two bugs in the core PR this module depends on (reported there):
index.html.twigis missing|rawontoolbarContent/topContent, breaking the toolbar-based asset-loading pattern this module (anddashexample) rely on.actionalready contains?_token=..., dropped and rebuilt from form fields alone), redirecting tosecurity/compromised.Chart.js benchmark
Chart.js was selected as the primary recommendation among Chart.js / ApexCharts / Billboard.js: MIT license, ~67.5k★ on GitHub, ~54M downloads/month, ~68 KB gzip, no license risk — over ApexCharts (excluded: proprietary relicensing in June 2025, revenue-gated + no-redistribution clause) and Billboard.js (heavier bundle, smaller community, keeps a D3 v7 dependency).
Known gap surfaced by this PoC: Chart.js renders on
<canvas>, invisible to screen readers by default. This PoC addsrole="img"+aria-labelas a minimal baseline; a real migration should budget explicit accessibility work per chart.How to test
dashboardfeature flag.php bin/console prestashop:module install dashexamplechartjs.Draft PR — opening for early visibility/discussion while PrestaShop/PrestaShop#42077 is still open.