Skip to content

Commit f4064ba

Browse files
(removed) all console.logs and legend visx component
1 parent b9aee99 commit f4064ba

File tree

1 file changed

+3
-35
lines changed

1 file changed

+3
-35
lines changed

src/app/components/PerformanceVisx.tsx

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const tooltipStyles = {
5454
color: "white"
5555
};
5656

57-
/* DATA HANDLING FUNCTIONS */
57+
/* DATA HANDLING HELPER FUNCTIONS */
5858
const getPerfMetrics = (snapshots, snapshotsIds) => {
5959
return snapshots.reduce((perfSnapshots, curSnapshot, idx)=> {
6060
return perfSnapshots.concat(traverse(curSnapshot, {snapshotId:snapshotsIds[idx]}))
@@ -120,11 +120,6 @@ const data = getPerfMetrics(snapshots, getSnapshotIds(hierarchy))
120120
const keys = Object.keys(data[0]).filter((d) => d !== "snapshotId") as CityName[];
121121
const allComponentStates = traverse(snapshots[0])
122122

123-
console.log(keys)
124-
console.log('data', data)
125-
console.log('snapshots', snapshots)
126-
console.log(allComponentStates)
127-
128123
// create array of total render times for each snapshot
129124
const totalRenderArr = data.reduce((totalRender, curSnapshot) => {
130125
const curRenderTotal = keys.reduce((acc, cur) => {
@@ -165,12 +160,6 @@ const yMax = height - margin.top - 150;
165160
snapshotIdScale.rangeRound([0, xMax]);
166161
renderingScale.range([yMax, 0]);
167162

168-
// console.log('totalRenderArr', totalRenderArr)
169-
// console.log('renderingScale domain', renderingScale.domain)
170-
// console.log('renderingscale range', renderingScale)
171-
console.log('height', height)
172-
// console.log(yMax)
173-
174163
return width < 10 ? null : (
175164
// relative position is needed for correct tooltip positioning
176165

@@ -263,31 +252,10 @@ console.log('height', height)
263252
textAnchor: 'middle',
264253
})}
265254
/>
266-
<Text x={-xMax / 2} y="15" transform="rotate(-90)" fontSize={10} fill="#FFFFFF">
267-
Rendering Time (ms)
268-
</Text>
269-
<Text x={xMax / 2} y={yMax + 100} fontSize={10} fill="#FFFFFF">
270-
Snapshot Id
271-
</Text>
272-
255+
<Text x={-xMax / 2} y="15" transform="rotate(-90)" fontSize={10} fill="#FFFFFF"> Rendering Time (ms) </Text>
256+
<Text x={xMax / 2} y={yMax + 100} fontSize={10} fill="#FFFFFF"> Snapshot Id </Text>
273257
</svg>
274258

275-
{/* <div
276-
style={{
277-
position: "absolute",
278-
top: margin.top / 2 - 10,
279-
width: "100%",
280-
display: "flex",
281-
justifyContent: "center",
282-
fontSize: "14px"
283-
}}
284-
>
285-
<LegendOrdinal
286-
scale={colorScale}
287-
direction="row"
288-
labelMargin="0 15px 0 0"
289-
/>
290-
</div> */}
291259

292260
{/* FOR HOVER OVER DISPLAY */}
293261
{tooltipOpen && tooltipData && (

0 commit comments

Comments
 (0)