Fix grouped labels

Created on 29 August 2019, over 5 years ago
Updated 11 March 2025, 2 months ago

Motivation

When generating the grouped labels for a chart, the project is currently taking the first result set and adding all labels there, then goes to the second one and skips the number of labels that were taking from the first result set.

If the first result set doesn't have some labels that the second one has in its first rows, the label will not be added to the chart at all.

Example

Having the following data, and filtering the data so amount > 1. I should get 2 results for October, 1 for November and 2 for December.

person | month | amount
-----------------------------
A         | 10      | 4
B         | 10      | 4
A         | 11      | 1
B         | 11      | 7
A         | 12      | 4
B         | 12      | 4

But the output doesn't show anything for November:

Solution

Generate the labels before setting the data, just after we get the sets from the view.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Views integration

Created by

πŸ‡²πŸ‡½Mexico jkevingz

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