private void InitData() { bindingConfiguration.Add(_configuration); foreach (var kv in _configuration.Calculations) { var calculation = new CalculationControl(I18N.GetString(kv.Key), kv.Value); calculationContainer.Controls.Add(calculation); } serverSelector.DataSource = _servers; _dataTable.Columns.Add("Timestamp", typeof(DateTime)); _dataTable.Columns.Add("Speed", typeof(int)); _speedSeries.XValueMember = "Timestamp"; _speedSeries.YValueMembers = "Speed"; // might be empty _dataTable.Columns.Add("Package Loss", typeof(int)); _dataTable.Columns.Add("Ping", typeof(int)); _packageLossSeries.XValueMember = "Timestamp"; _packageLossSeries.YValueMembers = "Package Loss"; _pingSeries.XValueMember = "Timestamp"; _pingSeries.YValueMembers = "Ping"; StatisticsChart.DataSource = _dataTable; LoadChartData(); StatisticsChart.DataBind(); }
private void InitData() { bindingConfiguration.Add(_configuration); foreach (var kv in _configuration.Calculations) { var calculation = new CalculationControl(kv.Key, kv.Value); calculationContainer.Controls.Add(calculation); } serverSelector.DataSource = _servers; _dataTable.Columns.Add("Timestamp", typeof(DateTime)); _dataTable.Columns.Add("Speed", typeof (int)); _speedSeries.XValueMember = "Timestamp"; _speedSeries.YValueMembers = "Speed"; // might be empty _dataTable.Columns.Add("Package Loss", typeof (int)); _dataTable.Columns.Add("Ping", typeof (int)); _packageLossSeries.XValueMember = "Timestamp"; _packageLossSeries.YValueMembers = "Package Loss"; _pingSeries.XValueMember = "Timestamp"; _pingSeries.YValueMembers = "Ping"; StatisticsChart.DataSource = _dataTable; LoadChartData(); StatisticsChart.DataBind(); }
private void InitData() { bindingConfiguration.Add(_configuration); foreach (var kv in _configuration.Calculations) { var calculation = new CalculationControl(kv.Key, kv.Value); calculationContainer.Controls.Add(calculation); } serverSelector.DataSource = _servers; _dataTable.Columns.Add("Timestamp", typeof(DateTime)); _dataTable.Columns.Add("Package Loss", typeof(int)); _dataTable.Columns.Add("Ping", typeof(int)); StatisticsChart.Series["Package Loss"].XValueMember = "Timestamp"; StatisticsChart.Series["Package Loss"].YValueMembers = "Package Loss"; StatisticsChart.Series["Ping"].XValueMember = "Timestamp"; StatisticsChart.Series["Ping"].YValueMembers = "Ping"; StatisticsChart.DataSource = _dataTable; loadChartData(); StatisticsChart.DataBind(); }