Skip to content

Commit

Permalink
Merge pull request #112 from toddmedema/sunrise-sunset-emoji-markers
Browse files Browse the repository at this point in the history
Swap English text to symbolic emojis
  • Loading branch information
toddmedema authored Apr 27, 2024
2 parents 86d1df5 + e0e65d0 commit d0e0a8a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/base/ChartSupplyDemand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const ChartSupplyDemand = (props: Props): JSX.Element => {
).sunset;
}

const noon = sunrise + (sunset - sunrise) / 2

// BLACKOUT CALCULATION
let blackoutCount = 0;
const blackouts = [
Expand Down Expand Up @@ -167,7 +169,7 @@ const ChartSupplyDemand = (props: Props): JSX.Element => {
<div>
<VictoryChart
theme={VictoryTheme.material}
padding={{ top: 10, bottom: 25, left: 55, right: 5 }}
padding={{ top: 10, bottom: 45, left: 55, right: 5 }}
domain={{ y: [domainMin, domainMax] }}
domainPadding={{ y: [6, 6] }}
height={height || 300}
Expand Down Expand Up @@ -196,8 +198,8 @@ const ChartSupplyDemand = (props: Props): JSX.Element => {
}
>
<VictoryAxis
tickValues={[sunrise, sunset]}
tickFormat={["sunrise", "sunset"]}
tickValues={[sunrise, noon, sunset]}
tickFormat={["🌅", "☀️ ", "🌇"]}
tickLabelComponent={<VictoryLabel dy={-5} />}
style={{
axis: chartTheme.axis,
Expand Down

0 comments on commit d0e0a8a

Please sign in to comment.