0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++ builder XE4, 10.2 Tokyo > TeeChart > 最初の一歩 > グラフ作成まで

Last updated at Posted at 2015-10-23
動作確認
C++ Builder XE4 on Windows 7 pro
Rad Studio 10.2 Tokyo Update 2 (追記: 2017/12/27)

TeeChartでグラフをとりあえず作りたいという時の流れ。
よく忘れるのでメモ。

  1. フォームにTChartを追加
  2. TChartをダブルクリックして、Series > Addを選択
  3. Fast Lineを選択
  4. 以下のソースをFormCreate()に実装
#include <DateUtils.hpp>
...
	Chart1->Series[0]->XValues->DateTime = true;
	Chart1->BottomAxis->DateTimeFormat = L"nn:ss";

	TDateTime dt;

	dt = Now();

	double yval;
	for (int idx=0; idx < 10; idx++) {
		yval = (1+ idx) % 2;
		Series1->AddXY(dt, yval, "", clRed);
		dt = IncSecond(dt, 1);
	}

以上で横軸が時刻(mm:ss)のグラフがとりあえず作成できる。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?