Closed (fixed)
Project:
Charts
Version:
5.0.x-dev
Component:
Highcharts integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2019 at 13:58 UTC
Updated:
13 May 2022 at 20:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jdmoreno commentedAdded
Comment #3
jdmoreno commentedComment #4
andileco commentedThanks, @jdmoreno. We actually used to have this feature (which works well for the Charts API), but we took it out due to a couple issues:
1) If you have a View where you're only plotting one field, there would only be one color selected in the View configuration, so you would have all the same colors for the pie slices.
2) The number of colors in default settings only goes up to 10, so if your pie has more than 10 slices, you run into an issue there as well.
Leaving the code you added out allows Highcharts to just do its own thing. Though I agree with you: it's not optimal.
Any ideas about how to address the two issues above?
Comment #5
jdmoreno commentedHi @andileco, thanks for your answer, regarding point number one, the truth is that I have not had the opportunity to try it since this solution is mainly designed for the use of chart implementations by code.
With reference to point two, perhaps a button (add new color) could be implemented in the module configuration form, which adds a new color field by ajax and increases the array of colors with the new fields added by the user.
Regards.
Comment #6
jdmoreno commentedHi @andileco, thanks for your answer, regarding point number one, the truth is that I have not had the opportunity to try it since this solution is mainly designed for the use of chart implementations by code.
With reference to point two, perhaps a button (add new color) could be implemented in the module configuration form, which adds a new color field by ajax and increases the array of colors with the new fields added by the user.
Regards.
Comment #7
jtriguero commentedHi @andileco, @jdmoreno is my teammate, seems like he is not a confirmed user yet in drupal.org.
Here is his response.
"Hi @andileco, thanks for your answer, regarding point number one, the truth is that I have not had the opportunity to try it since this solution is mainly designed for the use of chart implementations by code.
With reference to point two, perhaps a button (add new color) could be implemented in the module configuration form, which adds a new color field by ajax and increases the array of colors with the new fields added by the user.
Regards."
Comment #8
andileco commentedMoving this to 5.0.x. Fixing colors is hopefully my last release blocker.
Comment #9
rosk0Going back to the question sin #4:
- I can see some options here: 1) we allow for more colors; 2) we can add an option for user to ignore pre-set colors if the number slices (or other items requiring a color) is bigger then configured ; 3) combine previous two
Comment #13
andileco commentedThis patch enabled dynamic addition of new default colors. This, combined with other recent color-related commits should close this issue.