This question is locked. New answers and comments are not allowed.
I try to manually set the axis range in RunWorkerCompleted event. The chart did render the new data, but not the axis value. Here is an example code:
I use BackgroundWorker to load a large data then plot it when it finished reading the data. I'm wondering if there is a way to update the axis in this worker completed event.
- Alan
System.ComponentModel.BackgroundWorker worker = new System.ComponentModel.BackgroundWorker();worker.DoWork += (o, e) => { System.Threading.Thread.Sleep(500); };worker.RunWorkerCompleted += (o, e) =>{ CreateDummyView(); AxisY myRangeAxis = MyChart.DefaultView.ChartArea.AxisY; myRangeAxis.AddRange(-2, 2, 0.4);};worker.RunWorkerAsync();I use BackgroundWorker to load a large data then plot it when it finished reading the data. I'm wondering if there is a way to update the axis in this worker completed event.
- Alan