Closed RomainChardon closed 1 month ago
This happens with most of the charts plugins / adapters as well. These are currently unusable with the new AssetMapper setup.
ux-chartjs uses chart.js/auto
package when using the AssetMapper, but plugins and adapters are using the normal chart.js package.
If you install a charts.js plugin / adapter via importmap:require
, you'll see that a normal chart.js and some additonal packages are also added to the importmap.
Simple test:
$ bin/console importmap:require chart.js/auto chartjs-plugin-annotations
importmap.php
contents:
return [
//...
'chart.js/auto' => [
'version' => '4.4.1',
],
'chartjs-plugin-annotation' => [
'version' => '3.0.1',
],
'@kurkle/color' => [
'version' => '0.3.2',
],
'chart.js' => [
'version' => '4.4.1',
],
'chart.js/helpers' => [
'version' => '4.4.1',
],
];
I think it works. But I must have a problem with the plugin settings in my chart
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Sorry for the delay in response, it's good for me. I had to do something else to impot the plugins, but my configuration is a bit weird due to Symfony
Hello, I installed ChartJs via symfony:ux on a symfony 6.4 with assetMapper, I cannot add the
chartjs-plugin-annotation
plugin.The import and register is carried out, the plugin and charjs have compatible versions. Everything is well built.
Thank you for your help