Problem/Motivation
The buildVariables method is expecting the categories to be keyed by order. e.g.
0 => 'Foo'
1 => 'Bar'
However, if the keys are not in that order then we get the following notice:
Notice: Undefined offset: 1 in Drupal\charts_google\Plugin\chart\Google->buildVariables() (line 151 of modules/contrib/charts/modules/charts_google/src/Plugin/chart/Google.php).
Proposed resolution
Use the a foreach rather than the for so we can get the keys correctly.
File: modules/charts_google/src/Plugin/chart/Google.php
Line: 95
// From.
for ($j = 0; $j < $categoriesCount; $j++) {
// To.
foreach ($categories as $j => $category) {
Comments
Comment #2
jkevingz commentedComment #4
andileco commented