public static void DrawArrow(ArrowPoint point, Color color, TChart chart) { Steema.TeeChart.Styles.Arrow Tmparrow = new Steema.TeeChart.Styles.Arrow(chart.Chart); Tmparrow.Add(point.xs, point.ys); Tmparrow.EndXValues[0] = point.xd; Tmparrow.EndYValues[0] = point.yd; Tmparrow.Color = color; }
private void button1_Click(object sender, EventArgs e) { mystyle++; tChart1.Series.Clear(); switch (mystyle) { case 1: Steema.TeeChart.Styles.Area area = new Steema.TeeChart.Styles.Area(); area.Add(data); tChart1.Series.Add(area); break; case 2: Steema.TeeChart.Styles.Arrow arrow= new Steema.TeeChart.Styles.Arrow(); arrow.Add(data); tChart1.Series.Add(arrow); break; case 3: Steema.TeeChart.Styles.Bar Bar = new Steema.TeeChart.Styles.Bar(); Bar.Add(data); tChart1.Series.Add(Bar); break; case 4: Steema.TeeChart.Styles.Bar3D Bar3D = new Steema.TeeChart.Styles.Bar3D(); Bar3D.Add(data); tChart1.Series.Add(Bar3D); break; case 5: Steema.TeeChart.Styles.BarJoin BarJoin = new Steema.TeeChart.Styles.BarJoin(); BarJoin.Add(data); tChart1.Series.Add(BarJoin); break; case 6: Steema.TeeChart.Styles.Bezier Bezier = new Steema.TeeChart.Styles.Bezier(); Bezier.Add(data); tChart1.Series.Add(Bezier); break; } if (mystyle > 10) mystyle = 0; }
private void AddRandomArrows() { double x0, y0, x1, y1; arrowSeries1.Clear(); for (int t = 1; t < 40; t++) { x0 = r.Next(1000); y0 = r.Next(1000); x1 = r.Next(300) - 150; if (x1 < 50) { x1 = 50; } x1 += x0; y1 = r.Next(300) - 150; if (y1 < 50) { y1 = 50; } y1 += y0; arrowSeries1.Add(x0, y0, x1, y1); } }