I have an ASP Chart that uses a timer to refresh an updatepanel, simulating a “realtime” graph (essentially the guide at https://web.archive.org/web/20201205213920/https://www.4guysfromrolla.com/articles/121609-1.aspx under “Creating Real Time Charts”). I’ve added functionality that allows you to dynamically add a series to the chart, but the new series always starts from the 0 point on the x-axis. This is a problem when there is already data on the chart that has been “ticking” for some time, because the new series starts from 0 and appears “shifted” to the left. How can I shift that series to the right to align it’s x-axis time with that of the other, “older” series?
Here’s a picture of an example–the blue line was added first, then the yellow line a few seconds later.
I figured this issue out myself. Here’s what I did:
Basically, I add “dummy values” for all those data points that didn’t exist in the new series, then hide them using Color.Transparent.
Hope this helps other people!