Upgraded from 8.6.x to 8.7.x, chart broke

Created on 9 September 2019, over 5 years ago
Updated 18 April 2025, 13 days ago

I upgraded a site from 8.6.x to the latest 8.7.x core release and Charts stopped working. Where before I had a lovely C3.js line graph, now I have this error:

Notice: Undefined index: colors in Drupal\charts\Plugin\views\style\ChartsPluginStyleChart->render() (line 246 of modules/contrib/charts/src/Plugin/views/style/ChartsPluginStyleChart.php).

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Chart API

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    I believe this has been fixed. The code checks if the array key isset before accessing it.

        foreach ($data_field_options as $field_key) {
          if (isset($field_handlers[$field_key])) {
            $data_fields[$field_key] = $field_handlers[$field_key];
          }
        }
    
Production build 0.71.5 2024