Allow the intervals track to populate legend and color scheme dynamically, rather than using a hard-coded preset.
This attempts to handle several scenarios of missing or partial data: although global state_ids and preset legends are the ideal for stable coloring, it can build a legend based on the data in region, using only the information in the plot
TODO
[x] Explore ways to make color scheme consistent across tracks/datasets (a limit of auto-generation)
[x] Clean up and improve the defaults to better suit portal preference (eg collapse tracks by default)
[x] Evaluate whether we would prefer to use (and build a legend from) itemRgb value if present. This would be more consistent when comparing tracks in the same region (we wouldn't be picking colors based on the data available), but at the expense of consistency in coloring across datasets of different origin.
[ ] Document breaking changes introduced in this PR.
Additional changes
In auditing the interval layer, it was found to be used in relatively few sites. Several specialty data layers and dashboard widgets have been moved to extension files, reducing the built asset bundle size by 10-15%
Pages using the interval rendering must now include the extension file by either script tag or import command. Eg,
import 'locuszoom/dist/ext/lz-intervals-track.min'; // Import for side effects (globally register helpers)
The standard_phewas layout no longer uses the genome legend track by default, making the bundled layout more aligned with the most common use cases.
An undocumented and unused layout directive (transition options) has been removed from the codebase.
Ticket: #183
Purpose
Allow the intervals track to populate legend and color scheme dynamically, rather than using a hard-coded preset.
This attempts to handle several scenarios of missing or partial data: although global state_ids and preset legends are the ideal for stable coloring, it can build a legend based on the data in region, using only the information in the plot
TODO
Additional changes
import
command. Eg,import 'locuszoom/dist/ext/lz-intervals-track.min'; // Import for side effects (globally register helpers)
standard_phewas
layout no longer uses the genome legend track by default, making the bundled layout more aligned with the most common use cases.transition
options) has been removed from the codebase.