mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 09:17:00 +00:00
navbar, homepage init, first nivo chart
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { ResponsiveLine } from "@nivo/line";
|
||||
|
||||
function PortfolioChart({ data }: any) {
|
||||
return (
|
||||
<ResponsiveLine
|
||||
data={data}
|
||||
margin={{ top: 50, right: 110, bottom: 50, left: 60 }}
|
||||
xScale={{ type: "point" }}
|
||||
yScale={{
|
||||
type: "linear",
|
||||
min: "auto",
|
||||
max: "auto",
|
||||
stacked: true,
|
||||
reverse: false,
|
||||
}}
|
||||
yFormat=" >-.2f"
|
||||
curve="monotoneX"
|
||||
axisTop={null}
|
||||
axisRight={{
|
||||
tickSize: 5,
|
||||
tickPadding: 5,
|
||||
tickRotation: 0,
|
||||
legend: "",
|
||||
legendOffset: 0,
|
||||
truncateTickAt: 0,
|
||||
}}
|
||||
axisBottom={{
|
||||
tickSize: 0,
|
||||
tickPadding: 0,
|
||||
tickRotation: -1,
|
||||
legend: "",
|
||||
legendOffset: 36,
|
||||
legendPosition: "middle",
|
||||
truncateTickAt: 0,
|
||||
}}
|
||||
axisLeft={null}
|
||||
enableGridX={false}
|
||||
colors={{ scheme: "yellow_orange_brown" }}
|
||||
enablePoints={false}
|
||||
pointSize={10}
|
||||
pointColor={{ theme: "background" }}
|
||||
pointBorderWidth={2}
|
||||
pointBorderColor={{ from: "serieColor" }}
|
||||
pointLabelYOffset={-12}
|
||||
crosshairType="cross"
|
||||
useMesh={true}
|
||||
legends={[]}
|
||||
motionConfig={{
|
||||
mass: 1,
|
||||
tension: 250,
|
||||
friction: 1,
|
||||
clamp: true,
|
||||
precision: 0.01,
|
||||
velocity: 0,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default PortfolioChart;
|
||||
Reference in New Issue
Block a user