C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[49851] Re:Re:[질문]Chart Tools의 Annotation tool 가 상용툴 인가요?
unitas [kjlee1] 1116 읽음    2007-07-10 13:49
답변 감사합니다.

Chart Tools의 Annotation tool 이란게 따로 구매를 해야 하는건가요?
아님 C++ Builder에 포함되어 있는건가요?

참고로 전 5.0을 사용하고 있거든요.



smleelms 님이 쓰신 글 :
: Chart Tools의 Annotation tool을 응용하시면 될것같네요.
: 혹 최근 Example이 있으시면 Tools - Annotation - Annotation Callout 을 한번 보시기 바랍니다.
: 그리고 샘플코드 일부 추가합니다.
:
: //---------------------------------------------------------------------------
: void __fastcall TAnnotationCO::SetCallout(int AIndex)
: {
:   // Change annotation text
:   ChartTool1->Text = "Point: "+IntToStr(AIndex)+TeeLineSeparator+
:                    "Value: "+Series1->ValueMarkText[AIndex];
:
:   // Re-position annotation callout
:   ChartTool1->Callout->Visible = true;
:   ChartTool1->Callout->XPosition = Series1->CalcXPos(AIndex);
:   ChartTool1->Callout->YPosition = Series1->CalcYPos(AIndex);
:   ChartTool1->Callout->ZPosition = 0;
: }
: //---------------------------------------------------------------------------
: // Returns Series point index that is nearest to xy position.
: int __fastcall TAnnotationCO::NearestPoint(TChartSeries *ASeries, int x, int y)
: {
:   int res = -1;
:   int Difference = -1;
:   int tmpDif;
:   for (int t=0; t<ASeries->Count(); t++)
:   {
:     tmpDif = int(TeeDistance(ASeries->CalcXPos(t)-x,ASeries->CalcYPos(t)-y));
:     if (Difference==-1 || tmpDif<Difference)
:     {
:       Difference = tmpDif;
:       res = t;
:     }
:   }
:   return res;
: }
: //---------------------------------------------------------------------------
: void __fastcall TAnnotationCO::Chart1MouseMove(TObject *Sender,
:       TShiftState Shift, int X, int Y)
: {
:   if (CheckBox1->Checked) // follow mouse
:   {
:     // Locate nearest point to mouse...
:     int tmp = NearestPoint(Series1, X, Y);
:     if (tmp!=-1) SetCallout(tmp);  // set annotation callout
:   }
: }
: //---------------------------------------------------------------------------

+ -

관련 글 리스트
49839 [질문]최대/최소값에 해당하는 x 좌표에 관해서.. [TChart] unitas 1382 2007/07/09
49850     Re:[질문]최대/최소값에 해당하는 x 좌표에 관해서.. [TChart] smleelms 1648 2007/07/10
49851         Re:Re:[질문]Chart Tools의 Annotation tool 가 상용툴 인가요? unitas 1116 2007/07/10
49855             Re:Re:Re:[질문]Chart Tools의 Annotation tool 가 상용툴 인가요? smleelms 1386 2007/07/10
49858                 Re:Re:Re:Re:[질문]5.0은 없네요. unitas 942 2007/07/10
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.