mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
customizable charts
This commit is contained in:
@@ -2,19 +2,34 @@ import {
|
||||
heatmapData,
|
||||
newsData,
|
||||
portfolioData,
|
||||
indexData,
|
||||
winnerMovers,
|
||||
loserMovers,
|
||||
} from "@/app/MockData/MockData";
|
||||
import HomepageModule from "./HomepageModuleCard";
|
||||
import PortfolioChart from "../charts/Chart";
|
||||
import PortfolioChart, {
|
||||
LineSeriesPartialOptionsWithData,
|
||||
} from "../charts/Chart";
|
||||
import MarketHeatmap from "../charts/MarketHeatmap";
|
||||
import { Button } from "../ui/button";
|
||||
import { ArrowRight, Divide } from "lucide-react";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { NewsTable } from "../charts/news/NewsTable";
|
||||
import { newsColumns } from "../charts/news/newsColumns";
|
||||
import Chart from "../charts/Chart";
|
||||
|
||||
export const PortfolioModule = () => {
|
||||
const portfolioLine: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: portfolioData,
|
||||
color: "white",
|
||||
};
|
||||
|
||||
const indexLine: LineSeriesPartialOptionsWithData = {
|
||||
type: "line",
|
||||
data: indexData,
|
||||
color: "yellow",
|
||||
};
|
||||
|
||||
return (
|
||||
<HomepageModule title="Portfolio">
|
||||
<div className="flex justify-between px-4">
|
||||
@@ -23,7 +38,13 @@ export const PortfolioModule = () => {
|
||||
<div className="text-green-500">^10.0% $3,412.09</div>
|
||||
</div>
|
||||
<div className="h-3/4">
|
||||
<Chart data={portfolioData} />
|
||||
<Chart
|
||||
series={[portfolioLine, indexLine]}
|
||||
colors={{
|
||||
backgroundColor: "transparent",
|
||||
textColor: "white",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<Button className="text-white" variant="link">
|
||||
@@ -99,12 +120,28 @@ export const MoversModule = () => {
|
||||
};
|
||||
|
||||
export const MarketsModule = () => {
|
||||
// const chartSeries: chartSeries[] = [
|
||||
// {
|
||||
// options: {color: "yellow"},
|
||||
// type: "line",
|
||||
// data: portfolioData,
|
||||
// },
|
||||
// {
|
||||
// type: "line",
|
||||
// data:
|
||||
// }
|
||||
// ];
|
||||
|
||||
return (
|
||||
<HomepageModule title="Markets">
|
||||
<div className="w-full">
|
||||
<div className="w-full h-full">
|
||||
<div className="w-1/2"></div>
|
||||
<div className="w-1/2 border-blue-200 border">
|
||||
<Chart />
|
||||
{/* <Chart
|
||||
series={chartSeries}
|
||||
backgroundColor={"transparent"}
|
||||
textColor={"white"}
|
||||
/> */}
|
||||
</div>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
|
||||
Reference in New Issue
Block a user