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
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
Comment #4
nikathoneComment #5
nikathoneComment #6
andileco commentedThings 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.
Comment #7
nikathoneAdded a warning message as the default placeholder for colors. We might need to tweak the wording though.
Comment #9
andileco commentedThank 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.