Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Add tooltip to barbreakdown chart and style zonedetails a bit #87

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

Kongkille
Copy link

Description

We have a lot of very similar functionality when it comes to tooltips. I'd like to simplify a bit but since I was able to add this with quite little code, I think it's better to just carry on and take another look at tooltips in the future.

Preview

Screen.Recording.2022-12-20.at.16.18.17.mov

image

@Kongkille Kongkille marked this pull request as ready for review December 20, 2022 15:29
Copy link

@tonypls tonypls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming together nicely! I noticed that there are currently unknown values for hydro storage in the tooltip when the chart has a value

@@ -21,6 +26,13 @@ function BarBreakdownChart() {
const [displayByEmissions] = useAtom(displayByEmissionsAtom);
const { ref, width } = useRefWidthHeightObserver();
const { __ } = useTranslation();
const isMinSM = useBreakpoint('sm');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to have this more descriptive? isSmallDevice or something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const isMinSM = useBreakpoint('sm');
const isBiggerThanMobile = useBreakpoint('sm');

Copy link
Member

@madsnedergaard madsnedergaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🥳

@Kongkille Kongkille merged commit 40b252e into master Dec 21, 2022
@Kongkille Kongkille deleted the mk/finalize-bar-breakdown-chart branch December 21, 2022 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants