I recently posted about this but was unclear so posting again for clarity. I want to use XOJOs native Desktop Chart tools to plot data. I have two lists, one of time values, and one of values of f(t). I want to plot points of the form (t,f(t)). Here is the code I have so far, which is not working at all, and I know will not work. I am not sure how to make each f(t) value correspond to a time value in XOJO.
Var GraphData() As Double
Var TimeData() As String
Var n as integer = ChartArray.LastIndex(2)
Var j as integer = GraphChoicePopupMenu.SelectedRowIndex
for i as integer = 0 to n
GraphData.add(ChartArray(j,i))
TimeData.Add(ChartArray(0,i).ToString)
next
Can you find a chart similar of what you want searching in Google? or can you draw one up?
I’m not sure the native chart can handle what you want (because you posted on your other thread that you want to chart “will have over 600,000 elements”)
I have a similar need. I think what he was getting at is how to plot a line graph when you have a time series consisting of unevenly spaced TIMES and the corresponding VALUES. For line charts Xojo seems to assume that all points are evenly spaced along the X axis. One workaround is to use a scatter plot so you can provide BOTH X and Y coordinates and then use the line style to connect the dots.