Datawheel / canon

Reusable React environment and components for creating visualization engines.
GNU General Public License v3.0
27 stars 7 forks source link

[vizbuilder] use new ui_default_drilldown annotation when changing measures #436

Closed davelandry closed 5 years ago

davelandry commented 5 years ago

@jspeis and @hwchen will be adding in a ui_default_drilldown annotation that will define the default drilldown for a measure. From Jonathan

ui_default_drilldown is meant to make looking at measures like Property Value by Bucket more intuitive by adding an annotation that tells the vizbuilder it should default to drilldown on the Value Bucket so that a user sees https://saguaro.datausa.io/visualize?groups=0-Z1sykUT&groups=1-26IlCY&measure=ZX51uM instead of just https://saguaro.datausa.io/visualize?groups=0-Z1sykUT&measure=ZX51uM (the latter doesn't really have much useful information because its not broken out by bucket)

@frabarz obviously we'll have to wait until this is implemented in the cubes: https://github.com/Datawheel/datausa-tracker/issues/223

jspeis commented 5 years ago

@frabarz I've temporarily hacked these in starting in ulysses to hopefully enable you to test: https://ulysses-api.datausa.io/cubes feel free let me know if you run into any issues or have any questions! (as an example take a look at the acs_ygo_housing_value_bucket_1/acs_ygo_housing_value_bucket_5 cubes, for instance)

frabarz commented 5 years ago

Should this be handled transparently to the user (adding the drilldown to the grouping list in the sidebar), or hidden in the request?

davelandry commented 5 years ago

The user should definitely see this, it should behave the same way the defaultGroup prop works, super-ceding whatever the React user has defined in that prop.