2022-06-17 22:37:05 -04:00
|
|
|
import { mockPieData } from "data/mocks";
|
2022-07-27 19:46:08 -04:00
|
|
|
import { BarGraphHorizontal, BarGraphVertical } from "components/BarGraph";
|
|
|
|
import { mockCategoricalData } from "data/mocks";
|
2022-06-03 01:31:07 -04:00
|
|
|
import React from "react";
|
|
|
|
|
2022-06-17 22:37:05 -04:00
|
|
|
import { PieChart } from "@/components/PieChart";
|
|
|
|
|
2022-07-01 14:30:57 -04:00
|
|
|
import { ColorPalette } from "../components/ColorPalette";
|
|
|
|
|
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-06-18 22:35:39 -04:00
|
|
|
<div style={{ padding: "30px" }}>
|
2022-07-13 20:07:14 -04:00
|
|
|
<PieChart data={mockPieData} width={800} labelWidth={215} />
|
2022-06-18 22:35:39 -04:00
|
|
|
</div>
|
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={{
|
|
|
|
top: 20,
|
|
|
|
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,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-06-03 01:31:07 -04:00
|
|
|
);
|
|
|
|
}
|