public void ChartEnhance(Chart chart1,string chartAreaName,string legendName,string seriesName,string titleName,string titleText) { chart1.BackColor = Color.WhiteSmoke; chart1.BackGradientStyle = GradientStyle.TopBottom; chart1.BackSecondaryColor = Color.White; chart1.BorderlineColor = Color.FromArgb(26, 59, 105); chart1.BorderlineDashStyle = ChartDashStyle.Solid; chart1.BorderlineWidth = 2; chart1.BorderSkin.SkinStyle = BorderSkinStyle.Emboss; chart1.ChartAreas[chartAreaName].Area3DStyle.Inclination = 15; chart1.ChartAreas[chartAreaName].Area3DStyle.IsClustered = true; chart1.ChartAreas[chartAreaName].Area3DStyle.IsRightAngleAxes = false; chart1.ChartAreas[chartAreaName].Area3DStyle.Perspective = 10; chart1.ChartAreas[chartAreaName].Area3DStyle.Rotation = 10; chart1.ChartAreas[chartAreaName].Area3DStyle.WallWidth = 0; chart1.ChartAreas[chartAreaName].AxisX.LabelAutoFitStyle = (LabelAutoFitStyles.IncreaseFont | LabelAutoFitStyles.DecreaseFont | LabelAutoFitStyles.WordWrap); chart1.ChartAreas[chartAreaName].AxisX.LabelStyle.Font = new Font("Trebuchet MS", 8.25F, FontStyle.Bold); chart1.ChartAreas[chartAreaName].AxisX.LineColor = Color.FromArgb(64, 64, 64, 64); chart1.ChartAreas[chartAreaName].AxisX.MajorGrid.LineColor = Color.FromArgb(64, 64, 64, 64); chart1.ChartAreas[chartAreaName].AxisX.ScrollBar.LineColor = Color.Black; chart1.ChartAreas[chartAreaName].AxisX.ScrollBar.Size = 10; chart1.ChartAreas[chartAreaName].AxisY.LabelStyle.Font = new Font("Trebuchet MS", 8.25F, FontStyle.Bold); chart1.ChartAreas[chartAreaName].AxisY.LineColor = Color.FromArgb(64, 64, 64, 64); chart1.ChartAreas[chartAreaName].AxisY.MajorGrid.LineColor = Color.FromArgb(64, 64, 64, 64); chart1.ChartAreas[chartAreaName].AxisY.ScrollBar.LineColor = Color.Black; chart1.ChartAreas[chartAreaName].AxisY.ScrollBar.Size = 10; chart1.ChartAreas[chartAreaName].BackColor = Color.Gainsboro; chart1.ChartAreas[chartAreaName].BackGradientStyle = GradientStyle.TopBottom; chart1.ChartAreas[chartAreaName].BackSecondaryColor = Color.White; chart1.ChartAreas[chartAreaName].BorderColor = Color.FromArgb(64, 64, 64, 64); chart1.ChartAreas[chartAreaName].BorderDashStyle = ChartDashStyle.Solid; chart1.ChartAreas[chartAreaName].CursorX.IsUserEnabled = true; chart1.ChartAreas[chartAreaName].CursorX.IsUserSelectionEnabled = true; chart1.ChartAreas[chartAreaName].CursorY.IsUserEnabled = true; chart1.ChartAreas[chartAreaName].CursorY.IsUserSelectionEnabled = true; chart1.ChartAreas[chartAreaName].ShadowColor = Color.Transparent; chart1.Legends[legendName].BackColor = Color.Transparent; chart1.Legends[legendName].Enabled = false; chart1.Legends[legendName].Font = new Font("Trebuchet MS", 8.25F, FontStyle.Bold); chart1.Legends[legendName].IsTextAutoFit = false; chart1.Series[seriesName].ShadowColor = Color.Black; chart1.Series[seriesName].BorderColor = Color.FromArgb(180, 26, 59, 105); chart1.Series[seriesName].ChartType = SeriesChartType.FastLine; chart1.Series[seriesName].Legend = legendName; chart1.Titles[titleName].Font = new Font("Trebuchet MS", 12F, FontStyle.Bold); chart1.Titles[titleName].ForeColor = Color.FromArgb(26, 59, 105); chart1.Titles[titleName].ShadowColor = Color.FromArgb(32, 0, 0, 0); chart1.Titles[titleName].ShadowOffset = 3; chart1.Titles[titleName].Text = titleText; }