Skip to content

Commit 541474c

Browse files
(added) y axis for rendering time
1 parent b1c2a60 commit 541474c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/app/components/PerformanceVisx.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import { BarStack } from "@visx/shape";
33
import { SeriesPoint } from "@visx/shape/lib/types";
44
import { Group } from "@visx/group";
55
import { Grid } from "@visx/grid";
6-
import { AxisBottom } from "@visx/axis";
6+
import { AxisBottom, AxisLeft } from "@visx/axis";
77
import { scaleBand, scaleLinear, scaleOrdinal } from "@visx/scale";
88
import { useTooltip, useTooltipInPortal, defaultStyles } from "@visx/tooltip";
99
// import { LegendOrdinal } from "@visx/legend";
10+
import { Text } from '@visx/text';
1011
import { schemeSet1,schemeSet3 } from "d3-scale-chromatic";
1112
// import snapshots from "./snapshots";
1213
import useForceUpdate from './useForceUpdate';
@@ -207,19 +208,35 @@ renderingScale.range([yMax, 0]);
207208
}
208209
</BarStack>
209210
</Group>
211+
<AxisLeft
212+
top={margin.top}
213+
left={margin.left}
214+
scale={renderingScale}
215+
stroke={axisColor}
216+
tickStroke={axisColor}
217+
strokeWidth={2}
218+
tickLabelProps={() => ({
219+
fill: axisColor,
220+
fontSize: 11,
221+
verticalAnchor: 'start',
222+
})}
223+
/>
210224
<AxisBottom
211225
top={yMax + margin.top}
212226
left={margin.left}
213227
scale={snapshotIdScale}
214228
stroke={axisColor}
215229
tickStroke={axisColor}
230+
strokeWidth={2}
216231
tickLabelProps={() => ({
217232
fill: axisColor,
218233
fontSize: 11,
219234
textAnchor: 'middle',
220235
})}
221236
/>
237+
222238
</svg>
239+
223240

224241
// OPTIONAL legend
225242
{/* <div

0 commit comments

Comments
 (0)