C++ Builder VCL Charting source-code adding charts to your EXE via VCL interface.

[ Builder C++ Development ]

The following demonstrates your first ProEssentials VCL C++ Builder Charting implementation. Though first...

  • See the new v8 demo (only 15 meg and uninstalls no problem.)
  • Charting Demo with three EXEs based on WPF, WinForm and native DLL.
  • Size, Shape, Right Click, Export, Zoom (especially date and log scales), Pan and Rotate.
  • Study the code to discover the ease of use.
  • Your company, team, vendors, and end-users deserve the best.
See the demo...
C++ Builder chart for finance engineering and  more Builder 3D Surface Charting

 

Installing into Builder is as simple as opening the the package file gigasoft.bpk. If your IDE supports both Delphi and Builder personalities, follow our Delphi walkthrough as installing into Delphi is recommended and supports Win32 and Win64 bit as well as Builder projects.

Open Gigasoft.dpk... Installation...



When running the ProEssentials setup, the setup program installs the ProEssentials DLL into system32 or SysWow64 on 64 bit systems. It also installs the ProEssentials VCL interfaces into C:\ProEssentials8\Builder and C:\ProEssentials\Delphi. Your relevant files are:

PEGRP32F.DLL

ProEssentials Pro DLL
GIGASOFT.BPK Builder Package File
GIGASOFT.CPP Builder to VCL helper file
PEGRPAPI.PAS ProEssentials Constants and Declarations
PEGVCL.PAS Graph Object
PESGVCL.PAS Scientific Graph Object
PE3DVCL.PAS 3D Scientific Graph Object
PEPSVCL.PAS Polar Object
PEPCVCL.PAS Pie Chart Object

PEGRPSF.DLL

ProEssentials Standard DLL
   

After setup completes, use the Builder menus File / Close All and then File / Open to open the file "GIGASOFT.BPROJ" found in the C:\ProEssentials8\Builder directory. You will see a project pane similar to shown at left. Right click near the top "gigasoft.bpl" and select Install. The interfaces are compiled and ProEssentials components registered into the "Additional" tab. We provide the PAS source incase you need to tinker with the interfaces.

Tools / Options... Dialog
Builder Lib and Include Paths should be updated to add ProEssentials' folder

Builder Lib for ProEssentials

After the components are installed into the Builder IDE, use the File / Close All menu item and save the "Gigasoft" package when prompted.

Use the File / New menu item to create a new VCL Forms Application project.

Use the Tools / Options... menu to open the "Builder" Dialog as shown to the left. Add "C:\ProEssentials8\Delphi" to the "Library path" field and select "OK".

Repeat the Tools/Options... settings to also adjust the "Include path" similar to the Library path.

With these steps, any project you create in Builder will find the ProEssentials VCLs, Units, Objs as needed.

 

Form1... Adding ProEssentials to a Form...

Chart first installed into Builder

Click the PEGraph control from the Additional ToolBox and then click and drag a rectangle selection on Form1's canvas. Size the vcl chart control as needed.

The adjacent image shows a similar result. This represents the default state of a ProEssentials Graph.

The default state has one subset with four data points. In the course of constructing your own charts, you'll set the properties Subsets and Points which define the quantity of data your chart will hold. You'll then pass data via the YData[subset][point] two dimensional property array. The following section shows example code of passing data. Note, if we were constructing a Scientific Graph (PESGraph1), we'd also set XData[subset][point].

ProEssentials uses the terms Subsets and Points but you can think of these as Rows and Columns. Passing data is as simple as filling each Subset with Points worth of data.

Unit1.pas...
Use Builder's Object Inspector to add the TForm1 FormShow event handler to the project.

Double clicking OnShow will auto generate this handler.

Builder FormShow event

Enter the code as shown below. Builder's code complete key strokes help resolving enums.

PEGraph1->MainTitle = "Hello World";
PEGraph1->SubTitle = "";
PEGraph1->Subsets = 2;
PEGraph1->Points = 6;
PEGraph1->YData[0][0] = 10; PEGraph1->YData[0][1] = 30;
PEGraph1->YData[0][2] = 20; PEGraph1->YData[0][3] = 40;
PEGraph1->YData[0][4] = 30; PEGraph1->YData[0][5] = 50;
PEGraph1->YData[1][0] = 15; PEGraph1->YData[1][1] = 63;
PEGraph1->YData[1][2] = 74; PEGraph1->YData[1][3] = 54;
PEGraph1->YData[1][4] = 25; PEGraph1->YData[1][5] = 34;
PEGraph1->PointLabels[0] = "Jan"; PEGraph1->PointLabels[1] = "Feb";
PEGraph1->PointLabels[2] = "Mar"; PEGraph1->PointLabels[3] = "Apr";
PEGraph1->PointLabels[4] = "May"; PEGraph1->PointLabels[5] = "June";
PEGraph1->SubsetLabels[0] = "For .Net Framework";
PEGraph1->SubsetLabels[1] = "or MFC, ActiveX, VCL";
PEGraph1->YAxisLabel = "Simple Quality Rendering";
PEGraph1->SubsetColors[0] = PEGraph1->PEargb(60, 0, 180, 0);
PEGraph1->SubsetColors[1] = PEGraph1->PEargb(180, 0, 0, 130);
PEGraph1->BitmapGradientMode = false;
PEGraph1->QuickStyle = gLightShadow;
PEGraph1->GraphPlusTable = gGraphPlusTable;
PEGraph1->DataPrecision = gNoDecimals;
PEGraph1->LabelBold = true;
PEGraph1->PlottingMethod = gBar;
PEGraph1->GradientBars = 8;
PEGraph1->BarGlassEffect = true;
PEGraph1->LegendLocation = gLegendLeft;
PEGraph1->DataShadows = gWithThreeD;
PEGraph1->FontSize = gLarge;
PEGraph1->PrepareImages = true;
PEGraph1->CacheBmp = true;
PEGraph1->RenderEngine = gDirect2D;
PEGraph1->AntiAliasGraphics = true;
PEGraph1->AntiAliasText = true;
PEGraph1->AllowDataHotSpots = true;
PEGraph1->PEactions = gReinitAndReset;

MainTitle and SubTitle are set first. Note that setting SubTitle to an empty string hides the subtitle.

Subsets and Points define the amount of data you'll be passing.

Next, we pass some random data into the YData[s][p] two dimensional property array.

PointLabels[0] sets the first data point label located below axis.

SubsetLabels[0] sets the first subset label.

Next, we set various other properties controlling visual aspects, and enable flicker free updates with PrepareImages.

Finally PEactions is set to gReinitAndReset which tells ProEssentials to initialize and resetimage the image, in other words, you're done setting properties.

Your code window will look similar to below...
C++ Builder Charting Code

Results... Congratulations...
Builder vcl charting results

Run your project and you'll see the resulting form.

Congratulations, you've just completed your first C++ Builder ProEssentials implementation.

 

Online developer reference

Complete online technical reference to the ProEssentials product. The .NET Reference is the best mechanism to navigate the large quantity of properties and features.  Walk-Throughs of charting in VB.NET, C#.NET, ASP, VC, VB6, and Delphi get you started quickly.

learn more about Delphi Charts, see Chapter 4

Online interactive demo

Financial, Engineering, Scientific, and Business examples give you an instant taste of ProEssentials' power.

view our online Charting Demo

Letter from the President

Thank you for researching. Call, email and let's talk charting.

Thank you.