3

may I know how to do the realtime line chart using victory?

The victory library: https://github.com/FormidableLabs/victory

<div className="chart-header">Temperature</div>
  <VictoryChart
   theme={VictoryTheme.material}
   width={1500}
  >
  <VictoryLine
   style={{
    data: { stroke: "#c43a31" },
    parent: { border: "1px solid #ccc"}
   }}
   labelComponent={<VictoryTooltip />} 
   data={temperatureData}
   x="timestamp"
   y="temperature"
   labels={p => `${p.timestamp} $${p.temperature}`} 
  />
 </VictoryChart>
</div>

This is when the new temperature added it will automatically updated to the graph. Now I using it with the Redux and the backend I use is loopback. May I know how to do it in real time? Thank you.

johnhour
  • 119
  • 3
  • 14

0 Answers0