70 lines
2.4 KiB
TypeScript
70 lines
2.4 KiB
TypeScript
import { BarGraphHorizontal, BarGraphVertical } from "components/BarGraph";
|
|
import { mockCategoricalData, moreMockCategoricalData } from "data/mocks";
|
|
import React from "react";
|
|
import useWindowDimensions from "utils/getWindowDimensions";
|
|
|
|
import FullComponentWrapper from "@/components/FullComponentWrapper";
|
|
import SideComponentWrapper from "@/components/SideComponentWrapper";
|
|
|
|
import { WordCloud } from "../components/WordCloud";
|
|
|
|
import styles from "./samplePage.module.css";
|
|
|
|
export default function SamplePage() {
|
|
const { height, width } = useWindowDimensions();
|
|
|
|
return (
|
|
<div className={styles.page}>
|
|
<SideComponentWrapper
|
|
heading="What program are you in?"
|
|
body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics."
|
|
>
|
|
<BarGraphVertical
|
|
data={mockCategoricalData}
|
|
width={700}
|
|
height={500}
|
|
margin={{
|
|
top: 20,
|
|
bottom: 80,
|
|
left: 60,
|
|
right: 20,
|
|
}}
|
|
/>
|
|
</SideComponentWrapper>
|
|
|
|
<FullComponentWrapper
|
|
heading="What program are you in?"
|
|
body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics."
|
|
>
|
|
<WordCloud
|
|
data={moreMockCategoricalData.map((word) => ({
|
|
text: word.key,
|
|
value: word.value,
|
|
}))}
|
|
width={1000}
|
|
height={500}
|
|
/>
|
|
</FullComponentWrapper>
|
|
|
|
<SideComponentWrapper
|
|
heading="What program are you in?"
|
|
body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics."
|
|
rightAligned
|
|
>
|
|
<BarGraphHorizontal
|
|
className={styles.barGraphDemo}
|
|
data={mockCategoricalData}
|
|
width={width / 2}
|
|
height={500}
|
|
margin={{
|
|
top: 20,
|
|
bottom: 40,
|
|
left: 150,
|
|
right: 20,
|
|
}}
|
|
/>
|
|
</SideComponentWrapper>
|
|
</div>
|
|
);
|
|
}
|