protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { // You can get this value from the WebService, for instance double currentValue = 50 + new Random().Next(10); DevExpress.XtraCharts.SeriesPoint nextPoint = new SeriesPoint(DateTime.Now, new double[] { currentValue }); tempPoints = (List <SeriesPoint>)Session["tempPoints"]; foreach (DevExpress.XtraCharts.SeriesPoint point in WebChart.Series[0].Points) { if (Convert.ToDateTime(point.Argument) < DateTime.Now - new TimeSpan(0, 0, 35)) { tempPoints.Add(point); } } if (tempPoints.Count > 0) { tempPoints.RemoveAt(0); } foreach (SeriesPoint point in tempPoints) { WebChart.Series[0].Points.Remove(point); } tempPoints.Clear(); WebChart.Series[0].Points.Add(nextPoint); WebChart.Titles[0].Text = "Trend on: " + DateTime.Now.ToShortDateString(); AdjustChartRange(); }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { string[] cmdAndParams = e.Parameter.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries); string command = cmdAndParams[0]; string[] parameters = cmdAndParams[1].Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries); if (command == "ChangeViewTypeCommand") { WebChartControl1.Series[0].ChangeView((ViewType)Enum.Parse(typeof(ViewType), parameters[0])); } else if (command == "EvaluateCommand") { string expr = parameters[0].Replace("x", "Convert.ToDouble(param1)").Replace("y", "Convert.ToDouble(param2)"); double start = double.Parse(parameters[1], System.Globalization.CultureInfo.InvariantCulture.NumberFormat); double end = double.Parse(parameters[2], System.Globalization.CultureInfo.InvariantCulture.NumberFormat); int points = int.Parse(parameters[3], System.Globalization.CultureInfo.InvariantCulture.NumberFormat); Evaluater.Code = expr; WebChartControl1.Series[0].Points.Clear(); for (double x = start; x <= end; x += (end - start) / (points - 1)) { WebChartControl1.Series[0].Points.Add(new SeriesPoint(x, Convert.ToDouble(Evaluater.Evaluate(x, 0)))); } } }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { //12/16/2013 NS uncommented the line below WebChartControl1.Width = new Unit(Convert.ToInt32(chartWidth.Value)); //WebChartControl1.Width = new Unit(Convert.ToInt32(chartWidth.Value)); //int index = ClusterHealthGrid.FocusedRowIndex; //string Type = ClusterHealthGrid.GetRowValues(index, "ServerName").ToString(); //Session["Type"] = Type; //if (txtfromdate.Text != "" && txttodate.Text != "") //{ // fromdate = txtfromdate.Text + " " + "00:00:00.000"; // todate = txttodate.Text + " " + "23:59:59.000"; // if (Convert.ToDateTime(txtfromdate.Text) > Convert.ToDateTime(txttodate.Text)) // { // MsgPopupControl.ShowOnPageLoad = true; // ErrmsgLabel.Text = "From Date Should be less than To Date"; // } // else if (Session["Type"].ToString() != "" && Session["Type"] != null) // { // SetGraphforCluster(Session["Type"].ToString(), fromdate, todate); // } //} }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { if (e.Parameter == "GridChanged") { WebChartControl1.DataBind(); } }
protected void WebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { try { if (!string.IsNullOrEmpty(e.Parameter)) { if (e.Parameter.Equals("chartTypeValueChanged")) { Helpers.SetChartType(WebChart, cbbChartType.SelectedItem.Text); } else if (e.Parameter.Equals("Appearance")) { this.WebChart.AppearanceName = this.cbbAppearance.SelectedItem.Text; } else if (e.Parameter.Equals("Palette")) { this.WebChart.PaletteName = this.cbbPalette.SelectedItem.Text; } else { this.WebChart.Width = new Unit(Convert.ToInt32(Lib.IfNOE(e.Parameter, 986))); } } this.WebChart.DataBind(); } catch { } }
protected void WebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { try { if (e.Parameter != this.WebChart.Width.Value.ToString()) { this.WebChart.Width = Unit.Pixel(Convert.ToInt32(e.Parameter)); } if (this.WebChart.SeriesTemplate.View.ToString() != this.cmbTipoGrafica.SelectedItem.Value.ToString()) { this.WebChart.SeriesTemplate.ChangeView((ViewType)Enum.Parse(typeof(ViewType), this.cmbTipoGrafica.SelectedItem.Value.ToString())); } if (this.WebChart.PaletteName != this.cmbColorGrafica.SelectedItem.Value.ToString()) { this.WebChart.PaletteName = this.cmbColorGrafica.SelectedItem.Value.ToString(); } } catch (Exception ex) { if (this.WebChart.JSProperties.Count > 0) { this.WebChart.JSProperties.Clear(); this.WebChart.JSProperties.Add("cpex", ex.Message); } else { this.WebChart.JSProperties.Add("cpex", ex.Message); } } }
protected void chartHistory_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { //if (e.Parameter == "MarkerKind") // PerformMarkerKindAction(); //else if (e.Parameter == "MarkerSize") // PerformMarkerSizeAction(); //else if (e.Parameter == "ShowLabels") // PerformShowLabelsAction(); }
protected void Grafico_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { AtualizaPagina(System.DateTime.Now, Convert.ToInt32(e.Parameter)); //Permitir atualização em tempo real mediante acesso via web... caso não tenha salvar dados em arquivo texto //para recompor banco de dados quando a reestabelecer a internet....... // Na tabela de celula --- faltando finaliza-la ! // Finalizar tb tabela de estoque - Empresa - Tipo usuário //Acrescentar tudo o que for possível, //Criar ou não um tipo de célula - provavelmente sim ... // }
//Item count count by server protected void chartItemSizeServer_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.chartItemSizeServer.Width = new Unit(Convert.ToInt32(chartWidth.Value)); if (ItemSizeServercombobox.Text == "All Servers") { SetBarGraphForItemSizeServer("All Servers"); } else { SetBarGraphForItemSizeServer(ItemSizeServercombobox.Text); } }
protected void MailTemplateWebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.MailTemplateWebChart.Width = new Unit(Convert.ToInt32(chartWidth.Value)); if (ServerComboBox.Text == "All Servers") { SetPieChartForMailTemplates(""); } else { SetPieChartForMailTemplates(ServerComboBox.Text); } }
protected void BigMailChartControl_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.BigMailChartControl.Width = new Unit(Convert.ToInt32(chartWidth.Value)); if (ServerComboBox.Text == "All Servers") { SetBarGraphForTopMail("All Servers"); } else { SetBarGraphForTopMail(ServerComboBox.Text); } }
//Item count by database protected void chartItemSizeDatabase_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.chartItemSizeDatabase.Width = new Unit(Convert.ToInt32(chartWidth.Value)); if (ItemSizeDatabaseComboBox.Text == "All Databases") { SetBarGraphForItemSizeDatabase("All Databases"); } else { SetBarGraphForItemSizeDatabase(ItemSizeDatabaseComboBox.Text); } }
protected void chart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { try { if (!string.IsNullOrEmpty(e.Parameter)) { var filters = Lib.FromJsonStr <List <WidgetFilter> >(e.Parameter); this.Sett.WidgetFiltersRuntime = filters; this.InitCustom_Charts(); } } catch { } }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { var list = new List <DataRowView>(); for (int i = 0; i < ASPxGridView1.VisibleRowCount; i++) { if (!ASPxGridView1.IsGroupRow(i)) { list.Add((DataRowView)ASPxGridView1.GetRow(i)); } } Session["DataSource"] = list; WebChartControl1.DataSource = list; WebChartControl1.DataBind(); }
protected void BiggestQuotaWebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.BiggestQuotaWebChart.Width = new Unit(Convert.ToInt32(chartWidth.Value)); SetBarGraphForTopQuota(""); /* * if (ServerComboBox.Text == "All Servers") * { * SetBarGraphForTopMail("All Servers"); * } * else * { * SetBarGraphForTopMail(ServerComboBox.Text); * } */ }
// Drill implementation protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { int detailsLevel = Convert.ToInt32(Session["detailsLevel"]); string argument = e.Parameter; if (argument != "") { // DrillDown if (detailsLevel == 0) { FilterProducts(argument); ShowProducts(); } else { if (detailsLevel == 1) { FilterOrderDetails(argument); } ShowOrderDetails(); } if (detailsLevel < 2) { detailsLevel++; } } else { // DrillUp if (detailsLevel > 0) { detailsLevel--; } if (detailsLevel == 0) { ShowCategories(); } else if (detailsLevel == 1) { ShowProducts(); } } Session["detailsLevel"] = detailsLevel; }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { string[] parameters = e.Parameter.Split(';'); DateTime originalArgument = Convert.ToDateTime(hfOriginalArgument.Value, CultureInfo.InvariantCulture); DateTime argument = Convert.ToDateTime(parameters[0], CultureInfo.InvariantCulture); double value = Convert.ToDouble(parameters[1]); DataTable table = ManualDataSet.RetrieveDataCache().Tables[0]; for (int i = 0; i < table.Rows.Count; i++) { if (Convert.ToDateTime(table.Rows[i]["MyDateTime"]) == originalArgument) { table.Rows[i]["MyDateTime"] = argument; table.Rows[i]["MyData"] = value; break; } } }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { string[] parameters = e.Parameter.Split(';'); string argument = parameters[0]; int valueIndex = Convert.ToInt32(parameters[1]); DateTime date = Convert.ToDateTime(parameters[2], CultureInfo.InvariantCulture); DataTable taskList = DataManagement.RetrieveDataCache().Tables[0]; for (int i = 0; i < taskList.Rows.Count; i++) { if (taskList.Rows[i]["Task"].ToString() == argument) { if (valueIndex == 0) { taskList.Rows[i]["Start"] = date; } else if (valueIndex == 1) { taskList.Rows[i]["End"] = date; } else { taskList.Rows[i]["Start"] = date; taskList.Rows[i]["End"] = Convert.ToDateTime(parameters[3], CultureInfo.InvariantCulture); } DateTime start = Convert.ToDateTime(taskList.Rows[i]["Start"]); DateTime end = Convert.ToDateTime(taskList.Rows[i]["End"]); if (start > end) { taskList.Rows[i]["Start"] = end; taskList.Rows[i]["End"] = start; } DataManagement.UpdateDatabase(); break; } } }
protected void mailFileOpensWebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.mailFileOpensWebChart.Width = new Unit(Convert.ToInt32(chartWidth.Value)); }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.WebChartControl1.Width = new Unit(Convert.ToInt32(chartWidth.Value)); }
protected void webChartDiskHealth_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { webChartDiskHealth.Width = new Unit(Convert.ToInt32(chartWidth.Value)); }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { UpdateSeries(); }
protected void WebChartControl1_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { this.BOProducts.SelectParameters["categoryID"].DefaultValue = e.Parameter; this.productsChart.DataBind(); }
protected void MailCountWebChart_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { MailCountWebChart.Width = new Unit(Convert.ToInt32(chartWidth.Value)); }
protected void CostperUserservedWebChartControl_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { //CostperUserservedWebChartControl.Width = new Unit(Convert.ToInt32(chartWidth.Value)); GraphforResponseTime(SortRadioButtonList1.SelectedItem.Value.ToString(), SearchTextBox.Text, TypeComboBox.Text, UserTypeComboBox.Text); }
protected void ResponseWebChartControl_CustomCallback(object sender, DevExpress.XtraCharts.Web.CustomCallbackEventArgs e) { //2/13/2013 NS commented out ResponseWebChartControl.Width = new Unit(Convert.ToInt32(chartWidth.Value)); GraphforResponseTime(SortRadioButtonList1.SelectedItem.Value.ToString(), SearchTextBox.Text, TypeComboBox.Text, LocationComboBox.SelectedItem.Value.ToString()); }