I recently encountered a tool called LiveChart and decided to test it out.
Unfortunately I\'ve been having some problems figuring out how to update the chart values
Live-Charts tries to keep it simple. The logic is to use a generic collection with the type you need to plot, and then as easy as adding/removing or updating any element in this collection then your chart will be updated.
To answer your question, you normally need to:
public partial class Form1 : Form
{
private ObservableValue value1;
public Form1()
{
InitializeComponent();
//int val1 = int.Parse(Settings.Default.Value1);
value1 = new ObservableValue(3);
//...
cartesianChart1.Series.Add(new LineSeries
{
Values = new ChartValues { value1, ... },
});
}
private void changeValue1ToolStripMenuItem_Click(object sender, EventArgs e)
{
value1.Value = 10;
Settings.Default.Value1 = "10";
Settings.Default.Save();
this.Text = Settings.Default.Value1;
}
}
Then the library will handle animations and the update