Problem/Motivation

Currently has two methods for selecting series color when a view is grouped: it can be based on the values of an entity reference field, or it can be based on a "color field" set on the referenced entities. While these are helpful, there are other scenarios, such as grouping on a "list (text)" field, where it would be helpful to have another way of selecting the preferred colors.

Steps to reproduce

Create a view with a chart format.
Group by a "list (text)" field.
Colors will default to the colors selected in your charts default settings.

Proposed resolution

It would be nice to have an additional method for selecting based on non-entity reference field values.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork charts-3535897

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andileco created an issue. See original summary.

nikathone made their first commit to this issue’s fork.

nikathone’s picture

Status: Active » Needs work
nikathone’s picture

Status: Needs work » Needs review
andileco’s picture

Status: Needs review » Needs work

Things seem to be working well - thank you!! One thing that I think needs to happen from a UX perspective is to provide a message if the user selects an option but the underlying data doesn't support it. For example, if there are no fields of a select type, then we should have a message that no eligible fields were found. For example, all three options show up for me for a view based on Views CSV Source.

nikathone’s picture

Status: Needs work » Needs review

Added a warning message as the default placeholder for colors. We might need to tweak the wording though.

  • andileco committed d4ca87bb on 5.1.x authored by nikathone
    Issue #3535897 by nikathone, andileco: Provide additional option for...
andileco’s picture

Status: Needs review » Fixed

Thank you! There's a minor issue where if you move from the third option to the second (on a taxonomy term field), then it looks different than if you move from the first to the second. But I'm going to make it a follow-up issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.