I'm Creating a program which creates a plot after btnCalculate_Click
using oxyplot
. What can I do so that whenever I change a textbox value and click on btnCalculate
it can refresh the plot? I also have btnPrint
and on click it should clear the plot?
public void btnCalculate_Click(object sender, EventArgs e)
{
Pko = float.Parse(textBox5.Text);
//Plotting Using Oxyplots
OxyPlot.WindowsForms.PlotView pv = new PlotView();
pv.Location = new Point(650, 0);
pv.Size = new Size(900, 815);
this.Controls.Add(pv);
pv.Model = new PlotModel { Title = "Program" };
pv.Model.InvalidatePlot(true);
//Pko line from surface to depth
LineSeries Pkoline = new LineSeries();
Pkoline.Color = OxyColors.Black;
Pkoline.LineStyle = LineStyle.Solid;
Pkoline.StrokeThickness = 1;
Pkoline.Points.Add(new DataPoint(Pko, 0));
Pkoline.Points.Add(new DataPoint(100, 200));
pv.Model.Series.Add()
}
private void btnClear_Click(object sender, EventArgs e)
{
}