c# - LiveCharts - plotting x&y from lists -


i have 4 lists (x1list, y1list, x2list, y2list) hold 1000 values each, want plot these lists x & y values using livecharts.

i understand how plot y values using;

            new lineseries             {                 title = "series1",                 values = y1list.aschartvalues(),                 pointgeometry = null             },              new lineseries             {                 title = "series2",                 values = y2list.aschartvalues(),                 pointgeometry = null             }, 

i don't understand how apply x values respective series.

i'm new c# apologies if simple overlooking.

you can use obserablepoint object store x , y value. can create chartvalues<observablepoint> plot i'm thinking want see. make sure include statement livecharts.defualts namespace;

using livecharts.defaults;  chartvalues<observablepoint> list1points = new chartvalues<observablepoint>();  for(int = x1list, < x1list.count, i++) {     list1points.add(new observablepoint      {          x=x1list[i],          y=y1list[i]     }); } 

hopefully work you.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -