seattleflu / genomic-incidence-tracker

https://genomic-incidence-tracker.herokuapp.com
GNU Affero General Public License v3.0
1 stars 0 forks source link

Hoist chart data selectors #2

Open jameshadfield opened 5 years ago

jameshadfield commented 5 years ago

Currently the data selectors provide transformed data directly to the chart components. When faceting this has the unfortunate side effect that each chart has a different scale, which is confusing. The easiest way out of this is hoisting the data selector calls (and modifying the selectors) and then passing the relevant data to each chart as props. This would allow a consistent scale to be provided, and facilitate potential UI improvements such as only displaying one scale / legend for multiple charts.

UPDATE: Integrating the modeling results into the data flow makes the makeSelectDataForChart selector even more complex and may want to be looked at during this issue.