protected void Page_Load(object sender, System.EventArgs e) { Chart1.Series["Series1"].XAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series1X.SelectedItem.Text); Chart1.Series["Series1"].YAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series1Y.SelectedItem.Text); Chart1.Series["Series2"].XAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series2X.SelectedItem.Text); Chart1.Series["Series2"].YAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series2Y.SelectedItem.Text); }
private void SetSecondary() { if (Series1X.SelectedItem == null || Series1Y.SelectedItem == null || Series2X.SelectedItem == null || Series2Y.SelectedItem == null) { return; } Chart1.Series["Series1"].XAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series1X.GetItemText(Series1X.SelectedItem)); Chart1.Series["Series1"].YAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series1Y.GetItemText(Series1Y.SelectedItem)); Chart1.Series["Series2"].XAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series2X.GetItemText(Series2X.SelectedItem)); Chart1.Series["Series2"].YAxisType = (AxisType)AxisType.Parse(typeof(AxisType), Series2Y.GetItemText(Series2Y.SelectedItem)); }
private void SetSecondary() { if (Series1X.SelectedItem == null || Series1Y.SelectedItem == null) { return; } ChartArea area = Chart1.ChartAreas["Default"]; AxisType axisXType = (AxisType)AxisType.Parse(typeof(AxisType), Series1X.GetItemText(Series1X.SelectedItem)); AxisType axisYType = (AxisType)AxisType.Parse(typeof(AxisType), Series1Y.GetItemText(Series1Y.SelectedItem)); area.CursorX.AxisType = axisXType; area.CursorY.AxisType = axisYType; if (axisXType == AxisType.Primary) { area.AxisX.LineColor = Color.Black; area.AxisX2.LineColor = Color.FromArgb(64, 64, 64, 64); } else { area.AxisX2.LineColor = Color.Black; area.AxisX.LineColor = Color.FromArgb(64, 64, 64, 64); } if (axisYType == AxisType.Primary) { area.AxisY.LineColor = Color.Black; area.AxisY2.LineColor = Color.FromArgb(64, 64, 64, 64); } else { area.AxisY2.LineColor = Color.Black; area.AxisY.LineColor = Color.FromArgb(64, 64, 64, 64); } }