■ Area 클래스의 StackGroup 속성을 사용해 스택 그룹을 설정하는 방법을 보여준다.
▶ MainForm.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
using System.Drawing; using System.Windows.Forms; using Steema.TeeChart.Drawing; using Steema.TeeChart.Styles; namespace TestProject { /// <summary> /// 메인 폼 /// </summary> public partial class MainForm : Form { //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor ////////////////////////////////////////////////////////////////////////////////////////// Public #region 생성자 - MainForm() /// <summary> /// 생성자 /// </summary> public MainForm() { InitializeComponent(); Text = "Area 클래스 : StackGroup 속성을 사용해 스택 그룹 설정하기"; this.tChart.Panel.Pen = new ChartPen(Color.Black); Area area1 = new Area(); area1.MultiArea = MultiAreas.Stacked; area1.StackGroup = 0; area1.Color = Color.FromArgb(119, 153, 214); area1.FillSampleValues(10); this.tChart.Series.Add(area1); Area area2 = new Area(); area2.MultiArea = MultiAreas.Stacked; area2.StackGroup = 0; area2.Color = Color.FromArgb(255, 207, 104); area2.FillSampleValues(10); this.tChart.Series.Add(area2); Area area3 = new Area(); area3.MultiArea = MultiAreas.Stacked; area3.StackGroup = 1; area3.Color = Color.FromArgb(255, 127, 71); area3.FillSampleValues(10); this.tChart.Series.Add(area3); Area area4 = new Area(); area4.MultiArea = MultiAreas.Stacked; area4.StackGroup = 1; area4.Color = Color.FromArgb(129, 202, 219); area4.FillSampleValues(10); this.tChart.Series.Add(area4); } #endregion } } |