-
-
- greenline
-
+
+
-
-
-
-
-
-
-
- Glossary
-
-
-
-
-
-
- Link
-
-
-
-
- Resources
-
-
-
-
-
-
- Link
-
-
+
+
+
+
+
+ Glossary
+
+
+
+ Link
+
+
+
+
+ Resources
+
+
+
+ Link
+
+
+
+
+
+
-
-
-
+ {/* Chart Container */}
+
+
+
);
}
From 38e4cc5213e0c9bf800ca58a432f953d421af89d Mon Sep 17 00:00:00 2001
From: Loso <160607645+cronc002@users.noreply.github.com>
Date: Tue, 8 Oct 2024 21:18:14 -0400
Subject: [PATCH 5/6] Add files via upload
---
client/src/components/StockChart.tsx | 66 ++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 client/src/components/StockChart.tsx
diff --git a/client/src/components/StockChart.tsx b/client/src/components/StockChart.tsx
new file mode 100644
index 0000000..5818314
--- /dev/null
+++ b/client/src/components/StockChart.tsx
@@ -0,0 +1,66 @@
+"use client"; // Add this line
+
+import React, { useRef } from 'react';
+import { Line } from 'react-chartjs-2';
+import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Filler } from 'chart.js';
+
+ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler);
+
+const StockChart: React.FC = () => {
+ const chartRef = useRef(null); // Example usage of useRef
+
+ const data = {
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
+ datasets: [
+ {
+ label: 'Stock Price',
+ data: [65, 59, 80, 81, 56, 55, 40],
+ fill: false, // CHANGE TO TRUE FOR HIGHLIGHT UNDER LINE
+ backgroundColor: 'rgba(75, 192, 192, 0.2)',
+ borderColor: '#22c55e', // Set line color to green
+ borderWidth: 1,
+ },
+ ],
+ };
+
+ const options = {
+ responsive: true,
+ plugins: {
+ legend: {
+ position: 'top' as const,
+ labels: {
+ color: 'white', // Set legend text color to white
+ },
+ },
+ title: {
+ display: true,
+ text: 'Stock Prices Over Time',
+ color: 'white', // Set title color to white
+ },
+ },
+ scales: {
+ x: {
+ ticks: {
+ color: 'white', // Set x-axis tick color to white
+ },
+ },
+ y: {
+ ticks: {
+ color: 'white', // Set y-axis tick color to white
+ },
+ },
+ },
+ };
+
+ return (
+
+
+
+ );
+};
+
+export default StockChart;
From 98add589e6be89e29a13bad41dbbd60b047aa9df Mon Sep 17 00:00:00 2001
From: Loso <160607645+cronc002@users.noreply.github.com>
Date: Tue, 8 Oct 2024 21:38:58 -0400
Subject: [PATCH 6/6] Add files via upload
---
client/src/components/Navbar/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/Navbar/index.tsx b/client/src/components/Navbar/index.tsx
index 4474099..a89ace3 100644
--- a/client/src/components/Navbar/index.tsx
+++ b/client/src/components/Navbar/index.tsx
@@ -7,7 +7,7 @@ import {
NavigationMenuList,
NavigationMenuTrigger,
} from "@radix-ui/react-navigation-menu";
-import StockChart from '/home/zev/Desktop/greenline-Branch1-AestheticChanges/client/src/components/StockChart'; // Adjust the path if necessary
+import StockChart from '../StockChart'; // Adjust the path if necessary
export default function Home() {
return (