component page graphs now render
This commit is contained in:
parent
e5bc90e00e
commit
c62bfbf916
10 changed files with 908 additions and 38 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { Box, Button, useTheme } from "@material-ui/core";
|
||||
import { Box, Button, useTheme } from "@mui/material";
|
||||
import MaterialChartTooltip from "charts/MaterialChartTooltip";
|
||||
import moment from "moment";
|
||||
import { MeasurementDescriber } from "pbHelpers/MeasurementDescriber";
|
||||
import { useGlobalState } from "providers";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
Legend,
|
||||
Line,
|
||||
|
|
@ -67,7 +66,6 @@ export default function MultiLineGraph(props: Props) {
|
|||
const [refLeft, setRefLeft] = useState<number | undefined>();
|
||||
const [refRight, setRefRight] = useState<number | undefined>();
|
||||
const [xDomain, setXDomain] = useState<string[] | number[]>(["dataMin", "dataMax"]);
|
||||
const [{ newStructure }] = useGlobalState();
|
||||
|
||||
useEffect(() => {
|
||||
if (newXDomain) {
|
||||
|
|
@ -210,8 +208,7 @@ export default function MultiLineGraph(props: Props) {
|
|||
{...props}
|
||||
valueFormatter={value => {
|
||||
return describer.convertWithUnits(
|
||||
roundTo(parseFloat(String(value)), 2),
|
||||
newStructure
|
||||
roundTo(parseFloat(String(value)), 2)
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue