public TcpSyntheticCounters() { InitializeComponent(); ChartArea area = new ChartArea(); area.AxisX.Title = "Minutes since start"; area.AxisX.TitleFont = new System.Drawing.Font(area.AxisX.TitleFont, FontStyle.Bold); area.AxisX.ArrowStyle = System.Windows.Forms.DataVisualization.Charting.AxisArrowStyle.Triangle; area.AxisY.Title = "Bytes per second"; area.AxisY.TitleFont = new System.Drawing.Font(area.AxisY.TitleFont, FontStyle.Bold); area.AxisY.ArrowStyle = System.Windows.Forms.DataVisualization.Charting.AxisArrowStyle.Triangle; _received = new Column { Points = { }, LegendText = "Received" }; _send = new Column { Points = { }, LegendText = "Send" }; _chart = new Chart { ChartAreas = { area }, Dock = DockStyle.Fill, }; this.Controls.Add(_chart); }
public static Chart Bar() { var column1 = new Column { Points = { 6, 9, 5, 7.5, 5.6999998092651367, 3.2000000476837158, 8.5, 7.5, 6.5 } }; var column2 = new Column { 6, 9, 2, 7, 3, 5, 8, 2, 6 }; var column3 = new Column { Points = { 4, 5, 2, 6, 1, 2, 3, 1, 5 } }; var area = new ChartArea { Series = { column1, column2, column3 } , AxisX = { IsMarginVisible = true } , Area3DStyle = { Enable3D = true, Rotation = 30, Inclination = 10, IsRightAngleAxes = false } }; return new Chart { ChartAreas = { area }, Dock = DockStyle.Fill }; }