Fix StackedBar Graph nitpicks (Closes #51) (#133)
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Decided not to fix NITPICK #1 because aligning the line with the edge of the graph can make the grid column gap seem bigger than intended. - Center align bottom axis labels in both horizontal and vertical graphs - Right align left axis labels in both horizontal and vertical graphs - Fixed Cumulative Average to CAV in Academics page. - Add line at the top of the horizontal graph Co-authored-by: e26chiu <e26chiu@csc.uwaterloo.ca> Co-authored-by: shahanneda <shahan.neda@gmail.com> Co-authored-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca> Reviewed-on: #133 Reviewed-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca>
This commit is contained in:
parent
3558fa0fb9
commit
eb74c8e4a9
|
@ -42,17 +42,9 @@ export type StackedBarProps = {
|
||||||
/** Colours for each key */
|
/** Colours for each key */
|
||||||
colorRange: string[];
|
colorRange: string[];
|
||||||
/** Distance between the edge of the graph and the area where the bars are drawn, in pixels. */
|
/** Distance between the edge of the graph and the area where the bars are drawn, in pixels. */
|
||||||
margin: { top: number; left: number };
|
margin: { top: number; left: number; right: number; bottom: number };
|
||||||
/** Number of ticks for the value axis */
|
/** Number of ticks for the value axis */
|
||||||
numTicksValueAxis?: number;
|
numTicksValueAxis?: number;
|
||||||
/** Distance between the left axis labels and the start of the lines of the graph, in px. */
|
|
||||||
axisLeftOffset?: number;
|
|
||||||
/** Distance between the bottom axis and the bottom of the container of the graph, in px. */
|
|
||||||
axisBottomOffset?: number;
|
|
||||||
/** Distance between the right side of the graph and the legend, in px. */
|
|
||||||
legendLeftOffset?: number;
|
|
||||||
/** Distance between the top of the graph and the legend, in px. */
|
|
||||||
legendTopOffset?: number;
|
|
||||||
/** Width of the lines in the graph, in px. */
|
/** Width of the lines in the graph, in px. */
|
||||||
strokeWidth?: number;
|
strokeWidth?: number;
|
||||||
/** Length of the dashes and the gaps in the graph, in px. */
|
/** Length of the dashes and the gaps in the graph, in px. */
|
||||||
|
@ -61,9 +53,6 @@ export type StackedBarProps = {
|
||||||
scalePadding?: number;
|
scalePadding?: number;
|
||||||
/** Margin for each item in the legend */
|
/** Margin for each item in the legend */
|
||||||
itemMargin?: string;
|
itemMargin?: string;
|
||||||
/** Factor multiplied with an offset to center the labels of the category-axis depending on the width/height of the graph.
|
|
||||||
* >1 for width/height <600 and <1 for width/height >600 (vertical=width/horizontal=height) */
|
|
||||||
categoryAxisLeftFactor?: number;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let tooltipTimeout: number;
|
let tooltipTimeout: number;
|
||||||
|
@ -81,14 +70,9 @@ export const StackedBarGraphVertical = withTooltip<
|
||||||
margin,
|
margin,
|
||||||
scalePadding = 0.3,
|
scalePadding = 0.3,
|
||||||
numTicksValueAxis = 6,
|
numTicksValueAxis = 6,
|
||||||
axisLeftOffset = 40,
|
|
||||||
axisBottomOffset = 40,
|
|
||||||
strokeWidth = 2.5,
|
strokeWidth = 2.5,
|
||||||
strokeDashArray = "10,4",
|
strokeDashArray = "10,4",
|
||||||
legendLeftOffset = 40,
|
|
||||||
legendTopOffset = 40,
|
|
||||||
itemMargin = "0 0 0 15px",
|
itemMargin = "0 0 0 15px",
|
||||||
categoryAxisLeftFactor = 1,
|
|
||||||
tooltipOpen,
|
tooltipOpen,
|
||||||
tooltipLeft,
|
tooltipLeft,
|
||||||
tooltipTop,
|
tooltipTop,
|
||||||
|
@ -125,18 +109,15 @@ export const StackedBarGraphVertical = withTooltip<
|
||||||
});
|
});
|
||||||
|
|
||||||
// bounds
|
// bounds
|
||||||
const xMax = width;
|
const xMax = width - margin.left - margin.right;
|
||||||
const yMax = height - margin.top - axisBottomOffset;
|
const yMax = height - margin.top - margin.bottom;
|
||||||
|
|
||||||
categoryScale.rangeRound([0, xMax - axisLeftOffset]);
|
categoryScale.rangeRound([0, xMax]);
|
||||||
valueScale.range([yMax, 0]);
|
valueScale.range([yMax, 0]);
|
||||||
|
|
||||||
return width < 10 ? null : (
|
return width < 10 ? null : (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div
|
<div className={styles.legend}>
|
||||||
className={styles.legend}
|
|
||||||
style={{ left: width + legendLeftOffset, top: legendTopOffset }}
|
|
||||||
>
|
|
||||||
<LegendOrdinal
|
<LegendOrdinal
|
||||||
scale={colorScale}
|
scale={colorScale}
|
||||||
direction="row"
|
direction="row"
|
||||||
|
@ -151,7 +132,6 @@ export const StackedBarGraphVertical = withTooltip<
|
||||||
scale={valueScale}
|
scale={valueScale}
|
||||||
width={xMax}
|
width={xMax}
|
||||||
height={yMax}
|
height={yMax}
|
||||||
left={axisLeftOffset}
|
|
||||||
numTicks={numTicksValueAxis}
|
numTicks={numTicksValueAxis}
|
||||||
stroke={Color.tertiaryBackground}
|
stroke={Color.tertiaryBackground}
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
|
@ -160,93 +140,88 @@ export const StackedBarGraphVertical = withTooltip<
|
||||||
<GridColumns
|
<GridColumns
|
||||||
scale={categoryScale}
|
scale={categoryScale}
|
||||||
height={yMax}
|
height={yMax}
|
||||||
left={axisLeftOffset}
|
|
||||||
offset={categoryScale.bandwidth() / 2}
|
offset={categoryScale.bandwidth() / 2}
|
||||||
stroke={Color.tertiaryBackground}
|
stroke={Color.tertiaryBackground}
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
strokeDasharray={strokeDashArray}
|
strokeDasharray={strokeDashArray}
|
||||||
/>
|
/>
|
||||||
<Group left={axisLeftOffset}>
|
<BarStack<StackedBarData, string>
|
||||||
<BarStack<StackedBarData, string>
|
data={data}
|
||||||
data={data}
|
keys={keys}
|
||||||
keys={keys}
|
x={getCategory}
|
||||||
x={getCategory}
|
xScale={categoryScale}
|
||||||
xScale={categoryScale}
|
yScale={valueScale}
|
||||||
yScale={valueScale}
|
color={colorScale}
|
||||||
color={colorScale}
|
>
|
||||||
>
|
{(barStacks) =>
|
||||||
{(barStacks) =>
|
barStacks.map((barStack) =>
|
||||||
barStacks.map((barStack) =>
|
barStack.bars.map((bar) => (
|
||||||
barStack.bars.map((bar) => (
|
<rect
|
||||||
<rect
|
className={styles.barStack}
|
||||||
className={styles.barStack}
|
key={`bar-stack-${barStack.index}-${bar.index}`}
|
||||||
key={`bar-stack-${barStack.index}-${bar.index}`}
|
x={bar.x}
|
||||||
x={bar.x}
|
y={bar.y}
|
||||||
y={bar.y}
|
height={bar.height}
|
||||||
height={bar.height}
|
width={bar.width / 2}
|
||||||
width={bar.width / 2}
|
fill={bar.color}
|
||||||
fill={bar.color}
|
onMouseLeave={() => {
|
||||||
onMouseLeave={() => {
|
tooltipTimeout = window.setTimeout(() => {
|
||||||
tooltipTimeout = window.setTimeout(() => {
|
hideTooltip();
|
||||||
hideTooltip();
|
}, 300);
|
||||||
}, 300);
|
}}
|
||||||
}}
|
onMouseMove={(event) => {
|
||||||
onMouseMove={(event) => {
|
if (tooltipTimeout) clearTimeout(tooltipTimeout);
|
||||||
if (tooltipTimeout) clearTimeout(tooltipTimeout);
|
const tooltipPos = getTooltipPosition(event);
|
||||||
const tooltipPos = getTooltipPosition(event);
|
showTooltip({
|
||||||
showTooltip({
|
tooltipData: bar,
|
||||||
tooltipData: bar,
|
tooltipLeft: tooltipPos.x,
|
||||||
tooltipLeft: tooltipPos.x,
|
tooltipTop: tooltipPos.y,
|
||||||
tooltipTop: tooltipPos.y,
|
});
|
||||||
});
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
))
|
||||||
))
|
)
|
||||||
)
|
}
|
||||||
}
|
</BarStack>
|
||||||
</BarStack>
|
|
||||||
</Group>
|
|
||||||
<Line
|
<Line
|
||||||
fill={Color.tertiaryBackground}
|
fill={Color.tertiaryBackground}
|
||||||
to={new Point({ x: axisLeftOffset, y: 0 })}
|
to={new Point({ x: 0, y: 0 })}
|
||||||
from={new Point({ x: axisLeftOffset, y: yMax })}
|
from={new Point({ x: 0, y: yMax })}
|
||||||
stroke={Color.tertiaryBackground}
|
stroke={Color.tertiaryBackground}
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
strokeDasharray={strokeDashArray}
|
strokeDasharray={strokeDashArray}
|
||||||
/>
|
/>
|
||||||
<AxisBottom
|
|
||||||
top={yMax}
|
|
||||||
scale={categoryScale}
|
|
||||||
left={
|
|
||||||
((categoryScale.bandwidth() * 100) / width) *
|
|
||||||
categoryAxisLeftFactor
|
|
||||||
}
|
|
||||||
hideTicks
|
|
||||||
hideAxisLine
|
|
||||||
labelProps={{
|
|
||||||
fontSize: `${10 / 16}rem`,
|
|
||||||
}}
|
|
||||||
tickLabelProps={() => ({
|
|
||||||
fill: Color.label,
|
|
||||||
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<AxisLeft
|
<AxisLeft
|
||||||
scale={valueScale}
|
scale={valueScale}
|
||||||
top={5}
|
top={5}
|
||||||
numTicks={numTicksValueAxis}
|
numTicks={numTicksValueAxis}
|
||||||
hideAxisLine
|
hideAxisLine
|
||||||
|
hideTicks
|
||||||
labelProps={{
|
labelProps={{
|
||||||
fontSize: `${10 / 16}rem`,
|
fontSize: `${10 / 16}rem`,
|
||||||
}}
|
}}
|
||||||
tickLabelProps={() => {
|
tickLabelProps={() => ({
|
||||||
return {
|
fill: Color.label,
|
||||||
fill: Color.label,
|
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
||||||
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
textAnchor: "end",
|
||||||
};
|
})}
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<AxisBottom
|
||||||
|
top={yMax + margin.top}
|
||||||
|
scale={categoryScale}
|
||||||
|
left={margin.left - categoryScale.bandwidth() / 4}
|
||||||
|
hideTicks
|
||||||
|
hideAxisLine
|
||||||
|
labelProps={{
|
||||||
|
fontSize: `${10 / 16}rem`,
|
||||||
|
}}
|
||||||
|
tickLabelProps={() => ({
|
||||||
|
fill: Color.label,
|
||||||
|
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
||||||
|
textAnchor: "middle",
|
||||||
|
})}
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
{tooltipOpen && tooltipData ? (
|
{tooltipOpen && tooltipData ? (
|
||||||
|
@ -277,14 +252,9 @@ export const StackedBarGraphHorizontal = withTooltip<
|
||||||
margin,
|
margin,
|
||||||
scalePadding = 0.3,
|
scalePadding = 0.3,
|
||||||
numTicksValueAxis = 6,
|
numTicksValueAxis = 6,
|
||||||
axisLeftOffset = 40,
|
|
||||||
axisBottomOffset = 40,
|
|
||||||
strokeWidth = 2.5,
|
strokeWidth = 2.5,
|
||||||
strokeDashArray = "10,4",
|
strokeDashArray = "10,4",
|
||||||
legendLeftOffset = 40,
|
|
||||||
legendTopOffset = 40,
|
|
||||||
itemMargin = "0 0 0 15px",
|
itemMargin = "0 0 0 15px",
|
||||||
categoryAxisLeftFactor = 1,
|
|
||||||
tooltipOpen,
|
tooltipOpen,
|
||||||
tooltipLeft,
|
tooltipLeft,
|
||||||
tooltipTop,
|
tooltipTop,
|
||||||
|
@ -321,18 +291,15 @@ export const StackedBarGraphHorizontal = withTooltip<
|
||||||
});
|
});
|
||||||
|
|
||||||
// bounds
|
// bounds
|
||||||
const xMax = width;
|
const xMax = width - margin.left - margin.right;
|
||||||
const yMax = height - margin.top - axisBottomOffset;
|
const yMax = height - margin.top - margin.bottom;
|
||||||
|
|
||||||
categoryScale.rangeRound([yMax, 0]);
|
categoryScale.rangeRound([yMax, 0]);
|
||||||
valueScale.range([0, xMax - axisLeftOffset]);
|
valueScale.range([0, xMax]);
|
||||||
|
|
||||||
return width < 10 ? null : (
|
return width < 10 ? null : (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div
|
<div className={styles.legend}>
|
||||||
className={styles.legend}
|
|
||||||
style={{ left: width + legendLeftOffset, top: legendTopOffset }}
|
|
||||||
>
|
|
||||||
<LegendOrdinal
|
<LegendOrdinal
|
||||||
scale={colorScale}
|
scale={colorScale}
|
||||||
direction="row"
|
direction="row"
|
||||||
|
@ -347,7 +314,6 @@ export const StackedBarGraphHorizontal = withTooltip<
|
||||||
width={xMax}
|
width={xMax}
|
||||||
height={yMax}
|
height={yMax}
|
||||||
offset={categoryScale.bandwidth() / 2}
|
offset={categoryScale.bandwidth() / 2}
|
||||||
left={axisLeftOffset}
|
|
||||||
stroke={Color.tertiaryBackground}
|
stroke={Color.tertiaryBackground}
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
strokeDasharray={strokeDashArray}
|
strokeDasharray={strokeDashArray}
|
||||||
|
@ -356,55 +322,59 @@ export const StackedBarGraphHorizontal = withTooltip<
|
||||||
scale={valueScale}
|
scale={valueScale}
|
||||||
height={yMax}
|
height={yMax}
|
||||||
numTicks={numTicksValueAxis}
|
numTicks={numTicksValueAxis}
|
||||||
left={axisLeftOffset}
|
|
||||||
stroke={Color.tertiaryBackground}
|
stroke={Color.tertiaryBackground}
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
strokeDasharray={strokeDashArray}
|
strokeDasharray={strokeDashArray}
|
||||||
/>
|
/>
|
||||||
<Group left={axisLeftOffset}>
|
<Line
|
||||||
<BarStackHorizontal<StackedBarData, string>
|
fill={Color.tertiaryBackground}
|
||||||
data={data}
|
to={new Point({ x: 0, y: 2 })}
|
||||||
keys={keys}
|
from={new Point({ x: xMax, y: 2 })}
|
||||||
y={getCategory}
|
stroke={Color.tertiaryBackground}
|
||||||
xScale={valueScale}
|
strokeWidth={strokeWidth}
|
||||||
yScale={categoryScale}
|
strokeDasharray={strokeDashArray}
|
||||||
color={colorScale}
|
/>
|
||||||
>
|
<BarStackHorizontal<StackedBarData, string>
|
||||||
{(barStacks) =>
|
data={data}
|
||||||
barStacks.map((barStack) =>
|
keys={keys}
|
||||||
barStack.bars.map((bar) => (
|
y={getCategory}
|
||||||
<rect
|
xScale={valueScale}
|
||||||
className={styles.barStack}
|
yScale={categoryScale}
|
||||||
key={`bar-stack-${barStack.index}-${bar.index}`}
|
color={colorScale}
|
||||||
x={bar.x}
|
>
|
||||||
y={bar.y}
|
{(barStacks) =>
|
||||||
height={bar.height / 2}
|
barStacks.map((barStack) =>
|
||||||
width={bar.width}
|
barStack.bars.map((bar) => (
|
||||||
fill={bar.color}
|
<rect
|
||||||
onMouseLeave={() => {
|
className={styles.barStack}
|
||||||
tooltipTimeout = window.setTimeout(() => {
|
key={`bar-stack-${barStack.index}-${bar.index}`}
|
||||||
hideTooltip();
|
x={bar.x}
|
||||||
}, 300);
|
y={bar.y}
|
||||||
}}
|
height={bar.height / 2}
|
||||||
onMouseMove={(event) => {
|
width={bar.width}
|
||||||
if (tooltipTimeout) clearTimeout(tooltipTimeout);
|
fill={bar.color}
|
||||||
const tooltipPos = getTooltipPosition(event);
|
onMouseLeave={() => {
|
||||||
showTooltip({
|
tooltipTimeout = window.setTimeout(() => {
|
||||||
tooltipData: bar,
|
hideTooltip();
|
||||||
tooltipLeft: tooltipPos.x,
|
}, 300);
|
||||||
tooltipTop: tooltipPos.y,
|
}}
|
||||||
});
|
onMouseMove={(event) => {
|
||||||
}}
|
if (tooltipTimeout) clearTimeout(tooltipTimeout);
|
||||||
/>
|
const tooltipPos = getTooltipPosition(event);
|
||||||
))
|
showTooltip({
|
||||||
)
|
tooltipData: bar,
|
||||||
}
|
tooltipLeft: tooltipPos.x,
|
||||||
</BarStackHorizontal>
|
tooltipTop: tooltipPos.y,
|
||||||
</Group>
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</BarStackHorizontal>
|
||||||
<AxisBottom
|
<AxisBottom
|
||||||
top={yMax}
|
top={yMax}
|
||||||
scale={valueScale}
|
scale={valueScale}
|
||||||
left={axisLeftOffset}
|
|
||||||
numTicks={numTicksValueAxis}
|
numTicks={numTicksValueAxis}
|
||||||
hideAxisLine
|
hideAxisLine
|
||||||
hideTicks
|
hideTicks
|
||||||
|
@ -414,25 +384,21 @@ export const StackedBarGraphHorizontal = withTooltip<
|
||||||
tickLabelProps={() => ({
|
tickLabelProps={() => ({
|
||||||
fill: Color.label,
|
fill: Color.label,
|
||||||
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
||||||
|
textAnchor: "middle",
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<AxisLeft
|
<AxisLeft
|
||||||
top={
|
|
||||||
-((categoryScale.bandwidth() * 100) / width) *
|
|
||||||
categoryAxisLeftFactor
|
|
||||||
}
|
|
||||||
scale={categoryScale}
|
scale={categoryScale}
|
||||||
hideAxisLine
|
hideAxisLine
|
||||||
hideTicks
|
hideTicks
|
||||||
labelProps={{
|
labelProps={{
|
||||||
fontSize: `${10 / 16}rem`,
|
fontSize: `${10 / 16}rem`,
|
||||||
}}
|
}}
|
||||||
tickLabelProps={() => {
|
tickLabelProps={() => ({
|
||||||
return {
|
fill: Color.label,
|
||||||
fill: Color.label,
|
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
||||||
fontWeight: TICK_LABEL_FONT_WEIGHT,
|
textAnchor: "middle",
|
||||||
};
|
})}
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
@ -1331,7 +1331,7 @@ export const A16 = [
|
||||||
"95-100": 0.059,
|
"95-100": 0.059,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
category: "Cumulative Average",
|
category: "CAV",
|
||||||
"0-30": 0,
|
"0-30": 0,
|
||||||
"30-60": 0,
|
"30-60": 0,
|
||||||
"60-70": 0.03774,
|
"60-70": 0.03774,
|
||||||
|
|
|
@ -253,11 +253,7 @@ export default function Academics() {
|
||||||
Color.primaryAccentLighter,
|
Color.primaryAccentLighter,
|
||||||
]}
|
]}
|
||||||
data={A12i}
|
data={A12i}
|
||||||
axisLeftOffset={80}
|
margin={{ ...barGraphMargin, ...{ left: 90 } }}
|
||||||
margin={{
|
|
||||||
top: 20,
|
|
||||||
left: 20,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</ComponentWrapper>
|
</ComponentWrapper>
|
||||||
|
|
||||||
|
@ -270,7 +266,7 @@ export default function Academics() {
|
||||||
|
|
||||||
<ComponentWrapper
|
<ComponentWrapper
|
||||||
heading="What were your averages for each term? Approximately, what is your cumulative average as of right now?"
|
heading="What were your averages for each term? Approximately, what is your cumulative average as of right now?"
|
||||||
bodyText="The majority of people did their best in 1A and their worst in 1B, 2A, or 2B, likely because most of the mandatory challenging CS+MATH courses lie around that period of time. Students started having better grades in 3A, correlating with the difficulty of the courses question seen previously."
|
bodyText="The majority of people did their best in 1A and their worst in 1B, 2A, or 2B, likely because most of the mandatory challenging CS+MATH courses lie around that period of time. Students started having better grades in 3A, correlating with the difficulty of the courses question seen previously. CAV stands for Cumulative Average."
|
||||||
align="center"
|
align="center"
|
||||||
noBackground
|
noBackground
|
||||||
>
|
>
|
||||||
|
@ -284,10 +280,7 @@ export default function Academics() {
|
||||||
Color.primaryAccentLighter,
|
Color.primaryAccentLighter,
|
||||||
]}
|
]}
|
||||||
data={A16}
|
data={A16}
|
||||||
margin={{
|
margin={barGraphMargin}
|
||||||
top: 20,
|
|
||||||
left: 20,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</ComponentWrapper>
|
</ComponentWrapper>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,12 @@ import {
|
||||||
import { pageRoutes } from "data/routes";
|
import { pageRoutes } from "data/routes";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Color } from "utils/Color";
|
import { Color } from "utils/Color";
|
||||||
import { DefaultProp, pieChartProps, wordCloudWidth } from "utils/defaultProps";
|
import {
|
||||||
|
barGraphMargin,
|
||||||
|
DefaultProp,
|
||||||
|
pieChartProps,
|
||||||
|
wordCloudWidth,
|
||||||
|
} from "utils/defaultProps";
|
||||||
import { useWindowDimensions } from "utils/getWindowDimensions";
|
import { useWindowDimensions } from "utils/getWindowDimensions";
|
||||||
import { useIsMobile } from "utils/isMobile";
|
import { useIsMobile } from "utils/isMobile";
|
||||||
|
|
||||||
|
@ -225,10 +230,7 @@ export default function CoopPage() {
|
||||||
Color.secondaryAccent,
|
Color.secondaryAccent,
|
||||||
]}
|
]}
|
||||||
data={C7v}
|
data={C7v}
|
||||||
margin={{
|
margin={barGraphMargin}
|
||||||
top: 20,
|
|
||||||
left: 20,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ComponentWrapper>
|
</ComponentWrapper>
|
||||||
|
@ -253,10 +255,7 @@ export default function CoopPage() {
|
||||||
Color.primaryText,
|
Color.primaryText,
|
||||||
]}
|
]}
|
||||||
data={C7vi}
|
data={C7vi}
|
||||||
margin={{
|
margin={barGraphMargin}
|
||||||
top: 20,
|
|
||||||
left: 20,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ComponentWrapper>
|
</ComponentWrapper>
|
||||||
|
@ -296,10 +295,7 @@ export default function CoopPage() {
|
||||||
keys={C7viiiKey}
|
keys={C7viiiKey}
|
||||||
colorRange={[Color.primaryAccent, Color.secondaryAccentLight]}
|
colorRange={[Color.primaryAccent, Color.secondaryAccentLight]}
|
||||||
data={C7viii}
|
data={C7viii}
|
||||||
margin={{
|
margin={barGraphMargin}
|
||||||
top: 20,
|
|
||||||
left: 20,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ComponentWrapper>
|
</ComponentWrapper>
|
||||||
|
|
|
@ -125,7 +125,9 @@ export default function Home() {
|
||||||
data={mockStackedBarGraphData}
|
data={mockStackedBarGraphData}
|
||||||
margin={{
|
margin={{
|
||||||
top: 20,
|
top: 20,
|
||||||
left: 20,
|
left: 28,
|
||||||
|
right: 20,
|
||||||
|
bottom: 20,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -147,8 +149,10 @@ export default function Home() {
|
||||||
]}
|
]}
|
||||||
data={mockStackedBarGraphData}
|
data={mockStackedBarGraphData}
|
||||||
margin={{
|
margin={{
|
||||||
top: 20,
|
top: 60,
|
||||||
left: 20,
|
left: 20,
|
||||||
|
right: 20,
|
||||||
|
bottom: 40,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue