The current symfony/ux-chartjs component is tightly coupled to Chart.js: its PHP model (Chart, ChartBuilderInterface), its Twig helper (render_chart), its Stimulus controller, its events (chartjs:pre-connect, chartjs:connect) and even its npm package name (@symfony/ux-chartjs) all assume Chart.js is the one and only rendering library.
This RFC proposes to:
Introduce a new renderer-agnostic symfony/ux-chart component, inspired by the architecture of symfony/ux-map.
Provide two first-party bridges: symfony/ux-chartjs-chart (Chart.js) and symfony/ux-apexcharts-chart (ApexCharts), with the door open for future bridges (ECharts, Highcharts, Plotly, etc.).
Deprecate symfony/ux-chartjs in 2.x and remove it in 3.0
The current symfony/ux-chartjs component is tightly coupled to Chart.js: its PHP model (Chart, ChartBuilderInterface), its Twig helper (render_chart), its Stimulus controller, its events (chartjs:pre-connect, chartjs:connect) and even its npm package name (@symfony/ux-chartjs) all assume Chart.js is the one and only rendering library.
This RFC proposes to:
Introduce a new renderer-agnostic symfony/ux-chart component, inspired by the architecture of symfony/ux-map.
Provide two first-party bridges: symfony/ux-chartjs-chart (Chart.js) and symfony/ux-apexcharts-chart (ApexCharts), with the door open for future bridges (ECharts, Highcharts, Plotly, etc.).
Deprecate symfony/ux-chartjs in 2.x and remove it in 3.0