기타 TeeChart - 라인 차트에서 포인트 표시하는 방법.
페이지 정보
본문
스티마 티차트(Steema TeeChart)에서 라인에 포인트를 표시하는 방법입니다.
using Steema.TeeChart;
using Steema.TeeChart.Styles;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
tChart1.Header.Text = "NGMsoftware";
Axis leftAxis = tChart1.Axes.Left;
leftAxis.AxisPen.Color = Color.Red;
leftAxis.Title.Font.Color = Color.Red;
leftAxis.Title.Font.Bold = true;
leftAxis.Title.Text = "Alarm count";
leftAxis.SetMinMax(0, 250);
Axis bottomAxis = tChart1.Axes.Bottom;
bottomAxis.AxisPen.Color = Color.Red;
bottomAxis.Title.Font.Color = Color.Red;
bottomAxis.Title.Font.Bold = true;
bottomAxis.Title.Text = "Date time";
Line line = new Line(tChart1.Chart);
line.Pointer.Style = PointerStyles.Circle;
line.Pointer.HorizSize = 5;
line.Pointer.VertSize = 5;
line.Pointer.Visible = true;
line.Add(1, 200);
line.Add(2, 100);
line.Add(3, 50);
line.Add(4, 150);
line.Add(5, 100);
line.Add(6, 100);
line.Add(7, 50);
line.Add(8, 150);
line.Add(9, 100);
}
}
}
포인트의 모양을 변경하려면 아래와 같이 포인터 스타일(PointerStyles)에서 변경할 수 있습니다.
개발자에게 후원하기
추천, 구독, 홍보 꼭~ 부탁드립니다.
여러분의 후원이 빠른 귀농을 가능하게 해줍니다~ 답답한 도시를 벗어나 귀농하고 싶은 개발자~
감사합니다~
추천0 비추천0
- 이전글마우스 클릭 매크로 만들기. (Create a mouse click macro.) 21.05.03
- 다음글나만의 매크로 프로그램 만들기. (비활성 마우스 클릭) 21.05.02
댓글목록
등록된 댓글이 없습니다.