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
i succeeded to build the graph, and it update automatically when adding new point in the graph.
I'm using the LineSeries graph.
My graph is small so i added a button "expand", that open a new big window and there i can see the graph entirely and big.
The issue i have is, after adding some points and getting the Line on the graph and the expand window is open, when i select a new point the old line is not disappearing, and it will add new point on the graph, but in the expand window it's ok. (see picture below)
My ViewModel:
public class ViewModel : ObservableValue
{
public List<ISeries> Series_OVL_Performance_X { get; set; } = new List<ISeries>();
public List<ISeries> Series_OVL_Performance_Y { get; set; } = new List<ISeries>();
public Dictionary<Int64, ObservableCollection<ObservableCollection<double>>> Test_Num_AVG_List { get; set; } = new Dictionary<Int64, ObservableCollection<ObservableCollection<double>>>();
public ObservableCollection<ObservableCollection<double>> AVG_List { get; set; } = new ObservableCollection<ObservableCollection<double>>();
public ObservableCollection<string> Date_Collection { get; set; } = new ObservableCollection<string>();
public ObservableCollection<Axis> Xaxes { get; set; } = new ObservableCollection<Axis>();
}
Functions for adding Xaxes and Lineseries:
class Graphs_Config
{
public void Add_New_Line(List<ISeries> Series, string Name, ObservableCollection<double> Collection)
{
Series.Add(
new LineSeries<double>
{
Values = Collection,
Fill = null,
GeometrySize = 6,
DataLabelsSize = 10,
DataLabelsPaint = new SolidColorPaint(SKColors.Black),
DataLabelsPosition = LiveChartsCore.Measure.DataLabelsPosition.Top,
Name = Name
});
}
public void Add_New_X_Axes(ObservableCollection<Axis> Xaxes, string Name, ObservableCollection<string> Collection)
{
Xaxes.Add(
new Axis
{
Name = Name,
Labels = Collection,
TextSize = 9,
NamePaint = new SolidColorPaint(SKColors.Black),
LabelsRotation = -45,
});
}
}
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
-
Hi,
i have an issue using this library.
i succeeded to build the graph, and it update automatically when adding new point in the graph.
I'm using the LineSeries graph.
My graph is small so i added a button "expand", that open a new big window and there i can see the graph entirely and big.
The issue i have is, after adding some points and getting the Line on the graph and the expand window is open, when i select a new point the old line is not disappearing, and it will add new point on the graph, but in the expand window it's ok. (see picture below)
My ViewModel:
Functions for adding Xaxes and Lineseries:
MainWindow function when adding new Points:
Function that create the Expand Window:
The Expand Window.cs
Picture of the Mainwindow with the issue:
https://i.postimg.cc/TYcwWjHZ/issue.png
The blue line is the older points, it has no labels on it, it needs to be removed.
The yellow point is the new selection.
Picture of the Expand window:
https://i.postimg.cc/wgDspLF5/issue1.png
You can see only the yellow point, that's what i need to see in the Mainwindow also.
Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions