Plotting Data Using XOJO Native Graphing Tools

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

MainGraphDataChart.Title = “Graph of” +GraphChoicePopupMenu.SelectedRowText
MainGraphDataChart.Mode = DesktopChart.modes.Line
MainGraphDataChart.GridColor = Color.Clear

Var ds As New ChartLinearDataset(GraphChoicePopupMenu.SelectedRowText, Color.red, True, GraphData)
ds.ChartType = ChartLinearDataset.ChartTypes.Line

MainGraphDataChart.AddDatasets ds

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”)

Maybe if you attach an example project instead of just code would help to understand better what you want to achieve :+1:

i think basically you have one x axis the time, and each datapoint have a value y?

data(x)=value
whereby each x have a datetime label in the chart

with a database/query you could select average,min,max,sum for a timespan.

What I’m not seeing here is:

MainGraphDataChart.AddLabels TimeData