We've recently installed temperature sensors at our branch locations and set up a simple VB 2008 program to read the XML data and graph the temperature trend.
I'm using the MS Chart Control addon to plot a line graph. For the most part, everything is working as intended, however, I would like the graph to only show the last 24 hours worth of the graph.
I have X axis as "Time" and the Y axis as Temperature. The X axis is set for VariableCount and the Y axis is Fixed between 65 and 85 F.
What I would like to do is have the X axis remain Variable but only hold 24 hours worth of trend points. After 24 hours, I'd like to see the graph start shifting left if for each new point if possible.
I played around with the Scale Min and Max a bit but couldn't get anything to work. Anyone know of a way to get this to work? I attached a picture of the output graph.
Here's a snipped of how the data is getting plotted in the graph
Dim lukepoint As Double = LUKTempF
Dim arrowpoint As Double = ARHTempF
Dim cactuspoint As Double = CTSTempF
Dim northpoint As Double = NORTempF
Dim heritagepoint As Double = HTGTempF
Chart1.Series(0).XValueType = ChartValueType.DateTime
Dim x As DateTime = DateTime.Now
Dim y As String = x.ToString("H:mm:ss")
Chart1.Series.Item("North Mtn").Points.AddXY(y, northpoint)