Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgets can not render line charts due to an updated chart.js version in TYPO3 12 #6

Closed
morefx opened this issue Nov 30, 2023 · 2 comments · Fixed by #7
Closed

Widgets can not render line charts due to an updated chart.js version in TYPO3 12 #6

morefx opened this issue Nov 30, 2023 · 2 comments · Fixed by #7

Comments

@morefx
Copy link

morefx commented Nov 30, 2023

In current TYPO3 12 versions the dashboard widgets can not draw the line graphs due to a new version of charts.js introducing breaking changes:

Invalid scale configuration for scale: yAxes [chartjs.js:19:81187
Invalid scale configuration for scale: xAxes [chartjs.js:19:81187]
Invalid scale configuration for scale: x [chartjs.js:19:81187]

The current TYPO3 12 ships with chart.js 4.x. with a new configuration format. From vendor/typo3/cms-core/Documentation/Changelog/12.1/Deprecation-99150-UpdatedChartLibraryInEXTdashboard.rst:

Deprecation: #99150 - Updated chart library in EXT:dashboard

See :issue:99150

Description

The library chart.js used to render charts in a dashboard has been
updated to version 4.x, introducing some breaking changes. A migration layer is
in place to migrate known and used affected settings.

Impact

The CSS file :file:EXT:dashboard/Resources/Public/Css/Contrib/chart.css became
obsolete with the update of chart.js and was therefore removed without
replacement.

If a migration is executed, an entry will be written into the deprecation log.

Affected installations

All plugins providing third-party chart widgets are affected.

Migration

Migrate the configuration as mentioned in the table below.

================================   ============================
Old setting                        New setting
================================   ============================
graphConfig/options/scales/xAxes   graphConfig/options/scales/x
graphConfig/options/scales/yAxes   graphConfig/options/scales/y
================================   ============================

Also, please consult the migration guides available at

@morefx morefx changed the title Widgets can not render line charts due to an updated version of chart.js version in TYPO3 12 Widgets can not render line charts due to an updated chart.js version in TYPO3 12 Nov 30, 2023
@morefx
Copy link
Author

morefx commented Nov 30, 2023

Additionally, the function getCssFiles() is deprecated, because charts.js has no chart.css any more.

@maikschneider
Copy link
Member

Hey @morefx, thanks for the detailed bug report! I just released version 11.0.4 which should resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants