Skip to content

Commit 21e1a61

Browse files
authored
Merge pull request #7 from oslabs-beta/feature
Fixed issue with bars hanging off the graph
2 parents b6b25b6 + 2efc0fe commit 21e1a61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/components/BarGraph.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const BarGraph = props => {
105105
min={'outer min'}
106106
max={'first if'}
107107
// x={100}
108-
x={xMax / (Object.keys(data.barStack[0]).length - 2)}
108+
x={xMax / (Object.keys(data.barStack[0]).length) - 2}
109109
y={yMax - value}
110110
height={value}
111111
key={key}
@@ -139,7 +139,7 @@ const BarGraph = props => {
139139
BarArray.push(<Bar
140140
min={'outer min'}
141141
max={'else here'}
142-
x={(xMax / (Object.keys(data.barStack[0]).length - 2)) * (i + 1)}
142+
x={(xMax / (Object.keys(data.barStack[0]).length)) * (i + 1)}
143143
// x={(xMax / (Object.keys(data.barStack[0]).length - 2)) + barWidth * i}
144144
y={yMax - value * 20}
145145
height={value * 20}
@@ -385,7 +385,7 @@ const BarGraph = props => {
385385
)
386386
: (
387387
<>
388-
{snapshotIdScale.rangeRound([0, xMax + 200])}
388+
{snapshotIdScale.rangeRound([0, xMax])}
389389
<Grid
390390
top={margin.top}
391391
left={margin.left}

0 commit comments

Comments
 (0)