diff --git a/src/gate/GateDeltaTempGraph.tsx b/src/gate/GateDeltaTempGraph.tsx index fc5b253..d547b1c 100644 --- a/src/gate/GateDeltaTempGraph.tsx +++ b/src/gate/GateDeltaTempGraph.tsx @@ -104,28 +104,25 @@ export default function GateDeltaTempGraph(props: Props){ */ useEffect(()=>{ //get the measurements for the temp component - componentAPI.listUnitMeasurements( + componentAPI.sampleUnitMeasurements( deviceID, tempComponent.key(), start.toISOString(), end.toISOString(), - 500, - 0, - "timestamp", + 500 ).then(resp => { + console.log(resp) if(resp.data.measurements){ let tempCompMeasurements = resp.data.measurements.map(um => UnitMeasurement.any(um, user)); //if there is an ambient component, then treat the temp component like a single sensor and not a chain, and use the ambient measurements as the inlet if(ambient){ //need to then load the measurements for the ambient component - componentAPI.listUnitMeasurements( + componentAPI.sampleUnitMeasurements( deviceID, ambient.key(), start.toISOString(), end.toISOString(), - 500, - 0, - "timestamp", + 500 ).then(resp => { let ambientMeasurements = resp.data.measurements.map(um => UnitMeasurement.any(um, user)); //now loop through each of them to 'combine' them into a single array