Skip to content

Commit

Permalink
Merge pull request #3 from oslabs-beta/louis/new-feature
Browse files Browse the repository at this point in the history
Updated BarGraph and ComponentMap
  • Loading branch information
SamuelTr13 authored Oct 12, 2022
2 parents 5404d5b + 945b778 commit c2785e1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 591 deletions.
3 changes: 0 additions & 3 deletions src/app/components/BarGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import { onHover, onHoverExit, save } from '../actions/actions';
import { useStoreContext } from '../store';

/* TYPESCRIPT */
interface data {
snapshotId?: string;
}

interface margin {
top: number;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/BarGraphComparison.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): unknown => {
return currentMax;
};

// the domain array on rendering scale will set the coordinates for Y-aix points.
// the domain array on rendering scale will set the coordinates for Y-axis points.
const renderingScale = scaleLinear<number>({
domain: [0, Math.max(calculateMaxTotalRender(series), data.maxTotalRender)],
nice: true,
Expand Down
38 changes: 2 additions & 36 deletions src/app/components/BarGraphComparisonActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ import { deleteSeries, setCurrentTabInApp } from '../actions/actions';
import { useStoreContext } from '../store';

/* TYPESCRIPT */
interface data {
snapshotId?: string;
}
interface series {
seriesId?: any;
}

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

// create visualization SCALES with cleaned data
// create visualization SCALES with cleaned data.
// the domain array/xAxisPoints elements will place the bars along the x-axis
const seriesNameScale = scaleBand<string>({
domain: data.map(getSeriesName),
Expand Down Expand Up @@ -157,38 +151,16 @@ const BarGraphComparisonActions = props => {
if (!event) return;
setSeries(event.target.value);
setAction(false);
// setXpoints();
};

const handleClose = () => {
setOpen(false);
// setXpoints();
};

const handleOpen = () => {
setOpen(true);
// setXpoints();
};

const handleActionChange = event => {
if (!event) return;
setAction(event.target.value);
setSeries(false);
// setXpoints();
};

const picHandleClose = () => {
setPicOpen(false);
// setXpoints();
};

const picHandleOpen = () => {
setPicOpen(true);
// setXpoints();
};

const animateButton = function (e) {
e.preventDefault;
e.preventDefault();
e.target.classList.add('animate');
e.target.innerHTML = 'Deleted!';
setTimeout(() => {
Expand Down Expand Up @@ -230,9 +202,6 @@ const BarGraphComparisonActions = props => {
labelId="simple-select-outlined-label"
id="simple-select-outlined"
className={classes.select}
// open={open}
// onClose={handleClose}
// onOpen={handleOpen}
value={series}
onChange={handleSeriesChange}
>
Expand All @@ -248,9 +217,6 @@ const BarGraphComparisonActions = props => {
labelId="snapshot-select"
id="snapshot-select"
className={classes.select}
// open={picOpen}
// onClose={picHandleClose}
// onOpen={picHandleOpen}
value={action} // snapshots
onChange={handleActionChange}
>
Expand Down
Loading

0 comments on commit c2785e1

Please sign in to comment.