openclimatefix / quartz-frontend

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

Update solar limit to 5000 (from 4000) #509

Open peterdudfield opened 2 months ago

peterdudfield commented 2 months ago

Currently the solar generation was very near 4000, and the graph look a bit close to the top. We could adjust the yaxis to something a bit

Here sets out a few examples of how to do it

https://stackoverflow.com/questions/50078787/recharts-set-y-axis-range

peterdudfield commented 2 months ago

One way to do this is with padding={{ top: 20 }}.

If we use <YAxis type="number" domain={[0, 20000]}/> I think we will always run into issues for different data at different order of magnitudes.

Screenshot 2024-04-29 at 16 39 17
peterdudfield commented 2 months ago

@braddf I can make a PR, but wanted to get your opinion on domain or padding or other things in https://recharts.org/en-US/api/YAxis

braddf commented 2 months ago

@peterdudfield just looking at this now, my first impression is that padding is just the gap and I don't think it looks as nice

peterdudfield commented 2 months ago

Yea I know what you mean. I thought it would be an empty space of padding, but it looks like its padding on the Yaxis, so its maybe a bit like a buffer ontop of the maximum value.

its this bit, above 4000

Screenshot 2024-04-30 at 08 32 39