calliope-project / calliope-explore

A web-based UI to explore Calliope model results
https://explore.callio.pe
6 stars 0 forks source link

Set slider range to min-max of data #14

Closed FLomb closed 2 years ago

FLomb commented 2 years ago

Currently, all slides range from 0 to 1. However, some of those have a much narrower 'actual' range. For instance, Gini is something like 0.7-1 only.

Would it make more sense to set the sliders' range to the min-max range of data? This should be done, however, in a way that is consistent with the scatter plot, which instead shows (correctly) all ranges from 0 to 1. One option would be to keep all slides with a 0-1 range while simultaneously 'stopping' the slider at the edges of the min-max data range.

sjpfenninger commented 2 years ago

Done in 722ba09 by setting the starting values of the sliders to the min-max in the data. Ideally, as Francesco suggests there would be a "stopper" at the edge of the min-max range but I don't see an easy way to do that with what Dash provides while still keeping the relative width of the slider correct - maybe something to revisit in the far future...