I am using the standard chart library from Visual Studio 2010. This chart works fine but I guess the axis grid line. They are already set up in Form 1. Designers.cs
chartArea3.Name = "ChartArea1"; This.chart1.ChartAreas.Add (chartArea3); Legend3.Name = "Legend1"; This.chart1.Legends.Add (legend3); This.chart1.Location = New system. DrawingPoint (12, 68); This.chart1.Name = "chart1"; Series 5 Chart Aria = "Chart Aria 1"; Series 5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; Series 5 Color = system Drawing Colour. Red; Series 5 Ligend = "legend 1"; Series 5 .name = "floating"; Series 6 Chart Aria = "Chart Aria 1"; Chain 6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; Series 6 Color = system Drawing Colour. Blue; Series 6 Ligend = "legend 1"; Series 6 Name = "Ummid"; This.chart1.Series.Add (series5); This.chart1.Series.Add (series6); This.chart1.Size = New System. Drawing. Size (647, 182); This.chart1.TabIndex = 8; This.chart1.Text = "chart1"; This.chart1.ChartAreas [0] .AxisY.Interval = 5; I have to keep the axis grid type of dots or dashtots. I have tried with: this.chart1 ChartAreas [0] .AxisX.LineDashStyle. Line But then I do not know how to assign assets and / or if the partial line above the code is correct.
I finally got this right:
this.chart1. ChartAreas [0] .xxx Majorgrid. LyndaSystem = System.windows.form.dataVisualization.Charting.ChartDashStyle.DashDotDot; This.chart1.ChartAreas [0] .AxisY.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.DashDotDot; This is working and gives access to the grid axis line style.
this.chart1.ChartAreas [0] .AxisX.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.availableStileSelectionHere;
No comments:
Post a Comment