Problem/Motivation
Currently, when more than one Charts submodule (e.g. Highcharts) is saved, users should select which library is the default in the "Chart configuration" page (/admin/config/content/charts). This adds a horizontal tab on that page with additional settings that are specific to that library. In the case of Highcharts, that includes language options like what a thousands separator should be.
If a user decides to switch which library is the default, then those settings are lost. I happen to do this a lot in order to see how each of the libraries looks on the page generated by the Charts API Example module (/charts/example/display). This can be extremely frustrating, especially now that the Highcharts module has settings for additional libraries that can be included.
Steps to reproduce
- Enable the Highcharts and Chart.js modules.
- Navigate to /admin/config/content/chart
- Set Highcharts as the default library, then check "Enable Highcharts' "Accessibility" library" in the "Highcharts settings" horizontal tab.
- Save.
- Set Chart.js as the default library.
- Save.
- Set Highcharts as the default library and check the "Highcharts settings" horizontal tab: the Accessibility library will be unchecked.
Proposed resolution
Add a new library_configs setting that can hold the per-library configuration information and use this instead of the single shared library_config (no s); in this way, switching between libraries no longer discards the other library's configuration.
Remaining tasks
Manual user testing and confirmation that the fix works.
User interface changes
None.
API changes
Data model changes
Issue fork charts-3532462
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
andileco commentedComment #9
andileco commentedComment #10
andileco commentedComment #11
nikathoneComment #13
andileco commented