ProEssentials VCL Charting components are used when creating stand-alone client-side EXEs to be distributed and ran on an end-users machine. This VCL Charting Walk-through includes instructions for Embarcadero Builder XE7 and should apply to later versions of Builder. For Delphi XE7 Click here for Delphi XE7
For help finding VCL specific features in our help system, the .Net Reference section is the best source for researching properties. Our help topics show VCL specific syntax in the OCX/VCL header near top of topic.
When installing ProEssentials, the setup program installs the ProEssentials 32 bit DLL into the System32 directory on 32 bit systems. On 64 bit systems, the 32 bit DLL is installed in SysWow64 and the 64 bit DLL is installed in System32.
The setup also installs the VCL files into the C:\ProEssentials9\Builder directory. The relevant files are:
The following information demonstrates how to create your first ProEssentials VCL Charting implementation using the C++ language. It discusses using the VCL components to add interactive scientific charting content to your EXEs. Please see the other charting examples provided within the product/evaluation.
1) Installing the VCL Charting components into Builder is accomplished by pointing Builder to the project file GIGASOFT.CBPROJ.
HOWEVER; If your Embarcadero IDE supports both Delphi and Builder personalities, please follow our Delphi Walkthrough as installing into Delphi is recommended and best supports Win32, Win64 and Builder projects.
From the top level Delphi menus, use [File / Close All] to make sure nothing is currently open.
From the top level Delphi menus, use [File / Open Project...] and find GIGASOFT.CBPROJ from Builder directory where you installed ProEssentials. The default location is c:/ProEssentials9/Builder
Once project opens, you will see a project pane as shown to the right. Right click near the top and select Install.
The PAS interfaces are compiled and ProEssentials components installed into the "Additional" tab.
After the components are installed into the IDE, use the [File / Close All] menu item and save the "Gigasoft" project when prompted.
2)Use [File / New / VCL Forms Application...]
2) When the new project opens, you will be presented the design view of "Form1 - Unit1.cpp".
3) Use the [Tools / Options...] menu to open the "Builder Options" Dialog. Add "c:\ProEssentials9\Builder" to the "Library path" field.
Repeat this process for the System Include path setting.
Repeat the library path setting for 64-bit Windows Platform if 64 bit is of interest.
4) Use the top menus, [View / Tool Palette...] menu to show the Tool Palette and click the PEGraph control from the Additional ToolBox.
Then click and drag a rectangle selection on Form1's canvas. Size the vcl chart control as needed.
The adjacent image shows what you see. 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.
To automatically maintain Form1 client area with chart, we can set the align property. Use the top menus, [View / Object Inspector] menu to show the Object Inspector and adjust the Align property for the PEgraph1 control to "alClient".
5) Using the Object Inspector, select "Form1" from top drop down listbox, select "Events" tab and find the "OnShow" event and double click the OnShow event.
Enter the code as shown below. You may copy and paste, but also try to write a few lines that use enums to see Delphi's intellisense. For example typing "PEGraph1->PlottingMethod = ::" should prompt the ePlottingMethod enum. If this does not work, or Pegvcl and PEGraph1 is not recognized, the Library Path setting set above likely had a mistake.
PEGraph1->MainTitle = "Hello World";
PEGraph1->SubTitle = "";
PEGraph1->Subsets = 2; // Subsets = Rows //
PEGraph1->Points = 6; // Points = Cols //
PEGraph1->YData = 10; PEGraph1->YData = 30;
PEGraph1->YData = 20; PEGraph1->YData = 40;
PEGraph1->YData = 30; PEGraph1->YData = 50;
PEGraph1->YData = 15; PEGraph1->YData = 63;
PEGraph1->YData = 74; PEGraph1->YData = 54;
PEGraph1->YData = 25; PEGraph1->YData = 34;
PEGraph1->PointLabels = "Jan"; PEGraph1->PointLabels = "Feb";
PEGraph1->PointLabels = "Mar"; PEGraph1->PointLabels = "Apr";
PEGraph1->PointLabels = "May"; PEGraph1->PointLabels = "June";
PEGraph1->SubsetLabels = "For .Net Framework";
PEGraph1->SubsetLabels = "or MFC, ActiveX, VCL";
PEGraph1->YAxisLabel = "Simple Quality Rendering";
PEGraph1->SubsetColors = PEGraph1->PEargb(60, 0, 180, 0);
PEGraph1->SubsetColors = PEGraph1->PEargb(180, 0, 0, 130);
// Quick way to set many colors via QuickStyle property //
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->FixedFonts = true;
PEGraph1->FontSize = ::gLarge;
// You will likely set these for all charts //
PEGraph1->PrepareImages = true;
PEGraph1->CacheBmp = true;
PEGraph1->RenderEngine = ::gDirect2D;
PEGraph1->AntiAliasGraphics = true;
PEGraph1->AntiAliasText = true;
// Setting this True will enable Data HotSpots, //
// but we need to add code to respond to hot spot event //
PEGraph1->AllowDataHotSpots = true;
// Always finish your property settings with this setting //
PEGraph1->PEactions = ::gReinitAndReset;
Your project code should look similar to...
6) The code above enabled the DataHotSpot event, so we should place some appropriate code in the DataHotSpot event.
Using the Object Inspector, select "PEGraph1" from top drop down listbox, select "Events" tab and find the "OnDataHotSpot" event and double click the OnDataHotSpot event.
Add the following code to the TForm1::PEGraph1DataHotSpot event.
UnicodeString uS = SubsetIndex;
UnicodeString uP = PointIndex;
UnicodeString uV = PEGraph1->YData[SubsetIndex][PointIndex];
ShowMessage("Subset " + uS + ", Point " + uP + " with a value of " + uV );
7) Save, Build All, and run the project. Your project will show an image as follows. Move the mouse over a bar and click to trigger the DataHotSpot event.
This completes this walkthrough.
Please read the remaining sections within Chapter 4 and review the demo code and documentation that's installed with the eval/product.
Once installed, the demo program can be accessed via shortcut...
Start / ProEssentials v9 / PeDemo
Note that our main charting demo is replicated in WPF and Winform C#.NET, VB.NET, VC++ MFC, Delphi, Builder all accessible from where you installed ProEssentials. These are great for modifying an existing demo to test potential modifications before implementing within your applications.
Thank you for researching. Please contact our engineers if you have a question.
Ihr Erfolg ist unser höchstes Ziel, indem wir Ihrem Unternehmen und Ihren Endbenutzern den einfachsten und professionellsten Nutzen bieten.
ProEssentials wurde von professionellen Elektroingenieuren erschaffen, die ihre eigenen Charting-Komponenten benötigten. Treten Sie unserer großen Liste von Top-Engineering-Unternehmen bei, die ProEssentials einsetzen.
Vielen Dank, dass Sie ein ProEssentials-Kunde sind, und vielen Dank, dass Sie die ProEssentials-Charting-Engine recherchieren.