From b4d87c4abf6ae5472ffc15989a25ddec590cf8de Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 15 Aug 2013 15:33:48 +0400 Subject: [PATCH] tchart_xlabel_intersection added --- cpp/tchart_xlabel_intersection/Unit1.cpp | 37 ++++ cpp/tchart_xlabel_intersection/Unit1.dfm | 40 ++++ cpp/tchart_xlabel_intersection/Unit1.h | 29 +++ .../tchart_xlabel_intersection.cbproj | 176 ++++++++++++++++++ .../tchart_xlabel_intersection.cpp | 35 ++++ .../tchart_xlabel_intersectionPCH1.h | 3 + 6 files changed, 320 insertions(+) create mode 100644 cpp/tchart_xlabel_intersection/Unit1.cpp create mode 100644 cpp/tchart_xlabel_intersection/Unit1.dfm create mode 100644 cpp/tchart_xlabel_intersection/Unit1.h create mode 100644 cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cbproj create mode 100644 cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cpp create mode 100644 cpp/tchart_xlabel_intersection/tchart_xlabel_intersectionPCH1.h diff --git a/cpp/tchart_xlabel_intersection/Unit1.cpp b/cpp/tchart_xlabel_intersection/Unit1.cpp new file mode 100644 index 0000000..dd6a899 --- /dev/null +++ b/cpp/tchart_xlabel_intersection/Unit1.cpp @@ -0,0 +1,37 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop + +#include "Unit1.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm1 *Form1; +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button1Click(TObject *Sender) +{ + TLineSeries *ser1 = new TLineSeries (NULL), + *ser2 = new TLineSeries (NULL), + *ser3 = new TLineSeries (NULL); + Chart1->AddSeries(ser1); + Chart1->AddSeries(ser2); + Chart1->AddSeries(ser3); + ser3->Pen->Style = psClear; + + size_t n = 1024; + + for (size_t i = 0; i < n; ++i) { + ser1->AddXY (5 * i, i / 5);//, "a"); + ser2->AddXY (5 * i + 1, 1 + i / 5);//, "b"); + + ser3->AddXY (5 * i, 100, "a"); + ser3->AddXY (5 * i + 1, 100, "b"); + } +} +//--------------------------------------------------------------------------- diff --git a/cpp/tchart_xlabel_intersection/Unit1.dfm b/cpp/tchart_xlabel_intersection/Unit1.dfm new file mode 100644 index 0000000..2520d63 --- /dev/null +++ b/cpp/tchart_xlabel_intersection/Unit1.dfm @@ -0,0 +1,40 @@ +object Form1: TForm1 + Left = 0 + Top = 0 + Caption = 'Form1' + ClientHeight = 471 + ClientWidth = 690 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + DesignSize = ( + 690 + 471) + PixelsPerInch = 96 + TextHeight = 13 + object Chart1: TChart + Left = 0 + Top = 0 + Width = 689 + Height = 473 + Title.Text.Strings = ( + 'TChart') + View3D = False + TabOrder = 0 + Anchors = [akLeft, akTop, akRight, akBottom] + ColorPaletteIndex = 13 + object Button1: TButton + Left = 16 + Top = 8 + Width = 75 + Height = 25 + Caption = 'Button1' + TabOrder = 0 + OnClick = Button1Click + end + end +end diff --git a/cpp/tchart_xlabel_intersection/Unit1.h b/cpp/tchart_xlabel_intersection/Unit1.h new file mode 100644 index 0000000..75c4eb1 --- /dev/null +++ b/cpp/tchart_xlabel_intersection/Unit1.h @@ -0,0 +1,29 @@ +//--------------------------------------------------------------------------- + +#ifndef Unit1H +#define Unit1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TChart *Chart1; + TButton *Button1; + void __fastcall Button1Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cbproj b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cbproj new file mode 100644 index 0000000..78fbcee --- /dev/null +++ b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cbproj @@ -0,0 +1,176 @@ + + + {12DF3B8A-44A8-4C6D-8E64-9E7104CD52AF} + 14.3 + VCL + Application + tchart_xlabel_intersection.cpp + True + Debug + Win32 + 1 + + + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + CppVCLApplication + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + rtl.lib;vcl.lib;Tee.lib;vclimg.lib + true + $(BDS)\bin\cbuilder_PROJECTICON.ico + <_TCHARMapping>wchar_t + JPHNE + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + true + true + $(BDSLIB)\$(PLATFORM)\release\$(LANGDIR);$(ILINK_TranslatedLibraryPath) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + true + JvBDE;JvGlobus;JvWizards;JvMM;JvManagedThreads;fs17;frx17;JvHMI;bindcompfmx;JvBands;vcldbx;fmx;rtl;dbrtl;IndySystem;TeeDB;JvDlgs;bindcomp;inetdb;JvCrypt;JvPluginSystem;vclib;inetdbbde;DBXInterBaseDriver;Tee;JclContainers;DataSnapCommon;JvCmp;JvNet;JvSystem;xmlrtl;JvDotNetCtrls;ibxpress;DbxCommonDriver;JvControls;vclimg;JvTimeFramework;IndyProtocols;dbxcds;MetropolisUILiveTile;JvXPCtrls;soaprtl;bindcompdbx;FMXTee;TeeUI;vclactnband;bindengine;bindcompvcl;vcldb;vcldsnap;Jcl;vclie;JvStdCtrls;JvCustom;JvJans;JvPageComps;JvPrintPreview;vcltouch;bcbsmp;websnap;CustomIPTransport;JvCore;dsnap;IndyIPServer;IndyCore;vcl;IndyIPCommon;dsnapcon;FmxTeeUI;frxDB17;inet;fsDB17;JclVcl;JvAppFrm;JvDB;JvPascalInterpreter;vclx;frxe17;inetdbxpress;webdsnap;JvRuntimeDesign;JclDeveloperTools;bdertl;JvDocking;dbexpress;adortl;bcbie;IndyIPClient;$(PackageImports) + $(BDS)\bin\default_app.manifest + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + false + true + false + true + _DEBUG;$(Defines) + false + None + DEBUG + true + true + true + true + Full + true + true + true + true + true + $(BDSLIB)\$(PLATFORM)\debug;$(ILINK_LibraryPath) + $(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath) + + + rtl.bpi;vcl.bpi;Tee.bpi;vclimg.bpi + + + NDEBUG;$(Defines) + None + + + + 0 + + + 1 + + +
Form1
+ dfm + Unit1.h + 2 +
+ + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + CPlusPlusBuilder.Personality.12 + CppVCLApplication + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + False + True + True + + + tchart_xlabel_intersection.cpp + + + + + True + + + 12 + + + +
diff --git a/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cpp b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cpp new file mode 100644 index 0000000..50c3412 --- /dev/null +++ b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersection.cpp @@ -0,0 +1,35 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#include +//--------------------------------------------------------------------------- +USEFORM("Unit1.cpp", Form1); +//--------------------------------------------------------------------------- +int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) +{ + try + { + Application->Initialize(); + Application->MainFormOnTaskBar = true; + Application->CreateForm(__classid(TForm1), &Form1); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + catch (...) + { + try + { + throw Exception(""); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/cpp/tchart_xlabel_intersection/tchart_xlabel_intersectionPCH1.h b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersectionPCH1.h new file mode 100644 index 0000000..d540360 --- /dev/null +++ b/cpp/tchart_xlabel_intersection/tchart_xlabel_intersectionPCH1.h @@ -0,0 +1,3 @@ +#include +#include +