I have been scratching my head over this for the past three hours, if anyone can help, please do. I am not very adept at D3 in combination with React.
So, basically, I have an anomaly detector algorithm running in the backend Flask App which returns values in form of a dictionary (then converted to json object via json.dumps()) that will, further, be plotted on my React app using D3.
Initially, I thought the problem was with my Database because the app was working perfectly on codesandbox and in all my prior versions.
This is what the console.log(data) looks like :
I was told that a problem could be with the varying data points for A_Epoch(3) and Time_Epoch(151). Having resolved that didn't help either.
This is what the code looks like:
const timeDomain = d3.extent(data, d=>(d.Time_Epoch*1000));
const bytesReadDomain = d3.extent(data, (d) => d.Bytes_Read);
const bytesWriteDomain = d3.extent(data, (d) => d.Bytes_Write);
const bytesSentDomain = d3.extent(data, (d) => d.Bytes_Sent);
const bytesRecvDomain = d3.extent(data, (d) => d.Bytes_Recv);
This part is throwing error.