Certain parts of the plot (like data sources) allow initial config to be overridden based on options in plot.state. There could be value in a reusable widget that sets a field in plot.state.
The initial use case is to select LD reference population dynamically from a preset list of options.
Summary of changes
Add dashboard_components registry for complex and reusable buttons
Add set_state widget that sets a value in plot.state
Add ldlz2_pop_selector widget that changes LD population used
for whole plot
Button can optionally update its label text to show the selected value.
The options on the premade button are hardcoded for the 1000G data in the UMich LD server. It is not part of the default layout, because many deployments are still stuck on the old, deprecated ap1v1 LD endpoint.
TODO
[x] Add unit tests
[x] Verify common use cases
[x] Update other LZ examples, including nonstandard layouts (like annotations and cred sets)
Ticket: #153
Purpose
Certain parts of the plot (like data sources) allow initial config to be overridden based on options in
plot.state
. There could be value in a reusable widget that sets a field in plot.state.The initial use case is to select LD reference population dynamically from a preset list of options.
Summary of changes
dashboard_components
registry for complex and reusable buttonsset_state
widget that sets a value in plot.stateldlz2_pop_selector
widget that changes LD population used for whole plotButton can optionally update its label text to show the selected value.
The options on the premade button are hardcoded for the 1000G data in the UMich LD server. It is not part of the default layout, because many deployments are still stuck on the old, deprecated ap1v1 LD endpoint.
TODO