You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I create a graph where the x, y values are updated?
I tried it as below. The simple graph works. But the x,y graph does not. How can I create an x,y graph this way?
C# code Simple graph:
List<int> ValuesPoints = new List<int>();
for (int x = 0; x < 10; x ++)
ValuesPoints.Add(x);
ObservableCollection<ISeries> seriesCollection = new ObservableCollection<ISeries>();
grfArbeitsfenster2.Series = seriesCollection;
seriesCollection.Add(new LineSeries<int>
{
Values = ValuesPoints
});
C# code x,y graph
List<ObservablePoint> ValuesPoints = new List<ObservablePoint>();
for (int x = 0; x < 10; x++)
ValuesPoints.Add(new ObservablePoint(x, x+1));
ObservableCollection<ISeries> seriesCollection = new ObservableCollection<ISeries>();
grfArbeitsfenster2.Series = seriesCollection;
seriesCollection.Add(new LineSeries<ObservablePoint>
{
Values = ValuesPoints
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have the following question.
How do I create a graph where the x, y values are updated?
I tried it as below. The simple graph works. But the x,y graph does not. How can I create an x,y graph this way?
C# code Simple graph:
C# code x,y graph
Wpf Code:
<lvc:CartesianChart x:Name="grfArbeitsfenster2" Series="{Binding Series}" Width="700" Height="350" Margin="183,101,96.2,1885" />
Beta Was this translation helpful? Give feedback.
All reactions