protected void Page_Load(object sender, System.EventArgs e) { // bind data but in this case the data is already // attached as it is static in aspx file if(this.IsPostBack) { if(ShowTitle.Checked) Chart1.ChartAreas["ChartArea1"].AxisX.Title = "This is the X Axis"; else Chart1.ChartAreas["ChartArea1"].AxisX.Title = ""; Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Arial", float.Parse(FontSize.SelectedItem.ToString())); } else { Chart1.ChartAreas["ChartArea1"].AxisX.Title = "This is the X Axis"; ShowTitle.Checked = true; Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Arial", 8); Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Angle = 0; DataTable1.Checked = true; } // call method to add data to where the data table will be if(DataTable1.Checked) { TableHelper = new ChartDataTableHelper(); TableHelper.Initialize(Chart1, ShowTotals.Checked); TableHelper.TableColor = Color.FromName(this.TableColor.SelectedItem.Text); TableHelper.BorderColor = Color.FromName(this.BorderColor.SelectedItem.Text); } ShowTotals.Enabled = DataTable1.Checked; }
protected void Page_Load(object sender, System.EventArgs e) { // bind data but in this case the data is already // attached as it is static in aspx file if (this.IsPostBack) { if (ShowTitle.Checked) { Chart1.ChartAreas["ChartArea1"].AxisX.Title = "This is the X Axis"; } else { Chart1.ChartAreas["ChartArea1"].AxisX.Title = ""; } Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Arial", float.Parse(FontSize.SelectedItem.ToString())); } else { Chart1.ChartAreas["ChartArea1"].AxisX.Title = "This is the X Axis"; ShowTitle.Checked = true; Chart1.ChartAreas["ChartArea1"].AxisX.TitleFont = new Font("Arial", 8); Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Angle = 0; DataTable1.Checked = true; } // call method to add data to where the data table will be if (DataTable1.Checked) { TableHelper = new ChartDataTableHelper(); TableHelper.Initialize(Chart1, ShowTotals.Checked); TableHelper.TableColor = Color.FromName(this.TableColor.SelectedItem.Text); TableHelper.BorderColor = Color.FromName(this.BorderColor.SelectedItem.Text); } ShowTotals.Enabled = DataTable1.Checked; }