728x90
728x170
▶ MainForm.cs
using System;
using System.Drawing;
using System.Windows.Forms;
using Steema.TeeChart.Drawing;
using Steema.TeeChart.Styles;
namespace TestProject
{
/// <summary>
/// 메인 폼
/// </summary>
public partial class MainForm : Form
{
//////////////////////////////////////////////////////////////////////////////////////////////////// Field
////////////////////////////////////////////////////////////////////////////////////////// Private
#region Field
/// <summary>
/// 포인트 시리즈
/// </summary>
private Points points;
#endregion
//////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
////////////////////////////////////////////////////////////////////////////////////////// Public
#region 생성자 - MainForm()
/// <summary>
/// 생성자
/// </summary>
public MainForm()
{
InitializeComponent();
Text = "Points 클래스 : GetVertAxis 필드를 사용해 Y축 설정하기";
this.treatNullsComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
this.treatNullsComboBox.Items.Add(TreatNullsStyle.DoNotPaint);
this.treatNullsComboBox.Items.Add(TreatNullsStyle.Ignore );
this.treatNullsComboBox.Items.Add(TreatNullsStyle.Skip );
this.treatNullsComboBox.SelectedIndex = 0;
this.tChart.Panel.Pen = new ChartPen(Color.Black);
this.points = new Points(this.tChart.Chart);
this.points.TreatNulls = TreatNullsStyle.DoNotPaint;
this.points.FillSampleValues(100);
Random random = new Random();
for(int i = 0; i < 30; i++)
{
int index = random.Next(0, 99);
points.SetNull(index);
}
this.treatNullsComboBox.SelectedIndexChanged += treatNullsComboBox_SelectedIndexChanged;
this.automaticVerticalAxisCheckBox.CheckedChanged += automaticVerticalAxisCheckBox_CheckedChanged;
}
#endregion
//////////////////////////////////////////////////////////////////////////////////////////////////// Method
////////////////////////////////////////////////////////////////////////////////////////// Private
//////////////////////////////////////////////////////////////////////////////// Event
#region NULL 처리 콤보 박스 선택 인덱스 변경시 처리하기 - treatNullsComboBox_SelectedIndexChanged(sender, e)
/// <summary>
/// NULL 처리 콤보 박스 선택 인덱스 변경시 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void treatNullsComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
TreatNullsStyle style = (TreatNullsStyle)this.treatNullsComboBox.SelectedItem;
this.points.TreatNulls = style;
this.tChart.Refresh();
}
#endregion
#region 자동 수직 축 체크 박스 체크 변경시 처리하기 - automaticVerticalAxisCheckBox_CheckedChanged(sender, e)
/// <summary>
/// 자동 수직 축 체크 박스 체크 변경시 처리하기
/// </summary>
/// <param name="sender">이벤트 발생자</param>
/// <param name="e">이벤트 인자</param>
private void automaticVerticalAxisCheckBox_CheckedChanged(object sender, EventArgs e)
{
this.points.GetVertAxis.Automatic = this.automaticVerticalAxisCheckBox.Checked;
if(!this.points.GetVertAxis.Automatic)
{
this.points.GetVertAxis.SetMinMax(0, 100);
}
this.tChart.Refresh();
}
#endregion
}
}
728x90
그리드형(광고전용)
'TeeChart > WinForm' 카테고리의 다른 글
[TEECHART/WINFORM] Shape 클래스 : Brush 속성을 사용해 브러시 이미지 설정하기 (0) | 2022.03.24 |
---|---|
[TEECHART/WINFORM] Shape 클래스 : Style 속성을 사용해 도형 추가하기 (0) | 2022.03.24 |
[TEECHART/WINFORM] Gantt 클래스 : Add/AddMultipleNextTasks 메소드 사용하기 (0) | 2022.03.24 |
[TEECHART/WINFORM] Gantt 클래스 사용하기 (0) | 2022.03.24 |
[TEECHART/WINFORM] Arrow 클래스 사용하기 (0) | 2022.03.24 |
[TEECHART/WINFORM] Points 클래스 사용하기 (0) | 2022.03.24 |
[TEECHART/WINFORM] HorizBar 클래스 : MultiBar/BarStyle 속성을 사용해 스택 수평 바 차트 만들기 (0) | 2022.03.23 |
[TEECHART/WINFORM] HorizLine 클래스 : Stairs 속성을 사용해 계단형 수평 라인 차트 만들기 (0) | 2022.03.23 |
[TEECHART/WINFORM] HorizArea 클래스 : MultiArea/Stairs 속성을 사용해 계단형 스택 수평 영역 차트 만들기 (0) | 2022.03.23 |
[TEECHART/WINFORM] Line 클래스 : Pointer 속성을 사용해 포인터 스타일 설정하기 (0) | 2022.03.23 |