Skip to content

Commit e0704af

Browse files
(added) y-axis label and hidZero tick
1 parent 541474c commit e0704af

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/app/components/PerformanceVisx.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const totalRenderArr = data.reduce((totalRender, curSnapshot) => {
115115
// data accessor (used to generate scales) and formatter (add units for on hover box)
116116
const getSnapshotId = (d: snapshot) => d.snapshotId;
117117
const formatSnapshotId = id => 'Snapshot ID: ' + id;
118-
const formatRenderTime = time => time + ' ms';
118+
const formatRenderTime = time => time + ' ms ';
119119

120120
// create visualization scales with filtered data
121121
const snapshotIdScale = scaleBand<string>({
@@ -215,10 +215,13 @@ renderingScale.range([yMax, 0]);
215215
stroke={axisColor}
216216
tickStroke={axisColor}
217217
strokeWidth={2}
218+
numTicks={8}
219+
hideZero={true}
218220
tickLabelProps={() => ({
219221
fill: axisColor,
220222
fontSize: 11,
221-
verticalAnchor: 'start',
223+
verticalAnchor: 'middle',
224+
textAnchor: 'end'
222225
})}
223226
/>
224227
<AxisBottom
@@ -234,6 +237,9 @@ renderingScale.range([yMax, 0]);
234237
textAnchor: 'middle',
235238
})}
236239
/>
240+
<Text x="-100" y="15" transform="rotate(-90)" fontSize={10} fill="#00FFFF">
241+
Rendering Time
242+
</Text>
237243

238244
</svg>
239245

0 commit comments

Comments
 (0)