How do you plot two different separate datasets with domains that do not align in Recharts?

16 views Asked by At

I'm trying to plot two datasets, for example, one would be temp (x = time, y = temperature) and the other altitude (x = time, y = altitude). The time domain of these two datasets are not sampled at the exact same time, but the values are near each other (they differ by a matter of seconds). Everything I have seen using Recharts for plotting multiple different chart types on the same chart have been with different types of data but were sampled at the same time. I have tried using custom components to force it, however, the x and y positions are the SVG positions on the Canvas do not align with the actual data on the axes. I have been stuck on this for a while and was wondering if anyone had any suggestions. Thanks!

When trying to integrate distinct datasets onto the same Rechart graph I have tried using the CombinedChart graph with multiple Line, Bar, and Reference Area Components. I have tried to change the XAxis format between number and category timestamps. I have tried using Customized Components. I have tried to embed the data from one dataset in the other, and hide the irrelevant data being plotted on the corresponding lines so that they contained the same timestamps.

0

There are 0 answers