Skip to content

Commit c2785e1

Browse files
authored
Merge pull request #3 from oslabs-beta/louis/new-feature
Updated BarGraph and ComponentMap
2 parents 5404d5b + 945b778 commit c2785e1

File tree

6 files changed

+5
-591
lines changed

6 files changed

+5
-591
lines changed

src/app/components/BarGraph.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import { onHover, onHoverExit, save } from '../actions/actions';
1313
import { useStoreContext } from '../store';
1414

1515
/* TYPESCRIPT */
16-
interface data {
17-
snapshotId?: string;
18-
}
1916

2017
interface margin {
2118
top: number;

src/app/components/BarGraphComparison.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
131131
return currentMax;
132132
};
133133

134-
// the domain array on rendering scale will set the coordinates for Y-aix points.
134+
// the domain array on rendering scale will set the coordinates for Y-axis points.
135135
const renderingScale = scaleLinear<number>({
136136
domain: [0, Math.max(calculateMaxTotalRender(series), data.maxTotalRender)],
137137
nice: true,

src/app/components/BarGraphComparisonActions.tsx

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ import { deleteSeries, setCurrentTabInApp } from '../actions/actions';
1717
import { useStoreContext } from '../store';
1818

1919
/* TYPESCRIPT */
20-
interface data {
21-
snapshotId?: string;
22-
}
23-
interface series {
24-
seriesId?: any;
25-
}
2620

2721
interface margin {
2822
top: number;
@@ -94,7 +88,7 @@ const BarGraphComparisonActions = props => {
9488
// data accessor (used to generate scales) and formatter (add units for on hover box)
9589
const getSeriesName = action => action.seriesName;
9690

97-
// create visualization SCALES with cleaned data
91+
// create visualization SCALES with cleaned data.
9892
// the domain array/xAxisPoints elements will place the bars along the x-axis
9993
const seriesNameScale = scaleBand<string>({
10094
domain: data.map(getSeriesName),
@@ -157,38 +151,16 @@ const BarGraphComparisonActions = props => {
157151
if (!event) return;
158152
setSeries(event.target.value);
159153
setAction(false);
160-
// setXpoints();
161-
};
162-
163-
const handleClose = () => {
164-
setOpen(false);
165-
// setXpoints();
166-
};
167-
168-
const handleOpen = () => {
169-
setOpen(true);
170-
// setXpoints();
171154
};
172155

173156
const handleActionChange = event => {
174157
if (!event) return;
175158
setAction(event.target.value);
176159
setSeries(false);
177-
// setXpoints();
178-
};
179-
180-
const picHandleClose = () => {
181-
setPicOpen(false);
182-
// setXpoints();
183-
};
184-
185-
const picHandleOpen = () => {
186-
setPicOpen(true);
187-
// setXpoints();
188160
};
189161

190162
const animateButton = function (e) {
191-
e.preventDefault;
163+
e.preventDefault();
192164
e.target.classList.add('animate');
193165
e.target.innerHTML = 'Deleted!';
194166
setTimeout(() => {
@@ -230,9 +202,6 @@ const BarGraphComparisonActions = props => {
230202
labelId="simple-select-outlined-label"
231203
id="simple-select-outlined"
232204
className={classes.select}
233-
// open={open}
234-
// onClose={handleClose}
235-
// onOpen={handleOpen}
236205
value={series}
237206
onChange={handleSeriesChange}
238207
>
@@ -248,9 +217,6 @@ const BarGraphComparisonActions = props => {
248217
labelId="snapshot-select"
249218
id="snapshot-select"
250219
className={classes.select}
251-
// open={picOpen}
252-
// onClose={picHandleClose}
253-
// onOpen={picHandleOpen}
254220
value={action} // snapshots
255221
onChange={handleActionChange}
256222
>

0 commit comments

Comments
 (0)