[Card] Research/test graph card #111
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please document all findings for future discussion
Parent Issues: #106 #23
One solution is:
To show a Graph/Chart of the temperature, the simplest solution is to use Recharts with React.
1- install recharts / npm install recharts
2- create a file called Graph.js in components in frontend
3- populate that file with the necessary libraries :
import React from "react";
import Card from "./Card"; // Needed since the graph will probably be inside the card?
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip } from "recharts";
4- Create a line chart. Line charts are best for showing the temperature over time. X = time, Y = temperature.
code example:
export default function GraphCard() {
return (
);
}
5- Finally, display the graph in the TemperatureView.js file