openclimatefix / quartz-frontend

Front End repo for the Nowcasting project.
https://openclimatefix.org/projects/nowcasting/
MIT License
100 stars 17 forks source link

Issue/409 chart zoom v1 #450

Closed rachel-labri-tipton closed 5 months ago

rachel-labri-tipton commented 7 months ago

Pull Request

Description

This adds the zoom feature to the chart. Currently you can highlight the chart you want to inspect and the main y-axis domain is adjusted based on the maximum y value in the selected set of data.

The Recharts library allows you to highlight a reference area and then redraw the chart boundaries.

I'm wondering if the RemixLine could use another prop that would be the zoomYMax of the chart when a chart is in a zoomed state.

Here are a few screenshots of the feature.

Screenshot 2023-12-18 at 21 20 17 Screenshot 2023-12-18 at 21 25 13 Screenshot 2023-12-18 at 21 21 02

Fixes #409

How Has This Been Tested?

I ran the code locally.

Checklist:

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nowcasting-app ✅ Ready (Inspect) Visit Preview 💬 3 unresolved Jan 17, 2024 10:17am
peterdudfield commented 7 months ago

Looks really good i like it, Lets get this in with out the yaxis zoom for the moment

  1. Looks great on national
  2. GSP needed some y max buffer I think
  3. Site level zoom went a bit funny, not sure why?
  4. Delta national looked good
  5. Detla GSP needed a bit of extra y mas
rachel-labri-tipton commented 7 months ago

thanks for having a look, @peterdudfield! All of these issues are the same for me. I have a couple ideas for fixing the ymax issue.

braddf commented 6 months ago

Hey @rachel-labri-tipton – looking really good on the y-axis zoom here ⚡ I think I agree with Dan's comments on Vercel, an X to close also makes sense to me, maybe on the top right, but can see how it looks. And getting same bugs with site/GSP as Peter and you have mentioned above – happy to have a look at these together tomorrow maybe if you fancy?

braddf commented 5 months ago

Hey @rachel-labri-tipton, is this PR superseded by the other zoom one now, and if so can we close this to tidy up pending?