2022-07-27 19:46:08 -04:00
|
|
|
import { BarGraphHorizontal, BarGraphVertical } from "components/BarGraph";
|
2022-09-03 11:13:58 -04:00
|
|
|
import { BoxPlot } from "components/Boxplot";
|
2022-09-02 21:53:05 -04:00
|
|
|
import {
|
|
|
|
mockCategoricalData,
|
|
|
|
moreMockCategoricalData,
|
2022-09-03 11:13:58 -04:00
|
|
|
mockBoxPlotData,
|
2022-09-02 21:53:05 -04:00
|
|
|
mockQuoteData,
|
|
|
|
mockQuoteDataLong,
|
|
|
|
} from "data/mocks";
|
2022-09-01 02:09:19 -04:00
|
|
|
import { sectionsData } from "data/routes";
|
2022-06-03 01:31:07 -04:00
|
|
|
import React from "react";
|
|
|
|
|
2022-09-02 21:53:05 -04:00
|
|
|
import { QuotationCarousel } from "@/components/QuotationCarousel";
|
2022-09-07 22:59:41 -04:00
|
|
|
import { Sections } from "@/components/Sections";
|
2022-09-01 02:09:19 -04:00
|
|
|
|
2022-07-01 14:30:57 -04:00
|
|
|
import { ColorPalette } from "../components/ColorPalette";
|
2022-08-04 02:17:19 -04:00
|
|
|
import { WordCloud } from "../components/WordCloud";
|
2022-07-01 14:30:57 -04:00
|
|
|
|
2022-07-27 19:46:08 -04:00
|
|
|
import styles from "./playground.module.css";
|
|
|
|
|
2022-06-03 01:31:07 -04:00
|
|
|
export default function Home() {
|
|
|
|
return (
|
2022-07-27 19:46:08 -04:00
|
|
|
<div className={styles.page}>
|
2022-06-03 01:31:07 -04:00
|
|
|
<h1>Playground</h1>
|
|
|
|
<p>Show off your components here!</p>
|
2022-07-01 14:30:57 -04:00
|
|
|
<ColorPalette />
|
2022-07-27 19:46:08 -04:00
|
|
|
|
|
|
|
<h2>
|
|
|
|
<code>{"<BarGraphHorizontal />"}</code>
|
|
|
|
</h2>
|
|
|
|
<BarGraphHorizontal
|
|
|
|
className={styles.barGraphDemo}
|
|
|
|
data={mockCategoricalData}
|
|
|
|
width={800}
|
|
|
|
height={500}
|
|
|
|
margin={{
|
2022-09-03 11:13:58 -04:00
|
|
|
top: 25,
|
2022-07-27 19:46:08 -04:00
|
|
|
bottom: 40,
|
|
|
|
left: 150,
|
|
|
|
right: 20,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<h2>
|
|
|
|
<code>{"<BarGraphVertical />"}</code>
|
|
|
|
</h2>
|
|
|
|
<p>
|
|
|
|
<code>{"<BarGraphVertical />"}</code> takes the same props as{" "}
|
|
|
|
<code>{"<BarGraphHorizontal />"}</code>.
|
|
|
|
</p>
|
|
|
|
<BarGraphVertical
|
|
|
|
className={styles.barGraphDemo}
|
|
|
|
data={mockCategoricalData}
|
|
|
|
width={800}
|
|
|
|
height={500}
|
|
|
|
margin={{
|
|
|
|
top: 20,
|
|
|
|
bottom: 80,
|
|
|
|
left: 60,
|
|
|
|
right: 20,
|
|
|
|
}}
|
|
|
|
/>
|
2022-08-04 02:17:19 -04:00
|
|
|
|
|
|
|
<h2>
|
|
|
|
<code>{"<WordCloud />"}</code>
|
|
|
|
</h2>
|
|
|
|
<WordCloud
|
|
|
|
data={moreMockCategoricalData.map((word) => ({
|
|
|
|
text: word.key,
|
|
|
|
value: word.value,
|
|
|
|
}))}
|
|
|
|
/>
|
2022-09-01 02:09:19 -04:00
|
|
|
|
|
|
|
<h2>
|
|
|
|
<code>{"<Sections />"}</code>
|
|
|
|
</h2>
|
2022-09-07 22:59:41 -04:00
|
|
|
<Sections data={sectionsData} />
|
2022-09-07 23:01:47 -04:00
|
|
|
|
|
|
|
<h2>
|
2022-09-03 11:13:58 -04:00
|
|
|
<code>{"<BoxPlot />"}</code>
|
|
|
|
</h2>
|
|
|
|
<BoxPlot
|
|
|
|
width={600}
|
|
|
|
height={400}
|
|
|
|
data={mockBoxPlotData}
|
|
|
|
margin={{
|
|
|
|
top: 20,
|
|
|
|
left: 20,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
2022-09-02 21:53:05 -04:00
|
|
|
<h2>
|
|
|
|
<code>{"<QuotationCarousel />"}</code>
|
|
|
|
</h2>
|
|
|
|
<div className={styles.quotationCarouselDemo}>
|
|
|
|
<QuotationCarousel data={mockQuoteData} circleDiameter={0} />
|
|
|
|
<QuotationCarousel
|
|
|
|
data={mockQuoteDataLong}
|
|
|
|
width={800}
|
|
|
|
height={160}
|
|
|
|
circleDiameter={180}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-07-27 19:46:08 -04:00
|
|
|
</div>
|
2022-06-03 01:31:07 -04:00
|
|
|
);
|
|
|
|
}
|