Closed
Description
Hi,
I'm using:
- Symfony 6.2.7
- symfony/ux-chartjs 2.7
- Chart.JS 3.4.1
- chartjs-adapter-luxon 1.3.1
- npm 9.5.1 (via Docker image
FROM node:19-alpine3.16
)
... with Webpack Encore for building. My app.ts
is as follows:
// Import CSS
import './css/app.css';
// Required for ChartJS time series axis
import { Chart } from 'chart.js';
import 'chartjs-adapter-luxon';
// Start the Stimulus application
import './bootstrap';
When I try to render a Chart.js chart (using a Symfony UX component), I receive a JavaScript console error of:
stimulus.js:2017 Error connecting controller
Error: This method is not implemented: Check that a complete date adapter is provided.
at abstract (chart.esm.js:2488:1)
at DateAdapter.formats (chart.esm.js:2495:1)
at TimeScale.init (chart.esm.js:10343:12)
at chart.esm.js:5551:1
at each (helpers.segment.js:105:1)
at Chart.buildOrUpdateScales (chart.esm.js:5529:9)
at Chart._updateScales (chart.esm.js:5676:1)
at Chart.update (chart.esm.js:5637:1)
at new Chart (chart.esm.js:5426:1)
at extended.connect (controller.js:18:23)
I've tried to run composer update
and npm update
to no avail.
I've previously used the Luxon adapter when I wasn't using the Symfony UX component, so I'm fairly confident it should do what I need. However, something isn't getting glued together when the adapters are loaded for Chart.Js.
Has anyone else encountered this issue?
Metadata
Metadata
Assignees
Labels
No labels