hoogi91 / charts

TYPO3 Extension charts
https://extensions.typo3.org/extension/charts/
GNU General Public License v3.0
5 stars 5 forks source link

Wrong pie chart colors after bugfix release 3.0.1 -> 3.0.2 #560

Open noeol opened 3 weeks ago

noeol commented 3 weeks ago

Version affected: 3.0.2

TYPO3 11.5 PHP 8.2 hoogi91/charts 3.0.2 (no hoogi91/spreadsheets)

Description
After the latest Bugfix release 3.0.1 -> 3.0.2, pie charts show only one color.

The problem seems to be directly linked to the change in https://github.com/hoogi91/charts/blob/develop/Classes/DataProcessing/Charts/Library/AbstractColoredLibrary.php#L31

- $paletteSize = count($datasets[$key]);
+ $paletteSize = count($datasets);
Before (3.0.1) After (3.0.2)
before after

How to reproduce
Consider the following simple dataset: Bildschirmfoto vom 2024-08-19 14-33-39

ikonplant commented 3 weeks ago

I can confirm this issue (Using version 2.0.7)