Fix grouped display for "incomplete" result sets

Created on 4 December 2015, over 9 years ago
Updated 11 March 2025, 2 months ago

The problem

When grouping the results (i.e., in Charts lingo, having more than one series) and some series don't have all the data points, the output will be wrong, since values per series will just be added sequentially from the "right", through the following line (which doesn't take the "label key" into account at all):

            $chart[$series_key]['#data'][] = $value;

An example

You want to show a column chart of the GPD of two countries, A and B, for the years 2012–2014, but country B hasn't reported a value for the year 2013:

Country | Year | GPD
---------------------
A       | 2012 |  8 T$
A       | 2013 |  9 T$
A       | 2014 | 10 T$
B       | 2012 |  3 T$
B       | 2014 |  5 T$

This will lead to the following output:

As you can see, the value for B/2014 ends up as the 2013 value instead.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Views integration

Created by

πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

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

    Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.

Production build 0.71.5 2024