Skip to content

Commit

Permalink
Add noon marker
Browse files Browse the repository at this point in the history
  • Loading branch information
n-hebert committed Apr 27, 2024
1 parent cb733b4 commit e0e65d0
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 @@ -82,6 +82,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 @@ -165,14 +167,14 @@ 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}
>
<VictoryAxis
tickValues={[sunrise, sunset]}
tickFormat={["πŸŒ…", "πŸŒ‡"]}
tickValues={[sunrise, noon, sunset]}
tickFormat={["πŸŒ…", "β˜€οΈ ", "πŸŒ‡"]}
tickLabelComponent={<VictoryLabel dy={-5} />}
style={{
axis: chartTheme.axis,
Expand Down

0 comments on commit e0e65d0

Please sign in to comment.