ComponentOne Chart 8.0

ComponentOne Chart Control Overview

Chart Basics

Building a Chart

Programming User Interaction


Overview

Welcome to ComponentOne® Chart 8.0. ComponentOne Chart 8.0 provides a 2D and a 3D chart control that you can use in your Windows applications to provide your users with professional information display and manipulation capabilities.

ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of Chart 8.0 to try for as long as they wish. Those who like the product and find it useful may buy a license for a reasonable price. The only restriction is that unlicensed copies of Chart 8.0 will display a ComponentOne banner every time they are loaded to remind developers to license the product.

We are confident that you will like ComponentOne Chart 8.0. If you have any suggestions or ideas for new features that you'd like to see included in a future version, or ideas for new controls, please call us or write:

Corporate Headquarters

ComponentOne LLC
4516 Henry Street
Suite 500
Pittsburgh, PA 15213 USA
412.681.4343
412.681.4384 (Fax)

http://www.componentone.com


ComponentOne Chart Control Overview

2D and 3D Charting in OCX and DLL Formats

2D Chart Control

3D Chart Control

ComponentOne Chart OCX/DLL Control Model


2D and 3D Charting in OCX and DLL Formats

Each control is available as a distinct OCX and DLL custom control for 32-bit Windows applications.

The OCXs have a full object-based API that makes them easy to program with visual development environments like Visual Basic, Visual C++, or Delphi. The DLLs have a C API with MFC and OWL wrappers and can be used with any development environment that supports DLL custom controls.


2D Chart Control

Use the 2D Chart to display data as a bar, X-Y plot, area, stacking bar, pie, radar, filled radar, polar, candle, or combination chart. 2D Chart is optimized for real-time applications displaying rapidly changing data.


3D Chart Control

Use the 3D Chart to create 3D surface, contour, or bar charts that end-users can easily rotate, scale, or zoom interactively. 3D Chart can display 3D data in 15 basic surface or bar appearances and automatically generate contours and zones from the data.


ComponentOne Chart OCX/DLL Control Model

When choosing the control (2D or 3D) and format (OCX or DLL) for your applications, it is useful to understand the functionality and relationship between the DLL and OCX format of each control.

The DLL control is the “charting engine” for both the OCX and DLL. It stores the internal values of the chart’s properties and performs axis calculations and all low-level chart functions. The OCX builds on this charting engine, adding a fully object-based API, support for OLE automation, persistence, and an end-user Property Editor. The following diagram illustrates this relationship.


Quick Start Overview


Overview for OCX Programmers

ComponentOne Chart provides the following sample source code, sample chart description and data files, and documentation, to get you productive with the product as quickly as possible.

 | 2D Chart Location | 3D Chart Location
Demo Launcher | Handy program provides brief explanations about each demo and runs precompiled versions of the demos. Icon is located in the ComponentOne Chart Program Group.
Visual Basic Sample Code | CHART\2D\DEMOS\VB | CHART\3D\DEMOS\VB
Delphi Sample Code | CHART\2D\DEMOS\DELPHI | CHART\3D\DEMOS\DELPHI
Visual C++ Sample Code | CHART\2D\DEMOS\VC | CHART\3D\DEMOS\VC
Sample Charts | CHART\2D\SAMPLES | CHART\3D\SAMPLES
Sample Data | CHART\2D\DATA | CHART\3D\DATA
Documentation | Display context-sensitive online help from Visual Basic’s Object Browser or from the chart’s Property Editor. Online documentation is available as an icon in the ComponentOne Chart program group. The printed 2D / 3D OCX User’s Guide and Programmer’s Manual.

Directory paths are relative to the directory into which you installed ComponentOne Chart.


Overview for DLL Programmers

ComponentOne Chart provides the following sample source code, data files, and documentation, to get you productive with the product as quickly as possible.

 | 2D Chart Location | 3D Chart Location
Demo Launcher | Handy program provides brief explanations about each demo and runs precompiled versions of the demos. Icon is located in the ComponentOne Chart Program Group.
Include Files | INCLUDE | INCLUDE
LIB Files | LIB | LIB
Sample Code (SDK, MFC, OWL) | CHART\2D\DEMOS\DLL | CHART\3D\DEMOS\DLL
Sample Data | CHART\2D\DATA | CHART\3D\DATA
Documentation | Printed 2D /3D DLL User’s Guide & Programmer’s Manual Manuals available in Acrobat PDF format on the CD, in the \DLL-DOCS directory. They can be viewed or printed using Adobe Acrobat Reader, freely available from Adobe’s web site at: http://www.adobe.com/prodindex/acrobat/readstep.html

Directory paths are relative to the directory into which you installed ComponentOne Chart.


Using the Sample Code Makefiles

The makefiles supplied with the sample programs cannot be used as-is because they reference virtual drives. To use these makefiles without editing them, use the DOS SUBST command to create this virtual drive, as shown below:

SUBST X: C:\COMPONENTONE

(Windows 95/98/ME/2000 or Windows NT)
Visual C++ V5.0, or 6.0 (32-bit)


Installing ComponentOne Chart

Before You Begin

Be sure that your system and development environment are set up correctly before installing ComponentOne Chart. You must be able to create and run simple Windows applications before attempting to use ComponentOne Chart.

Minimum Requirements for ComponentOne Chart

Installing the ComponentOne Chart

ComponentOne Chart Files Installed

Removing ComponentOne Chart


Minimum Requirements for ComponentOne Chart

The following lists the minimum operating system and development environment version requirements for ComponentOne Chart. ComponentOne Chart does not add to the system requirements of your development environment.

Operating System | Windows 95, 98, ME, 2000 or Windows NT 3.51 or 4.0
OCX Development Environments | Any development environment that supports 32-bit OCX custom controls including: • Visual Basic 4 (32-bit) • Visual Basic 5 • Visual Basic 6 • Visual C++ 5.0, 6.0 • Delphi 4.0, 5.0 Client | Server • C++ Builder 3.0, 4.0
DLL Development Environments | Any development environment that supports 32-bit DLL custom controls including: • Visual C++ 5.0, 6.0 • Borland C++ 5.0 • MFC 4.x, OWL 2.5


Installing the ComponentOne Chart

To install the 32-bit version of ComponentOne Chart:

1.

Start Windows (if not already started). As a precaution, shut down any applications that may be currently running.

2.

If you have a previous version of ComponentOne Chart (OlectraChart) installed on your system, make sure you uninstall it before proceeding with the new installation.

3.

Insert the ComponentOne Chart 8.0 CD-ROM into a drive on your system. The installation program should launch automatically.

4.

In the Setup dialog, click the 32-bit Installation button. The appropriate setup program will start.

Follow the instructions on the screen to select the parts to install and where to install them. If you install either OCX, it is registered automatically.

Note:

If you are using Delphi 3.0 (or later), make sure you remove ComponentOne Chart from the Component Palette before proceeding with the installation.


ComponentOne Chart Files Installed

The setup program installs the product into C:\COMPONENTONE by default. Subdirectories contain the sample code and include files, constants files, and import libraries appropriate to the parts of the product you installed. The following files are placed in your Windows SYSTEM or SYSTEM32 directory if they do not exist or are older, depending on the parts of the product you installed:


OCX Installation

Support Files

OLEPRO32.DLL, COMDLG32.OCX, TABCTL32.OCX

2D Chart OCX

OLCH2X8.OCX

Online Help

OLCH2D8P.CHM, OLCH2D8U.CHM, OLCH2D8U.HLP, OLCH2D8U.CNT, OC2D8API.CHM

3D Chart OCX

OLCH3X8.OCX

Online Help

OLCH3D8P.CHM, OLCH3D8U.CHM, OLCH3D8U.HLP, OLCH3D8U.CNT, OC3D8API.CHM


DLL Installation

2D Chart DLL

OLCH2D8.DLL

3D Chart DLL

OLCH3D8.DLL


Removing ComponentOne Chart

To remove ComponentOne Chart from your system, run the automated “uninstall” program included with the product. Use the “Add/Remove Programs” icon located in the Control Panel.

If the program does not remove all of the files listed in the previous section, you may delete them manually. Take care not to remove support files that are needed by other applications on your system.


Adding the Chart 8.0 Controls to Visual Basic Projects

ComponentOne Chart 8.0 2D is the control used to add 2D Chart functionality to any Visual Basic project.

To use the Chart2D control, it must be added to the Visual Studio Toolbox:

Open the Visual Basic IDE (Microsoft's Integrated Development Environment). Make sure the Toolbox is visible (if necessary, select Toolbox in the View menu).

To set up the Chart2D control to appear on its own tab, right-click anywhere in the Toolbox and select Add Tab from the context menu. Enter a tab name, for example, “Chart2D”, in the dialog box. Select the new tab. Right-click the gray area under that tab and select Components from the context menu. The Components dialog box opens.

In the Components dialog box, find and select ComponentOne Chart 8.0 2D Control. Click OK.


End-User License Agreement

IMPORTANT-READ CAREFULLY: This End User License Agreement (this "EULA") contains the terms and conditions regarding your use of the SOFTWARE (as defined below). This EULA contains material limitations to your rights in that regard. You should read this EULA carefully and treat it as valuable property.

I. THIS EULA.

1.

Software Covered by this EULA. This EULA governs your use of the ComponentOne, LLC ("C1") software product(s) enclosed or otherwise accompanied herewith (individually and collectively, the "SOFTWARE"). The term "SOFTWARE" includes, to the extent provided by C1: 1) any revisions, updates and/or upgrades thereto; 2) any data, image or executable files, databases, data engines, computer software, or similar items customarily used or distributed with computer software products; 3) anything in any form whatsoever intended to be used with or in conjunction with the SOFTWARE; and 4) any associated media, documentation (including physical, electronic and on-line) and printed materials (the "Documentation").

2.

This EULA is a Legally Binding Agreement Between You and C1. If you are acting as an agent of a company or another legal person, such as an officer or other employee acting for your employer, then "you" and "your" mean your principal, the entity or other legal person for whom you are acting. However, importantly, even if you are acting as an agent for another, you may still be personally liable for violation of federal and State laws, such as copyright infringement.

This EULA is a legally binding agreement between you and C1. You intend to be legally bound to this EULA to the same extent as if C1 and you physically signed this EULA. By installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms and conditions contained in this EULA. If you do not agree to all of the terms and conditions contained in this EULA, you may not install or use the SOFTWARE. If, for whatever reason, installation has begun or has been completed, you should cancel installation or un-install the SOFTWARE, as the case may be. (You may click on the "exit" button or its equivalent to immediately abort installation.) If you do not agree to all of these terms and conditions, then you must promptly return the SOFTWARE to the place of business from which you obtained it in accordance with any return policies of such place of business. Return policies may vary between or among resellers, and you must comply with your particular reseller's return policies as agreed at the point of purchase. If the place of business from which you purchased the SOFTWARE does not honor a complete refund for a period of thirty (30) days from the date of proof of purchase, then you may return the SOFTWARE directly to C1 for a period of thirty (30) days from the date of your purchase. To return the product directly to C1, you must obtain a C1 Return Authorization Number by contacting C1, and you must forward all items purchased, including the proof of purchase, directly to C1. The return must be postage-prepaid, and post-marked within thirty (30) days from the proof of purchase, time being of the essence. The return option to C1 is only available to the original purchaser of an unopened factory packaged item.

II. YOUR LICENSE TO DEVELOP AND TO DISTRIBUTE.

As provided in more detail below, this EULA grants you two licenses: 1) a license to use the SOFTWARE to develop other software products (the "Development License"); and 2) a license to use and/or distribute the Developed Software (the "Distribution License"). Both of these licenses (individually and collectively, the "Licenses") are explained and defined in more detail below.

1.

Definitions. The following terms have the respective meanings as used in this EULA:

"Network Server" means a computer with one or more computer central processing units (CPU's) that operates for the purpose of serving other computers logically or physically connected to it, including, but not limited to, other computers connected to it on an internal network, intranet or the Internet. "Web Server" means a type of Network Server that serves other computers more particularly connected to it over an intranet or the Internet.

"Developed Software" means those computer software products that are developed by or through the use of the SOFTWARE. "Developed Web Server Software" means those Developed Software products that reside logically or physically on at least one Web Server and are operated (meaning the computer software instruction set is carried out) by the Web Server's central processing unit(s) (CPU). "Developed Legacy Software" means those Developed Software products that are not Developed Web Server Software, including, for example, stand-alone applications and applications accessed by a file server only. "Redistributable Files" means the SOFTWARE files or other portions of the SOFTWARE that are provided by C1 and are identified as such in the Documentation for distribution by you with the Developed Software. "Developer" means a human being or any other automated device using the SOFTWARE in accordance with the terms and conditions of this EULA.

"Developer Seat License" means that each Developer using or otherwise accessing the programmatic interface or the SOFTWARE must obtain the right to do so by purchasing a separate End User License. "Network Server CPU License" means that a separate End User License must be purchased for each CPU operating the computer software at issue in the reference.

“Source Code” shall mean computer software code or programs in human readable format, such as a printed listing of such a program written in a high-level computer language. The term "Source Code" includes, but is not limited to, documents and materials in support of the development effort of the SOFTWARE, such as flow charts, pseudo code and program notes.

2.

Your Development License. You are hereby granted a limited, royalty-free, non-exclusive right to use the SOFTWARE to design, develop, and test Developed Software, on the express condition that, and only for so long as, you fully comply with all terms and conditions of this EULA.

The SOFTWARE is licensed to you on a Developer Seat License basis.

The Developer Seat License means that you may perform a single install of the SOFTWARE for use in designing, testing and creating Developed Software by a single Developer on a single computer with a single set of input devices, so long as such computer is used only by one Developer. Conversely, you may not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part of it, where it is or may be used by more than one Developer unless you purchase an additional Development License for each Developer. You must purchase another separate license to the SOFTWARE in order to add additional developer seats, whether the additional developers are accessing the SOFTWARE in a stand-alone environment or on a computer network. If the SOFTWARE is used to create Developed Web Server Software, then you may perform a single install of the SOFTWARE for use in designing, testing and creating Developed Web Server Software by a single Developer on a single computer or Network Server, either with a single CPU only. An additional Network Server CPU License is required for each additional CPU on the single computer or Network Server, as the case may be, upon which the SOFTWARE and/or the Developed Web Server Software is installed and a separate license for each separate computer. That is, for Developed Web Server Software, if the computer or Network Server operating the SOFTWARE has 2 CPU's, then you would need to purchase one additional Network Server CPU License (beyond the one Developer Seat License granted in this EULA).

In all cases, you may not use C1's name, logo, or trademarks to market your Developed Software without the express written consent of C1; (b) you must include the following C1 copyright notice in your Developed Software documentation and/or in the "About Box" of your Developed Software, and wherever the copyright/rights notice is located in the Developed Software (“Portions Copyright © ComponentOne, LLC 1991-2002. All Rights Reserved.”); (c) agree to indemnify, hold harmless, and defend C1, its suppliers and resellers, from and against any claims or lawsuits, including attorney's fees that may arise from the use or distribution of your Developed Software; (d) you may use the SOFTWARE only to create Developed Software that is significantly different than the SOFTWARE.

3.

Your Distribution License.

a. License to Distribute Developed Legacy Software. Subject to the terms and conditions in this EULA, you are granted the license to use and to distribute Developed Legacy Software on a royalty-free basis, provided that the Developed Legacy Software incorporates the SOFTWARE as an integral part of the Developed Software in machine-language compiled format (customarily an ".exe", or ".dll", etc.). You may not distribute, bundle, wrap or subclass the SOFTWARE as Developed Software which, when used in a "designtime" development environment, exposes the programmatic interface of the SOFTWARE. You may distribute, on a royalty-free basis, Redistributable Files with Developed Legacy Software only.

b. License to Distribute Developed Web Server Software. Subject to the terms and conditions in this EULA, you are granted the license to use and to distribute Developed Web Server Software, provided that you must purchase one Network CPU License for each CPU operating the Developed Web Server Software (and/or Redistributable Files called or otherwise used directly by the Developed Web Server Software). You may purchase an additional Network CPU License by purchasing an additional separate End User License for the SOFTWARE; one Network CPU License is included in this EULA. Notwithstanding the foregoing, however, you may distribute or transfer, free of royalties, the Redistributable Files (and/or any Developed Legacy Software) to the extent that they are used separately on a single CPU on the client/workstation side of the network served by the Web Server.

4.

Specific Product Limitations. Notwithstanding anything in this EULA to the contrary, if the license you have purchased is for any of the following products, then the following additional limitations will apply:

a. C1 ReportDesigner. C1ReportDesigner includes at least: 1) one dynamic link library (c1.win.c1reportdesigner.dll) file known as C1ReportDesigner Component, 2) one executable (ReportDesigner.exe) file known as C1ReportDesigner Application and, 3) the Source Code of the C1ReportDesigner Application. The C1ReportDesigner Component is subject to the general terms and restrictions set forth in this EULA. The C1ReportDesigner Application is an executable file used to design and prepare reports; the C1ReportDesigner Application may be distributed, free of royalties, only in conjunction with the Developed Software.

Subject to the terms and conditions in this EULA, C1 hereby grants you the right to use the C1ReportDesigner Application Source Code. You are hereby also granted the right to modify such Source Code and to create derivative works that are based on the licensed Source Code. You may distribute the derivative works that you develop, solely in object code format and exclusively in conjunction with and/or as a part of the Developed Software. You are expressly not granted the right to distribute, disclose or otherwise make available to any third party the licensed Source Code, any modified version, derivative work, or any portion thereof, in source code format.

C1 shall retain all right, title and interest in and to the licensed Source Code, and all C1 updates, modifications or enhancements thereof. Nothing herein shall be deemed to transfer any ownership or title rights in and to the licensed Source Code from C1 to you.

SOURCE CODE IS LICENSED TO YOU AS IS. C1 DOES NOT AND SHALL NOT PROVIDE YOU WITH ANY TECHNICAL SUPPORT FOR YOUR SOURCE CODE LICENSE.

b. VS View Reporting Edition. VS View Reporting Edition includes at least one executable file listed as “VSRpt7.exe”, known as “Designer.” The file "VSRpt7.exe”, or any upgrade or future versions of the Designer, are subject to the restrictions set forth in this EULA and may not be distributed with your Developed Software or in any other way.

c. VSForum. VSForum is intended to be installed on a Network Server. C1 grants to you the following rights to the SOFTWARE: a) Installation: You may install one copy of the SOFTWARE on a single Network Server; b) Use: When installed and initialized, the SOFTWARE creates a database file which contains the embodiment of a discussion forum (the database hereinafter referred to as the "Forum"). You may use the SOFTWARE to create one Forum on one Network Server only, which server may be connected at any point to an unlimited number of workstations or computers operating on one or more networks. You are specifically NOT LICENSED to create or operate multiple Forums. To create or to operate more than one FORUM, you must purchase one additional SOFTWARE license for each additional Forum.

d. Doc-to-Help. You may use Doc-To-Help to create online help, manuals or other documentation in electronic or printed format (the "Output Documents"). You may distribute and incorporate in such Output Documents those files identified in the documentation as Redistributable Files. Except for those specific Redistributable Files, you MAY NOT distribute the SOFTWARE, in any format, to others.

e. Studio Products. You may not share the component parts of the Studio Products licensed to you with other Developers, nor may you allow the use and/or installation of such components by other Developers.

5.

Updates/Upgrades; Studio Subscription. Subject to the terms and conditions of this EULA, the Licenses are perpetual. Updates and upgrades to the SOFTWARE may be provided by C1 from time-to-time, and, if so provided by C1, are provided upon the terms and conditions offered at that time by C1 in its sole discretion. C1 may provide updates and upgrades to the SOFTWARE for free or for any charge, at any time or never, and through its chosen manner of access and distribution, all in C1's sole and complete discretion.

C1 licenses certain of its separately-licensed products bundled together in a product suite, called the C1 "Studio" product line (the "Studio Products"). The exact separately-licensed products that are bundled into the Studio Products may change from time-to-time in C1's sole discretion. If the SOFTWARE is identified as a C1 "Studio" product, then the SOFTWARE is one of the Studio Products. The SOFTWARE and the Studio Products are revised from time-to-time (meaning, for example, revised with updates, upgrades and, in the case of Studio products, possibly changes to which specific products are included in the bundle). For you to be entitled to receive any such revisions to the SOFTWARE or the Studio Products, as the case may be, you must have a valid SOFTWARE license or a valid Studio subscription. The original purchaser of the SOFTWARE or of a Studio product receives a one-year subscription from the date of purchase of the SOFTWARE. After one year, the Studio subscription and/or the SOFTWARE license must be renewed to continue to be entitled to receive the SOFTWARE and/or the Studio Products revisions as the case may be.

6.

Serial Number. Within the packaging of the SOFTWARE, a unique serial number (the "Serial Number") is included, which allows for the registration of the SOFTWARE. The Serial Number is subject to the restrictions set forth in this EULA and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number shall constitute a breach of this EULA, the effect of which shall be the automatic termination and revocation of all the rights granted herein.

7.

Evaluation Copy. If you are using an "evaluation copy" or similar version, specifically designated as such by C1 on its website or otherwise, then the Licenses are limited as follows: a) you are granted a license to use the SOFTWARE for a period of thirty (30) days counted from the day of installation (the "Evaluation Period"); b) upon completion of the Evaluation Period, you shall either i) delete the SOFTWARE from the computer containing the installation, or you may ii) contact C1 or one of its authorized dealers to purchase a license of the SOFTWARE, which is subject to the terms and limitations contained herein; and c) any Developed Software may not be distributed or used for any commercial purpose.

III. INTELLECTUAL PROPERTY.

1.

Copyright. You agree that all right, title, and interest in and to the SOFTWARE (including, but not limited to, any images, photographs, animations, video, audio, music, text, and “applets” incorporated into the SOFTWARE), and any copies of the SOFTWARE, and any copyrights and other intellectual properties therein or related thereto are owned exclusively by C1, except to the limited extent that C1 may be the rightful license holder of certain third-party technologies incorporated into the SOFTWARE. The SOFTWARE is protected by copyright laws and international treaty provisions. The SOFTWARE is licensed to you, not sold to you. C1 reserves all rights not otherwise expressly and specifically granted to you in this EULA.

2.

Backups. You may either: (a) copy the SOFTWARE solely for backup or archival purposes; or (b) install the SOFTWARE on a single computer, provided you keep the original solely for backup or archival purposes. Notwithstanding the foregoing, you may not copy the Documentation.

3.

General Limitations. You may not reverse engineer, decompile, or disassemble the SOFTWARE, except and only to the extent that applicable law expressly permits such activity notwithstanding this limitation.

4.

Software Transfers. You may not rent or lease the SOFTWARE. You may transfer the SOFTWARE to another computer, provided that it is completely removed from the computer from which it was transferred. You may permanently transfer all of your rights under the EULA, provided that you retain no copies, that you transfer all the SOFTWARE (including all component parts, the media and printed materials, any dates, upgrades, this EULA and, if applicable, the Certificate of Authenticity), and that the recipient agrees to the terms and conditions of this EULA as provided herein. If the SOFTWARE is an update or upgrade, any transfer must include all prior versions of the SOFTWARE.

5.

Termination. Without prejudice to any other rights it may have, C1 may terminate this EULA and the Licenses if you fail to comply with the terms and conditions contained herein. In such an event, you must destroy all copies of the SOFTWARE and all of its component parts.

6.

Export Restrictions. You acknowledge that the SOFTWARE is of U.S. origin. You acknowledge that the license and distribution of the SOFTWARE is subject to the export control laws and regulations of the United States of America, and any amendments thereof, which restrict exports and re-exports of software, technical data, and direct products of technical data, including services and Developed Software. You agree that you will not export or re-export the SOFTWARE or any Developed Software, or any information, documentation and/or printed materials related thereto, directly or indirectly, without first obtaining permission to do so as required from the United States of America Department of Commerce's Bureau of Export Administration ("BXA"), or other appropriate governmental agencies, to any countries, end-users, or for any end-uses that are restricted by U.S. export laws and regulations, and any amendments thereof, which include, but are not limited to, the following:

Restricted Countries: Restricted Countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, Montenegro, North Korea, Serbia, Sudan, and Syria.

Restricted End-Users: Any End-User whom you know or have reason to know will use SOFTWARE or Developed Software in the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons. Any national of any of the Restricted Countries, wherever located, who intends to transmit or transport the SOFTWARE or Developed Software to one of the Restricted Countries.

Restricted End-Uses: Any use of SOFTWARE and Developed Software related to the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons.

These restrictions change from time to time. You represent and warrant that neither the BXA nor any other United States federal agency has suspended, revoked or denied your export privileges. C1 acknowledges that it shall use reasonable efforts to supply you with all reasonably necessary information regarding the SOFTWARE and its business to enable you to fully comply with the provisions of this Section. If you have any questions regarding your obligations under United States of America export regulations, you should contact the Bureau of Export Administration, United States Department of Commerce, Exporter Counseling Division, Washington DC. U.S.A. (202) 482-4811, http://www.bxa.doc.gov.

7.

U.S. Government Restricted Rights. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. For solicitations issued before December 1, 1995, by the United States of America, its agencies and/or instrumentalities (the "Government"), other than the Department of Defense, the use, duplication or disclosure of the software and documentation provided to the Government under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at 48 CFR ch.1 52.227-19. For solicitations issued before September 29, 1995, by the Department of Defense, the use, duplication or disclosure of the software and documentation provided under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at 48 CFR ch.2 252.227-7013. You will comply with any requirements of the Government to obtain such RESTRICTED RIGHTS protection, including without limitation, the placement of any restrictive legends on the SOFTWARE, and any license agreement used in connection with the distribution of the SOFTWARE. Manufacturer is ComponentOne, LLC, 4516 Henry Street, Suite 501, Pittsburgh, Pennsylvania 15213 USA. For solicitations issued by the Government on or after December 1, 1995 and the Department of Defense on or after September 29, 1995, the only rights provided in the software and documentation provided herein shall be those contained in this EULA. Under no circumstances shall C1 be obligated to comply with any Governmental requirements regarding the submission of or the request for exemption from submission of cost or pricing data or cost accounting requirements. For any distribution of the SOFTWARE that would require compliance by C1 with the Government's requirements relating to cost or pricing data or cost accounting requirements, you must obtain an appropriate waiver or exemption from such requirements for the benefit of C1 from the appropriate Government authority before the distribution and/or license of the SOFTWARE to the Government.

IV. WARRANTIES AND REMEDIES.

1.

Limited Warranty. C1 warrants that the original media, if any, are free from defects for ninety (90) days from the date of delivery of the SOFTWARE. EXCEPT AS OTHERWISE PROVIDED IN THE PRECEDING SENTENCE, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, C1 EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE, DOCUMENTATION AND ANYTHING ELSE PROVIDED BY C1 HEREBY AND C1 PROVIDES THE SAME IN “AS IS” CONDITION WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION REMAINS WITH YOU. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS WHICH VARY FROM STATE TO STATE.

2.

Limited Remedy. C1's entire liability and your exclusive remedy under this EULA shall be, at C1's sole option, either (a) return of the price paid for the SOFTWARE; (b) repair the SOFTWARE through updates distributed online or otherwise in C1's discretion; or (c) replace the SOFTWARE with its reasonable, provided that you return the SOFTWARE in the same manner as provided in Section I.2 for return of the SOFTWARE for non-acceptance of this EULA. Any media for any repaired or replacement SOFTWARE will be warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer. THESE REMEDIES ARE NOT AVAILABLE OUTSIDE OF THE UNITED STATES OF AMERICA. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL C1 BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFIT, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF C1 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES IN CERTAIN CASES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

V. MISCELLANEOUS.

1.

This is the Entire Agreement. This EULA (including any addendum or amendment to this EULA included with the SOFTWARE) is the final, complete and exclusive statement of the entire agreement between you and C1 relating to the SOFTWARE. This EULA supersedes any prior and contemporaneous proposals, purchase orders, advertisements, and all other communications in relation to the subject matter of this EULA, whether oral or written. No terms or conditions, other than those contained in this EULA, and no other understanding or agreement which in any way modifies these terms and conditions, shall be binding upon the parties unless entered into in writing executed between the parties, or by other non-oral manner of agreement whereby the parties objectively and definitively act in a manner to be bound (such as by continuing with an installation of the SOFTWARE, "clicking-through" a questionnaire, etc.) Employees, agents and other representatives of C1 are not permitted to orally modify this EULA.

2.

You Indemnify C1. You agree to indemnify, hold harmless, and defend C1 and its suppliers and resellers from and against any and all claims or lawsuits, including attorney's fees, that arise or result from this EULA.

3.

Interpretation of this EULA. If for any reason a court of competent jurisdiction finds any provision of this EULA, or any portion thereof, to be unenforceable, that provision of this EULA will be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this EULA will continue in full force and effect. Formatives of defined terms shall have the same meaning of the defined term. Failure by either party to enforce any provision of this EULA will not be deemed a waiver of future enforcement of that or any other provision. Except as otherwise required or superseded by law, this EULA is governed by the laws of the Commonwealth of Pennsylvania, without regard to its conflict of laws principles. The parties consent to the personal jurisdiction and venue of the Commonwealth of Pennsylvania, in the County of Allegheny, and agree that any legal proceedings arising out of this EULA shall be conducted solely in such Commonwealth. If the SOFTWARE was acquired outside the United States, then local law may apply.


Redistributable Files

ComponentOne Chart 8.0 is developed and published by ComponentOne LLC. You may use it for development with Microsoft Visual Studio or any other programming environment. You may also distribute the following control files, royalty free, with any application you develop, as specified in the license agreement:

•

Olch2d8.dll

•

Olch2u8.dll

•

Olch3d8.dll

•

Olch3u8.dll

•

Olch2x8.ocx

•

Olch2u8.ocx

•

Olch3x8.ocx

•

Olch3u8.ocx

Groups of multiple developers may be interested in acquiring ComponentOne product site licenses. Please contact ComponentOne for details.

NOTE: When shipping your applications, we strongly suggest that you use a professional installation utility such as the Wise Installation System®, InstallShield®, or the setup wizard that ships with Microsoft Visual Basic 5.0 and later.


Technical Support

ComponentOne Chart is developed and supported by ComponentOne LLC, a company formed by the merger of APEX Software Corporation and VideoSoft. You can obtain technical support using any of the following methods:


ComponentOne Web Site

The ComponentOne Web site at www.componentone.com provides a wealth of information and software downloads for Chart users, including:

•

Descriptions of the various support options available through the ComponentOne Service Team.

•

Answers to frequently asked questions (FAQ's) about our products, organized by functionality. Please consult the FAQ's before contacting us directly, as this can save you time and also introduce you to other useful information pertaining to our products.

•

Free product updates, which provide you with bug fixes and new features.


Internet E-mail

For technical support through the Internet, e-mail us at:

support.chart@componentone.com

To help us provide you with the best support, please include the following information when contacting ComponentOne:

•

Your ComponentOne product serial number.

•

The version and name of your operating system.

•

Your development environment and its version.

For more information on technical support, go to:

www.componentone.com/support


Peer-to-Peer Newsgroup

ComponentOne also sponsors peer-to-peer newsgroups for users. ComponentOne does not offer formal technical support in this newsgroup, but instead sponsors it as a forum for users to post and answer each other's questions regarding our products. However, ComponentOne may monitor the newsgroups to ensure accuracy of information and provide comments when necessary. You can access the newsgroup from the ComponentOne Web site at http://www.componentone.com/newsgroups.


Chart Basics

Successful charting requires that you are familiar with basic chart processes and vocabulary, specifically as they relate to the 2D Chart control. The following topics cover basic information that anyone who uses 2D Chart should be familiar with.

Chart Terminology

Interacting with the Chart

Choosing the Chart Type

Understanding Data Layout

General Layout

Loading and Saving Charts and Data


Chart Terminology

The following shows the terms used to describe chart elements.

Note: Pie charts contain the same elements except for the axes.


Interacting with the Chart

You can interact with the chart as it is running to examine data more closely or visually isolate a part of the chart. The interactions described here affect the chart displayed inside the ChartArea; other chart elements like the header are not affected.

ComponentOne Chart provides users with 2 different mechanisms for zooming the chart: Graphics zoom and Axis zoom. Performing a Graphics zoom enlarges the selected area of a chart, while not necessarily showing the axes. Performing an Axis zoom changes the minimum and maximum data values to those selected, and redraws only that data with axes.

Special Notes

•

The keyboard/mouse combinations that perform the different interactions can be changed or removed by a programmer. The interactions described here may not be enabled for your chart.

•

Scaling, moving, or graphics zooming the chart sets the PlotArea margin properties, so the chart will not automatically control margins anymore when other chart properties change.

To Scale the Chart:

1.

Press CTRL, and hold down both mouse buttons (or middle button on 3-button mouse).

2.

Move the mouse down to increase chart size, or move the mouse up to decrease chart size.

To Move the Chart:

1.

Press SHIFT, and hold down both mouse buttons (or the middle button on 3-button mouse).

2.

Move the mouse to change the positioning of the chart inside the ChartArea.

To Graphics Zoom an Area of the Chart:

1.

Press CTRL, and hold down left mouse button.

2.

Drag mouse to select zoom area and release the mouse button.

To Axis Zoom the Chart:

1.

Press SHIFT, and hold down left mouse button.

2.

Drag the mouse to select the zoom area and release the mouse button.

To Rotate the Chart (Bar/Pie Charts Displaying 3D Effect Only):

1.

Hold down both mouse buttons (or middle button on 3-button mouse)

2.

Move mouse up or down to change the 3D inclination

3.

On bar charts, you can also move mouse left or right to change the 3D rotation angle

To Reset to Automatic Scale and Position:

Press the “r” key to remove all scaling, moving, and zooming effects; chart regains control of PlotArea margins.


Choosing the Chart Type

The 2D Chart can display data as one of 12 basic chart types. More specialized chart types, such as Pareto charts and Gantt charts, can also be created using one of the basic 12 types. A powerful feature of the chart is its ability to change the type of chart independently of the data or other properties. For example, the same data can be displayed as a plot and then later as a bar chart.

The following topics explain each of the chart types in detail.

Plot Charts

Area Charts

Bar Charts

Stacking Bar Charts

Pie Charts

Candle Charts

HiLo Charts

HiLoOpenClose Charts

Polar Charts

Radar Charts

Bubble Charts


Plot Charts

A plot chart draws each series as connected points of data. By customizing ChartStyles, you can remove the connecting lines to emphasize the data values themselves, or remove the points to emphasize the relationship between points. The series can be drawn independently, or stacked. You can also customize the line and symbol properties of each series.

Use the ChartGroup object’s IsStacked property to create a stacking Plot chart. Stacking charts represent the data by stacking the values for each series on top of the values from the previous series.

For more information on stacking charts, see Creating Stacking Charts.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Plot Chart 3D Effects

ComponentOne Chart’s 3D effects can be used with plot and stacked plot charts to create “ribbon” charts. A ribbon chart is simply a line graph that appears to have depth. By using the depth, elevation, rotation and shading properties, you can enhance your plot charts, making them stand out by creating visual depth as shown below.

To access the 3D view for a plot chart, activate the Property Editor View3D Page . The General Tab (View3D) allows you to modify the Depth, Elevation, Rotation and Shading properties by typing a value in the appropriate textbox.

The Depth property is the key to all 3D type chart logic. While the Elevation and Rotation properties modify the way a user views the chart, it is the Depth property that actually dictates whether a chart is 3D. By using a non zero value for the depth property and setting the elevation and rotation property values to zero, you have created a 3D chart even though nothing seems to have changed. In effect you are looking at the “front” edge of the chart which is visually represented as a line.

Note:

Ribbon charts do not support symbols. However, you will notice that the ribbon outlines (usually drawn in black) exist at each point. These lines can be removed by turning off the IsShowingOutlines property, located on the ChartArea Page of the Property Pages.


Area Charts

An area chart draws each series as connected points of data, filled below the points. Each series is drawn “on top” of the preceding series. The series can be drawn independently, or stacked. Using ChartStyles, you can customize the fill properties of each series.

Use the ChartGroup object’s IsStacked property to create a stacking Area chart. Stacking charts represent the data by stacking the values for each series on top of the values from the previous series.

For more information on stacking charts, see Creating Stacking Charts.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Area Chart 3D Effects

ComponentOne Chart’s 3D effects can be used with area charts or stacking area charts to create the illusion of depth with each data series. By using the depth, elevation, rotation and shading properties, you can enhance your area charts, making them stand out by creating visual depth as shown below.

To access the 3D view for an area chart, activate the Property Pages View3D Page . The General Tab (View3D) allows you to modify the Depth, Elevation, Rotation and Shading properties by typing a value in the appropriate textbox.

Note that the Depth property is the key to all 3D type chart logic. While the Elevation and Rotation properties modify the way a user views the chart, it is the Depth property that actually dictates whether a chart is 3D. By using a non zero value for the depth property and setting the elevation and rotation property values to zero, you have created a 3D chart even though nothing seems to have changed. In effect you are looking at the “front” surface of the chart which is visually represented in the same way as a standard area chart.


Bar Charts

A bar chart draws each series as a bar in a cluster. The number of clusters is the number of points in the data. Each cluster displays the nth data point in each series. Using ChartStyles, you customize the fill properties of each series. You can also customize bar cluster properties and 3D display properties.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.


Stacking Bar Charts

A stacking bar chart draws each series as a portion of a stacked bar cluster, the number of clusters being the number of points in the data. Each bar displays the nth data point in each series. Positive values are displayed above the X-axis, and negative values are displayed below the X-axis. Using ChartStyles, you customize the fill properties of each series. You can also customize bar cluster properties and 3D display properties.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Bar Chart 3D Effects

ComponentOne Chart’s 3D effects can be used with bar charts or stacking bar charts to create the illusion of depth with each data series. By using the depth, elevation, rotation and shading properties, you can enhance your bar charts, making them stand out by creating visual depth as shown below.

To access the 3D view for a bar chart, activate the Property Editor View3D Page . The General Tab (View3D) allows you to modify the Depth, Elevation, Rotation and Shading properties by typing a value in the appropriate textbox.

Note that the Depth property is the key to all 3D type chart logic. While the Elevation and Rotation properties modify the way a user views the chart, it is the Depth property that actually dictates whether a chart is 3D. By using a non zero value for the depth property and setting the elevation and rotation property values to zero, you have created a 3D chart even though nothing seems to have changed. In effect you are looking at the “front” surface of the chart which is visually represented in the same way as a standard bar chart.


Pie Charts

A pie chart draws each series as a slice in a pie. The number of pies is the number of points in the data. Each pie displays the nth data point in each series. Using ChartStyles, you customize the fill properties of each series. You can also customize special pie properties and 3D display properties.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups)on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Pie Chart 3D Effects

ComponentOne Chart’s 3D effects can be used with pie charts to create the illusion of depth. By using the depth, elevation, rotation and shading properties, you can enhance your pie charts, making them stand out by creating visual depth as shown below.

To access the 3D view for a pie chart, activate the Property Editor View3D Page . The General Tab (View3D) allows you to modify the Depth, Elevation, Rotation and Shading properties by typing a value in the appropriate textbox.

Note that the Depth property is the key to all 3D type chart logic. While the Elevation and Rotation properties modify the way a user views the chart, it is the Depth property that actually dictates whether a chart is 3D. By using a non zero value for the depth property and setting the elevation and rotation property values to zero, you have created a 3D chart even though nothing seems to have changed. In effect you are looking at the “top” surface of the chart which is visually represented in the same way as a standard pie chart.


Candle Charts

A candle chart is a special type of HiLoOpenClose Chart used in financial applications to show the opening, closing, high and low prices of a given stock. The "candle" (the solid bar between the opening and closing values) represents the change in stock price from opening to closing. With simple candle charts, a filled candle indicates a rising stock price (close was higher than open), and a hollow candle indicates a falling stock price (open was higher than close). With complex candle charts, the series2 FillColor represents a rising stock price, and the series3 FillColor represents a falling stock price.

Using ChartStyles, you can customize the fill and line properties of each series.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups)on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Programming Considerations

The four different series used to draw a candle chart creates a "logical" data set. When programming chart labels, point and set labels and markers, make sure you refer to this logical data set, and not the individual series themselves. For example, if there are 8 series forming 2 different candles, series 0 refers to the first logical data set, and series 1 refers to the second logical data set.


HiLo Charts

A HiLo chart combines 2 series to form a logical data set. HiLo charts are used primarily in financial applications to show the high and low price for a given stock. The first series of each pair in a HiLo chart represents the "high" value, and the second represents the "low" value.

Using ChartStyles, you can customize the fill and line properties of each series.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Programming Considerations

The 2 different series used to draw a HiLo chart creates a "logical" data set. When programming chart labels, point and set labels and markers, make sure you refer to this logical data set, and not the individual series themselves. For example, if there are 4 series forming 2 different HiLo bars, series 0 refers to the first logical data set, and series 1 refers to the second logical data set.


HiLoOpenClose Charts

HiLoOpenClose charts are similar to HiLo charts except that they combine 4 series to form a logical data set. In addition to showing the high and low value of a stock, the third and fourth series represent the stock's opening and closing price, respectively.

Using ChartStyles, you can customize the fill and line properties of each series.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. Use the ChartType dropdown to select the appropriate chart.

Programming Considerations

The 4 different series used to draw a HiLoOpenClose chart creates a "logical" data set. When programming chart labels, point and set labels and markers, make sure you refer to this logical data set, and not the individual series themselves. For example, if there are 8 series forming 2 different HiLoOpenClose bars, series 0 refers to the first logical data set, and series 1 refers to the second logical data set.


Polar Charts

A polar chart draws the x and y coordinates in each series as (theta,r), where theta is amount of rotation from the origin and r is the distance from the origin. theta may be specified in either degrees (default), radians or grads. Since the x-axis is a circle, the x-axis maximum and minimum values are fixed. The series can be drawn independently, or stacked.

Using ChartStyles, you can customize the line and symbol properties of each series.

Use the ChartGroup object’s IsStacked property to create a stacking Polar chart. Stacking charts represent the data by stacking the values for each series on top of the values from the previous series.

For more information on stacking charts, see Creating Stacking Charts.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages.


Radar Charts

A radar chart draws the y value in each data set along a radar line (the x value is ignored). If the data set has n points, then the chart plane is divided into n equal angle segments, and a radar line is drawn (representing each point) at n/360 degree increments. By default, the radar line representing the first point is drawn vertically (at 90 degrees). The series can be drawn independently, or stacked.

Using ChartStyles, you can customize the line and symbol properties of each series.

Use the ChartGroup object’s IsStacked property to create a stacking Radar chart. Stacking charts represent the data by stacking the values for each series on top of the values from the previous series.

For more information on stacking charts, see Creating Stacking Charts.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages.

Filled Radar Charts

A filled radar chart draws the y value in each data set along a radar line (the x value is ignored). If the data set has n points, the chart plane is divided into n equal angle segments, and a radar line is drawn (representing each point) at n/360 degree increments. Each series is drawn "on top" of the preceding series. The series can be drawn independently, or stacked. Filled radar charts are the same as Radar charts, except that the area between the origin and the points is filled.

Using ChartStyles, you can customize the fill and line properties of each series.

Use the ChartGroup object’s IsStacked property to create a stacking Radar chart. Stacking charts represent the data by stacking the values for each series on top of the values from the previous series.

For more information on stacking charts, see Creating Stacking Charts.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages.


Bubble Charts

A bubble chart combines 2 series to draw a plot chart with varying point sizes. Bubble charts are used to represent an additional data value at each point by changing its size. The first series determines the cartesian position (as in a plot chart), and the Y-values from the second series determine the size of the bubble at each point. The size of the points can be encoded according to area or diameter. Using ChartStyles, you can specify the symbol style and color, and whether connecting lines appear.

To Change the Chart Type

Use the ChartType property to set the chart type for one ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages.

Programming Considerations

The 2 different series used to draw a Bubble chart create a "logical" data set. When programming chart labels, point and set labels and markers, make sure you refer to this logical data set, and not the individual series themselves. For example, if there are 4 series forming 2 different Bubble chart plots, series 0 refers to the first logical data set, and series 1 refers to the second logical data set.


Understanding Data Layout

The 2D Chart displays data supplied in one of two basic layouts, Array and General. Data can come from many different sources, one common source being a data file. You can load and save data files, and customize the data itself, using the Property Editor.


Array Layout

Use Array layout with bar, stacking bar, HiLo, HiLoOpenClose, candle, radar, filled radar and pie charts. Plots, polar and area charts can also use Array data when the Y-values in their series share common X-values.

The important Array layout characteristics illustrated above are:

•

The X-values of the points in each series are common to all series.

•

Each series contains the same number of points (although by using a data hole, a series can appear to have fewer points).

Note

When using Array data, do not try to set separate X values for each series, since each series shares common X values.


General Layout

Use General layout with plots, polar area charts. Candle, bar, stacking bar, HiLo, HiLoOpenClose, radar, filled radar and pie charts cannot display General data.

The important General layout characteristics illustrated above are:

•

The points in each series have their own X- and Y-values.

•

Each series can contain a different number of points.

To Load and Save Data Files:

Use the Load and Save buttons, located on the Data Tab (ChartGroups) on the Property Pages, to load and save data files.

To Edit Data:

•

Use the Layout, Hole, NumSeries, and NumPoints properties to set the format, size, and hole value for the data. Use the ThisSeries and ThisPoint properties to select a specific data point, and edit the values of the XValue and YValue properties. These properties are also located on the Data Tab (ChartGroups) on the Property Pages.

•

Use the Edit Chart Series dialog to add, remove, hide or show a data series. Access this dialog by clicking the Series button on the Data Tab (ChartGroups) on the Property Pages.

•

Use the Edit Chart Data dialog to edit X and Y values. Access this dialog by clicking the Data button on the Data Tab (ChartGroups) on the Property Pages.


Loading and Saving Charts and Data

The two main components of any chart are the data it’s displaying and the properties that control its appearance. You can save the current chart data and load new chart data from a file. You can also load and save chart descriptions, which are settings for all of the chart properties.

ComponentOne Chart includes sample chart descriptions and data files that you can use as templates to build a more highly-customized chart.


To Load and Save Data:

Use the Load and Save buttons on the Data Tab (ChartGroups) on the Property Pages to load and save data. See Understanding Data Layout for information on data layouts.


To Load and Save Chart Descriptions:

Use the Load and Save buttons on the General Tab (Control) on the Property Pages to load and save chart descriptions.


Overview of 2D Property Pages

The ComponentOne Chart Property Pages provide an easy-to-use designer that enables you to visually specify chart properties and collections. All property page and sub-tab descriptions include methods to access the properties from within the property page dialog and from code.

Accessing the Property Pages

Control Page

Axes Page

ChartGroups Page

ChartStyles Page

Titles Page

Legend Page

ChartArea Page

PlotArea Page

ChartLabels Page

View3D Page

Markers Page

AlarmZones Page


Accessing the Property Pages

Right-click anywhere on the ComponentOne Chart control at design time to display the context menu, which is a superset of the context menu that Visual Basic provides for all ActiveX controls.

To access the property pages, select Properties… from the context menu. This will display the property pages dialog.

You can also display the property pages by selecting (Custom) from the Visual Basic Properties window. To accept the changes made on any page, click the OK button at the bottom of the property page dialog. Click Cancel to discard any changes. The property pages dialog will be closed after you click OK or Cancel.

You can also click the Apply button to commit your changes without closing the dialog, which allows you to continue making changes on that property page. Note that selecting a different property page tab will also commit any changes that you made.


Immediate Feedback Model

As you edit properties, the changes are immediately applied to the chart and displayed. This enables you to quickly see how a change affects the chart so that you can make further changes without leaving the Property Pages. However, once you have changed a property the only way to “undo” it is to change the property back to its previous value.


Editing Chart Properties

1.

Select the tab that corresponds to the element of the chart that you want to edit. Tabs contain one or more inner tabs that group related properties together. Some tabs also contain a list that selects a specific object to edit.

2.

If the tab contains a list on the left side, select the specific object to edit from that list.

3.

Select the inner tab that corresponds to the kind of property you want to edit.

4.

Click on a control and change the value of that property. The change is immediately applied to the chart and displayed unless the IsBatched property, located on the General Tab (Control), is set. When IsBatched is set, click the Apply button to display property changes.

5.

Make further changes to the same property or change other properties on this tab or other tabs.

For related information, see Chart Terminology.


Collection Items in Code

Many of the code examples illustrated in the Property Page documentation include collection element variables represented by Item. For example:

Chart2D.ChartArea.Axes.Item(ii).AnnotationMethod

In code, (ii) should be replaced by a specific collection element.

For more information, see Using Collections with Objects and Accessing Each of the Elements of a Collection.


Control Page

The Control Page contents deal with general overlapping properties that are related to various charts. These properties include, loading and saving ComponentOne Chart description files, choosing border types, colors and attached images.

General Tab (Control)

Border Tab (Control)

Interior Tab (Control)

Image Tab (Control)

About Tab (Control)


General Tab (Control)

When selected (checked), the IsBatched checkbox sets the IsBatched property so that it does not allow changes to the chart to be displayed on the screen.

Chart2D.IsBatched

When selected (checked), the IsDoubleBuffered checkbox sets the IsDoubleBuffered property so that it buffers changes, allowing images on the screen update as smoothly as possible.

Chart2D.IsDoubleBuffered

The Load… command button allows you to load previously created ComponentOne Chart description files. This feature allows you to reuse settings from previous charts.

Chart2D.Load

The Save… command button allows you to save the property settings as a ComponentOne Chart description file.

Chart2D.Save

The Reset command button restores the chart to its default settings, including data.

Chart2D.Reset


Border Tab (Control)

The Type: dropdown box allows you to choose one of the pre-set BorderType properties to be drawn around the entire chart. If this option is disabled, you cannot change the border type for this area.

Chart2D. Border.Type

The Width: textbox allows you to set the width of the border in pixels.

Chart2D. Border.Width

For more information, see Using Borders.


Interior Tab (Control)

Background Color Area

The RGB: textbox lists the RGB value of the of specified background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the active chart area.

Chart2D.Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the specified foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the active chart area.

Chart2D.Interior.ForegroundColor

For more information, see Setting Colors.


Image Tab (Control)

The File: textbox lists the current image (including path) used in the background of the chart. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the chart.

Chart2D.Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the text area where the image is used will be sized according to the image.

Chart2D.Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the chart and clears the File textbox.

For more information, see Adding Images to Chart Elements.


About Tab (Control)

The About Tab displays information about the 2D chart control, including the version and serial number.


Axes Page

This page allows you to modify the chart’s axes. You can modify each axis by highlighting a specific axis in the left pane then choosing the inner tab and property you wish to change.

General Tab (Axes)

Annotation Tab (Axes)

Scale Tab (Axes)

Title Tab (Axes)

Axis/GridLines Tab (Axes)

AxisStyle Tab (Axes)

GridStyle Tab (Axes)

Font Tab (Axes)

Polar/Radar Tab (Axes)


General Tab (Axes)

When selected (checked), the IsShowing checkbox sets the IsShowing property so that the X-axis or Y-axis is visible.

Chart2D.ChartArea.Axes.Item(ii).IsShowing

When selected (checked), the IsLogarithmic checkbox sets the IsLogarithmic property so that it interprets the selected axis logarithmically (log base 10) instead of linearly.

Chart2D.ChartArea.Axes.Item(ii).IsLogarithmic

For more information, see Logarithmic Axes.

When selected (checked), the IsReversed checkbox sets the IsReversed property so that the selected axis is reversed.

Chart2D.ChartArea.Axes.Item(ii).IsReversed

When selected (checked), the Is100Percent checkbox sets the Is100Percent property so that all stacking bars are the same height and each series is scaled to equal 100 percent. Note: This property only works with Stacking Bar Charts.

Chart2D.ChartArea.Axes.Item(ii).Is100Percent


Annotation Tab (Axes)

The Anno. Meth.: dropdown allows you to change how the axis in question is annotated. The ellipsis button next to the textbox allows you to specify additional annotation information such the number spacing, tick spacing, precision and how the annotation is formatted.

Chart2D.ChartArea.Axes.Item(ii).AnnotationMethod

The Anno. Place.: dropdown allows you to change the placement of the annotation. If this option is disabled, it does not apply to the selected axis.

Chart2D.ChartArea.Axes.Item(ii).AnnotationPlacement

The Origin Place.: dropdown allows you to change the placement of the x or y axis origin. If this option is disabled, it does not apply to the selected axis.

Chart2D.ChartArea.Axes.Item(ii).OriginPlacement

The Anno. Rot.: textbox allows you to specify the angle of rotation for the annotation text.

Chart2D.ChartArea.Axes.Item(ii).AnnotationRotationAngle

The NumMeth.: dropdown allows you to change the numbering method so that the values can be rounded.

Chart2D.ChartArea.Axes.Item(ii).NumMethod

The Y Mult.: textbox allows you to specify a second Y-axis to the right of the chart. It creates values for a second Y-axis (Y2) by multiplying Y-axis numbering by this value. This option is only enabled for the Y2-axis.

Chart2D.ChartArea.Axes.Item(ii).Multiplier

The Y Const.: textbox allows you to adjust the vertical position of the second Y-axis in relation to the X-axis.

Chart2D.ChartArea.Axes.Item(ii).Constant

For more information, see Axis Annotation Overview.


Scale Tab (Axes)

The DataMax: textbox allows you to specify the maximum value data for each of the axes. When the IsDefault checkbox is checked, the chart automatically controls the maximum data for that axis.

Chart2D.ChartArea.Axes.Item(ii).DataMax

The DataMin: textbox allows you to specify the minimum value data for each of the axes. When the IsDefault checkbox is checked, the chart automatically controls the minimum data for that axis.

Chart2D.ChartArea.Axes.Item(ii).DataMin

The Max: textbox allows you to specify the maximum value of the specific axis itself. When the IsDefault checkbox is checked, the chart automatically controls the maximum value for that axis.

Chart2D.ChartArea.Axes.Item(ii).DataMax.Value

The Min: textbox allows you to specify the minimum value of the specific axis itself. When the IsDefault checkbox is checked, the chart automatically controls the minimum value for that axis.

Chart2D.ChartArea.Axes.Item(ii).DataMin.Value

The Origin: textbox allows you to specify the location of the origin for each axis. When the IsDefault checkbox is checked, the chart automatically controls the origin of the axis.

Chart2D.ChartArea.Axes.Item(ii).OriginPlacement


Title Tab (Axes)

The Text: textbox allows you to specify a title for each of your axes.

Chart2D.ChartArea.Axes.Item(ii).Title.Text

The Title Rot.: dropdown box allows you to modify the position of your titles.

Chart2D.ChartArea.Axes.Item(ii).TitleRotation

Note: Titles on the X-axis cannot be rotated.

The TitleFont: ellipsis button allows you to select a font for your title.

Chart2D.ChartArea.Axes.Item(ii).TitleFont

For more information, see Titling Axes and Rotating Axis Elements.


Axis/GridLines Tab (Axes)

When selected (checked), the IsStyleDefault checkbox returns the axis tick line to the default length.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.IsStyleDefault

The Tick Length: textbox allows you to specify the length of the tick marks along the axis.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.TickLength

Gridlines Area

When selected (checked), the IsStyleDefault checkbox returns the GridStyle to the default. If this option is disabled, it does not apply to the selected axis.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.IsStyleDefault

The Spacing: textbox allows you to specify the increment between each gridline.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.Spacing.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the spacing. If this option is disabled, it does not apply to the selected axis.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.Spacing.IsDefault

When selected (checked), the IsOnTop checkbox causes the gridlines to display on top of the chart.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.IsOnTop

For more information, see Adding Grid Lines.


AxisStyle Tab (Axes)

The Pattern: dropdown allows you to change the line pattern for each of the axes.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Pattern

The Width: textbox allows you to specify the thickness of the axis line.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Width

Color Area

The RGB: textbox lists the RGB value of the of the specified axis line. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the axis line.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Color


GridStyle Tab (Axes)

The Pattern: dropdown allows you to change the line pattern for the actual gridlines.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.Style.Pattern

The Width: textbox allows you to specify the thickness of the actual gridlines.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.Style.Width

Color Area

The RGB: textbox lists the RGB value of the gridlines for the specific axis. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the gridlines.

Chart2D.ChartArea.Axes.Item(ii).MajorGrid.Style.Color


Font Tab (Axes)

The Description: textbox lists the font type and font size being used by the axis text. The ellipsis button to the right of the textbox opens the font browser.

Chart2D.ChartArea.Axes.Item(ii).Font.Name

Chart2D.ChartArea.Axes.Item(ii).Font.Size

Chart2D.ChartArea.Axes.Item(ii).Font.Bold

Chart2D.ChartArea.Axes.Item(ii).Font.Italic

Chart2D.ChartArea.Axes.Item(ii).Font.Underline

Chart2D.ChartArea.Axes.Item(ii).Font.Strikethrough

Chart2D.ChartArea.Axes.Item(ii).Font.Weight

Chart2D.ChartArea.Axes.Item(ii).Font.Charset

For more information, see Choosing Fonts.


Polar/Radar Tab (Axes)

The Origin Base: textbox allows you to specify the number of degrees along the Y-axis to place the X-axis.

Chart2D.ChartArea.Axes.Item(ii).Origin.Value

The Anno. Angle: textbox allows you to specify the Y-axis annotation angle.

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Y-axis annotation angle.

Chart2D.ChartArea.Axes.Item(ii).Origin.IsDefault

For more information, see Special Polar Chart Properties.


ChartGroups Page

This page allows you to modify the various ChartGroups. You can modify each ChartGroup by highlighting a specific item in the left pane then choosing the inner tab and property you wish to change.

General Tab (ChartGroups)

Data Tab (ChartGroups)

Bar Tab (ChartGroups)

Bubble Tab (ChartGroups)

Pie Tab (ChartGroups)

HiLoOpenClose Tab (ChartGroups)

Candle Tab (ChartGroups)

Polar Tab (ChartGroups)

Labels Tab (ChartGroups)

Internet Tab (ChartGroups)

Binding Tab (ChartGroups)


General Tab (ChartGroups)

The ChartType: dropdown allows you to change the specific type of chart used for each ChartGroup.

Chart2D.ChartGroups.Item(ii).ChartType

The DrawingOrder: dropdown allows you to specify the order that the selected ChartGroup is drawn.

Chart2D.ChartGroups.Item(ii).DrawingOrder

When selected (checked), the IsStacked checkbox sets the IsStacked property so that the chart values are stacked. Note: This property is available for plot, area, polar, radar and filled radar charts.

Chart2D.ChartGroups.Item(ii).IsStacked


Data Tab (ChartGroups)

The Layout: dropdown specifies the format of the chart data. Note: Changing Layout deletes any data displayed in the chart.

Chart2D.ChartGroups.Item(ii).Layout

The Hole: textbox specifies the value that represents missing data values, or holes.

Chart2D.ChartGroups.Item(ii).Data.HoleValue

The NumSeries: textbox specifies the number of series in the data.

Chart2D.ChartGroups.Item(ii).Data.NumSeries

The NumPoints: textbox specifies the number of points in the data.

Chart2D.ChartGroups.Item(ii).Data.NumPoints

The XValue: textbox list the X data value at ThisSeries and ThisPoint. You can edit this value.

Chart2D.ChartGroups.Item(ii).Data.X

The YValue: textbox lists the Y data value at ThisSeries and ThisPoint. You can edit this value.

Chart2D.ChartGroups.Item(ii).Data.Y

The ThisSeries: textbox selects a data series to view or edit. Use with ThisPoint to select a particular data point. XValue and YValue display the X and Y coordinates at this series/point.

The ThisPoint: textbox selects a data point to view or edit. Use with ThisSeries to select a particular data point. XValue and YValue display the X and Y coordinates at this series/point.

The Load… button allows you to load new data into the selected ChartGroup.

Chart2D.ChartGroups.Item(ii).Data.Load

The Save… button allows you to save the selected ChartGroup’s data to a file.

Chart2D.ChartGroups.Item(ii).Data.Save

The Edit… button allows you to edit the 2D chart data in the Edit 2D Chart Data window.

The Series… button allows you to show, hide or exclude each data series in a chart.

Chart2D.ChartGroups.Item(ii).Data.SeriesDisplay

The Sort button allows you to sort the points in each series from lowest to highest X value.

Chart2D.ChartGroups.Item(ii).Data.Sort


Edit Chart 2D Series

Chart2D Series Editor Using Array Layout with Option Menu

Use the down/up arrow keys or mouse click to select the appropriate cell of a specific series. If using the mouse, you may scroll the selections using the scroll bar. If keys are used, the scrolling will take place automatically.

Use a right mouse click to bring up the SeriesDisplay values for the selected series and click the desired value. Show displays the series. Hide includes the series in the ChartGroup, but does not draw the series. Exclude eliminates the series from the ChartGroup without actually deleting it. Excluded series are not used for automatic calculations such as axis limits and stacked charts.

In some cases, you may wish to set multiple cells to the same value. If so, select the upper left corner of the rectangle comprised of those cells you wish to set, set the value of that cell, then left click the mouse and drag the mouse to the opposite corner of the rectangle. This will highlight multiple cells and enable the Fill button. When the appropriate rectangle is highlighted, release the left mouse button and press the Fill button. All highlighted cells will be changed to the value of the current cell.

Chart2D Series Editor Using General Layout

Note that the Series editor appears differently for Array layouts than it does for General layouts. Array layouts share the same X or independent values, so each series will have the same number of data points. General layouts have independent X values. For you convenience, it is possible to modify the number of data points in each series while editing the series.

Pressing the Apply button will cause the chart display to change in a manner consistent with the new settings. Once the Apply button has been pressed, it is only possible to cancel changes made since Apply was pressed.

When finished modifying the settings, press Cancel to return to the property pages without applying changes, or press OK to apply the changes and return to the property pages.


Edit Chart 2D Data

Chart2D Data Using Array Layout, Ready to Fill with 22

Use the down/up/left/right arrow keys or mouse to select the appropriate cell to make the current cell. If using the mouse, you may scroll the selections using the scroll bar. If keys are used, the scrolling will take place automatically.

The current cell is indicated by a green or red border around the cell. The green border indicates that the current cell is unmodified or that the edit has been completed (enter key pressed). The red border indicates that the current cell is being edited.

To edit the data in the cell, select the cell, and then enter digits and characters via the keyboard. If you wish to edit the existing data, select the cell, then double click the cell, and you may insert or delete characters.

In some cases, you may wish to set multiple cells to the same value. In this case, select the upper left corner of the rectangle comprised of those cells you wish to set, set the value of that cell, then left click the mouse and drag the mouse to the opposite corner of the rectangle. This will highlight multiple cells and enable the Fill button. When the appropriate rectangle is highlighted, release the left mouse button and press the Fill button. All highlighted cells will be changed to the value of the current cell.

Chart2D Data Using General Layout, Current Cell Modified

Note that the Series Data editor appears differently for Array layouts than it does for General layouts. Array layouts share the same X or independent values, so each series will have the same number of data points and X values. General layouts have independent X values. When editing General layouts, both X and Y values are displayed and can be edited. Note that each series may have a different number of data points.

Pressing the Apply button will cause the chart display to change in a manner consistent with the new settings. Once the Apply button has been pressed, it is only possible to cancel changes made since Apply was pressed.

When finished modifying the settings, press Cancel to return to the property pages without applying changes, or press OK to apply the changes and return to the property pages.


Bar Tab (ChartGroups)

The ClusterOverlap: textbox specifies the spacing within each bar cluster. Positive values overlap the bars, negative values space the bars apart.

Chart2D.ChartArea.Bar.ClusterOverlap

The ClusterWidth: textbox specifies the percentage of space used by each bar cluster.

Chart2D.ChartArea.Bar.ClusterWidth


Bubble Tab (ChartGroups)

Use this tab to set Bubble chart properties. Note that in order to view this tab, the ChartType must be set to Bubble.

The EncodingMethod: dropdown sets the size of the bubbles according to diameter or area. When specifying the size of the bubble, both the diameter and area are measured as a percentage of the total diameter or area of the plot area. Inverting these values (making the Minimum value larger than the Maximum) draws large bubbles for small values, and small bubbles for large values.

Chart2D.ChartArea.Bubble.EncodingMethod

The Minimum size: textbox specifies minimum allowable size of the bubbles.

Chart2D.ChartArea.Bubble.MinimumSize

The Maximum size: textbox specifies maximum allowable size of the bubbles.

Chart2D.ChartArea.Bubble.MaximumSize

For more information, see Bubble Charts.


Pie Tab (ChartGroups)

The SortOrder: dropdown specifies the order that pie slices are displayed.

Chart2D.ChartArea.Pie.SortOrder

The ThresholdMethod: dropdown specifies the method used to group low values into the other slice.

Chart2D.ChartArea.Pie.ThresholdMethod

The Threshold Value: textbox provides a place for you to enter the value used with ThresholdMethod. To disable creation of the other slice, set this to 0.

Chart2D.ChartArea.Pie.ThresholdValue

The MinSlices: textbox specifies the minimum number of pie slices to display before grouping values into the other slice.

Chart2D.ChartArea.Pie.MinSlices

The StartAngle: textbox specifies the angle at which the slices for the first series start.

Chart2D.ChartArea.Pie.StartAngle

For more information, see Pie Charts.


HiLoOpenClose Tab (ChartGroups)

When selected (checked), the IsShowingOpen checkbox sets the IsShowingOpen property so that the open tick mark is shown on the chart.

Chart2D.ChartArea.HiLoOpenClose.IsShowingOpen

When selected (checked), the IsShowingClose checkbox sets the IsShowingClose property so that the close tick mark is shown on the chart.

Chart2D.ChartArea.HiLoOpenClose.IsShowingClose

When selected (checked), the IsOpenCloseFullWidth checkbox sets the IsOpenCloseFullWidth property so that the open and close tick marks are shown on both sides of the vertical range.

Chart2D.ChartArea.HiLoOpenClose.IsOpenCloseFullWidth

For more information, see HiLoOpenClose Charts.


Candle Tab (ChartGroups)

When selected (checked), the IsComplex checkbox sets the IsComplex property to specify the type of candle chart to be drawn.

Chart2D.ChartArea.Candle.IsComplex

For more information, see Candle Charts.


Polar Tab (ChartGroups)

When selected (checked), the IsHalfRange checkbox sets the IsHalfRange property to determine if the x-axis is represented in full-range (where IsHalfRange is false) or half-range (where IsHalfRange is true).

Chart2D.ChartArea.Polar.IsHalfRange

When selected (checked), the AxisAllowNegative checkbox sets the AxisAllowNegative property to specify whether or not to permit negative values for r.

Chart2D.ChartArea.Polar.AxisAllowNegative

For more information, see Polar Charts and Special Polar Chart Properties.


Labels Tab (ChartGroups)

The Add: button allows you to add labels to the chart points and the chart series.

Chart2D.ChartGroups.Item(ii).PointLabels.Add

Chart2D.ChartGroups.Item(ii).SeriesLabels.Add

The Remove: button allows you to remove the selected label.

Chart2D.ChartGroups.Item(ii).PointLabels.Remove

Chart2D.ChartGroups.Item(ii).SeriesLabels.Remove


Internet Tab (ChartGroups)

The Datapath: textbox allows you to specify a URL to use to load a chart data (.DAT) file when the chart is run.

Chart2D1.ChartGroups(i).Data.DataPath


Binding Tab (ChartGroups)

The Add button allows you to add bindings to database fields which provide chart points and the chart series data. PointLabels can also be taken from the database.

Chart2D.ChartGroups.Item(ii).PointValuesField = “fieldname for X values”

Chart2D.ChartGroups.Item(ii).SeriesFields.Add

Chart2D.ChartGroups.Item(ii).PointLabelsField = “fieldname for PointLabels”

The Remove button allows you to remove the selected database field from the bindings.

Chart2D.ChartGroups.Item(ii).PointValuesField = “”(empty string)

Chart2D.ChartGroups.Item(ii).SeriesFields.Remove

Chart2D.ChartGroups.Item(ii).PointLabelsField = “”(empty string)

The Set button allows you to set the name of the field after typing.

When selected (checked) the “Use field names for series labels” checkbox indicates that the database field names added to the SeriesFields collection will be used as SeriesLabels and will therefore appear in the Legend.


ChartStyles Page

The group of attributes that define how a series of data looks in the chart is called a ChartStyle. This page lists the currently defined Chartstyles and allows you to modify them as required. You can modify each ChartStyle by highlighting a specific style in the left pane then choosing the inner tab and property you wish to change.

To add a new style, press the Add… button. To remove a style, simply highlight the style you wish to delete and press the Remove button.

Chart2D.ChartGroups.Item(ii).Styles.Add

Chart2D.ChartGroups.Item(ii).Styles.Remove

For more information, see Changing ChartStyles.

FillStyle Tab (ChartStyles)

LineStyle Tab (ChartStyles)

SymbolStyle Tab (ChartStyles)

SliceStyle Tab (ChartStyles)

Image Tab (ChartStyles)


FillStyle Tab (ChartStyles)

The Pattern: dropdown allows you to change the fill pattern for various chart types.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Fill.Pattern

Color Area

The RGB: textbox lists the RGB value of the pattern for the specific chart area. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the pattern.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Fill.Interior.ForegroundColor


LineStyle Tab (ChartStyles)

The Pattern: dropdown allows you to change the line pattern style for the various chart areas.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Pattern

The Width: textbox allows you to specify the thickness of the actual chart area outlines.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Width

Color Area

The RGB: textbox lists the RGB value of the outline for a specific area. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the area line.

Chart2D.ChartArea.Axes.Item(ii).AxisStyle.LineStyle.Color


SymbolStyle Tab (ChartStyles)

The Shape: dropdown allows you to change the data marker symbol for the plot charts.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Symbol.Shape

The Size: textbox allows you to specify the size of the data marker symbol.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Symbol.Size

Color Area

The RGB: textbox lists the RGB value of the outline for a data marker symbol. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the data marker symbol.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Symbol.Color


SliceStyle Tab (ChartStyles)

The Offset: textbox allows you to position a pie section away from the rest of the chart.

Chart2D.ChartArea.Pie.OtherSliceStyle.Offset.Value

The Display: dropdown allows you to specify if a specific section of the pie is shown or hidden.

Chart2D.ChartArea.Pie.OtherSliceStyle.Display


Image Tab (ChartStyles)

The File: textbox lists the current image (including path) used as the symbol when the symbol shape is set to ImageFile. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Image.FileName

The Layout: dropdown allows you to format the position of the image within the symbol shape.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the persistence file rather than being linked to the chart.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the area where the image is used will be sized according to the image.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.ChartGroups.Item(ii).Styles.Item(ii).Image.IsTransparent

Pressing the Reset button removes the current image from the legend and clears the File textbox.

For more information, see Adding Images to Chart Elements.


Titles Page

This page lists the currently defined Titles (Header and Footer) and allows you to modify them as required. You can modify each Title by highlighting the specific header or footer in the left pane then choosing the inner tab and property you wish to change.

For more information, see Adding Header and Footer Titles.

General Tab (Titles)

Label Tab (Titles)

Location Tab (Titles)

Border Tab (Titles)

Interior Tab (Titles)

Font Tab (Titles)

Image Tab (Titles)


General Tab (Titles)

The Adjust: dropdown allows you to determine the alignment of multiple lines of text within the title (Right, Left or Center).

Chart2D.Header.Adjust

Chart2D.Footer.Adjust

When selected (checked), the IsShowing checkbox causes the chart Title to be visible.

Chart2D.Header.IsShowing

Chart2D.Footer.IsShowing


Label Tab (Titles)

The Text: textbox provides you with a place to enter and edit text for each label.

Chart2D.Header.Text.Text

Chart2D.Footer.Text.Text


Location Tab (Titles)

The Left: textbox specifies the distance from the left edge of the chart to the header or footer in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.Header.Location.Left.Value

Chart2D.Footer.Location.Left.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Left value.

Chart2D.Header.Location.Left.IsDefault

Chart2D.Footer.Location.Left.IsDefault

The Top: textbox specifies the distance from the top edge of the chart to the header or footer in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.Header.Location.Top.Value

Chart2D.Footer.Location.Top.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Top value.

Chart2D.Header.Location.Top.IsDefault

Chart2D.Footer.Location.Top.IsDefault

The Width: textbox specifies the width of the header or footer area in pixels. If this option is disabled, you cannot change the width of this area.

Chart2D.Header.Location.Width.Value

Chart2D.Footer.Location.Width.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Width value.

Chart2D.Header.Location.Width.IsDefault

Chart2D.Footer.Location.Width.IsDefault

The Height: textbox specifies the height of the header or footer area in pixels. If this option is disabled, you cannot change the height of this area.

Chart2D.Header.Location.Height.Value

Chart2D.Footer.Location.Height.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Height value.

Chart2D.Header.Location.Height.IsDefault

Chart2D.Footer.Location.Height.IsDefault


Border Tab (Titles)

The Type: dropdown box allows you to choose one of the pre-set BorderType properties to be drawn around the header or footer area. If this option is disabled, you cannot change the border type for this area.

Chart2D.Header.Border.Type

Chart2D.Footer.Border.Type

The Width: textbox allows you to set the width of the border in pixels.

Chart2D.Header.Border.Width

Chart2D.Footer.Border.Width

For more information, see Using Borders.


Interior Tab (Titles)

Background Color Area

The RGB: textbox lists the RGB value of the specified background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the active chart area.

Chart2D.Header.Interior.BackgroundColor

Chart2D.Footer.Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the specified foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the active chart area.

Chart2D.Header.Interior.ForegroundColor

Chart2D.Footer.Interior.ForegroundColor

For more information, see Setting Colors.


Font Tab (Titles)

The Description: textbox lists the font type and font size being used by the header or footer text. The ellipsis button to the right of the textbox opens the font browser.

Chart2D.Header.Font.Name

Chart2D.Header.Font.Size

Chart2D.Header.Font.Bold

Chart2D.Header.Font.Italic

Chart2D.Header.Font.Underline

Chart2D.Header.Font.Strikethrough

Chart2D.Header.Font.Weight

Chart2D.Header.Font.Charset

Chart2D.Footer.Font.Name

Chart2D.Footer.Font.Size

Chart2D.Footer.Font.Bold

Chart2D.Footer.Font.Italic

Chart2D.Footer.Font.Underline

Chart2D.Footer.Font.Strikethrough

Chart2D.Footer.Font.Weight

Chart2D.Footer.Font.Charset

For more information, see Choosing Fonts.


Image Tab (Titles)

The File: textbox lists the current image (including path) used in the background of the header or footer. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.Header.Interior.Image.FileName

Chart2D.Footer.Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the header or footer.

Chart2D.Header.Interior.Image.Layout

Chart2D.Footer.Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.Header.Interior.Image.IsEmbedded

Chart2D.Footer.Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the text area (header or footer) where the image is used will be sized according to the image.

Chart2D.Header.Interior.Image.HasMinimumSize

Chart2D.Footer.Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.Header.Interior.Image.IsTransparent

Chart2D.Footer.Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the header or footer and clears the File textbox.

For more information, see Adding Images to Chart Elements.


Legend Page

A Legend displays the visual attributes used for each series in the chart, with text that labels the series. This page lists the currently defined Legend and allows you to modify it as required. Note: To display a legend, the Series Labels must be defined first.

For more information, see Using a Legend.

General Tab (Legend)

Title Tab (Legend)

Location Tab (Legend)

Border Tab (Legend)

Interior Tab (Legend)

Font Tab (Legend)

Image Tab (Legend)


General Tab (Legend)

The Anchor: dropdown allows you to specify where the legend it positioned in relation to the ChartArea.

Chart2D.Legend.Anchor

The Orientation: dropdown allows you to specify the layout of the items in the Legend.

Chart2D.Legend.Orientation

When selected (checked), the IsShowing checkbox sets the IsShowing property so that the Legend is visible.

Chart2D.Legend.IsShowing

When selected (checked), the IsShowing3DShading checkbox sets the IsShowing3DShading property so that 3D effects appear in the legend with rectangular swatches of color.

Chart2D.Legend.IsShowing3DShading

When selected (checked), the IsReversed checkbox sets the IsReversed property so that the order of the SeriesLabels is reversed.

Chart2D.Legend.IsReversed


Title Tab (Legend)

The Text: textbox allows you to specify the title of the legend.

Chart2D.Legend.Text.Text


Location Tab (Legend)

The Left: textbox specifies the distance from the left edge of the chart to the legend in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.Legend.Location.Left.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Left value.

Chart2D.Legend.Location.Left.IsDefault

The Top: textbox specifies the distance from the top edge of the chart to the legend in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.Legend.Location.Top.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Top value.

Chart2D.Legend.Location.Top.IsDefault

The Width: textbox specifies the width of the legend in pixels. If this option is disabled, you cannot change the width of this area.

Chart2D.Legend.Location.Width.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Width value.

Chart2D.Legend.Location.Width.IsDefault

The Height: textbox specifies the height of the legend in pixels. If this option is disabled, you cannot change the height of this area.

Chart2D.Legend.Location.Height.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Height value.

Chart2D.Legend.Location.Height.IsDefault


Border Tab (Legend)

l

The Type: dropdown box allows you to choose one of the pre-set BorderType properties to be drawn around the legend area. If this option is disabled, you cannot change the border type for this area.

Chart2D.Legend.Border.Type

The Width: textbox allows you to set the width of the border in pixels.

Chart2D.Legend.Border.Width

For more information, see Using Borders.


Interior Tab (Legend)

l

Background Color Area

The RGB: textbox lists the RGB value of the of the legend background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the legend area.

Chart2D.Legend.Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the of the legend foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the legend area.

Chart2D.Legend.Interior.ForegroundColor

For more information, see Setting Colors.


Font Tab (Legend)

l

The Description: textbox lists the font type and font size being used by the legend text. The ellipsis button to the right of the textbox opens the font browser.

Chart2D.Legend.Font.Name

Chart2D.Legend.Font.Size

Chart2D.Legend.Font.Bold

Chart2D.Legend.Font.Italic

Chart2D.Legend.Font.Underline

Chart2D.Legend.Font.Strikethrough

Chart2D.Legend.Font.Weight

For more information, see Choosing Fonts.


Image Tab (Legend)

l

The File: textbox lists the current image (including path) used in the background of the legend. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.Legend.Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the legend.

Chart2D.Legend.Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.Legend.Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the area where the image is used will be sized according to the image.

Chart2D.Legend.Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.Legend.Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the legend and clears the File textbox.

For more information, see Adding Images to Chart Elements.


ChartArea Page

The ChartArea is the section of the chart that contains the chart elements including the graphic representation of the date, the axes and axes titles. This page lists the currently defined properties for the ChartArea and allows you to modify them as required.

General Tab (ChartArea)

Location Tab (ChartArea)

Border Tab (ChartArea)

Interior Tab (ChartArea)

Image Tab (ChartArea)


General Tab (ChartArea)

When selected (checked), the IsHorizontal checkbox sets the IsHorizontal property so that the X-axis and Y-axis are reversed, making the chart appear horizontal.

Chart2D.ChartArea.IsHorizontal

For more information, see Chart Orientation and Axis Direction.

When selected (checked), the IsShowingOutlines checkbox sets the IsShowingOutlines property so that lines are shown around the chart objects (bars, pie sections, etc.) Note: This property is only functional with bar, pie, stacking bar, area and filled radar charts.

Chart2D.ChartArea.IsShowingOutlines

The AngleUnit: dropdown allows you to format the chart angles for degrees, radiants and grads. Note: This property is only functional with polar, radar and filled radar charts.

Chart2D.ChartArea.AngleUnit


Location Tab (ChartArea)

The Left: textbox specifies the distance from the left edge of the chart to the chartarea in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.ChartArea.Location.Left.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Left value.

Chart2D.ChartArea.Location.Left.IsDefault

The Top: textbox specifies the distance from the top edge of the chart to the chartarea in pixels. If this option is disabled, you cannot change the position of this area.

Chart2D.ChartArea.Location.Top.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Top value.

Chart2D.ChartArea.Location.Top.IsDefault

The Width: textbox specifies the width of the chartarea in pixels. If this option is disabled, you cannot change the width of this area.

Chart2D.ChartArea.Location.Width.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Width value.

Chart2D.ChartArea.Location.Width.IsDefault

The Height: textbox specifies the height of the chartarea in pixels. If this option is disabled, you cannot change the height of this area.

Chart2D.ChartArea.Location.Height.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Height value.

Chart2D.ChartArea.Location.Height.IsDefault


Border Tab (ChartArea)

The Type: dropdown box allows you to choose one of the pre-set BorderType properties to be drawn around the chartarea. If this option is disabled, you cannot change the border type for this area.

Chart2D.ChartArea.Border.Type

The Width: textbox allows you to set the width of the border in pixels.

Chart2D.ChartArea.Border.Width

For more information, see Using Borders.


Interior Tab (ChartArea)

Background Color Area

The RGB: textbox lists the RGB value of the of the chartarea background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the chartarea.

Chart2D.ChartArea.Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the of the chartarea foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the chartarea.

Chart2D.ChartArea.Interior.ForegroundColor

For more information, see Setting Colors.


Image Tab (ChartArea)

The File: textbox lists the current image (including path) used in the background of the chartarea. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.ChartArea.Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the chartarea.

Chart2D.ChartArea.Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.ChartArea.Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the area where the image is used will be sized according to the image.

Chart2D.ChartArea.Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.ChartArea.Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the chartarea and clears the File textbox.

For more information, see Adding Images to Chart Elements.


PlotArea Page

This page lists the currently defined properties for the PlotArea and allows you to modify them as required.


General Tab (PlotArea)

When selected (checked), the IsBoxed checkbox sets the IsBoxed property, placing a box around the plot area.

Chart2D.ChartArea.PlotArea.IsBoxed

The Top: textbox specifies the distance from the top edge of the chartarea to the axis of the chart in pixels. Positive values allow space for axis labels; negative values let you “zoom in” on a chart.

Chart2D.ChartArea.PlotArea.Top.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Top value.

Chart2D.ChartArea.PlotArea.Top.IsDefault

The Bottom: textbox specifies the distance from the top edge of the chartarea to the axis of the chart in pixels. Positive values allow space for axis labels; negative values let you “zoom in” on a chart.

Chart2D.ChartArea.PlotArea.Bottom.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Bottom value.

Chart2D.ChartArea.PlotArea.Bottom.IsDefault

The Left: textbox specifies the distance from the left edge of the chartarea to the axis in pixels. Positive values allow space for axis labels; negative values let you “zoom in” on a chart.

Chart2D.ChartArea.PlotArea.Left.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Left value.

Chart2D.ChartArea.PlotArea.Left.IsDefault

The Right: textbox specifies the distance from the right edge of the chartarea to the axis in pixels. Positive values allow space for axis labels; negative values let you “zoom in” on a chart.

Chart2D.ChartArea.PlotArea.Right.Value

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Right value.

Chart2D.ChartArea.PlotArea.Right.IsDefault

For more information, see Adjusting PlotArea Margins.


Interior Tab (PlotArea)

Background Color Area

The RGB: textbox lists the RGB value of the of the plotarea background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the plotarea.

Chart2D.ChartArea.PlotArea.Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the of the plotarea foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the plotarea.

Chart2D.ChartArea.PlotArea.Interior.ForegroundColor

For more information, see Setting Colors.


Image Tab (PlotArea)

The File: textbox lists the current image (including path) used in the background of the plotarea. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.ChartArea.Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the plotarea.

Chart2D.ChartArea.Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.ChartArea.Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the area where the image is used will be sized according to the image.

Chart2D.ChartArea.Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.ChartArea.Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the plotarea and clears the File textbox.

For more information, see Adding Images to Chart Elements.


ChartLabels Page

A ChartLabel is a text label that displays in front of the chart data. This page lists the currently defined properties for the ChartLabels and allows you to modify them as required. You can modify each Label by highlighting the specific item in the left pane then choosing the inner tab and property you wish to change.

To add a new label, press the Add… button and type the desired label text in the Add Label textbox that appears, then press OK. To remove a label, simply highlight the label you wish to delete and press the Remove button.

Chart2D.ChartLabels.Add

Chart2D.ChartLabels.Remove

For more information, see Using ChartLabels.

General Tab (ChartLabels)

Label Tab (ChartLabels)

Border Tab (ChartLabels)

Interior Tab (ChartLabels)

Font Tab (ChartLabels)

Location Tab (ChartLabels)

Image Tab (ChartLabels)


General Tab (ChartLabels)

The Name: textbox provides a place to modify the name of each label.

Chart2D.ChartLabels.Item(ii).Name

The Offset: textbox specifies the distance between the chartlabel and its attachment point.

Chart2D.ChartLabels.Item(ii).Offset

The Anchor: dropdown allows you to determine where the chartlabel is positioned, relative to where it is attached.

Chart2D.ChartLabels.Item(ii).Anchor

When selected (checked), the IsShowing checkbox sets the IsShowing property so that the chartlabel is visible.

Chart2D.ChartLabels.Item(ii).IsShowing

The Adjust: dropdown allows you to specify how to align multiple lines of text in the selected chartlabel.

Chart2D.ChartLabels.Item(ii).Adjust

When selected (checked), the IsConnected checkbox sets the IsConnected property so there is a line drawn from the chartlabel to its attachment point.

Chart2D.ChartLabels.Item(ii).IsConnected

The Rot’n: dropdown allows you to specify the rotation angle of the chartlabel.

Chart2D.ChartLabels.Item(ii).Rotation

The AttachMethod… button allows you to modify the how the chartlabel is attached in the Select AttachMethod window. Note, the DataCoord: text, located to the right of the button shows the coordinate location of the chartlabel.

Chart2D.ChartLabels.Item(ii).AttachMethod

By utilizing the Select AttachMethod window, chartLabels can be attached to screen coordinates, graph coordinates, a series and point in the data, or a Y-value at a series/point.


Label Tab (ChartLabels)

The Text: textbox provides you with a place to enter and edit text for each chartlabel.

Chart2D.ChartLabels.Item(ii).Text.Text


Border Tab (ChartLabels)

The Type: dropdown box allows you to choose one of the pre-set BorderType properties to be drawn around the chartlabel. If this option is disabled, you cannot change the border type for this area.

Chart2D.ChartLabels.Item(ii).Border.Type

The Width: textbox allows you to set the width of the border in pixels.

Chart2D.ChartLabels.Item(ii).Border.Width

For more information, see Using Borders.


Interior Tab (ChartLabels)

Background Color Area

The RGB: textbox lists the RGB value of the of the chartlabel background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the chartlabel.

Chart2D.ChartLabels.Item(ii).Interior.BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the of the chartlabel foreground (text). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a foreground by the chartlabel.

Chart2D.ChartLabels.Item(ii).Interior.ForegroundColor

For more information, see Setting Colors.


Font Tab (ChartLabels)

The Description: textbox lists the font type and font size being used by the chartlabel text. The ellipsis button to the right of the textbox opens the font browser.

Chart2D.ChartLabels.Item(ii).Font.Name

Chart2D.ChartLabels.Item(ii).Font.Size

Chart2D.ChartLabels.Item(ii).Font.Bold

Chart2D.ChartLabels.Item(ii).Font.Italic

Chart2D.ChartLabels.Item(ii).Font.Underline

Chart2D.ChartLabels.Item(ii).Font.Strikethrough

Chart2D.ChartLabels.Item(ii).Font.Weight

For more information, see Choosing Fonts.


Location Tab (ChartLabels)

Note: The settings for this tab are modified by the changes made in the SelectAttachMethod window. The properties for the chartlabels cannot be modified here.

The Left: textbox specifies the distance from the left edge of the chart to the chartlabel in pixels.

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Left value.

The Top: textbox specifies the distance from the top edge of the chart to the chartlabel in pixels.

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Top value.

The Width: textbox specifies the width of the chartlabel in pixels.

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Width value.

The Height: textbox specifies the height of the chartlabel in pixels.

When selected (checked), the IsDefault checkbox causes the chart to automatically control the Height value.


Image Tab (ChartLabels)

The File: textbox lists the current image (including path) used in the background of the chartlabel. The ellipsis button next to the textbox opens the browser to locate the image that you wish to use.

Chart2D.ChartLabels.Item(ii).Interior.Image.FileName

The Layout: dropdown allows you to format the position of the image within the chartlabel.

Chart2D.ChartLabels.Item(ii).Interior.Image.Layout

When selected (checked), the IsEmbedded checkbox sets the IsEmbedded property so that the image is embedded within the file rather than being linked to the chart.

Chart2D.ChartLabels.Item(ii).Interior.Image.IsEmbedded

When selected (checked), the HasMinimumSize checkbox sets the HasMinimumSize property so that the area where the image is used will be sized according to the image.

Chart2D.ChartLabels.Item(ii).Interior.Image.HasMinimumSize

When selected (checked), the IsTransparent checkbox sets the IsTransparent property so that the bitmap image is rendered as a transparent bitmap.

Chart2D.ChartLabels.Item(ii).Interior.Image.IsTransparent

Pressing the Reset button removes the current image from the chartlabel and clears the File textbox.

For more information, see Adding Images to Chart Elements.


View3D Page

This page lists the currently defined properties for the 3D Effects and allows you to modify them as required. Note, only ribbon plot, area, bar and pie charts can support 3D effects.

For more information, see Adding the 3D Effect.


General Tab (View3D)

The Depth: textbox specifies the depth of the chart 3D effect, as a percentage of the total width of the chart. This must be greater than zero to display any 3D effect.

Chart2D.ChartArea.View3D.Depth

The Elevation: textbox specifies the elevation angle of the 3D effect, as degrees above the X-axis.

Chart2D.ChartArea.View3D.Elevation

The Rotation: textbox specifies the rotation angle of the 3D effect, as degrees to the right of the Y-axis. Note: This has no effect on pie charts.

Chart2D.ChartArea.View3D.Rotation

The Shading: dropdown allows you to format the shading effects for the “surfaces” of the 3D chart..

Chart2D.ChartArea.View3D.Shading

Note: The Depth property is the key to all 3D type chart logic. While the Elevation and Rotation properties modify the way a user views the chart, it is the Depth property that actually dictates whether a chart is 3D. By using a non zero value for the depth property and setting the elevation and rotation property values to zero, you have created a 3D chart even though nothing seems to have changed. In effect you are looking at the “front” of the chart.


Markers Page

A marker is a vertical or horizontal line drawn on top of the chart to identify a particular data point or chart coordinate. This page lists the currently defined properties for the chart Markers and allows you to modify them as required. You can modify each marker by highlighting the specific axis in the left pane then choosing the inner tab and property you wish to change.

For more information, see Adding Markers.


General Tab (Markers)

When selected (checked), the IsShowing checkbox sets the IsShowing property so that the marker is visible.

Chart2D.ChartArea.Markers.Item(ii).IsShowing

When selected (checked), the IsStyleDefault checkbox sets the IsStyleDefault property so that the LineStyle for the marker returns to the default.

Chart2D.ChartArea.Markers.Item(ii).IsStyleDefault


Attach Tab (Markers)

By utilizing the Attach Tab option buttons and textboxes you can specify the location of each marker by X-axis and Y-axis value or by data.

Chart2D.ChartArea.Markers.Item(ii).Index.Series

Chart2D.ChartArea.Markers.Item(ii).Index.Point

Chart2D.ChartArea.Markers.Item(ii).Index.ChartGroup

Chart2D.ChartArea.Markers.Item(ii).Value.X

Chart2D.ChartArea.Markers.Item(ii).Value.Y

Chart2D.ChartArea.Markers.Item(ii).Value.ChartGroup


LineStyle Tab (Markers)

The Pattern: dropdown allows you to change the line pattern for each of the markers.

Chart2D.ChartArea.Markers.Item(ii).Style.Pattern

The Width: textbox allows you to specify the thickness of the marker line.

Chart2D.ChartArea.Markers.Item(ii).Style.Width

Color Area

The RGB: textbox lists the RGB value of the of the specified marker line. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the marker line.

Chart2D.ChartArea.Markers.Item(ii).Style.Color


AlarmZones Page

Alarm Zones are a series of bands that can be placed behind the plotted data, but in front of the chart background. This page lists the currently defined properties for the chart AlarmZones and allows you to modify them as required. You can modify each AlarmZone by highlighting the specific item in the left pane then choosing the inner tab and property you wish to change.

To add a new alarmzone, press the Add… button and a new alarmzone appears in the left pane. To remove an alarmzone, simply highlight the item you wish to delete and press the Remove button.

Chart2D.ChartArea.AlarmZones.Add

Chart2D.ChartArea.AlarmZones.Remove

For more information, see Alarm Zones.


General Tab (AlarmZones)

The Name: textbox allows you to specify the name of each alarms zone.

Chart2D.ChartArea.AlarmZones.Item(ii).Name

The UpperExtent: textbox allows you to specify the uppermost value of each alarmzone.

Chart2D.ChartArea.AlarmZones.Item(ii).UpperExtent

When selected (checked), the IsShowing checkbox sets the IsShowing property so that the specific alarmzone is visible.

Chart2D.ChartArea.AlarmZones.Item(ii).IsShowing

The LowerExtent: textbox allows you to specify the lowermost value of each alarmzone.

Chart2D.ChartArea.AlarmZones.Item(ii).LowerExtent

Note: By setting the lowerextent property of the next alarmzone band to match the upperextent property of the previous alarmzone band, it is possible to “stack” the alarmzones.

The Pattern: dropdown allows you to change the fill pattern for each of the alarmzones.

Chart2D.ChartArea.AlarmZones.Item(ii).Pattern


Colors Tab (AlarmZones)

Background Color Area

The RGB: textbox lists the RGB value of the of the specific alarmzone background. The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used as a background by the specific alarmzone.

Chart2D.ChartArea.AlarmZones.Item(ii).BackgroundColor

Foreground Color Area

The RGB: textbox lists the RGB value of the of the specific alarmzone pattern (set on the General tab). The ellipsis button next to the textbox opens the customized color pallet.

The Name: textbox lists the current color that is being used by the alarmzone pattern.

Chart2D.ChartArea.AlarmZones.Item(ii).ForegroundColor


Special ChartType Properties

Certain ChartTypes have special properties or features that should be taken into consideration when using them in your chart. For a detailed description of each ChartType, see Choosing the Chart Type.

The following topics cover the special properties of each ChartType:

Special Bubble Chart Properties

Special Bar Chart Properties

Special Stacking Bar Chart Properties

Special Candle Chart Properties

Special HiLoOpenClose Chart Properties

Special Pie Chart Properties

Special Polar Chart Properties


Special Bubble Chart Properties

A bubble chart combines 2 series to draw a plot chart with varying point sizes. The encoding method for the size of the bubbles, as well as their minimum and maximum size can be specified.


Encoding Method

Use the EncodingMethod property to set whether to size the bubbles according to diameter or area. When specifying the size of the bubble, both the diameter and area are measured as a percentage of the total diameter or area of the plot area. Inverting these values (making the Minimum value larger than the Maximum) draws large bubbles for small values, and small bubbles for large values.

The EncodingMethod property is located on the ChartGroups Page Bubble Tab.


Maximum and Minimum Size

The maximum and minimum allowable size for bubbles can be set using the MaximumSize and MinimumSize properties respectively. These properties are located on the ChartGroups Page Bubble Tab.


Special Bar Chart Properties

A bar chart draws each series as a bar in a cluster. You can customize the sizing and spacing of the clusters for bar and stacking bar charts.


Cluster Overlap

Use the bar ClusterOverlap property to set the amount that bars overlap each other in a cluster. The value represents the percentage of bar overlap, with valid values between -100 and 100.


Cluster Width

Use the bar ClusterWidth property to set the space used by each bar cluster. The value represents the percentage available space, with valid values between 0 and 100.

The amount of overlap can be adjusted by typing a value in the appropriate textbox.


Special Stacking Bar Chart Properties

A stacking bar chart draws each series as a portion of a stacked bar cluster, the number of clusters being the number of points in the data. Each bar displays the nth data point in each series. Positive values are displayed above the X-axis, and negative values are displayed below the X-axis. You can create floating bars by either hiding or excluding specific data sets, or draw the chart as a 100 percent stacking bar chart.


Floating Bar Charts

Each series in a stacking bar chart can be either hidden (where the series is charted as a blank set) or excluded (where the series is not considered part of the chart data). Use the SeriesDisplay property of the Chart2DData Object to determine if each series in the chart is either shown, hidden or excluded.

In the following examples, the third series is shown, hidden, and then excluded.

To access the 3D view for the bar chart, activate the Property Pages View 3D tab. The General inner tab allows you to modify the Depth, Elevation and Rotation properties by typing a value in the appropriate textbox.

To exclude a series from the bar chart by using the SeriesDisplay property, access the Property Pages ChartGroups tab and highlight the correct chart from the left side window pane. Choose the inner Data tab and press the Series button located there, this will bring up the Edit Chart 2D Series window. Right click on the series you wish to exclude and choose the Exclude option from the context menu.

To hide a series from the bar chart by using the SeriesDisplay property, access the Property Pages ChartGroups tab and highlight the correct chart from the left side window pane. Choose the inner Data tab and press the Series button located there, this will bring up the Edit Chart 2D Series window. Right click on the series you wish to hide and choose the Hide option from the context menu.

For more information on 3D effects, see Adding the 3D Effect.


100 Percent Stacking Bar Charts

Use the IsYAxis100Percent and IsY2Axis100Percent properties of the Axis Object to scale the Y axis of stacking bar charts to a common 100 percent value. When IsYAxis100Percent or IsY2Axis100Percent is False, the actual series data is used. When IsYAxis100Percent or IsY2Axis100Percent is True, the data is scaled so that all bars are the same height and each series is scaled to a total of 100 percent.

The IsYAxis100Percent and IsY2Axis100Percent properties can be accessed through the Property Pages by choosing the Axes tab, highlighting the Y or Y2 series from the left window pane and clicking the Is100Percent checkbox.


Negative values

For stacking bar charts, series with negative values are displayed below the X-axis, as is shown in the example below:

To modify the bar chart to show negative values, access the Property Pages and choose the ChartGroups tab. Choose the inner Data tab. You can choose the bar and series with the ThisPoint and ThisSeries properties. After choosing the correct bar and series, modify the value of the series by typing data into the Yvalue textbox.


Special Candle Chart Properties

A candle chart draws 4 series together to form a logical data set. For example, the first and second series show the high and low value of a stock, and the third and fourth series represent the stock's opening and closing price. You can specify how the candle is drawn by setting the IsComplex property.


Complex Candle Charts

Use the candle IsComplex property to specify the type of candle chart drawn. Simple candle charts (IsComplex is False) are drawn with a filled candle to indicate a falling stock price (open was higher than close), and a hollow candle to indicate a rising stock price (close was higher than open). Complex candle charts are drawn with the Series2 FillStyle color to indicate a rising stock price, and the Series3 FillStyle color to indicate a falling stock price.

All candle properties are located on the ChartGroups Page Candle Tab.


Special HiLoOpenClose Chart Properties

A HiLoOpenClose chart draws 4 series together to (typically) represent the high, low open and close value for a stock. The first and second series show the high and low value of a stock, and the third and fourth series represent the stock's opening and closing price. You can specify how the open and close tick marks are displayed on the chart.


Display Open and Close Ticks

Use the IsShowingOpen, IsShowingClose and IsOpenCloseFullWidth properties to determine how the open and close tick marks are displayed. Enable IsShowingOpen to display the open tick marks (Series 3) and enable IsShowingClose to display the close tick marks (Series 4). Enable IsOpenCloseFullWidth to draw the open and close tick marks on both sides of the vertical range.


Special Pie Chart Properties

Pie charts are quite different from the other chart types you can use. They do not have the concept of a two-dimensional grid or axes. Pie charts also introduce a special category called ”Other”, into which all data values below a certain threshold are grouped. You can customize properties of the Other slice and other properties unique to pie charts.

Building the “Other” Slice

“Other” Slice Style and Label

Pie Ordering

Starting Angle

Exploding Pies

Missing Slices


Building the “Other” Slice

Pie charts are often more effective if unimportant values are grouped into an “Other” category. Use the pie ThresholdMethod property to select the grouping method to use. “SliceCutoff” is useful when you know the data value that should be grouped into the “Other” slice. “Percentile” is useful when you want a certain percentage of the pie to be devoted to the “Other” slice.

Use the ThresholdValue property to specify the value used for the ThresholdMethod. These properties are located on the ChartGroups Page Pie Tab on the Property Pages.

Use the MinSlices property to fine-tune the number of slices displayed before the “Other” slice. For example, when set to 5, the chart tries to display 5 slices before grouping data into the “Other” slice.

Note

You can use a value of "0" to represent the "other" slice in code that would normally expect a set value. For example, the series value returned by CoordToDataIndex will be 0 when the other slice is picked.


“Other” Slice Style and Label

Use the FillStyle Pattern and Color properties to define the appearance of the “Other” slice. These properties are located on the FillStyle Tab (ChartStyles) on the Property Pages.

Use the Text label property to change the label of the “Other” slice. Text is located on the Labels Tab (ChartGroups) on the Property Pages.


Pie Ordering

Use the SortOrder property to specify whether to display slices largest-to-smallest, smallest-to-largest, or the order they appear in the data. SortOrder is located on the ChartGroups Page Pie Tab on the Property Pages.


Starting Angle

Use the StartAngle property to specify the angle at which the slices for the first series start. The default angle is 135 degrees. StartAngle is located on the ChartGroups Page Pie Tab on the Property Pages.


Exploding Pies

A slice of a pie chart can be emphasized by exploding it, which extrudes the slice from the rest of the pie. Use the Offset property to set the exploded slice’s offset from the center of the pie. The offset is measured as a percentage of the radius of the pie.

Exploding slices must be set programmatically, and can be set by series, or by a single slice. To set the properties for an exploding slice for a specific slice of all pies, access the Slice object through the Style object for the corresponding series.

‘ Sets the offset for the first series to 10% of the pie’s radius

Chart2D1.ChartGroups(1).Styles(1).Slice.Offset = 10

‘ Resets the exploded slices.

Chart2D1.ChartGroups(1).Styles(1).Slice.Offset = 0

To set the properties for an exploding slice for a single point, access the Slice object through the PointStyles collection. The first number in the PointStyle’s Item method specifies the Series, and the second number specifies the point.

# Sets the offset for the third point of the second

# series to 15% of the pie’s radius

Chart2D1.ChartGroups(1).PointStyles.Item(2,3).Slice.Offset = 15

# Resets the exploded slice.

Chart2D1.ChartGroups(1).PointStyles.Item(2,3).Slice.UseDefault = True


Missing Slices

A slice of the pie chart can be excluded, so that an empty gap in the pie appears where the slice would otherwise be.

Missing slices must be set programmatically, and can be set by individual slices via the PointStyles property of the ChartGroup object. Unlike exploding pies, missing slices cannot be specified by series. The PointStyles collection is empty by default. PointStyles for individual (set,point) pairs must be added before they can be used.

’ PointStyles do not exist by default. You have to add them before using them.

Chart2D1.ChartGroups(1).PointStyles.Add 1, 1

’ Set the first point of the series to be missing.

Chart2D1.ChartGroups(1).PointStyles(1,1).Slice.Display = oc2dDisplayHide


Special Polar Chart Properties

A polar chart draws the x and y coordinates in each series as (theta,r), where theta is amount of rotation from the origin and r is the distance from the origin. The x-axis is represented in either degrees, radians, or grads.

Full or Half-Range X-Axis

Setting the Origin

Specifying the Annotation Angle

Allowing Negative Values


Full or Half-Range X-Axis

Use the IsHalfRange property to determine if the x-axis is represented in full-range (where IsHalfRange is false) or half-range (where IsHalfRange is true).

The IsHalfRange property is located on the ChartGroups Page Polar Tab on the Property Pages.


Setting the Origin

Use the OriginBase property to set the number of degrees along the Y-axis to place the X-axis. OriginBase can be from 0 to 359 degrees.

The OriginBase property is located on the Polar/Radar Tab (Axes) on the Property Pages.


Specifying the Annotation Angle

Use the AnnotationAngle property to specify where on the Y-axis to place the annotation. The AnnotationAngle property is located on the Polar/Radar Tab (Axes) on the Property Pages.


Allowing Negative Values

Use the AxisAllowNegative property to specify whether or not to permit negative values for r. When AxisAllowNegative is enabled, the chart shifts the axis to accommodate negative values. When AxisAllowNegative is disabled, a negative radius is interpreted as a positive radius rotated 180 degrees.

The AxisAllowNegative property is located on the Polar/Radar Tab (Axes) on the Property Pages.


Programming Considerations

Controlling the chart in an application program is generally quite straightforward once you are familiar with the programming basics and the object hierarchy. For most chart objects, the examples and overviews in the Object Reference provide all the information needed to program them.

The following topics cover programming considerations for the 2D Chart.

Object Hierarchy

Programming With Objects

Setting the Error Offset

Programming In C++

Compatibility Issues


Object Hierarchy

The following are the high-level objects defined as children of the 2D Chart control:


Programming With Objects

When you create a 2D Chart control, a Chart2D object is created. This object, like other Visual Basic objects, has properties defined for it. You can change the behavior of your chart by changing these properties.

The Object Reference describes the Chart2D object, the sub-objects automatically created when the Chart2D object is created, and the properties defined for each object. Properties that are read-only are indicated as such in their object description.

A Simple Example

Navigating the Object Hierarchy

Default Properties

Using Collections with Objects

Accessing Each of the Elements of a Collection

Calling Methods with Objects


A Simple Example

The following statement turns off the chart's double-buffering feature by setting the IsDoubleBuffered property of the Chart2D object to False:

Chart2D1.IsDoubleBuffered = False

By default, the first Chart2D object created in an application is named Chart2D1, the second is named Chart2D2, and so on. This is standard Visual Basic behavior.


Navigating the Object Hierarchy

As with other Visual Basic objects, you can access a specific object by navigating its object hierarchy. For example, the following code retrieves the background color of the main body of the chart:

Dim BackColor As Long

BackColor = Chart2D1.ChartArea.Interior.BackgroundColor


Default Properties

If an object is referenced in a statement without a property being specified, the object's default property is assumed. For example, the default property for the Border object is the Type property, which means that the following two statements are equivalent:

Chart2D1.Header.Border.Type = oc2dBorderShadow

Chart2D1.Header.Border = oc2dBorderShadow

Both of the above statements change the value of the Type property to oc2dBorderShadow.


Using Collections with Objects

Many 2D Chart objects are organized into collections. For example, the chart axes are organized into the Axes collection.

All collections are indexed by number, with 1 referring to the first element of the collection, 2 the second, and so on. If the objects in a collection have a Name property, the collection can also be indexed by object name. For example:

Chart2D1.ChartArea.Axes("X").Max = 25.1

This statement accesses the axis named “X” (the X-axis), and sets the maximum value of this axis to 25.1. Note that Visual Basic recognizes the default Item property of the collection, whereas other environments may require an explicit reference to the Item property:

Chart2D1.ChartArea.Axes.Item("X").Max = 25.1

Some 2D Chart collections are static, whereas others are dynamic. Dynamic collections have Add and Remove methods defined. Elements cannot be added to or removed from static collections.

For more details on the behavior of Visual Basic collections, refer to the Visual Basic documentation.


Accessing Each of the Elements of a Collection

Visual Basic enables you to access each of the elements of a collection in turn using the For Each statement. For example, the following code positions all of the chart labels over their attachment locations:

For Each Label in Chart2D1.ChartLabels

Label.Anchor = oc2dAnchorCenter

Next

Each collection defines a Count property whose value is the current number of objects in the collection. You can use Count to access some or all of the elements of a collection. For example, the following is another way to position all of the chart labels:

Dim Counter As Integer

For Counter = 1 To Chart2D1.ChartLabels.Count

Chart2D1.ChartLabels(Counter).Anchor = oc2dAnchorCenter

Next


Calling Methods with Objects

To call a 2D Chart method, access the object with which it is associated. For example, the following statement uses the DataCoordToCoord method, defined by the ChartGroups collection, to convert the chart coordinates (5.1, 10.2) to their equivalent pixel coordinates:

Chart2D1.ChartGroups(1).DataCoordToCoord 5.1, 10.2, PixelX, PixelY

Each method is described in the help page for its associated object. For example, DataCoordToCoord is described in the ChartGroups collection help page.


Setting the Error Offset

2D Chart ensures that its error numbers do not overlap existing Visual Basic error numbers by adding a special error offset to each of its error numbers. This error offset is specified by the ErrorOffset property of the Chart2D object.

If the chart’s error numbers overlap the error numbers generated by another Visual Basic custom control, you can change this ErrorOffset property. Note that you will need to change the ErrorOffset property of every instance of a Chart2D object that you create.


Programming In C++

The 2D Chart can be used in the Visual C++ version environment (version 4.0 or greater), which creates programs written in the C++ programming language. The chart will not work properly with earlier versions of Visual C++.

Insert the 2D Chart Control into an OLE Container Project

Add the 2D Chart Control to the Main Dialog Box

Add a Member Variable to a Project

Programming the 2D Chart Control

Setting an Object Property

Using Collections in C++

Calling Methods in C++

Demo Programs


Insert the 2D Chart Control into an OLE Container Project

In the Visual C++ environment, a 2D Chart control behaves like any other OLE control, which means that it can be incorporated into a container such as a dialog or an application window.

To add the 2D Chart control to an OLE container project, use Component Gallery as follows:

1.

From the Insert menu, select Component. The Component Gallery dialog box appears.

2.

Select the OLE Controls tab.

3.

Select the 2D Chart control icon in the Component Gallery window.

4.

Click the Insert button. This displays a Confirm Classes dialog box, which lists the 2D Chart control classes.

5.

Click the OK button to accept the class generated by Component Gallery.

6.

Click the Close button to close Component Gallery.

At this point, the 2D Chart wrapper class, CChart2D, is added to your project. This means that the 2D chart control can now be added to your application's main dialog box, as shown below.


Add the 2D Chart Control to the Main Dialog Box

To add the 2D Chart control to your dialog template, perform the following steps:

1.

Load the container project into Developer Studio.

2.

In the Project Workspace window, click the ResourceView button.

3.

Open the Dialog folder.

4.

Double-click the main dialog box template.

5.

Choose the 2D Chart control icon from the Controls toolbar.

6.

Position the mouse in the dialog box, and click to position the 2D Chart control.

7.

From the File menu, choose Save All.


Add a Member Variable to a Project

Once the 2D Chart control has been added to the project and placed in the dialog box container, you can access this control from other parts of your project. The easiest way to do this is to create a member variable of the dialog class, CContainerDlg, of type CChart2D (the 2D Chart wrapper class). To create a member variable, perform the following steps:

1.

Load the OLE container project.

2.

Choose ClassWizard from the View menu.

3.

Choose the Member Variables tab.

4.

From the Class Name list box, select the main dialog class (CContainerDlg).

5.

From the ControlIDs list box, select the control ID of the embedded 2D Chart control.

6.

Click the Add Variable button to display the Add Member Variable dialog box.

7.

In the Member Variable edit box, enter a name.

8.

Select Control from the Category list box.

9.

Click OK to close the Add Member Variables dialog box.

10.

Click OK to exit ClassWizard.

The member variable you have just added can now be used to access the embedded 2D Chart control.


Programming the 2D Chart Control

At this point, you are ready to actually program the control. To do this, note the following:

•

A wrapper class header file is defined for each 2D Chart object. Examples: the wrapper class header file for the Chart2D object is named chart2d.cpp, and the wrapper class header file for the Border object is named border.cpp.

•

The wrapper class header file for an object defines two routines for each of its properties: a routine that gets the current value of the property, and a routine that sets the value of the property. For example, the chart2d.cpp file defines two routines for the IsDoubleBuffered property of the Chart2D object: GetIsDoubleBuffered(), which gets the current value of the IsDoubleBuffered property, and SetIsDoubleBuffered(), which sets the value of the IsDoubleBuffered property.

•

Methods defined for an object are included in the wrapper class header file for the object.


Setting an Object Property

The following statement sets the background color of the chart area. The variable m_chart contains an instance of a Chart2D object (the main 2D Chart object).

m_chart.GetChartArea().GetInterior().SetBackgroundColor(

RGB(247,206,151));

This statement navigates the 2D Chart object hierarchy by retrieving the values of successive properties. First, the value of the ChartArea property is retrieved, which is a ChartArea object. Then, this ChartArea object's Interior property is retrieved, which is an Interior object. Finally, the Interior object's BackgroundColor property is set.


Using Collections in C++

Many 2D Chart objects are organized into collections. For example, the chart axes are organized into the Axes collection.

To access a particular element of a collection, specify the index which uniquely identifies this element. For example, the following code changes the maximum value of the X axis to 25.1:

Caxis axisX(m_chart.GetChartArea().GetAxes().GetItem(COleVariant("x")));

axisX.GetMax().SetValue(25.1);

Note that the index 1 refers to the first element of a collection.


Calling Methods in C++

To call a 2D Chart method, access the object with which it is associated. For example, the following statement uses the DataCoordToCoord method, defined by the ChartGroups collection, to convert the chart coordinates (5.1, 10.2) to their equivalent pixel coordinates:

long pixelx, pixely;

m_chart.GetChartGroups().GetItem(COleVariant(short(1)))

.DataCoordToCoord(5.1, 10.2, &pixelx, &pixely);

Each method is described in the help page for its associated object. For example, DataCoordToCoord is described in the ChartGroups collection help page.


Demo Programs

Sample C++ programs, created using Visual C++, are included as part of the ComponentOne Chart distribution. These sample programs are contained in the \CHART\2D\DEMOS\VC directory.


Compatibility Issues

The following compatibility issues affect the behavior of the 2D Chart control in various Windows environments.

Predefined Dash Styles Used in Windows 3.x, Windows 95/98

In the Windows 3.x and Windows 95 environments, lines are drawn using the dash styles predefined by Microsoft Windows. As a consequence, some 2D Chart dash styles are not displayed exactly as specified. The following dash styles are affected:

•

The short dash pattern (oc2dLineShortDash) is represented as a dash-dot pattern.

•

The long-short-long dash pattern (oc2dLineLongShortLongDash) is represented as a dash-dot-dot pattern.

Non-Solid Lines of Thickness Greater than 1 in Windows 95/98

In the Windows 95 environment, any non solid lines of thickness greater than 1 are rendered as lines with thickness 1.

Line Ends are Rounded in Windows 3.x

In the Windows 3.x environment, the ends of lines drawn in charts are rounded, not square. This becomes noticeable in thick lines.

Windows 3.x and Very Large Data Sets

Very large sets of data may not load properly in the Windows 3.x environment.


Distributing ComponentOne Chart Applications

The following topics cover distributing applications created with the ComponentOne Chart control.


Distributing 32-bit OCX Applications

You can freely distribute any applications that you create with ComponentOne Chart. A ComponentOne Chart application needs its dynamic link libraries present on the system it is run on.

Distributable Files

Distributing ComponentOne Chart in Visual Basic

End-User Online Help

Registering the 2D Chart Control


Distributable Files

When distributing 2D 32-bit OCX applications, you may only distribute the following file:

OLCH2X8.OCX

The following support files must also be installed on the end-user's system for ComponentOne Chart 2D OCX applications to work:

OLEPRO32.DLL

OLEAUT32.DLL

If OLEPRO32.DLL has not previously been installed, it must be registered before it can be used. To register this DLL, follow the same steps used to register the ComponentOne Chart Control. If this DLL is installed already, you can assume that it has been registered.


Distributing ComponentOne Chart in Visual Basic

In order to distribute ComponentOne Chart using VB 6, you must run the Package & Deployment wizard (located in “your VB directory”\Wizards\PDWizard ) once to create a file vb6dep.ini. The following dependences must be added to this file so you can distribute an application created with ComponentOne Chart:

[OLCH2X8.OCX]

Register=$(DLLSelfRegister)

Dest=$(WinSysPath)

[OLCH3X8.OCX]

Register=$(DLLSelfRegister)

Dest=$(WinSysPath)

Note that the above file contains the dependencies for both the 2D and 3D ComponentOne Chart controls.

Once you have added the above dependencies, run the Setup wizard and follow the directions on each screen. On the Confirm Dependency screen, make sure you include the OCX files.

In VB 6, on the Included Files Screen, make sure the following files have been included:

OLCH2X8.OCX

OLCH3X8.OCX

In VB 5, on the File Summary screen, make sure the following files have been included:

OLCH2X8.OCX

OLCH3X8.OCX


End-User Online Help

If your applications allow the end-user to access the 2D Chart Property Editor, you should also distribute the Property Editor's end-user online help, contained in the following files:

OLCH2D8U.HLP

OLCH2D8U.CNT

If you have disabled end-user property editing, you do not need to distribute these files.


Registering the 2D Chart Control

Before the 2D Chart control can be used in an application, appropriate entries must be added to the Microsoft Windows registration database.

To register the control for 32-bit applications, pass the complete path and filename of the ComponentOne Chart 2D OCX file, OLCH2X8.OCX, to the REGSVR32.EXE control registration program.


Adding a ComponentOne Chart 2D Control to a Web Page

You can add a ComponentOne Chart 2D control to a web page. Steps 1-5 provide detailed information on the tools you need, how to insert the control, how to create the license pack file, how to optimize the download process and what to look for when testing the web page.

Step 1: Getting Started

Step 2: Creating a Web Page

Step 3: Creating a License Pack File

Step 4: Packaging the Control

Step 5: Testing your Web Page


Step 1: Getting Started

Before you can add ComponentOne Chart to your web page, you will need the following tools:

Microsoft ActiveX SDK - Use this SDK to create the License Pack File (.LPK) that users will download when viewing a web page containing a ComponentOne Chart ActiveX control.

•

You can download the ActiveX SDK from:

http://www.microsoft.com/downloads/details.aspx?familyid=124552ff-8363-47fd-8f3b-36c226e04c85&languageid=f49e8428-7071-4979-8a67-3cffcb0c2524&displaylang=en

•

For more information about the ActiveX SDK, go to:

http://www.microsoft.com/com/tech/activex.asp

Microsoft Cabinet SDK - Use this SDK to create the Cabinet file which stores all the files to be downloaded. Creating a .CAB file helps to minimize the download time, and to keep all downloaded files together.

•

You can download the Cabinet SDK from:

http://download.microsoft.com/download/platformsdk/cab/2.0/w98nt42kmexp/en-us/Cabsdk.exe


Step 2: Creating a Web Page

The first step in adding an ActiveX control to a web page is to create the HTML page, and add the required code to insert, size and access the chart. The following three steps outline how to do this:

1.

Create the web page that you want to add ComponentOne Chart to.

2.

Insert and size the ActiveX control. To do this, add an <OBJECT> tag to your HTML code as follows:

<OBJECT ID="Chart2D1" WIDTH=473 HEIGHT=352
CLASSID="CLSID:92D71E93-25A8-11CF-A640-9986B64D9618"
CODEBASE="olectra.cab">
</OBJECT>

When this HTML code is processed, the browser checks to see if you have ComponentOne Chart registered, and if not it will download and register the control.

If you also want to specify a version the control to check for, add the Version element. This will avoid such problems as using new functionality with a prior version of the control. The following example shows how to specify the control version to search for:

<OBJECT ID="Chart2D1" WIDTH=473 HEIGHT=352
CLASSID="CLSID:92D71E93-25A8-11CF-A640-9986B64D9618"
CODEBASE="http://www.yoursite.com/olectra.cab#Version=6,0,0,0">
</OBJECT>

3.

To set properties, load data or access the chart, you must write VBScript code. For example, the following code sets the header, footer, ChartType and adds some data:

<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
'Declare a Variable
Dim x

'Batch the updates to the Chart
Chart2D1.IsBatched = True

'Setup the Header
Chart2D1.Header.Text = "Statistics By Region"
Chart2D1.Header.Border.Type = 3 'oc2dBorderShadow
Chart2D1.Header.Border.Width = 4
Chart2D1.Header.Interior.BackgroundColor = RGB(190, 190, 190)
Chart2D1.Header.Font.Bold = True

'Setup the Footer
Chart2D1.Footer.Text = "Nowhere"
Chart2D1.Footer.Border.Type = 3 'oc2dBorderShadow
Chart2D1.Footer.Border.Width = 4
Chart2D1.Footer.Interior.BackgroundColor = RGB(210, 210, 210)
Chart2D1.Footer.Font.Size = 10
Chart2D1.Footer.Font.Bold = True

'Add some data to the Chart
Chart2D1.ChartGroups(1).ChartType = 3 'oc2dTypePie
Chart2D1.ChartGroups(1).Data.NumSeries = 5
Chart2D1.ChartGroups(1).Data.NumPoints(1) = 1
Chart2D1.ChartGroups(1).Data.y(1, 1) = 20
Chart2D1.ChartGroups(1).Data.y(2, 1) = 15
Chart2D1.ChartGroups(1).Data.y(3, 1) = 25
Chart2D1.ChartGroups(1).Data.y(4, 1) = 30
Chart2D1.ChartGroups(1).Data.y(5, 1) = 20

'Give the Chart a 3D look
Chart2D1.ChartArea.View3d.Depth = 20
Chart2D1.ChartArea.View3d.Elevation = 30

'Setup some colors and borders
Chart2D1.Interior.BackgroundColor = RGB(170, 170, 170)
Chart2D1.Interior.ForegroundColor = RGB(0, 0, 0)
Chart2D1.Border.Type = 2 'oc2dBorder3DIn
Chart2D1.Border.Width = 5
Chart2D1.ChartArea.Border.Type = 1 'oc2dBorder3DOut
Chart2D1.ChartArea.Border.Width = 3

'Allow users to bring up our Property Page
Chart2D1.AllowUserChanges = True

'Add 5 labels to the Chart
For x = 1 to 5
Chart2D1.ChartLabels.Add
Next

'Setup the Labels
For x = 1 to 5
Chart2D1.ChartLabels(x).Name = "Label" & x
Chart2D1.ChartLabels(x).AttachMethod = 2 'oc2dAttachDataIndex
Chart2D1.ChartLabels(x).AttachDataIndex.Series = x
Chart2D1.ChartLabels(x).AttachDataIndex.Point = 1
Chart2D1.ChartLabels(x).Font.Size = 10
Chart2D1.ChartLabels(x).Font.Bold = True
Chart2D1.ChartLabels(x).Border.Type = 3 'oc2dBorderShadow
Chart2D1.ChartLabels(x).Border.Width = 2
Chart2D1.ChartLabels(x).Interior.BackgroundColor = RGB(255, 235, 205)
Chart2D1.ChartLabels(x).IsConnected = True
Chart2D1.ChartLabels(x).Offset = 10
Next

'Set the text of each of the labels
Chart2D1.ChartLabels(1).Text = "North"
Chart2D1.ChartLabels(2).Text = "South East"
Chart2D1.ChartLabels(3).Text = "South West"
Chart2D1.ChartLabels(4).Text = "West"
Chart2D1.ChartLabels(5).Text = "East"

'Force the location of the Chart to give it more room
Chart2D1.ChartArea.PlotArea.Top.Value = 40
Chart2D1.ChartArea.PlotArea.Bottom.Value = 0

'Go back to normal Chart updates
Chart2D1.IsBatched = False
End Sub

-->
</SCRIPT>

Notes:

•

The CLSID (pronounced Class ID) specified above is for the 32-bit ComponentOne Chart 2D.

•

ComponentOne Chart is safe for scripting, which means that it (or any of its methods) will not write to the local storage when used within a secure Web browser. ComponentOne Chart will also not execute any binary code (for example, a. virus) that is passed to it as data.

•

The Codebase element in the above example points to where the .CAB file (which contains all the files users must download to view the control) is located. For more information on creating .CAB files, see Step 4: Packaging the Control.


Loading Data or a File From a URL

Using the LoadURL method, you can load data or a chart description file (.OC2 and .OC3) directly from a URL instead of adding it programmatically. If you want to load an entire chart, use the Chart2D object’s LoadURL method. If you just want to load data into an existing chart, use the ChartData object’s LoadURL method. Both of these methods have a single parameter, URLname, which is a string representing the URL where the file you want to load is located.

The following two examples illustrate the different uses of the LoadURL method from within an HTML file:

<SCRIPT LANGUAGE="VBScript">

Sub Window_OnLoad()
'Load an .OC2 file
Chart2D1.loadURL("http://www.apexsc.com/olectrachart6/data/profit.oc2")

' Load a .DAT file
Chart2D1.ChartGroups(1).Data.LoadURL("http://www.apexsc.com/olectrachart6/data/1992.dat")
End Sub
</SCRIPT>


Step 3: Creating a License Pack File

Once you have created the HTML page shell for ComponentOne Chart, you must create a license pack file that the user’s browser uses to register the control on their computer. To do this, use the lpk_tool program to create a license pack file for all the ActiveX controls on your page:

1.

Run lpk_tool (located in your ActiveX SDK’s \bin directory).

2.

From the Available Controls list, select either ComponentOne Chart 2D or ComponentOne Chart 3D and click the Add button.

3.

Click the Save & Exit button. You will be prompted for a file name and location.

After creating the .LPK file, you must add the following lines in your HTML page, before the <OBJECT> tag used to describe ComponentOne Chart. In this example, replace filename.lpk with the name of your pack file:

<OBJECT CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<PARAM NAME="LPKPath" VALUE="filename.lpk">
</OBJECT>

Notes:

•

You must have a registered version of ComponentOne Chart on your computer to successfully generate a .LPK file.

•

The reference to the resulting .LPK file that you create must be placed on your HTML page before references to any of your ActiveX controls.

•

If your .LPK was created with only ComponentOne Chart in it, it should be 878 bytes. If it is smaller, the license pack file was not created properly.


Step 4: Packaging the Control

There are three parts to create and copy the files required when downloading the ActiveX control:


A: Creating the .INF File

In order for your browser to correctly load and run ComponentOne Chart you must create an .INF file that lists all of the control’s dependencies. Create a text file with the suffix .INF that lists all of the files needed for this component. The files needed are:

olch2x8.ocx

Here are the contents of an example .INF file called OLECTRA.INF:

[Add.Code]
olch2x8.ocx=olch2x8.ocx

[olch2x8.ocx]
File=thiscab
Clsid={92D71E93-25A8-11CF-A640-9986B64D9618}


B: Creating a .CAB File

1.

Use the cabarc.exe program (found in the Cabinet SDK’s \bin directory) to create .CAB files to combine and compress the files needed for downloading, minimizing the download requirements for the ActiveX controls embedded within your HTML page.

To create a CAB file that contains the ComponentOne Chart 2D OCX, DLL and the .INF file, type:

cabarc n olectra.cab olch2x8.ocx olectra.inf

2.

Find the place in the HTML on your Web page where the ComponentOne Chart control is referenced. (There should be an <OBJECT> tag with a CLASSID that matches the 32-bit ComponentOne Chart 2D CLSID. Edit the HTML and add a Codebase element with the suitable web site URL and CAB file name.

For example:

<OBJECT ID="Chart2D" WIDTH=313 HEIGHT=225

CLASSID="CLSID:92D71E93-25A8-11CF-A640-9986B64D9618"
CODEBASE="http://www.yoursite.com/olectra.cab">
</OBJECT>

A Sample HTML File

Here is a very simple .HTML file that displays a 2D chart control. In particular, note the class IDs for the license pack file and the chart control:

<HTML>

<HEAD>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<TITLE>Home Page</TITLE>
</HEAD>

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"
<PARAM NAME="LPKPath" value="olectra.lpk">
</OBJECT></p>

<p>

<OBJECT ID="Chart2D" WIDTH=313 HEIGHT=225
CLASSID="CLSID:92D71E93-25A8-11CF-A640-9986B64D9618"
CODEBASE="http://www.yoursite.com/olectra.cab">
</OBJECT>

</BODY>
</HTML>


C: Copying .LPK and .CAB Files to the Server

Once you have created the .LPK and .CAB files, copy them to the server where your web page is. The .LPK file must be in the same directory as the HTML file that references it. The .CAB file must be in the directory that is specified in the <OBJECT> tag. For example, in the above HTML code, the file olectra.cab would go in the root directory of the server where www.yoursite.com is located.


Step 5: Testing your Web Page

Once you have created your web page with the ComponentOne Chart ActiveX control embedded, you should now run Internet Explorer on a machine that has never had ComponentOne Chart installed on it. Navigate to the Web site where your page exists and have Internet Explorer attempt to display it.

You may get a sequence of dialog boxes depending on the security level that your copy of Internet Explorer is set to. You can change these settings by doing the following:

1.

On the View menu, click Options. The Options dialog appears.

2.

Click the Security tab.

3.

Click the Safety Level button.

4.

The choices for Security Level are High, Medium, None. The default for Internet Explorer is High, so controls that have not been digitally signed will not be downloaded. ComponentOne Chart 8.0 is signed.

Note:

Internet Explorer caches all downloaded ActiveX control components within a directory called OCCACHE that exists directly under the WINDOWS or WINNT root directories. If you wish to remove ComponentOne Chart from your test system, you only need to delete the files in the OCCACHE directory that correspond to the ones listed in the .INF file described in step 4.


Building a Chart

Building a chart is quite easy. The chart can automatically set properties based on the data, so axis numbering and data display usually do not need much customization.

The following topics cover information on the various steps required to create a chart.

Axis Annotation Overview

Annotating Axes

Using Custom Values Formatting

Annotating with ValueLabels

Annotating with PointLabels

Annotating with TimeLabels

Axis Labeling Programming Considerations

Using a Time-Axis

Positioning Axis Annotation

Chart Orientation and Axis Direction

Setting Axis and Data Bounds

Titling Axes and Rotating Axis Elements

Logarithmic Axes

Adding a Second Y-Axis

Changing the Axis Appearance

Customizing Origins

Adding Grid Lines

Creating Stacking Charts

Creating Combination Charts Using ChartGroups

Converting Data Coordinates

Storing Chart Descriptions in Files

Printing Charts


Axis Annotation Overview

The annotation along each axis is an extremely important part of any chart. The 2D chart can annotate any axis with numbers based on the data (Values) or with text you supply that is displayed at axis coordinates (ValueLabels). The X-axis can also be annotated with text for each point in the data (PointLabels) or with automatically-generated time values (TimeLabels). Time labels are only available on the X-axis – not the Y-axes because the values are generally plotted with time as the independent variable.

Whatever annotation method you choose for each axis, the chart goes to considerable effort to automatically produce the most natural annotation possible, even as chart data changes. You can change annotation properties to fine-tune this process.

Values Annotation

ValueLabels Annotation

PointLabels Annotation (X-axis only)

TimeLabels Annotation (X-axis only)

Choose the Annotation Method


Values Annotation

Perhaps the most common type of annotation, Values automatically generates numeric annotation based on the data itself. Values annotation can be used for any axis, with any chart type, and with any data layout.

See Annotating with Values for details on using Values annotation.


ValueLabels Annotation

A very flexible type of annotation, ValueLabels displays text you define at a specific axis coordinate. This is useful to label only specific coordinates, or to produce annotation in a form that the chart does not provide. ValueLabels annotation can be used for any axis, with any chart type, and with any data layout, with the following exceptions:

•

When used for the X-axis, the chart type cannot be either Pie, Radar or Filled Radar

•

When used for the Y-axis, the chart type cannot be Pie

See Annotating with ValueLabels for details on setting up ValueLabels.


PointLabels Annotation (X-axis only)

PointLabels displays text you define at each point along the X-axis. PointLabels annotation can be used with the X-axis of any chart type.

See Annotating with PointLabels for details on setting up PointLabels.


TimeLabels Annotation (X-axis only)

TimeLabels automatically generates X-axis annotation along a time scale, based on the data and using the starting point and format you specify. This is useful for charts that measure something in seconds, minutes, hours, days, weeks, months, or years. TimeLabels annotation can be used for the X-axis with any data layout, with the following exception:

The chart type for TimeLabels cannot be Pie, Radar, Filled Radar or Polar.

See Annotating with TimeLabels for details on setting up TimeLabels.


Choose the Annotation Method

Use the axis AnnotationMethod property to specify the method used to annotate an axis. AnnotationMethod is located on the Annotation Tab (Axes) on the Property Pages. The button beside this property displays a dialog of properties that apply to the current annotation method.


Annotating Axes

There are several different ways to annotate the chart axes.

Annotating with Values

Numbering Method

Numbering Precision

Numbering and Ticking Increments


Annotating with Values

Also, see Axis Annotation Overview.

Values annotation produces numeric labeling along an axis, based on the data itself. The chart can produce very natural-looking axis numbering automatically, but you can fine-tune properties that control this process.


Numbering Method

Use the NumMethod axis property to select the method used to number an axis. “Round” rounds the numbering determined by the precision, numbering and ticking increments and usually provides the most pleasing display. “Precision” determines numbering by the precision, numbering and ticking increments and produces coarser and more irregular numbering. NumMethod is located on the Annotation Tab (Axes) on the Property Pages.


Numbering Precision

Use the Precision axis property to set the number of decimal places to use when displaying each number. Its IsDefault property allows the chart to automatically determine precision based on the data. The effect of Precision depends whether it is positive or negative:

•

Positive values add that number of places after the decimal place. For example, a value of 2 displays an annotation of 10 as “10.00”.

•

Negative values indicate the minimum number of zeros to use before the decimal place. For example, a value of -2 displays annotation in multiples of 100.

Precision properties are located on their own dialog on the Annotation Tab (Axes) on the Property Pages. Set AnnotationMethod to Values for an axis and click the button beside that property to display the dialog.


Numbering and Ticking Increments

Use the NumSpacing axis property to set the increment between labels along an axis. Its IsDefault property allows the chart to automatically determine the increment.

Use the TickSpacing axis property to set the increment between ticks along an axis. This should generally divide equally into NumSpacing on axes using Values annotation. The TickSpacing IsDefault property allows the chart to automatically determine the increment.

These properties are located on their own dialog on the Annotation Tab (Axes) on the Property Pages.


Using Custom Values Formatting

If you are using values to annotate your axes, you can format them using one of ComponentOne Chart 's predefined formats, or create your own. Use the LabelFormat axis property to set the formatting to Accounting, Currency, Fraction, Number, Percentage, or Scientific predefined formats, or a custom format.

Specify the Values Format

Format Codes

Defining Special Ranges for Formatting

Accounting Format

Currency Format

Fraction Format

Percentage Format

Number Format

Scientific Notation Format


Specify the Values Format

Use the ValueFormat Object's Category property to specify which format method you want to use. The value formats have properties that can be modified from the Values Format dialog. To view the Values Format dialog:

1.

From the Annotation sub tab of the Axes tab, select Values from the Annotation Method field.

2.

Click the Annotation Method button. The Select Annotation Values dialog appears.

3.

Click the Format button. The Value Format dialog appears.

4.

In the Category list, select the type of formatting you want to apply to the axes values. The dialog will change to display the properties for that value format.

5.

Edit the appropriate formatting options, as required.


Format Codes

The following lists and describes the valid format codes you can use in a format specification.

#0? | Creates a placeholder for a number. Use with . (period) code to specify the number of digits to display. # does not display extra zeros. 0 displays extra zeros when there are fewer digits than in the format. ? works like 0 and adds space for insignificant zeros to align decimal points and fractions. For example, “#.0#” formats 16 as 16.0, and 98.666 as 98.67.
. (period) | Positions the decimal point, used with #, 0, and ? to specify the number of digits and rounding. For example, “###.0000” formats 123.45 as 123.4500.
, (comma) | When between digits, acts as a thousands separator. When at the end of a value, divides value by a thousand. For example, “#,###” formats 21000 as 21,000. “0.0,” formats 12000 as 1.2.
$-+/() | Inserts character where it appears in the format. For example, “$#.00” formats 23.3 as $21.30.
\ <character> | Inserts <character> where it appears in the format. For example, “\%” inserts a percent sign (without multiplying).
_<character> | Inserts a space the width of <character>. For example, “_-” displays a space the width of the minus sign.
% | Multiplies value by 100 and inserts % character. For example, “#.##%” formats .85 as 85%.
[multiplier <n>] | Multiplies following value by <n>. For example, “[multiplier 1.6]” formats 10 as 16.
E+ e+ E- e- | Converts value to scientific notation, placing “E” or “e” in front of the exponent. E+ and e+ displays “+” before positive exponents and “-” before negative exponents. E- and e- only displays “-” before negative exponents. For example, “0.0E+00” formats 18987 as 1.8E+04.
*<character> | Pads the annotation space with <character>. For example, “$* ##.##” displays as much space as possible between the $ and value.
[Black] [White] [Red] [Green] [Blue] [Magenta] [Yellow] [Cyan] [<named color>] [COLOR=<value>] | Sets the color of following value or formats. <named color> specifies a ComponentOne Chart named color string. Use <COLOR=<value> to specify an RGB color reference.
[height <n>] | Sets the font size of the value or formats that follow. <n> represents the # of logical units. For example, “0[height 50%].00[height 100%]” formats 75.5 as (75 .50 ).
[align <value>] | Sets the vertical position of the value or formats that follow. Only effective when used with the [height] code. <value> is top, bottom, center, baseline, or top(x). When top(x), x specifies the only character for which the alignment is used. For example, “0.0[height 75%][align top(0)]E+00” formats 100 as 1.0E+02 .
[hide] [show] | [hide] hides the value or formats that follow. [show] turns off format/value hiding. For example, “0.0[hide]E[show]+00” formats 70 as 7.0+01.
; (semicolon) | Ends one group and begins a format group. For example, “#.##%” formats .85 as 85%.


Defining Special Ranges for Formatting

Several format codes enable you to define formatting for a range of numbers, in finer details than the built-in positive, negative and zero groups. The codes that define conditional formatting are [>value], [<value], [=value], [<>value], [>=value], and [<=value]. Use these codes to define new groups whose format codes are applied only when the condition is true. Each group is separated by a semicolon (;). The following example defines special formatting for values greater than 1000:

###.##;-###.##;#.#;[>1000]0.0E+00


Accounting Format

Use the Accounting Object to determine how this ValueFormat appears. The Accounting format puts a dollar sign in front of the value, pads the value with zeros (2 is the default) for the cents, and pads the value with spaces so that the dollar signs and decimals are aligned. The default format code is:

_-$* #,##0.00;-$* #,##0.00

•

The underscore adds a space the size of a dash (-) to the beginning of the annotation, and the asterisk (*) adds space between the dollar sign and the value to make sure the dollar signs align correctly.

•

Use the OrderCurrencySignValue property to change the order of the negative sign, dollar sign, and value.

•

Use the NegativeValueColor property to specify the color used to display negative values.


Currency Format

Use the Currency Object to determine how this ValueFormat appears. The Currency format puts a dollar sign in front of the value, pads the value with zeros (2 is the default) for the cents. The default format code is:

$#,##0.00;-$#,##0.00

•

Use the OrderCurrencySignValue property to change the order of the negative sign, dollar sign, and value.

•

Use the NegativeValueColor property to specify the color used to display negative values.


Fraction Format

Use the Fraction Object to determine how this ValueFormat appears. The Fraction format converts all decimal values to fractions, up to the number of digits specified or with a fixed denominator. The default format code is:

0 ?/?

•

Use the Denominator property to manually set the denominator for all fractions. Note that if you set this property, DenominatorDigits is set to 0.

•

Use the DenominatorDigits property to set the maximum number of digits to use as the denominator. The chart automatically calculates the closest possible match to use. Note that if you set this property, Denominator is set to 0.


Percentage Format

Use the Percentage Object to determine how this ValueFormat appears. The Percentage format multiplies all values by 100 and displays a percent sign. The default format code is:

0.00%;-0.00%

•

Use the DecimalPlaces property to set the maximum number of decimal places to display.

•

Use the OrderPercentSignValue to specify the order of the percent sign, negative sign and value.


Number Format

Use the Number Object to determine how this ValueFormat appears. The default format code is:

0.00

•

Use the OrderSignValue property to change the order of the negative sign and value.

•

Use the NegativeValueColor property to specify the color used to display negative values.


Scientific Notation Format

Use the Scientific Object to determine how this ValueFormat appears. The Scientific format converts values to scientific notation and places an E in front of the exponent. The default format code is:

0.00E+00

•

Use the DecimalPlaces property to set the maximum number of decimal places to display.

•

Use the UseSmallExponent property to display the exponent as a superscript without the E/e.

•

Multipliers, commas and percent signs are ignored with Scientific notation.

Notes

•

With scientific notation, using an E- or e- converts values to scientific notation and places a minus sign in front of negative exponents. Using E+ or e+ converts values to scientific notation, places a minus sign in front of negative exponents, and a plus sign in front of positive exponents.

•

Each custom format string can have up to 3 sections (not including sections for specific ranges)- one each for positive values, negative values and zeros, in that order. Each section in the string should be separated by a semi-colon.


Annotating with ValueLabels

Also, see Axis Annotation Overview.

ValueLabels annotation displays the labels you define at the axis coordinate you specify. This is useful for displaying special text at a specific axis coordinate, or when you need a kind of annotation that the chart does not support. You can set the axis coordinate and the text to display for each ValueLabel, and also add and remove individual ValueLabels. ValueLabels annotation can be used for any axis, with any chart type, and with any data layout, with the following exceptions:

•

When used for the X-axis, the chart type cannot be either Pie, Radar or Filled Radar

•

When used for the Y-axis, the chart type cannot be Pie

Every label displayed on the axis is one ValueLabel. Each ValueLabel has a Value property and a Label property.

Use the Value property to set the axis coordinate to display the label. Use the Label property to specify the text to display. All ValueLabels properties are located on their own dialog on the Annotation Tab (Axes) on the Property Pages. Set AnnotationMethod to ValueLabels for an axis and click the button beside that property to display the dialog.


Annotating with PointLabels

Also, see Axis Annotation Overview.

PointLabels annotation displays the labels you define along the X-axis. This is useful for annotating the X-axis of any chart using Array data layout, including bar, stacking bar, candle, HiLo, HiLoOpenClose, radar, filled radar and pie charts. You can add, remove, and edit PointLabels.

PointLabels are a collection of labels. The first label applies to the first point, the second label applies to the second point, and so on.

Use the PointLabels ChartGroup properties to define and edit PointLabels. These are located on the Labels Tab (ChartGroups) on the Property Pages. Remember to set the X-axis AnnotationMethod to PointLabels.


Annotating with TimeLabels

Also, see Axis Annotation Overview.

TimeLabels annotation interprets the X-values in your data as units of time along the X-axis. The chart calculates and displays a time-axis based on the starting point and format you specify. A time-axis is useful for charts that measure something in seconds, minutes, hours, days, weeks, months, or years. TimeLabels annotation can be used for the X-axis with any data layout, with the following exception:

The chart type for TimeLabels cannot be either Pie, Radar, Filled Radar or Polar.

Four properties are used to control the display and behavior of TimeLabels:

1.

Unit

2.

Base

3.

Format

4.

AnnotationMethod


Time Unit

Use the Unit property to specify how to interpret the X-values in the data. You can select either Seconds, Minutes, Hours, Weeks, Months, or Years. For example, when set to Years, X-values that range from 5 to 15 become a time-axis spanning 10 years.


Time Base

Use the Base property to set the starting point that the time-axis is measured from. You can specify the base in a common “mm/dd/yy hh:mm:ss” format, between January 1, 1970 and January 19, 2038. For example, to specify 3:00 pm on June 15, 1996, set the Base property to “06/15/96 15:00”.


Time Format

Use the Format property to specify what text to display at each annotation point. Its IsDefault property allows the chart to automatically determine an appropriate format based on the Unit property and the data, so you often do not need to customize the format.

Format specifies a time format. You build a time format using special format codes. The chart displays only the parts of the date/time specified by Format. The following lists all of the valid format codes:

%a | Weekday name, abbreviated
%A | Weekday name
%b | Month name, abbreviated
%B | Month name
%c | Appropriate date/time representation
%d | Day of month (01 to 31)
%H | Hour (0 to 23)
%I | Hour (0 to 12)
%j | Day number of year (001 to 366)
%m | Month number (01 to 12)
%M | Minute of hour (00 to 59)
%p | AM or PM
%S | Seconds (00 to 61)
%U | Week number of year (00 to 53), Sunday first day of week 1
%w | Weekday number (0 to 6), Sunday = 0
%W | Week number of year (00 to 53), Monday first day of week 1
%x | Appropriate date representation
%X | Appropriate time representation
%y | Year number within century (00 to 99)
%Y | Year
%Z | Time zone (shows nothing if time zone not known)

All TimeLabels properties are located on their own dialog on the Annotation Tab (Axes) on the Property Pages. Set AnnotationMethod to TimeLabels for the X-axis and click the button beside that property to display the dialog.


Axis Labeling Programming Considerations

If the AnnotationMethod property is set to oc2dAnnotateValueLabels, the chart places labels at explicit locations along an axis. The ValueLabels property, which is a ValueLabels collection, supplies this list of strings and their locations. For example, the following code sets chart labels at the locations 10, 20 and 30:

With Chart2D1.ChartArea.Axes("X")

.AnnotationMethod = oc2dAnnotateValueLabels

With .ValueLabels

.Add 10#, "Label 1"

.Add 20#, "Label 2"

.Add 30#, "Label 3"

End With

End With

The ValueLabels collection can be indexed either by subscript or by value:

' this retrieves the label for the second Value-label

Value = Chart2D1.ChartArea.Axes("X").ValueLabels(2).Value;

' this retrieves the label at chart coordinate 2.0

Value = Chart2D1.ChartArea.Axes("X").ValueLabels(2.0).Value;

If the AnnotationMethod property is set to oc2dAnnotatePointLabels, the chart evenly spaces the points across the axis, and annotates them with a list of strings. This labeling method can only be used on the X-axis. The labels are supplied by setting the PointLabels property of the ChartGroup object for this chart. For example, the following code specifies labels for each of the three points on the X-axis:

With Chart2D1

' assume three points on X-axis

.ChartArea.Axes("X").AnnotationMethod = oc2dAnnotatePointLabels

With ChartGroups(1).PointLabels

.Add "Point 1"

.Add "Point 2"

.Add "Point 3"

End With

End With

If the AnnotationMethod property is set to oc2dAnnotateTimeLabels, the chart treats the axis as a Time-axis. This labeling method can only be used on the X-axis. To define the values to appear on a Time-axis, access the TimeScale property, which is a TimeScale object, and set its properties as follows:

•

Set the Base property to the starting date and/or time.

•

Set the Unit property to the time unit to be used. This property must be set to a time unit constant.

•

Set the Format property to the format string to use when generating the time labels. See Annotating With TimeLabels for details on the contents of this format string.


Using a Time-Axis

Also, see Axis Annotation Overview.

2D Chart enables you to draw charts displaying data that changes over time. To do this, specify that the X-axis is to be treated as a time dimension by setting the properties of the TimeScale object (which is accessible via the Axis object representing the X-axis).

The following TimeScale properties define a Time-axis:

•

The Base property specifies the starting point of the Time-axis. Its value is a standard OLE Date value.

•

The Unit property specifies the unit of time used in the Time-axis.

For example, the following statement sets the starting point to January 15, 1985:

Chart2D1.ChartArea.Axes("X").TimeScale.Base = #1/15/85#

And the following sets the starting point to the current time in Visual Basic:

Chart2D1.ChartArea.Axes("X").TimeScale.Base = Now


Date Methods

The DateToValue method converts an OLE Date value into a Time-axis position (a floating-point value). To convert a Time-axis position to a Date, use the ValueToDate method.

To convert a Date to a formatted text string, use the FormatDate method. For information on date format strings, see Annotating with TimeLabels.


Positioning Axis Annotation

Axis annotation typically appears beside its axis. This may be a problem on charts with an origin that is not at the axis minimum or maximum. The chart can automatically determine where to place annotation in different situations, depending on the chart type. If this does not give the desired results, you can specify exactly where to place the annotation for each axis.


Specifying Annotation Placement

Use the AnnotationPlacement property to specify annotation placement for an axis. When set to Auto, annotation on plot and area charts is placed at the origin; on bar and stacking bar charts it is placed at the end of the axis closest to the origin. You can also explicitly place annotation at the origin, the axis minimum, or the axis maximum.

AnnotationPlacement is located on the Annotation Tab (Axes) on the Property Pages.

Note: AnnotationPlacement for the Y-axis is ignored for the Y-axis when the Y2-axis is displayed.


Chart Orientation and Axis Direction

A typical chart draws the X-axis horizontally from left-to-right and the Y-axes vertically from bottom-to-top. You can reverse the orientation of the entire chart, and/or the direction of each axis.


Chart Orientation

Use the ChartArea IsHorizontal property to change the chart orientation. When set to Horizontal, the X-axis is drawn vertically and the Y-axes are drawn horizontally. Any properties set on the X-axis apply to the vertical axis, and Y-axis properties apply to the horizontal axis. IsHorizontal is located on the General Tab (ChartArea) on the Property Pages.

Note that IsHorizontal has no effect on polar, radar or filled radar charts.


Axis Direction

Use the Axis IsReversed property to reverse the direction of an axis. For polar, radar and filled radar charts, reversing the X-axis changes the direction of rotation. IsReversed is located on the General Tab (Axes) on the Property Pages.


Setting Axis and Data Bounds

Normally a graph displays all of the data it contains. Sometimes you may want to display only part of the data. There are two ways to frame a specific part of the chart: by fixing data bounds, or by fixing axis bounds.

Fixing axis bounds generally gives better results than fixing data bounds. The chart determines the extent of each axis by considering the lowest and highest data value, the origin, and the numbering increment.


Axis Min and Max

Use the Axes Min and Max properties to frame a chart at specific axis values. Their IsDefault properties allow the chart to automatically determine axis bounds based on the data bounds. These properties are located on the Scale Tab (Axes) on the Property Pages.

Note that you cannot set the X axis for Polar charts.


Data Min and Max

Use the Axes DataMin and DataMax properties to frame a chart at specific data values. Their IsDefault properties set the chart to use the minimum and maximum values in the data. These properties are located on the Scale Tab (Axes) on the Property Pages.

Note that you cannot set the Axes DataMin and DataMax properties for Polar, Radar and Filled Radar charts.


Titling Axes and Rotating Axis Elements

Adding a title to an axis clarifies what is charted along that axis. You can add axis titles to area, plot, bar, HiLo, HiLoOpenClose or candle charts. You can also rotate the title or the annotation along the axis, as shown below.


Adding an Axis Title

Use the axis Title property to add a title to an axis. To remove the title, delete the text. Title is located on the Title Tab (Axes) on the Property Pages.

Note that you cannot add an axis title to either polar, radar or filled radar charts.


Rotating Axis Title

Use the axis TitleRotation property to rotate the axis title to either 90 or 270 degrees counterclockwise. Rotation is only visible on vertical axes (that is, Y or Y2 unless the ChartArea IsHorizontal property has been set to invert the chart orientation). 270-degree rotation usually looks best on the Y2-axis.

TitleRotation is located on the Title Tab (Axes) on the Property Pages.


Rotating Axis Annotation

Use the axis AnnotationRotationAngle property to rotate the axis annotation counterclockwise the specified number of degrees; 270-degree rotation usually looks best on the Y2-axis. AnnotationRotationAngle is located on the Annotation Tab (Axes) on the Property Pages.

Rotation Note

The axis font must be scalable to rotate the annotation or title. TrueType fonts such as Arial or Courier New are scalable. Bitmap fonts such as System, Small Fonts, or MS Sans Serif are not scalable, and cannot be used if you want to rotate annotation or title.


Logarithmic Axes

Axis annotation is normally interpreted and drawn in a linear fashion. You can set any axis to be interpreted logarithmically (log base 10), as shown below. Logarithmic axes are useful for charting certain types of scientific data.

Because of the nature of logarithmic axes, they impose the following restrictions on the chart:

•

Any data that is less than or equal to zero is not graphed (it is treated as a data hole), since a logarithmic axis only handles data values that are greater than zero. For the same reason, axis and data minimum/maximum bounds and origin properties cannot be set to zero or less.

•

Axis numbering increment, ticking increment, and precision properties have no effect when the axis is logarithmic.

•

For a logarithmic X-axis, the chart type must be either plot, bubble, area, HiLo, HiLoOpenClose or candle. For the Y-axis, the chart type must be either plot, bubble, area, polar, HiLo, HiLoOpenClose, candle, radar or filled radar.

•

The annotation method for the X-axis cannot be TimeLabels.


Specifying a Logarithmic Axis

Use the Axis IsLogarithmic property to make an axis logarithmic. IsLogarithmic is located on the General Tab (Axes) on the Property Pages.

Notes

•

Pie charts are not affected by logarithmic axes.

•

Polar, radar and filled radar charts are not affected by a logarithmic X-axis.


Adding a Second Y-Axis

There are two ways to create a second Y-axis (called the Y2 axis) on a chart. The simplest way is to define a numeric relationship between the Y and Y2 axes, as shown below. Use this to display a different scale or interpretation of the same graph data.

The other way to create a Y2-axis is to create a combination chart. See Creating Combination Charts using ChartGroups for a complete discussion.

Defining Y2-Axis Multiplier

Use the Multiplier Y2-axis property to define the multiplication factor for the Y2-axis. This property generates Y2-axis values from the Y-axis annotation. The multiplication factor can be positive or negative. Multiplier is located on the Annotation Tab (Axes) on the Property Pages.

Using a Constant Value

Use the Constant Y2-axis property to define a value to be added to or subtracted from the Y2-axis values generated by Multiplier. Constant is located on the Annotation Tab (Axes) on the Property Pages.

Hiding Y2-Axis

Use the IsShowing axis property to remove the Y2-axis from the display. IsShowing is located on the General Tab (Axes) on the Property Pages.

Other Y2-Axis Properties

You can customize most axis properties for the Y2-axis, including AnnotationMethod, Min, Max, IsLogarithmic, NumMethod, NumSpacing, and Title.


Changing the Axis Appearance

You can customize the appearance of the X, Y, and Y2 axes by changing the tick lengths, colors, and line patterns using the Axes AxisStyle object.

Tick Length

Use the AxisStyle TickLength property to change the length of the ticks on the axis. The IsStyleDefault property allows the chart to set the tick length automatically. These properties are located on the Axis/Gridlines Tab (Axes) on the Property Pages.

' Set tick length on X axis to 5

Chart2D1.ChartArea.Axes("X").AxisStyle.TickLength = 5

Axis Appearance

The AxisStyle object has a LineStyle sub-object that controls the line pattern, thickness, and color properties of the axis lines and ticks. These are located on the AxisStyle Tab (Axes) on the Property Pages, and available via the LineStyle Object.

' Set tick and axis width on X axis to 2

Chart2D1.ChartArea.Axes("X").AxisStyle.LineStyle.Width = 2


Customizing Origins

The chart can choose appropriate origins for the axes automatically, based on the data. You can customize how the chart determines the origin, or directly specify the coordinates of the origin.


Origin Placement

The easiest way to customize an origin is by controlling its placement, using the Axes OriginPlacement property. When set to Auto, the origin is placed at the axis minimum or at zero, if the data contains positive and negative values or is a bar chart. You can also explicitly place an origin at zero, the axis minimum, or the axis maximum. OriginPlacement is located on the Annotation Tab (Axes) on the Property Pages.


Origin Coordinates

When you need to place the origin at an arbitrary coordinate, use the Axes Origin property. Its IsDefault property allows the chart to automatically determine the origin coordinate based on the data. These properties are located on the Scale Tab (Axes) on the Property Pages.

Note

•

When you explicitly set or fix an origin coordinate, the chart ignores the OriginPlacement property.

•

The Y-axis origin cannot be by the user for polar and radar chart types. For these chart types the origin is automatically set to equal the DataMax property.


Adding Grid Lines

Displaying a grid on a chart can make it easier to see the exact value of data points. You can set the spacing between lines on the grid, and define how the grid looks.

Horizontal gridlines are a property of the Y-axis. Vertical gridlines are a property of the X-axis. You cannot set grid properties on the Y2-axis. For polar and radar charts, circular gridlines are a property of the Y-axis. Radial gridlines are a property of the X-axis. The following charts show the difference between radial and circular gridlines:


Grid Spacing

Use the gridlines Spacing property to customize the grid spacing for an axis. Its IsDefault property allows the chart to space the grid automatically, drawing a gridline wherever there is annotation. These properties are located on the Axis/Gridlines Tab (Axes) on the Property Pages.


Grid Appearance

Use the grid Style properties to customize the line pattern, thickness, and color of the gridlines. These are located on the GridStyle Tab (Axes) on the Property Pages. Use the IsStyleDefault grid property to allow the chart to determine the grid style. The IsStyleDefault property is located on the Axis/Gridlines Tab (Axes) on the Property Pages.


Special Considerations for Radar Charts

Radar and filled radar charts use the X-axis gridlines to display radar lines. The radar lines will not be displayed unless the X-axis gridline spacing is set to IsDefault.


Creating Stacking Charts

Stacking charts represent the data in a chart in a cumulative fashion by stacking the values for each series on top of the values from the previous series. You can apply stacking using the IsStacked property for Plot, Area, Polar, Radar, and Filled Radar charts.

This property is located on the ChartGroup tab’s General sub tab on the Property Editor.

Note

To remain backwards compatible with previous versions of ComponentOne Chart, Stacking Bar Charts are implemented as a separate chart type from Bar Charts .


100 Percent Stacking

Use the IsYAxis100Percent and IsY2Axis100Percent properties to scale the Y and Y2 axes of stacking charts to a common 100 percent value. When Is[YY2]Axis100Percent is False, the actual series data is used. When Is[YY2]Axis100Percent is True, the data is scaled so that all points are the same height and each series is scaled to a total of 100 percent.

This property is located on the Axes tab’s General sub tab on the Property Editor.

Note

The implementation of 100 Percent Stacking for Stacking Bar Charts is the same.


HIdden and Excluded Series

Hidden and excluded series do not appear in stacking charts, with the exception of Stacking Bar Charts, in which hidden series create a floating bar chart .


Creating Combination Charts Using ChartGroups

A combination chart displays two separate groups of data in the same chart. Combination charts are useful for comparing two groups of data against the same X-axis.

Each group of data is part of a ChartGroup. A ChartGroup also has a set of ChartStyles, SeriesLabels, PointLabels, and properties that define the chart type and drawing order. Use the first ChartGroup when creating a chart having just one group of data. Use the second ChartGroup when adding a second data group to the chart. The second ChartGroup only works when data exists in the first.

The X-axis is common to both ChartGroups. The first Y-axis applies to the first ChartGroup’s data. The second Y-axis (Y2) applies to the second ChartGroup’s data.

Special Rules

Loading Second ChartGroup Data

Setting Second ChartGroup Chart Type and Drawing Order

Legend

Customizing Second ChartGroup ChartStyles


Special Rules

When displaying a combination chart, the chart has the following limitations:

•

Pie, radar, filled radar and polar charts cannot be used in combination charts.

•

When annotating the X-axis using PointLabels, only the first ChartGroup’s PointLabels are used.


Loading Second ChartGroup Data

Use the Load button on the Data Tab (ChartGroups) on the Property Pages, to load data into the second ChartGroup. See Understanding Data Layout for information on data layouts.


Setting Second ChartGroup Chart Type and Drawing Order

Use the ChartType ChartGroups property to set the chart type for the second ChartGroup. ChartType is located on the General Tab (ChartGroups) on the Property Pages. See Choosing the Chart Type for information on chart types.

Use the DrawingOrder ChartGroups property to set which ChartGroup to draw first. When set to 1, that ChartGroup is drawn first and appears behind the other. DrawingOrder is located on the General Tab (ChartGroups) on the Property Pages.


Legend

The legend in a combination chart combines the SeriesLabels for the first and second ChartGroups. Use the SeriesLabels property to add, remove, or change SeriesLabels. SeriesLabels is located on the Labels Tab (ChartGroups) on the Property Pages. See Using a Legend for information on legends.


Customizing Second ChartGroup ChartStyles

Use the FillStyle, LineStyle, and SymbolStyle ChartStyle properties to set or change ChartStyles for the second ChartGroup. ChartStyles properties are located on the ChartStyles Page. See Changing ChartStyles for information on ChartStyles.


Converting Data Coordinates

The ChartGroups collection provides methods which enable you to do the following:

•

Convert from data coordinates to pixel coordinates and vice versa.

•

Determine the pixel coordinates of a given data point in a series, or the closest point to a given set of pixel coordinates.

To convert from data coordinates to pixel coordinates, call the DataCoordToCoord method. For example, the following code obtains the pixel coordinates corresponding to the screen coordinates (5.1, 10.2):

Dim PixelX As Long

Dim PixelY As Long

...

With Chart2D1.ChartGroups(1)

.DataCoordToCoord 5.1, 10.2, PixelX, PixelY

End With

' PixelX and PixelY now contain the pixel coordinate value

If the chart coordinate is out of the visible range of the chart, both of the pixel X- and Y-coordinates are set to -1.

To convert from pixel coordinates to data coordinates, call CoordToDataCoord. For example, the following converts the pixel coordinates (225, 92) to their equivalent data coordinates:

Dim ScreenX As Double

Dim ScreenY As Double

Dim Region As Integer

...

With Chart2D1.ChartGroups(1)

Region =.CoordToDataCoord (225, 92, ScreenX, ScreenY)

End With

' ScreenX and ScreenY now contain the data coordinate value

CoordToDataCoord returns, as its return value, the region of the chart in which the pixel coordinates are located. This region is represented as a region constant.

To determine the pixel coordinates of a given data point, call DataIndexToCoord. For example, the following code obtains the pixel coordinates of the third point in the first data series:

Dim PixelX As Long

Dim PixelY As Long

...

With Chart2D1.ChartGroups(1)

.DataIndexToCoord 1, 3, PixelX, PixelY

End With

' PixelX and PixelY now contain the pixel coordinate value

To determine the closest data point to a set of pixel coordinates, call CoordToDataIndex:

Dim Series As Long

Dim Point As Long

Dim Distance As Long

Dim Region As Integer

...

With Chart2D1.ChartGroups(1)

Region =.CoordToDataIndex (225, 92, oc2dFocusXY, Series, _

Point, Distance)

End With

The third argument passed to CoordToDataIndex specifies how the nearest series and point value are determined. This argument must be a focus constant.

CoordToDataIndex returns the series and point value corresponding to the closest data point, and also returns the distance in pixels between the pixel coordinates and the point. CoordToDataIndex returns, as its return value, the region of the chart in which the pixel coordinates are located. This region is represented as a region constant. When the returned region is oc2dRegionInLegend, the returned point value is also set to oc2dRegionInLegend, and the returned series is the closest element in the legend.


Converting VB Coordinates

In Visual Basic, coordinate values are measured in twips (1,440 twips equals one inch). The following code converts the height and width of a chart from twips to pixels:

pixwidth = Chart2D1.Width / Screen.TwipsPerPixelX

pixheight = Chart2D1.Height / Screen.TwipsPerPixelY


Converting Coordinates Passed By Reference

If passing parameters by reference is not supported in your development environment (such as VBScript), the ChartGroups collection provides methods for converting coordinates that return an object instead of a reference. Otherwise, these methods function like DataCoordToCoord, CoordToDataCoord, DataIndexToCoord, and CoordToDataIndex.

•

DataCoordToCoordObject maps a chart coordinate to a pixel coordinate. A Chart2DCoordResult object is returned with the X pixel and Y pixel values for the corresponding chart coordinate.

•

CoordToDataCoordObject maps a pixel coordinate to a chart coordinate. A Chart2DDataCoordResult object is returned with the X and Y values indicating chart region in which the coordinate is found.

•

DataIndexToCoordObject determines the closest pixel coordinate given a chart group series and point. A Chart2DCoordResult object is returned with the X Pixel and Y Pixel values.

•

CoordToDataIndexObject picks the displayed data closest to the given pixel coordinate. A Chart2DDataIndexResult object is returned with the Series, Point and Distance values that indicate the chart region in which the coordinate is found.


Storing Chart Descriptions in Files

To save a chart description in a file, access the Chart2D object and call the Save method:

Chart2D1.Save "C:\OLECTRA\CHART1.OC2"

To load a previously saved chart description from a file, call the Load method:

Chart2D1.Load "C:\OLECTRA\CHART1.OC2"

Both methods return True if the file operation was successful and False if an error occurred.


Saving Chart Data

Chart data is normally stored with the other chart properties. If you don't want the data saved, set the IsSaved property in the Chart2DData object to False. If you want the chart data saved to a file, set the FileName property to the name of the file. Saved data can be loaded from this file using the Load method.

If the IsSaved property is set to True, data is saved with the chart, and the value of the FileName property is ignored.


Printing Charts

Many applications need to provide the user with a way of getting a hardcopy of the chart. This includes printing the chart, copying it to a file or the clipboard. ComponentOne Chart provides several methods to output charts to one of these destinations.


Output/Printing Methods

The methods listed below allow you to output the chart. See the Chart2D Object for more information.

CopyToClipboard | Function CopyToClipboard(Format As FormatConstants) As Boolean | Copies the chart to the clipboard using the graphics format you specify.
DrawToDC | Function DrawToDC(Hdc As Long, Format As FormatConstants, Scale As ScaleConstants, Left As Long, Top As Long, Width As Long, Height As Long) As Boolean | Draws the chart on a specified device at the scale and graphics format you specify.
DrawToFile | Function DrawToFile(FileName As String, Format As FormatConstants) As Boolean | Draws the chart into a file using the graphics format you specify.
PrintChart | Function PrintChart(Format As FormatConstants, Scale As ScaleConstants, Left As Long, Top As Long, Width As Long, Height As Long) As Boolean | Prints the chart using the Windows Print dialog box.

Each of these methods enables you to produce a copy of the chart in bitmap format, Metafile format, or enhanced Metafile format.


Printing a Chart

To print a chart using the standard Windows Print dialog, use the PrintChart method. This method allows you to specify the image format and the size and position of the chart.

oc2dScaleNone | Uses pixel count matching the screen display.
oc2dScaleToFit | Maximizes the size of the chart within the rectangle specified by left, top, width, and height without changing the aspect ratio of the screen display.
oc2dScaleToWidth | Scales the chart without changing the aspect ratio so that the width of the chart matches the width specified by the width argument.
oc2dScaleToHeight | Scales the chart without changing the aspect ration so that the height of the chart matches the height specified by the height argument.
oc2dScaleToMax | Scales the width to match the width argument, scales the height to match the height argument, and allows the aspect ratio to change.
Width | If this value is zero, then the width is set to the number of pixels in the width of the device (printer).
Height | If this value is zero, then the height is set to the number of pixels in the height of the device (printer).

The following code example illustrates how to print a chart:

' Prints the chart as a Windows bitmap scaled to fit the entire_

‘page without changing the aspect ratio

Chart2D1.PrintChart oc2dFormatBitmap, oc2dScaleToFit, 0, 0, 0, 0

‘Prints the chart as a Windows bitmap scaled to fit the entire_

‘page, filling both the height and width

Chart2D1.PrintChart oc2dFormatBitmap, oc2dScaleToMax, 0, 0, 0, 0


Outputting Charts to Device Contexts

Use the DrawToDC for more complicated chart output, such as printing multiple charts on a single page, or for printing directly to a printer without using the Windows Print dialog. For example, to print several charts on one page, call DrawToDC for each chart, and specify the top, left, width and height arguments to specify each chart's different size and position. The following example shows how to use DrawToDC for a printing function that prints a chart that fills the page to the default printer without using the Windows Print dialog box:

' Prints a title

Printer.Print "Simple Chart Example"

' Prints the chart directly to the printer as an enhanced

' metafile with top and left margins of 0 pixels, and a

' height and width to fit the page

Chart2D1.DrawToDC Printer.hDC, oc2dFormatEnhMetafile, oc2dScaleToMax, 0, 0,_

Printer.ScaleWidth/Printer.TwipsPerPixelX,_ Printer.ScaleHeight/Printer.TwipsPerPixelY

' Ends the print job

Printer.EndDoc

The last four parameters specified in the PrintChart call indicate the location and size (in pixels) of the printer page into which the chart image is printed. The pixels for a printer are usually much smaller than those of the screen, as printing devices have a much higher resolution.

If the second parameter is oc2dScaleNone, the printer will use the same number of pixels that are used by the chart on the screen. A typical resolution for the screen is 96 pixels per inch while a laser printer is 600 pixels per inch, resulting in a small image. If the image is larger that the rectangle specified, the image will be clipped.

If the second parameter is oc2dScaleToMax, the image is scaled to fill the entire rectangle specified. To print a chart 1 cm from the left top margin, 15 cm wide, and 10 cm high, the following code would be used:

Private Sub cmdPrintChart_Click()

Dim left As Integer, top As Integer, width As Integer, height As Integer

Dim xfactor As Double, yfactor As Double

xfactor = 1440 / (2.54 * Printer.TwipsPerPixelX)

yfactor = 1440 / (2.54 * Printer.TwipsPerPixelY)

left = 1 * xfactor

top = 1 * yfactor

width = 15 * xfactor

height = 10 * xfactor

Me.lblPrintChart.Caption = Me.Chart2D.PrintChart (oc2dFormatBitmap,_

oc2dScaleToMax, left, top, width, height)

End Sub


Working with Data

The following topics explain how to plot, setup and configure your data for use with ComponentOne Chart.

Data Overview

Loading Data From a File

Charting Data Directly From Your Program

Charting Data Using Data Binding

Hiding and Excluding Data Series

Fast Update Methods

Copying Data

Batching Chart Updates

Double Buffering

Statistical Methods


Data Overview

Also, see Understanding Data Layout.

The 2D Chart control enables you to add or modify data at runtime.

Data Organization

Batching Data Updates

Changing Data Values

Adding Points and Series

Handling Missing Data

Fast Update


Data Organization

Data in a chart is organized into chart groups. Each chart contains two chart groups (although most charts will only use the first ChartGroup), each of which is treated as a separate entity. In 2D Chart, a chart group is represented by a ChartGroup object.

Within a chart group, data is represented by the Data property, which is a Chart2DData object. The Chart2DData object defines the following properties which control the data to be displayed in the chart:

The NumSeries property defines the number of data series in the chart group.

•

The NumPoints property defines the number of data points in a series. This property is indexed by series. For example, the statement

NumPoints = Chart2D1.ChartGroups(1).Data.NumPoints(1)

assigns the number of data points in the first series to the NumPoints variable.

•

The Layout property specifies the data layout. Its value must be a data layout constant specifying either array or general data. If array data is specified, each series is assumed to have the same number of data points.

•

The X and Y properties specify the X- and Y-coordinates of a particular data point. These properties are indexed by series and point. For example, the statement

Xval = Chart2D1.ChartGroups(1).Data.X(1,3)

assigns the X-coordinate of the third point in the first data series to Xval.

The following diagram is an example of a plot of array data:

And here is a plot of general data:


Batching Data Updates

Normally, the displayed chart is updated whenever a Chart2DData object property is changed. If you are changing or creating several data points, you can improve performance by batching the changes. To do this, set the IsBatched property to True.

When IsBatched is set to True, the chart data is not updated when a Chart2DData object property is changed. Updating does not take place until IsBatched is reset to False.


Changing Data Values

To change a data value displayed in the chart, all you need to do is set its X and Y properties. For example, the following statements change the fourth data point in the second series to (10.5, 7.7):

With Chart2D1.ChartGroups(1).Data
.X(2, 4) = 10.5
.Y(2, 4) = 7.7
End With


Adding Points and Series

To add points to an existing data series, do the following:

•

Add the number of new points to the NumPoints property for that series. (NumPoints must always equal the number of points in the series.)

•

Set the X and Y properties for the new points.

For example, the following code adds a fifth and sixth point to the first data series:

With Chart2D1.ChartGroups(1).Data
.IsBatched = True
.NumPoints(1) = 6
.X(1, 5) = 2.4
.Y(1, 5) = 3.77
.X(1, 6) = 2.85
.Y(1, 6) = 4.11
.IsBatched = False
End With

If the data is in array format, the new points are added to all of the series.

To add a new data series, do the following:

•

Add one to the value of the NumSeries property.

•

Set the NumPoints property for the new series to the number of points to be added.

•

Set the X and Y properties for the new points.

The following code adds a second data series containing two points:

With Chart2D1.ChartGroups(1).Data
.IsBatched = True
.NumSeries = 2
.NumPoints(2) = 2
.X(2, 1) = 1.0
.Y(2, 1) = 3.14159
.X(2, 2) = 2.0
.Y(2, 2) = 6.02
.IsBatched = False
End With

When a new series is created, a new ChartStyle object is automatically created for it. This chart style controls how the new data points are to be displayed. By changing the properties of this ChartStyle object, you can control the appearance of the new data.


Handling Missing Data

If the Y property for a data point is set to a special value known as the hole value, 2D Chart treats the data point as a missing value, and does not display it on the chart. This hole value is specified by the HoleValue property of the Chart2DData object.

For example, the following code treats the third point in the first data series as a missing value:

With Chart2D1.ChartGroups(1).Data
.HoleValue = 999.1
.Y(1, 3) = 999.1
End With


Fast Update

If the data points being changed fall within the current axis bounds, the 2D Chart control enables you to use the Fast Update methods to update the graph efficiently.


Loading Data From a File

A common task in any ComponentOne Chart program is to load the chart data (called a dataset) from a file into a format that the chart can use.

In order for ComponentOne Chart to allocate and load the data from a file, it must be in one of two basic layouts, Array or General. The following examples show the contents of the MM63.DAT file, in both Array and General formats. The first line of the file tells the control that the data which follows is in either Array or General format, and is made up of 2 sets of 4 points.

Array File Format

General File Format

Loading the Data

Loading Data From a URL


Array File Format

ARRAY 2 4

HOLE 1000

# X-values

1.0 2.0 3.0 4.0

# Y-values set 1

200.0 234.0 274.0 320.0

# Y-values set 2

200.0 218.0 237.0 258.0

Line 4 of the MM63.DAT file defines the X-value (i.e. points) shared by both of the sets (Y-values). Lines 6 and 8 in MMF95.DAT define each of the sets of Y-values. Lines beginning with "#" are comment lines.


General File Format

GENERAL 2 4

HOLE 1000

# line 1, 4 points

4

1 2 3 4

200.0 234.0 274.0 320.0

# line 2, 4 points

4

1 2 3 4

200.0 218.0 2237.0 258.0

Lines 4 and 8 tell the control how many points are in each series. Lines 5 and 9 represent the actual X values for each series, and lines 6 and 10 represent the Y values. Lines beginning with "#" are comment lines.

See Understanding Data Layout for more information on Array and General data layout.


Loading the Data

To allocate and load the data from a file, you can either use the Property Page's Load button, which is located on the Data sub tab of the ChartGroup tab, or do it programmatically. Loading the MMF95.DAT file into your chart can be done as follows:

' Load the data from files
Chart2d.ChartGroups(1).Data.Load "MMF95.DAT"


Loading Data From a URL

Instead of using the Load method to specify the location of a data file, you can specify a URL where the chart can find the data. ComponentOne Chart provides two different methods to load data from the Internet:

•

Use the Chart2D Object's LoadURL method to load a chart description file (.OC2).

•

Use the Chart2DData Object's LoadURL method to load a data file (.DAT) into an existing chart.

In addition, if you want to set a URL location but do not want to load the data, use the Chart2DData Object's Datapath property. This property can be set at design time, and used to initialize the chart data at run-time.


Charting Data Directly From Your Program

Often it may not be convenient to load chart data from a file. For example, if the data is created from within the program using a mathematical calculation, it makes more sense to read it into the chart directly instead of saving it to a file and then reading it again. Not only can this method be quicker, it can also be quite easy to program.

The following example creates a 2-dimensional array, populates the array with data, and then charts the data:

Sub Main

' Declare the arrays needed to do the calculations
Dim Rates(1 To 2) As Double
Dim Values(1 To 2, 1 To 12) As Double

' Set the number of series and points in the chart
Chart2D1.ChartGroups(1).Data.NumSeries = 2
Chart2D1.ChartGroups(1).Data.NumPoints(1) = 12
Chart2D1.ChartGroups(1).Data.NumPoints(2) = 12

' Set the different rates
Rates(1) = 0.17
Rates(2) = 0.089

' Set the initial values for the first and second series
Values(1, 1) = 200
Values(2, 1) = 200

' Populate the Values arrays with data
For i = 1 To 2
For j = 2 To 12
' Calculate the current value of the investment using the
' following calculation:
Values(i, j) = Values(i, j - 1) * Rates(i) + Values(i, j - 1)
Next j
Next i

' Set the common X values
For i = 1 To 12
Chart2D1.ChartGroups(1).Data.x(1, i) = I
Next i

' Set the Y values
For i = 1 To 2
For j = 1 To 12
Chart2D1.ChartGroups(1).Data.y(i, j) = Values(i, j)
Next j
Next I

End Sub


Charting Data Using Data Binding

If the data you want to chart comes from an external database, you can add it directly to the chart in its native format. Using data binding is useful to:

•

Bind the values in one column of a database to be the Y-values for one series on the chart

•

Bind the values in one column of a database to be the strings for point labels

•

Bind the values in one column of the database to be the X-values for the points

•

Bind column names to be the strings for series labels


Bind an External Database to the Chart

1.

Add a Data control to your form. For more information, refer to your Visual Basic documentation.

2.

Set the Data control's DatabaseName property to the database's name and location, the Connect property to the database type, and the RecordSource property to the record source from within the database.

3.

Set the Chart2D Object's DataSource property to the name of the data control. The chart is now bound to the external database.


Specify Series Data

Once your chart is bound to a datasource, you must specify which columns are to be used as chart data. Set the ChartGroup Object's SeriesFields property to specify which database fields to chart. Each bound field is charted as a separate series. Set the PointLabelsField property to use a database column for PointLabels, or set the PointValuesField property to use a database column for X-values.


Use Column Headings as SeriesLabels

Use the ChartGroup Object's AreSeriesLabelsBound property to use the database column headings as SeriesLabels.

Notes

•

Data for a bound chart must be in array format

•

If you set the PointValuesField or PointLabelsField properties, you must also set the Axis Object's AnnotationMethod property to the appropriate annotation type.

•

Each column (as opposed to row) in the database is treated as a separate series.


Hiding and Excluding Data Series

You can set the display properties for each data series to either hide or exclude each series. Hiding a series includes the series in the data set, but does not draw it. Excluding a series removes the series from the data set.

Hide or Exclude a Series

Excluding Series with Bubble, HiLo, HiLoOpenClose and Candle Charts

Hiding Series with HiLoOpenClose and Candle Charts

Hiding Series with Bubble and HiLo Charts


Hide or Exclude a Series

Set the Chart2dData object's SeriesDisplay property to either oc2dDisplayHide (to hide the series) or oc2dDisplayExclude (to exclude the series).The following examples show the difference between shown, hidden and excluded series.


Excluding Series with Bubble, HiLo, HiLoOpenClose and Candle Charts

With these chart types, multiple series are combined to create a single logical data set. Excluding one series will exclude the entire logical data set. Any excluded logical data set will not be used in calculating data bounds.


Hiding Series with HiLoOpenClose and Candle Charts

With these chart types, hiding either of the first two series (the Hi and Low values) will hide the entire logical data set. With HiLoOpenClose charts, hiding either the third or fourth series (the Open and Close values) will hide only that series; with Candle charts, hiding either the third or fourth series will hide both the Open and Close series (the candle portion of the chart).


Hiding Series with Bubble and HiLo Charts

With these chart types, hiding either of the series will hide the entire logical data set.


Fast Update Methods

Normally, when new data is added to a chart, the entire chart area is repainted. The Fast Update methods provide an alternative and potentially much faster way to add new data to an existing chart if the data falls within the chart's current axes bounds. Only plots, area and polar charts can be fast updated.

The following Fast Update methods are defined by the Chart2DData object:

CheckNewPoints(series, npoints, isxmin, isxmax, isymin, isymax)

Checks whether new data to be added falls within the axes bounds. Series specifies the data series to be added to if the data is in general format; if the data is in array format, all data series are added to. npoints is the number of points to be added; the index of the first point to be added is assumed to be one greater than the value of the LastPoint property. In addition, npoints plus the value of LastPoint must be less than or equal to the value of the NumPoints property. (For example, if LastPoint is 15 and npoints is 3, the indices of the added points are 16, 17 and 18, and NumPoints must be greater than or equal to 18.) isxmin, isxmax, isymin and isymax are return values; the data is inside the current axes bounds only if all four of these values are set to False.

CheckNewPoints returns True if all data is within the axes bounds.

DrawNewPoints(series, npoints)

Draws the new points as quickly as possible. Series specifies the data series to be added to if the data is in general format; if the data is in array format, all data series are added to, and the value of series is ignored. npoints is the number of points to be added; the index of the first point to be added is assumed to be one greater than the value of the LastPoint property.

DrawNewPoints returns True if fast update was possible (if the data falls within existing axes bounds, as verified by CheckNewPoints). When DrawNewPoints returns, the LastPoint property is incremented by npoints.

ShiftPoints(series, npoints, dest, src)

Shifts a block of points in a data series. Series specifies the data series to be shifted. npoints is the number of data points to shift. src is the start index of the data to be shifted, and dest is the destination index. Shifted-out points are set to the value of the HoleValue property.

For example, the following call shifts the three points indexed 7, 8 and 9 to locations 3, 4 and 5 respectively:

Chart2D1.ChartGroups(1).Data.ShiftPoints 1, 3, 3, 7

This method is used in charts that plot a continuous stream of real-time data. The stripper demo, included with ComponentOne Chart, is an example of a chart that uses this method.

Examples

Here is a simple example of code that uses the Fast Update methods:

With Chart2D1.ChartGroups(1).Data

' .LastPoint is assumed to have the value 9
.x(1, 10) = 15.4
.y(1, 10) = 23.1
.x(1, 11) = 7.2
.y(1, 11) = 20.8
.DrawNewPoints 1, 2

End With

For a more practical example of code that uses the Fast Update methods, refer to the Timer1 procedure defined in the stripper demo program.


Copying Data

Before you can create a chart, you must provide it with data. ComponentOne Chart provides users with 6 different methods that allow you to copy data arrays directly to and from the chart, making it easy to quickly create chart data. These methods pass data using OLE SafeArrays. To use these methods, your development environment must support SafeArrays, either directly (as in Microsoft Visual Basic), or using a special mechanism (such as Delphi's Variant arrays). For more information, refer to your development environment documentation.

The following copying data methods are defined by the Chart2DData object:

CopyXVectorIn(value,array), CopyXVectorOut(value,array)

Copies the X values for a specified series of data either from an array into a chart (CopyXVectorIn), or from a chart into an array (CopyXVectorOut). value is the series number for the data that is to be copied. array is either the name of the array where the X values are stored (CopyXVectorIn), or the name of the array where the X values are copied (CopyXVectorOut). Note that to use CopyXVectorIn and CopyXVectorOut, the array must be a one-dimensional array of singles, doubles, longs, integers, or dates. ComponentOne Chart provides the ability to pass zero-based and one-based arrays.

CopyXVectorIn and CopyXVectorOut return True when the copy is successful, False otherwise.

The following example uses the CopyXVectorIn method to copy the fourth series from an array "MyArray":

Dim MyArray (1 to 10) as Double
Chart2d1.ChartGroups(1).Data.CopyXVectorIn 1,MyArray

CopyYVectorIn(value,array), CopyYVectorOut(value,array)

Copies the Y values for a specified series of data either from an array into a chart (CopyYVectorIn), or from a chart into an array (CopyYVectorOut). value is the series number for the data that is to be copied. array is the name of the array where the Y values are stored (CopyYVectorIn) where the Y values are copied (CopyYVectorOut). Note that to use CopyYVectorIn and CopyYVectorOut, the array must be a one-dimensional array of singles, doubles, longs or integers. ComponentOne Chart provides the ability to pass zero-based and one-based arrays.

CopyYVectorIn and CopyYVectorOut return True when the copy is successful, False otherwise.

CopyYArrayIn(array), CopyYArrayOut(array)

Copies an array of Y data to multiple series (CopyYArrayIn) or from multiple series into an array (CopyYArrayOut). array is a two-dimensional array of singles, doubles, longs or integers where the data is located or is to be copied. The common X values are usually set with CopyXVectorIn, and the Y values for all series can be set with CopyYArrayIn. Note that to use this method the size of the array passed must match the number of series and points declared by NumSeries and NumPoints. ComponentOne Chart provides the ability to pass zero-based and one-based arrays. Arrays must be declared with the number of points as its first element, and the number of series as its second element. Note that to use CopyYArrayIn or CopyYArrayOut, your data must be in Array format. Otherwise, use CopyYVectorIn.

Example

Adding a lot of points (in the following example, four series of 10,000 points each) can be quite slow. The chart must add each point to the chart as it is generated to copy data arrays directly to and from the chart, making it easy to quickly create chart data.

The following code example uses the CopyYArrayIn method to quickly copy an entire array of data to the chart. The array passed is a two-dimensional array of singles, doubles, longs or integers. Note that to use this method the size of the array passed must match the number of series and points declared by NumSeries and NumPoints. Arrays must be declared with the number of points as its first dimension element, and the number of series as its second element.

Sub Main

' Setup the chart so it will display correctly

Chart2D1.ChartGroups(1).Styles(1).Symbol.Size = 0Chart2D1.ChartGroups(1).Styles(2).Symbol.Size = 0Chart2D1.ChartGroups(1).Styles(3).Symbol.Size = 0Chart2D1.ChartGroups(1).Styles(4).Symbol.Size = 0

With Chart2D1.ChartGroups(1).Data .IsBatched = True .NumSeries = 4 .NumPoints(1) = 10000

End With

' Declare a variableDim Yarray(1 To 10000, 1 To 4) As Double

' Generate some data, and add it to the chartFor j = 1 To 4

With Chart2D1.ChartGroups(1).Data .x(1, j) = j

For i = 1 To 10000 ‘Create a random number for our data Yarray(i, j) = (i / j) + (0.5 * Int(((i / j) * Rnd) + 1)) Next i

End WithNext j

Chart2D1.ChartGroups(1).Data.CopyYArrayIn (Yarray)Chart2D1.ChartGroups(1).Data.IsBatched = False

End Sub


Batching Chart Updates

Normally, the chart is repainted immediately after a property is set. To make several changes to a chart before causing a repaint, set the IsBatched property of the Chart2D object to True. Property changes do not cause a repaint until IsBatched is reset to False.

For convenience, the IsBatched property is also defined for the Chart2DData object and the ChartLabel object. In these cases, IsBatched batches the modifications to that object. These IsBatched properties are independent of Chart2D.IsBatched.

It is recommended that you batch around the creation or updating of multiple chart labels.


Double Buffering

Double buffering is a graphics technique which will reduce the amount of flashing perceived by a user when a chart changes. By default, double buffering is in effect. To turn off double buffering for a Chart2D object, set its IsDoubleBuffered property to False.

When double buffering is turned on, every time the chart changes, it will:

•

Allocate (if necessary) and clear an off-screen bitmap.

•

Render the complete graph to the off-screen bitmap.

When double buffering is turned off, the chart clears the screen image every time a chart is changed (possibly causing a visual flash). Then, it renders the complete image to the visible window (possibly allowing the user to see the chart being drawn piece by piece).

Turning off double buffering can improve the chart's graphing performance and reduce its memory requirements.


Statistical Methods

Double AverageDeviation(long Series)

Double DataMax(long Series)

Double DataMin(long Series)

Double Mean(long Series)

Double Median(long Series)

Double StandardDeviation(long Series)

Long DataCount(long Series)


Double AverageDeviation(long Series)

Returns the statistical average deviation of the Y values of the specified series. If the specified series is 0, then data from all series are included in the calculation. Data holes are not included in the calculation.


Double DataMax(long Series)

Returns the maximum of Y values for the specified series excluding data holes. If the specified series is 0, then data from all series are included in the calculation.


Double DataMin(long Series)

Returns the minimum of Y values for the specified series excluding data holes. If the specified series is 0, then data from all series are included in the calculation.


Double Mean(long Series)

Returns the statistical mean value of the Y values of the specified series. If the specified series is 0, then data from all series are included in the calculation. Data holes are not included in the calculation.


Double Median(long Series)

Returns the statistical median value of the Y values of the specified series. If the specified series is 0, then data from all series are included in the calculation. Data holes are not included in the calculation.

 | middle value | (N is odd)
Median = |  |
 | average of middle values | (N is even)


Double StandardDeviation(long Series)

Returns the statistical standard deviation of the Y values of the specified series. If the specified series is 0, then data from all series are included in the calculation. Data holes are not included in the calculation.


Long DataCount(long Series)

Returns the count of Y values for the specified series excluding data holes. If the specified series is 0, then data from all series are included in the calculation.


Customizing Chart Elements

When the chart data and axes are formatted properly, you can customize its elements to make it clearer and professional-looking. The following topics cover tasks that customize the appearance of a chart:

Adding Header and Footer Titles

Using a Legend

Changing ChartStyles

Programming ChartStyles

Adding Images to Chart Elements

Changing the ChartArea Appearance

Using Borders

Choosing Fonts

Setting Colors

Positioning Chart Elements

Adjusting PlotArea Margins

Adding the 3D Effect

Resizing Forms

Using ChartLabels

Programming ChartLabels

Adding Markers

Programming Markers

Alarm Zones


Adding Header and Footer Titles

A chart can have two titles, called the header and footer. A title consists of one or more lines of text with an optional border, both of which you can customize. You can also set the text alignment, positioning, colors, and font used for the header or footer.

Title Text and Alignment

Use the Text title property to add, change, or remove text for a title. Text is located on the Label Tab (Titles) on the Property Pages. To enter multiple lines of text, press RETURN between each line.

Use the Adjust title property to specify whether to center, left-justify, or right-justify a multi-line title. Adjust is located on the General Tab (Titles) on the Property Pages.

Title Positioning

Use the Left and Top location properties to customize the location of the title. When their IsDefault properties are used, the header is centered over the PlotArea and the footer is centered below the PlotArea. These properties are located on the Location Tab (Titles) on the Property Pages. See Positioning Chart Elements for more information.

Title Border

Use the Type and Width border properties to customize the title’s border. These properties are located on the Border Tab (Titles) on the Property Pages. See Using Borders for more information.

Title Colors

Use the interior properties to customize background and text colors of a title. These are located on the Interior Tab (Titles) on the Property Pages. See Setting Colors for more information.

Title Font

Use the font properties to customize the font used for a title. These are located on the Font Tab (Titles) on the Property Pages. See Choosing Fonts for more information.


Using a Legend

A legend shows the visual attributes (or ChartStyle) used for each series in the chart, with text that labels the series. You can customize the series labels, positioning, border, colors and font used for the legend.

Legend Text and Orientation

Legend Positioning

Legend Title

Legend Border

Legend Colors

Legend Font

LegendStyles (part of ChartGroup)


Legend Text and Orientation

The legend displays the text contained in the SeriesLabels (a ChartGroups property), so the legend does not appear unless at least one SeriesLabel exists. SeriesLabels are a collection of labels. The first label applies to the first series, and so on. The SeriesLabels property is located on the Labels Tab (ChartGroups) on the Property Pages.

Use the legend Orientation property to lay out the legend horizontally or vertically, and the IsReversed property to specify whether to display the SeriesLabels in reverse order. These properties are located on the General Tab (Legend) on the Property Pages.


Legend Positioning

Use the legend Anchor property to specify where to position the legend relative to the PlotArea. You can select from eight compass points around the PlotArea. Anchor is located on the General Tab (Legend) on the Property Pages.

Use the Left and Top location properties to finetune the positioning. When their IsDefault properties are used, the chart automatically positions the legend. These properties are located on the Location Tab (Legend) on the Property Pages. See Positioning Chart Elements for more information.


Legend Title

Use the legend Text property to specify the legend title. The legend title appears centered at the top of the legend. Text is located on the Title Tab (Legend) on the Property Pages.


Legend Border

Use the Type and Width border properties to customize the title’s border. These properties are located on the Border Tab (Legend) on the Property Pages. See Using Borders for more information.


Legend Colors

Use the interior properties to customize background and text colors of the legend. These are located on the Interior Tab (Legend) on the Property Pages. See Setting Colors for more information.


Legend Font

Use the font properties to customize the font used for the legend. These are located on the Font Tab (Legend) on the Property Pages. See Choosing Fonts for more information.


LegendStyles (part of ChartGroup)

When placing series labels, symbols, and lines in the legend, it is sometimes desirable to modify the symbols, lines, and color to be slightly different from that of the series. In these cases LegendStyles are used.

Note:

LegendStyles are only available through code.

Series Labels For: |
Plot, Radar, Polar, Bubble | SymbolStyle changes can be made to color, shape, and size. For these charts (except for Bubble charts), size is limited by the font size of the text of the legend. For Bubble charts, the symbol size in the legend is always the same size as the font.
Bar, Pie, Stacking Bar | FillStyle changes can be made to FillStyle Interior colors and hatch patterning. ForeColor is used for solid colors, and is mixed with BackColor lines when patterns are selected.
HiLo, HiLoOpenClose, Candle | LineStyle changes can be made to width, pattern, and color.
Area, FilledRadar | No effect.


Changing ChartStyles

The attributes that define how a series of data looks in the chart are called a ChartStyle. Each series has its own ChartStyle, which you can customize. For example, you can change the fill pattern and color of bars in a bar chart or the symbol used for data points in a plot or bubble chart.

Every ChartStyle has a FillStyle, a LineStyle, a SymbolStyle, and a SliceStyle. FillStyles are used for bar, stacking bar, area and pie charts. LineStyles and SymbolStyles are used for plot and bubble charts. SliceStyles are used for pie charts.

FillStyle

LineStyle

SymbolStyle

SliceStyle


FillStyle

Use the Pattern property to set the fill drawing pattern for a ChartStyle. The Color property sets the color used to draw the pattern (the foreground color), and the BackGroundColor property sets the color used to fill the background. The valid patterns are shown below:

These properties are located on the FillStyle Tab (ChartStyles) on the Property Pages.


LineStyle

Use the Pattern property to set the line drawing pattern, the Width property to set its width, and the Color properties to set the line color for a ChartStyle. The valid patterns are shown below:

These properties are located on the LineStyle Tab (ChartStyles) on the Property Pages.


SymbolStyle

Use the Shape property to set the symbol type, the Size property to set its size, and the Color properties to set the symbol color for a ChartStyle. The valid symbols are shown below:

These properties are located on the SymbolStyle Tab (ChartStyles) on the Property Pages.


SliceStyle

Use the Offset property to set the offset for exploding pie slices. See Special Pie Chart Properties for details.


Programming ChartStyles

Also, see Changing ChartStyles

A ChartStyle object defines the characteristics of a slice of a pie chart, a bar in a bar chart, or the points and lines in a plot, bubble, or radar chart. ChartStyles can be specified by series or by individual points. One ChartStyle object is defined for each series within a chart group, and for each point in a series. As new series or chart groups are added, new ChartStyle objects are automatically created by the chart.


Customizing ChartStyles

The 2D Chart control enables you to programmatically change the following properties of a ChartStyle object:

•

The Fill property, which specifies the pattern, color, and background color inside area, bar, pie and filled radar charts. This property is of type FillStyle.

•

The Line property, which defines the line style for the object. This specifies the color, pattern and thickness of lines in plots. This property is of type LineStyle.

•

The Symbol property, which defines the symbol style for the object. This specifies the color, size and shape of points in plots. This property is of type SymbolStyle.

•

The Slice property, which defines the slice style for the object. This specifies the offset for the exploding pie slices. This property is of type SliceStyle .


The ChartStyles Collection

The ChartStyles collection contains the ChartStyle objects defined for each series. The following methods are defined for the ChartStyles collection:

Add(index) Add a new ChartStyle object to the collection

Remove(index) Remove a ChartStyle object from the collection

Normally, you will not need to add or remove ChartStyle objects from the collection yourself. If a ChartStyle object already exists when its corresponding series is created, the previously created ChartStyle object is used to display the data in this series.

By looping through the ChartStyles collection, you can quickly change the behavior of all of the bars, lines or points in a chart. For example, the following code lightens all of the bars in a chart whenever the mouse is clicked:

Private Sub Chart2D1_Click()

Dim Style As Object
For Each Style in Chart2D1.ChartGroups(1).Styles
Style.Fill.Color = Style.Fill.Color + &H50505
Next Style

End Sub

Note that this only works if the Color property is initially set to an RGB color value (if the most significant bit is set to 0).

Examples

The following statement sets the color of the first bar in a chart to green:

Chart2D1.ChartGroups(1).Styles(1).Fill.Color = RGB(0,128,0)

The following sets the line pattern for the second line in a plot to a dotted line:

Chart2D1.ChartGroups(1).Styles(2).Line.Pattern = oc2dLineDotted

And the following statement sets the symbol style for the third line in a plot to an unfilled circle:

Chart2D1.ChartGroups(1).Styles(3).Symbol.Shape = oc2dShapeCircle


The PointStyles Collection

The PointStyles collection contains the ChartStyles objects defined for each point. The behavior of the PointStyles collection is similar to that of the ChartStyles collection described above, except that the PointStyles collection is indexed by 2 variables, the series and point. When specifying the style for a single point in a series, the child objects make available an additional method called UseDefault that sets the style for the individual point to the style used by its series.

PointStyles for different Chart types

PointStyles can be set for these Chart types:

•

For Plot, Bubble, Polar and Radar charts, point styles can be applied to the point style, size, and color.

•

For Bar and Stacking Bar charts, point styles can be applied to the fill color and fill pattern of individual bars.

•

For Pie charts, point styles can be applied to the fill color and fill pattern of individual pie slices, including the “other” slice.

•

For HiLo, HiLoOpenClose, and Candle charts, all elements of their point styles can be altered.

Note: PointStyles cannot be applied to Area and Filled Radar Charts

Examples

The following statement sets the color of the second bar in the first series in a chart to green.

Chart2D1.ChartGroups(1).PointStyles(1,2).Fill.Color = RGB(0,128,0)

The following sets the offset for the fourth slice in the third pie in a plot to 10% of the radius.

Chart2D1.ChartGroups(1).PointStyles(4,3).Slice.Offset = 10

The following sets the fill style for the second point in the third series to the default style used by the series:

Chart2D1.ChartGroups(1).PointStyles(4,3).Fill.UseDefault = True

The following is the object hierarchy for the ChartStyle and PointStyle objects and their children:

For more information, see the PointStyles Collection.


Adding Images to Chart Elements

You can add a Windows bitmap (.BMP) or Metafile (.WMF or .EMF) image to the background of any chart element. You can add separate images to the following chart elements:

•

Chart

•

ChartArea

•

ChartLabels

•

PlotArea

•

Header and Footer

•

Legend


Add an Image to a Chart Element

Use the Image Object's FileName property to specify the name and location of the image you want to display. The image must be in either Windows bitmap or Metafile format. Use the IsEmbedded property to include the specified image with the chart. If IsEmbedded is True, the image will be included with your chart (when the chart is saved). If IsEmbedded is False, the chart will look for the image file in the specified location. Note that if you set IsEmbedded, you should not change or remove the value of FileName. This property is still required to point to the graphic you want to use so that it can be embedded into the chart at runtime.


Set the Image Layout

Use the Layout property to specify how the image is to be displayed. You can set Layout to one of the following:

•

Centered - places the image in the center of the chart element

•

Fitted - resizes the image to fit as much of the chart element as possible, while maintaining the image's aspect ratio (so that the image remains in proportion)

•

Stretched - resizes the image to fit the entire chart element area. For best results with stretching images, use either a Metafile or Enhanced Metafile format.

•

Stretch to Width - stretches the image horizontally to match the chart element width. For best results with stretching images, use either a Metafile or Enhanced Metafile format.

•

Stretch to Height - stretches the image vertically to match the chart element height. For best results with stretching images, use either a Metafile or Enhanced Metafile format.

•

Tiled - repeats the image to fill the entire chart element

•

Cropped Fit - resizes the image to fit the shorter of the two chart element dimensions (either the height or the width), and crops the other dimension

These properties are located on the Control, ChartArea, PlotArea, Legend, ChartLabels, and Titles Image Tab.


Using Images as Labels

Use the HasMinimumSize property to use an image as a label. When HasMinimumSize is enabled the text area in which the image appears will be sized according to the image dimensions, so when a text area is empty, the image itself will appear as the label. When HasMinimumSize is disabled, the text area will be sized according to the text. If HasMinimumSize is enabled and the text is larger than the image, then the text determines the size. HasMinimumSize applies to Titles and ChartLabels, and can be found on their respective Image Tabs.

Notes

•

Enhanced Metafiles are only supported under Windows 95/98 and Windows NT.

•

If the background image type is either a Metafile (.WMF) or Enhanced Metafile (.EMF) format, the image will not draw when the chart is either copied to the clipboard or copied to a file when using the Metafile format. To get around this limitation, it is recommended that you set the drawing format to a Bitmap format when you want to copy your chart to the printer, clipboard or file.

•

When text areas containing background images are rotated, the image is not rotated with the text area.

•

The background image is not clipped to the circular PlotArea when rendering to a Metafile for Polar and Radar chart types.


Changing the ChartArea Appearance

You can customize how the Chart looks from the General Tab (ChartArea) on the Property Pages.


Changing Axes Orientation

The default orientation for your chart is with the X-axis displayed horizontally, and the Y-axis displayed vertically. Use the IsHorizontal property to switch the orientation of the X- and Y-axes. You can change the axes orientation for all ChartTypes except for Pie, Polar, Radar and Filled Radar types.


Showing and Hiding Chart Outlines

By default, an outline is drawn around each series for Area, Bar, Stacking Bar and Pie charts. Use the IsShowingOutlines property to turn the outlines on or off.


Viewing Stacking Charts as 100 Percent

Use the IsYAxis100Percent and IsY2Axis100Percent properties to scale the Y and Y2 axes of stacking charts to a common 100 percent value. When Is[YY2]Axis100Percent is False, the actual series data is used. When Is[YY2]Axis100Percent is True, the data is scaled so that each stacked set is the same height and each series is scaled to a total of 100 percent.

These properties are located on the General Tab (Axes) on the Property Pages.


Using Borders

Adding a border to part of the chart can help highlight important information, or simply make the chart look more attractive. You can customize the border type and width of the following chart elements:

•

Header and Footer titles

•

Legend

•

ChartArea

•

Each ChartLabel added to the chart

•

The entire chart

The valid border types are shown below; you can also specify that no border is used.


To Change a Border

Use the border Type property to set the type of border and the Width property to set its thickness. These properties are located on the Border Tab, found on the Control, ChartArea, Titles, Legend, and ChartLabels tabs of the Property Pages.


Choosing Fonts

A chart can have more impact when you customize the fonts used for different chart elements. You may also want to change the font size to make an element better fit the overall size of the chart. Any font available when the chart is running can be used. You can set the font for the following chart elements:

•

Header and Footer titles

•

Legend

•

Axis annotation and title

•

Each ChartLabel added to the chart


Change a Font

Use the font properties to set the font, style, and size attributes. Font properties are located on their own dialog on the Font Tab, found on the Titles, Legend, Axes, and ChartLabels tabs on the Property Pages. Click the button on the tab to display the dialog.

Notes

•

ComponentOne Chart uses the container’s exposed Ambient font (if available) as its own default font.

•

The Color control in the font chooser dialog has no effect on the text color. To set the color of text, use the ForegroundColor property, located on the Interior Tab of that element (located on the ChartArea tab for the axis text color).

•

When you want to rotate the axis annotation or title, you must use a scalable font (such as any TrueType font) for the axis. See Titling Axes and Rotating Axis Elements for more information.


Setting Colors

Color can powerfully enhance a chart’s visual impact. You can customize colors using color names, RGB values, or interactively using a color chooser. Each of the following visual elements in the chart has a background and foreground color that you can customize:

•

The entire chart

•

Header and Footer titles

•

Legend

•

ChartArea

•

PlotArea (background only)

•

Each ChartLabel added to the chart

The other chart elements that have color properties are ChartStyles, GridLines, and Markers.

Specifying named colors

Choosing Colors Interactively

Specifying RGB Colors

Using Automatic Colors

Change a Color


Specifying named colors

You can specify a color as one of over 200 recognized named colors. Choose common colors like Blue or Orange, or more exotic colors like Chartreuse or HotPink. Most of these colors look best on systems that can display 256 colors or more.


Choosing Colors Interactively

You can choose colors interactively using a color chooser dialog that works just like the standard Windows Control Panel color chooser. Choose from Windows basic colors, custom colors, or interactively with a full color spectrum.


Specifying RGB Colors

Alternately, you can specify a color by its RGB components, useful for matching another RGB color. RGB color values combine hexadecimal values for the red, green, and blue components of a color. “00” is the smallest value a component can have; “ff” is the largest value. For example, “#ff00ff” specifies magenta (the maximum value of red and blue combined with no green).


Using Automatic Colors

The background and foreground of all elements except the chart itself can be “Automatic”.

When a background or foreground is automatic, the chart uses the color of the element outside it for the background. For example, the header would have the background of the chart itself when its background is set to Automatic.


Change a Color

Use the BackgroundColor and ForegroundColor properties to set background and foreground colors. These properties are located on the Interior Tab, found on the Control, Titles, Legend, ChartArea, PlotArea, and ChartLabels tabs of the Property Pages. RGB and named colors have their own controls. The button displays the interactive color chooser dialog.


Positioning Chart Elements

Each of the main chart elements (header, footer, legend, ChartArea, and ChartLabels) has properties that control its position and size. While the chart can automatically control these properties, you can also customize the following:

•

Positioning of any element except ChartLabels

•

Size of the ChartArea only

When the chart controls positioning, it first allows space for the header, footer, and legend, if they exist (size is determined by contents, border, and font). The ChartArea is sized and positioned to fit into the largest remaining rectangular area. Positioning adjusts when other chart properties change.


Change or View Location

Use the Left location property to specify the number of pixels from the edge of the chart to the left edge of the chart element. Use the Top location property to specify the number of pixels from the edge of the chart to the top of the chart element. Left and Top have IsDefault properties that allow the chart to automatically position the element.

These properties are located on the Location Tab, found on the ChartArea, Titles, Legend, and ChartLabels tabs of the Property Pages.


Change Width and Height (ChartArea only)

Use the Width and Height location properties to specify the width and height of the ChartArea. These properties have IsDefault properties that allow the chart to automatically size the ChartArea.

These properties are located and enabled on the Location Tab (ChartArea) on the Property Pages.


Adjusting PlotArea Margins

The distance between the edges of the ChartArea and the PlotArea is called a margin. There are separate margins for the top, bottom, left, and right edges. You can allow the chart to automatically control margins, or you can customize them.

When the chart controls a margin, it sets enough space to display axis annotation and axis title. As axis and data properties change, the chart adjusts the margins as necessary.

You can fix a margin so that it does not change as axis and data properties change, and to achieve effects such as:

•

Scaling or zooming a chart. When margins are all negative, axes and annotations are clipped outside the PlotArea; the chart appears zoomed-in. When margins are all high positive values, there is a lot of space around the PlotArea; the chart appears zoomed-out.

•

Moving or translating a chart. For example, when top margin is increased and bottom margin decreased by the same amount, the chart moves down.

It is easier to achieve these effects interactively. See Interacting with the Chart for details.


Set Margins

Use the PlotArea Top, Bottom, Left, or Right properties to set the value of a margin. When you set a margin value, it remains fixed at that value until you change it or set its IsDefault property.


Use Automatic Margins

Use the IsDefault properties of the Top, Bottom, Left, and Right margin properties to allow the chart to automatically determine appropriate margins.

All PlotArea margin properties are located on the General Tab (PlotArea) on the Property Pages.


Adding the 3D Effect

Bar, stacking bar, and pie charts can be enhanced with a 3D effect. You can set the visual depth and the “elevation angle” of the 3D effect. You can also set the “rotation angle” on bar and stacking bar charts.

For charts with 3D effects, it is expected that X values will be in ascending order. This is necessary so that the images can be drawn correctly from left to right or right to left.

If it is desired to reverse the direction of the X-axis, then the X-axis property’s IsReversed should be set to True.

If data is loaded that is not in ascending order, then sorting should be done using the Chart2D.ChartGroup.Item(ii).Data.Sort() method. Sorting can also be performed by pressing the Sort button on the Data Tab (ChartGroups) on the ChartGroups Property page.

3D Depth

3D Elevation

3D Rotation

Shading


3D Depth

Use the Depth View3D property to set the visual depth of the 3D effect, as a percentage of the chart width. The maximum value is 500.


3D Elevation

Use the Elevation property to set the distance above the X-axis for the 3D effect, in degrees. This can be from -45 to 45 degrees.


3D Rotation

Use the Rotation property to set the distance right of the Y-axis for the 3D effect, in degrees. This cannot be higher than 45 or lower than -45.

All View3D properties are located on the General Tab (View3D) on the Property Pages.


Shading

Use the Shading property to set the shading method for the 3D areas of the chart. Using the Dithering method takes the graph color and uses white or black dots to make the 3D portion of the graph either lighter or darker, respectively. Using the Color shading method uses either a lighter or darker shade of the graph color to create the 3D effect.


Resizing Forms

Some applications permit the resizing of a Form object at runtime. This resizing is enabled at design time by setting the form's BorderStyle property to either 2 (Sizable) or 5 (Sizable ToolWindow).

To adjust the size of a Chart2D object when the Form object is resized, define a Resize procedure for the form, and adjust the chart's height and width to correspond to the form's height and width. For example, the following Resize procedure is defined by the chlabels demo:

Private Sub Form_Resize()

' Match the graph to the size of the form.

If Width > 700 Then ' Check the width of the window

' This keeps a consistent border around the

' sides of the chart

Chart2D1.Width = Width - 700

Else

' Sets the width to 0 because the window

' is smaller than the size of the chart

Chart2D1.Width = 0

End If

If Height > 1360 Then ' Check the height of the window

' This keeps a consistent border around the

' top and bottom of the chart

Chart2D1.Height = Height - 1360

Else

' Sets the height to 0 because the window is
' smaller than the size of the chart

Chart2D1.Height = 0

End If

End Sub


Using ChartLabels

A ChartLabel is a label that displays in front of the chart data. The chart does not adjust to make room for ChartLabels, they are completely independent. ChartLabels are useful when you want to highlight an important data point, but can also be used generally to provide information on data or on the chart.

There is no limit to the number of ChartLabels a chart can contain. Each ChartLabel has label, interior color, border and attachment attributes that you can customize.

Attaching and Positioning ChartLabels

Connecting Line and Offset

ChartLabel Text and Alignment

Rotating ChartLabels

ChartLabel Border

ChartLabel Colors

ChartLabel Font

ChartLabel Location


Attaching and Positioning ChartLabels

When you define a ChartLabel, you need to specify how to attach it to the chart and where to position it relative to its attachment point.

The attachment method you choose depends on what you are using the ChartLabel for. The following illustrates and describes the valid attachment methods:

•

Coord attaches to anywhere on the chart. You specify the number of pixels between the top-left corner of the chart to the ChartLabel.

•

DataCoord attaches to anywhere inside the PlotArea. You specify the data coordinates. This method is not allowed on pie charts using PointLabels for the X-axis annotation. If any part of the ChartLabel falls outside of the ChartArea, it is clipped.

•

DataIndex attaches to a specific data point on the chart. You specify the series and point indices, and the ChartGroup.

•

DataIndex & Data Y attaches to a distance above or below a specific data point. You specify the series and point indices, the ChartGroup, and the Y-coordinate. This is most useful for bar and stacking bar charts.

Use the AttachMethod ChartLabel property to set the attachment method, and the AttachCoord, AttachDataCoord, or AttachDataIndex properties to set the attachment point. These properties are located on their own dialog on the General Tab (ChartLabels) on the Property Pages. Click the AttachMethod button to display the dialog.

Once attached to a point on the chart, you can choose the anchoring position that works best for that ChartLabel. The following shows the valid anchoring positions:

Use the Anchor ChartLabel property to specify where to position the ChartLabel relative to its attachment point. In addition to the eight compass points, you can choose “Home” to center the ChartLabel over its attachment point or “Best” to allow the chart to determine the best position. Anchor is located on the General Tab (ChartLabels) on the Property Pages.


Connecting Line and Offset

Use the IsConnected property to draw a line connecting the ChartLabel to its attachment point and the Offset property to set the distance between the ChartLabel and its attachment point. IsConnected and Offset are located on the General Tab (ChartLabels) on the Property Pages.


ChartLabel Text and Alignment

Use the Text label property to set or change a ChartLabel’s text. Text is located on the Label Tab (ChartLabels) on the Property Pages. To enter multiple lines of text, press ENTER between each line. You can add up to 100 lines of text for each ChartLabel.

Use the Adjust property to specify whether to center, left-justify, or right-justify a multi-line ChartLabel. Adjust is located on the General Tab (ChartLabels) on the Property Pages.


Rotating ChartLabels

Use the Rotation label property to set or change the rotation of a ChartLabel. Rotation is located on the General Tab (ChartLabels) on the Property Pages. ChartLabels can be rotated by 0, 90 or 270 degrees.


ChartLabel Border

Use the Type and Width border properties to customize the title’s ChartLabel. These properties are located on the Border Tab (ChartLabels) on the Property Pages. See Using Borders for more information.


ChartLabel Colors

Use the interior properties to customize background and text colors of a ChartLabel. These are located on the Interior Tab (ChartLabels) on the Property Pages. See Setting Colors for more information.


ChartLabel Font

Use the font properties to customize the font used for a ChartLabel. These are located on the Font Tab (ChartLabels) on the Property Pages. See Choosing Fonts for more information.


ChartLabel Location

Use the Left, Top, Width and Height location properties to see the current size and position of a ChartLabel. You cannot change these properties because the size/location is determined by the label text and the attachment method. These properties are located on the Location Tab (ChartLabels) on the Property Pages.


Programming ChartLabels

For more information, see Using ChartLabels.

A ChartLabel object defines an independent rectangular region which can be attached to a chart. The ChartLabels collection contains all of the chart labels defined for a particular chart.

To create a ChartLabel object, call the Add method:

Dim label As Object

Set label = Chart2D1.ChartLabels.Add

The Remove method removes a ChartLabel from the collection:

Chart2D1.ChartLabels.Remove 1

You can pass either the chart label's index or its name to Remove.

To quickly remove all ChartLabels from the collection, use the RemoveAll() method:

Chart2D1.ChartLabels.RemoveAll()


Defining the ChartLabel

The ChartLabel object provides a number of properties that help you define and position the chart label. The most important of these properties are:

•

The Text property specifies the text to appear in the chart label, and is of type Label.

•

The Anchor property specifies the location of the chart label relative to the location to which it is attached. The location is specified as an anchor constant, which represents a compass direction.

•

The IsConnected property is a Boolean which specifies whether a line is to be drawn from the chart label to its attached location. If True, the line is drawn.

•

The Offset property specifies the distance, in the anchor direction, from the chart label to its attached location, and is of type Long.

The following code sets the above properties:

With Chart2D1.ChartLabels(1)

.Text = "Here is my chart label"

.Anchor = oc2dAnchorSouthWest

.Offset = 20

.IsConnected = True

End With


Attaching the ChartLabel

Chart labels can be attached to a chart in one of four ways:

•

to a pixel (x,y) coordinate

•

to a data (x,y) coordinate in the chart area

•

to a (series, point) in the chart area

•

to a (series, point, Y-value) in the chart area

To attach a chart label to a pixel coordinate, set the AttachMethod property to oc2dAttachCoord, and then set the AttachCoord property to the coordinates at which the chart label is to be attached. For example, the following attaches a chart label to the top left corner of the legend:

With Chart2D1.ChartLabels(1)

.AttachMethod = oc2dAttachCoord

.AttachCoord.X = Chart2D1.Legend.Location.Left

.AttachCoord.Y = Chart2D1.Legend.Location.Top

End With

To attach a chart label to a data coordinate on the chart, set the AttachMethod property to oc2dAttachDataCoord, and then set the AttachDataCoord property to the coordinates of the value. For example, the following attaches a chart label to the data coordinate (1.1, 15.8):

With Chart2D1.ChartLabels(1)

.AttachMethod = oc2dAttachDataCoord

.AttachDataCoord.X = 1.1

.AttachDataCoord.Y = 15.8

End With

Chart labels can only be attached to a data coordinate if the chart is an area or plot, and the X-axis is not annotated using point labels. Any part of the chart label that falls outside of the chart area is clipped.

To attach a chart label to a data point, set the AttachMethod property to oc2dAttachDataIndex, and then set the AttachDataIndex property to the series and point values that reference the specified data item. For example, the following attaches a chart label to the second point in the first data series:

With Chart2D1.ChartLabels(1)

.AttachMethod = oc2dAttachDataIndex

.AttachDataIndex.Series = 1

.AttachDataIndex.Point = 2

End With

You can also combine the above two methods, and attach a chart label to a location whose X-coordinate is specified by a data point and whose Y-coordinate is specified by a chart value. To do this, set the AttachMethod property to oc2dAttachDataIndexDataY, as in the following example:

With Chart2D1.ChartLabels(1)

.AttachMethod = oc2dAttachDataIndexDataY

.AttachDataIndex.Series = 1

.AttachDataIndex.Point = 2

.AttachDataCoord.Y = 15.8

End With

In this example, the chart label location is specified as follows:

•

The X-coordinate of the second point in the first data series becomes the X-coordinate of the chart label.

•

The Y-coordinate specified by the AttachDataCoord property becomes the Y-coordinate of the chart label.

This method is not supported in pie charts.

The following is the object hierarchy for the ChartLabels collection and the properties described above:


Batching ChartLabel Changes

To improve efficiency, you can batch changes to a chart label. To do this, set the IsBatched property to True before changing any chart label properties, and set IsBatched to False once you have finished. This ensures that the chart will be updated only once, instead of after each property change.

Example

The following code defines a chart label that points to the chart's legend:

Dim label As Object

...

Set label = Chart2D1.ChartLabels.Add

With label

' Batch everything for even faster processing
.IsBatched = True
.Text = "That's the legend!"

' Set the method of the label attachment
.AttachMethod = oc2dAttachCoord

' Set the actual X-axis location for the label
.AttachCoord.X = Chart2D1.Legend.Location.Left

' Set the actual Y-axis location for the label
.AttachCoord.Y = Chart2D1.Legend.Location.Top

' Set the anchor point for the label
.Anchor = oc2dAnchorNorthWest

' Give it some room to draw a pointer line
.Offset = 20
.Border.Type = oc2dBorderShadow
.Border.Width = 4

' Draw the line between the label and the region
.IsConnected = True
.IsBatched = False

End With


Adding Markers

A marker is a vertical or horizontal line drawn on top of the chart. Markers are used to identify a particular data point or chart coordinate. A programmer can write code that moves markers as you move the mouse, or displays a marker when you click on part of a chart. You can set where to display X- or Y-markers, and customize their visual attributes.

The chart can have two markers, X and Y. Each marker has positioning and LineStyle attributes that you can customize.


Markers and Chart Types

Plot, area, bar and stacking bar charts can display both markers. The X-marker is drawn through the X-axis and the Y-marker is drawn through the Y-axis. Pie, polar, radar and filled radar charts use the X-marker only. When using markers with combination charts, you can specify the ChartGroup to apply the marker to.


Positioning Markers

When you add a marker, you need to specify how to position it on the chart. The method you use depends on what you are using the marker for:

•

Value (ByValue) positions the marker at the X- or Y- chart coordinate you specify. The X-marker cannot use this method when the chart is pie using PointLabels X-axis annotation.

•

Index (ByData) positions the marker at a specific data point. You specify the series index and point index within that series. You specify the chart coordinates. The X-marker must use this method when the chart is a pie using PointLabels X-axis annotation.

Use the Method marker property to set the method to use, and the marker’s Index or Value properties to set the marker position. These properties are located on the Attach Tab (Markers) on the Property Pages.

Use the IsShowing marker property to display or hide a marker once you have positioned it. IsShowing is located on the General Tab (Markers) on the Property Pages.


Customizing Marker LineStyle

Use the LineStyle Pattern, Width, and Color properties to define the appearance of each marker. These properties are located on the LineStyle Tab (Markers) on the Property Pages.

Use the IsStyleDefault marker property to reset marker style to a 1-pixel wide black dashed line. IsStyleDefault is located on the General Tab (Markers) on the Property Pages.


Programming Markers

For More information, see Adding Markers.

Markers provide a way to identify a particular data element on the screen or a particular value in a plot.

On plots, area graphs and bar charts, two markers are defined: an X-marker and a Y-marker. The X-marker is a line perpendicular to the X-axis, and the Y-marker is a line perpendicular to the Y-axis.

On stacking bar charts, the X-marker is a short line drawn through one of the bar blocks, and the Y-marker is a line perpendicular to the Y-axis.

On pie charts, only the X-marker is defined, and is a line drawn from the center of the pie outward through the center of the selected slice.

In the 2D Chart control, the X- and Y-markers are represented by the Markers collection, and are named “X” and “Y” respectively. To display a marker, set its IsShowing property:

Chart2D1.ChartArea.Markers("Y").IsShowing = True

Once the marker is displayed, it can be positioned. For example, the following code positions the Y-marker at the point where the mouse is currently located. As the mouse moves, the Y-marker moves with it.

Private Sub Chart2D1_MouseMove(Button As Integer, Shift As Integer, _

x As Single, y As Single)
Dim px As Long
Dim py As Long
Dim vx As Double
Dim vy As Double

px = x / Screen.TwipsPerPixelX ' Get the current mouse X position
py = y / Screen.TwipsPerPixelY ' Get the current mouse Y position

' Convert to chart coordinates
Chart2D1.ChartGroups(1).CoordToDataCoord px, py, vx, vy

' Set position of Y-marker
Chart2D1.ChartArea.Markers("Y").Value.y = vy

End Sub

This procedure positions the marker using chart coordinates. You can also position a marker by specifying a dataset and point through which the marker should be drawn. To do this, use the Index property instead of the Value property.


Performance Issues

Updating the marker positioning properties occurs very quickly. This is because the 2D Chart does not repaint the entire chart window to reposition the markers. Marker performance is improved by setting the IsDoubleBuffered property of the Chart2D object to True. (However, general chart performance is improved by turning double buffering off.)


Markers and Data Styles

Note that both the X- and Y-marker data styles can have a different appearance by using separate X- and Y-marker data styles.


Alarm Zones

Alarm Zones are a series of bands that can be placed behind the plotted data, but in front of the chart background. Generally, they are used in much the same manner as grid lines, but because of the ability to modify the alarm zones, tend to be more visually appealing. By using the UpperExtent and LowerExtent properties, you are able to adjust each alarm zone band to specific values.

Note: Alarm zones are most effectively used with plot, bar, stacking bar and candle charts.


Adding Alarm Zones

To access the alarm zones, open the property pages and choose the AlarmZones Page. Create the number of alarm zones required by clicking the Add button on the left side of the property pages. Define each zone by highlighting the zone name in the left pane and typing values into the UpperExtent and LowerExtent textboxes. Determine the colors for each zone by choosing the Colors Tab and pressing the ellipsis (…) button.


Programming User Interaction

ComponentOne Chart allows you to interact with the user, reacting to specific mouse, menu and keyboard actions. You can also determine which tabs from the Property Pages you want users to see. The following topics cover the different types of user interaction.


Programming Actions

A chart action is a user event that causes some interactive action to take place in the control. There are three stages of user interaction defined in 2D Chart:

•

Starting a user interaction

•

Updating a user interaction

•

Ending a user interaction

Chart actions are defined for each of these stages. The complete list of actions is specified by the Action Constants.

Action Maps

Recognized Messages

Modifier Flags

Recognized Keycodes

Determining Action Mappings

Programming Action Mappings

Removing Action Mappings

Calling an Action Directly

Actions and Events


Action Maps

An action map is a mapping of a mouse operation and/or key pressing to a chart action. Each action map consists of three parts:

•

The message (indicating what mouse operation or key pressing occurred)

•

Any modifier flags

•

The keycode (if the message is WM_KEYDOWN or WM_KEYUP)

The ActionMaps collection specifies the action maps currently defined for the 2D Chart control.


Recognized Messages

The following messages are recognized:

WM_LBUTTONDBLCLK | double-click left mouse button
WM_MBUTTONDBLCLK | double-click both mouse buttons
WM_RBUTTONDBLCLK | double-click right mouse button
WM_LBUTTONDOWN | press left mouse button
WM_MBUTTONDOWN | press both mouse buttons
WM_RBUTTONDOWN | press right mouse button
WM_LBUTTONUP | release left mouse button
WM_MBUTTONUP | release both mouse buttons
WM_RBUTTONUP | release right mouse button
WM_MOUSEMOVE | move mouse
WM_KEYDOWN | press key
WM_KEYUP | release key

If you have a three-button mouse, holding down the middle mouse button is equivalent to simultaneously holding down the left and right mouse buttons.

Note:

The constants are defined by Windows and are available through the Visual Studio tool, API Text Viewer.

The file oc_api.bas in either the Actions demo contains Visual Basic definitions for each of these constants.


Modifier Flags

The following modifier flags are recognized:

MK_LBUTTON | left mouse button
MK_MBUTTON | both mouse buttons
MK_RBUTTON | right mouse button
MK_ALT | Alt key
MK_SHIFT | Shift key
MK_CONTROL | Ctrl key


Recognized Keycodes

Any valid VK_ value is treated as a recognized keycode. Note the following, however:

•

All alphabetic characters are forced to upper case.

•

MK_SHIFT must appear in the modifier if capitals are desired.

•

The CapsLock key toggles the meaning of the MK_SHIFT modifier.


Determining Action Mappings

To determine which action is mapped to a particular Microsoft Windows message, use the Item property, which is defined by the ActionMaps collection. For example, the following statement returns the action performed when the left mouse button is clicked:

Dim LeftMouse As Object

...

Set LeftMouse = Chart2D1.ActionMaps.Item WM_LBUTTONDOWN, 0, 0

An exception is generated if no action is mapped to a particular message.

By default, the following action maps are defined (message and modifier flags shown):

WM_MBUTTONDOWN, MK_MBUTTON,0 | oc2dActionModifyStart (start rotation)
WM_MBUTTONDOWN, MK_MBUTTON+MK_SHIFT, 0 | oc2dActionModifyStart (start translation)
WM_MBUTTONDOWN, MK_MBUTTON+MK_CONTROL, 0 | oc2dActionModifyStart (start scaling)
WM_LBUTTONDOWN, MK_LBUTTON+MK_CONTROL, 0 | oc2dActionZoomStart (start graphics zooming)
WM_LBUTTONDOWN MK_LBUTTON+MK_SHIFT, 0 | oc2dActionZoomStart (start axis zooming)
WM_MOUSEMOVE, MK_MBUTTON, 0 | oc2dActionRotate
WM_MOUSEMOVE, MK_MBUTTON + MK_SHIFT, 0 | oc2dActionTranslate
WM_MOUSEMOVE, MK_MBUTTON + MK_CONTROL, 0 | oc2dActionScale
WM_MOUSEMOVE, MK_LBUTTON + MK_CONTROL, 0 | oc2dActionZoomUpdate
WM_MOUSEMOVE, MK_LBUTTON + MK_SHIFT, 0 | oc2dActionZoomUpdate
WM_MBUTTONUP, 0, 0 | oc2dActionModifyEnd (end rotation)
WM_MBUTTONUP, MK_SHIFT, 0 | oc2dActionModifyEnd (end translation)
WM_MBUTTONUP, MK_CONTROL, 0 | oc2dActionModifyEnd (end scaling)
WM_LBUTTONUP, MK_CONTROL, 0 | oc2dActionZoomEnd (end zooming)
WM_LBUTTONUP, MK_SHIFT, 0 | oc2dActionZoomAxisEnd (end axis zooming)
WM_KEYDOWN, 0, 'R' | oc2dActionReset
WM_RBUTTONDOWN, MK_MBUTTON,0 | oc2dActionProperties
WM_KEYDOWN, MK_LBUTTON, VK_ESCAPE | oc2dActionZoomCancel


Programming Action Mappings

To program an action mapping, use the Add method to add the new action mapping to the collection.

For example, the following tells 2D Chart to undo all scaling and translations when the left mouse button is double-clicked:

Dim NewLeft As Object

...

With Chart2D1.ActionMaps

Set NewLeft = .Add WM_LBUTTONDBLCLK, 0, 0, oc2dActionReset

End With

All 2D Chart actions are customizable: you can determine which Microsoft Windows message will call a particular action, and decide on the appropriate steps to perform in each case.


Removing Action Mappings

To remove an existing action mapping, use the Remove method to remove the action mapping from the collection:

With Chart2D1.ActionMaps

.Remove WM_LBUTTONDBLCLK, 0, 0

End With

Note that Remove generates an exception if the action does not exist.


Calling an Action Directly

To call an action directly, call the CallAction method, which is defined by the Chart2D object. This method is passed the action to be performed and the X- and Y- coordinates of a window location.

For examples of code using CallAction, refer to the actions demo provided with your ComponentOne Chart distribution.


Actions and Events

Each of the actions defined in the Action Constants maps to a 2D Chart event method. The following mappings are defined:

oc2dActionNone | no event method called
oc2dActionModifyStart | ModifyStart()
oc2dActionModifyEnd | ModifyEnd()
oc2dActionRotate | View3DModify()
oc2dActionScale | PlotAreaModify()
oc2dActionTranslate | PlotAreaModify()
oc2dActionZoomStart | ModifyStart()
oc2dActionZoomUpdate | no event method called
oc2dActionZoomCancel | PlotAreaModify()
oc2dActionZoomEnd | PlotAreaModify(), ModifyEnd()
oc2dActionZoomAxisEnd | ZoomAxisModify(), ModifyEnd()
oc2dActionReset | ModifyStart(), PlotAreaModify(), ModifyEnd()
oc2dActionProperties | property pages are displayed

The event methods are defined in the Event Reference section. Note that some actions trigger multiple events.


Returning Coordinate Values

The ChartGroups collection provides methods which enable you to do the following:

•

Determine the pixel coordinates of a given data point, or the closest point to a given set of pixel coordinates.

•

Convert from data coordinates to screen pixel coordinates and vice versa.

Determining Coordinate Values

Converting Data Coordinates to Pixel Coordinates

Converting Pixel Coordinates to Data Coordinates

Picking Data Points

Converting Visual Basic Coordinates


Determining Coordinate Values

To determine the pixel coordinates of a given data point, call DataIndexToCoord. For example, the following code obtains the pixel coordinates of the point in the second row and third column:

Dim PixelX As Long

Dim PixelY As Long

...

With Chart2D1.ChartGroups(1)

.DataIndexToCoord 2, 3, PixelX, PixelY

End With

' PixelX and PixelY now contain the pixel coordinate value


Converting Data Coordinates to Pixel Coordinates

To convert from data coordinates to screen pixel coordinates, call the DataCoordToCoord method. For example, the following code obtains the pixel coordinates corresponding to the data coordinates (5.1, 10.2):

Dim PixelX As Long

Dim PixelY As Long

...

With Chart2D1.ChartGroups(1)

.DataCoordToCoord 5.1, 10.2, PixelX, PixelY

End With

' PixelX and PixelY now contain the pixel coordinate value

If the data coordinate is out of the visible range of the chart, both of the pixel X- and Y-coordinates are set to -1.


Converting Pixel Coordinates to Data Coordinates

To convert from pixel coordinates to data coordinates, call CoordToDataCoord. For example, the following converts the pixel coordinates (225, 92) to their equivalent data coordinates:

Dim DataX As Double

Dim DataY As Double

Dim Region As Integer

...

With Chart2D1.ChartGroups(1)

Region = CoordToDataCoord 225, 92, DataX, DataY

End With

' DataX and DataY now contain the data coordinate value

CoordToDataCoord returns, as its return value, the region of the chart in which the pixel coordinates are located. This region is represented as a region constant.


Picking Data Points

To determine the closest data point to a set of pixel coordinates, call CoordToDataIndex:

Dim Row As Long

Dim Column As Long

Dim Distance As Long

Dim Region As Integer

...

With Chart2D1.ChartGroups(1)

Region = CoordToDataIndex 225, 92, Row, Column

End With

CoordToDataIndex returns the row and column of the closest data point, and also returns the distance in pixels between the pixel coordinates and the point. CoordToDataIndex returns, as its return value, the region of the chart in which the pixel coordinates are located. This region is represented as a region constant. When the returned region is oc2dRegionInLegend, the returned point value is also set to oc2dRegionInLegend, and the returned series is the closest element in the legend.


Converting Visual Basic Coordinates

In Visual Basic, coordinate values are measured in twips (1,440 twips equals one inch). The following code converts the height and width of a chart from twips to pixels:

pixwidth = Chart2D1.Width / Screen.TwipsPerPixelX

pixheight = Chart2D1.Height / Screen.TwipsPerPixelY


Customizing the Property Pages

Depending on the type of chart you create, you may want to allow users to view the entire Property Pages, or only part of it. By hiding a Property Pages tab or sub tab, you can determine what chart components users can customize.


To Hide a Property Pages Tab

Use the ShowChartEditorElement method to set the display state of the Property Pages tab. The following example hides the Control tab and the Font sub tab of the Axes tab:

Chart2d1.ShowChartEditorElement oc2dceeControl, False

Chart2d1.ShowChartEditorElement oc2dceeAxesFont, False


To Display a Property Pages Tab Display State

Use the IsChartEditorElementVisible method to determine if the tab is currently hidden or visible. The method returns True if the element is visible, and False otherwise. The following example gets the display state for the Font sub tab of the Axes tab, and shows the tab if it is currently hidden:

If Chart2d1.IsChartEditorVisible (oc2dceeAxesFont) = False then

Chart2d1.ShowChartEditorElement oc2dceeAxesFont, True

EndIf


Object Reference

The following provides reference information on the objects that comprise the 2D Chart control, including their properties and methods. The objects are listed alphabetically.

Chart2D Object

Accounting Object

ActionMap Object

ActionMaps Collection

AlarmZone Object

AlarmZones Collection

Axes Collection

Axis Object

AxisStyle Object

Bar Object

Border Object

Bubble Object

Candle Object

ChartArea Object

ChartGroup Object

ChartGroups Collection

ChartLabel Object

ChartLabels Collection

ChartStyle Object

ChartStyles Collection

Chart2DCheckNewPointsResult Object

Chart2DCoordResult Object

Chart2DData Object

Chart2DDataCoordResult Object

Chart2DDataIndexResult Object

Coord Object

Currency Object

DataCoord Object

DataIndex Object

DerivedBoolean Object

DerivedDouble Object

DerivedEnum Object

DerivedLong Object

DerivedString Object

FillStyle Object

Fraction Object

GridLines Object

HiLoOpenClose Object

Image Object

Interior Object

Label Object

Labels Collection

Legend Object

LineStyle Object

Location Object

Marker Object

Markers Collection

Number Object

Percentage Object

Pie Object

PlotArea Object

PointStyles Collection

Polar Object

Scientific Object

SliceStyle Object

Strings Collection

SymbolStyle Object

TimeScale Object

Title Object

ValueFormat Object

ValueLabel Object

ValueLabels Collection

View3D Object


Chart2D Object


Chart2D Object Members

Chart2D Object Properties

ActionMaps | The action maps for the control
AllowUserChanges | Specifies whether the end-user is to be permitted to pop up the property page at runtime.
Border | The border around the entire control.
CausesValidation | Returns/sets whether validation occurs on the control which lost focus.
Cborder | The border around the entire control.
ChartArea | The region of the chart containing the data and axes.
ChartGroups | The collection of data, styles, series/point labels.
ChartLabels | Text annotations within the chart.
Container | Returns the container of an object.
DataBindings | Returns/sets a DataBindings collection object that collects the bindable properties that are available to the developer.
DataPath | Specifies a URL containing chart data to load at runtime.
DataSource | The data control through which the current control is bound to a database.
DragIcon | Returns/sets the icon to be displayed as the pointer in a drag-and-drop operation.
DragMode | Returns/sets a value that determines whether manual or automatic drag mode is used.
ErrorOffset | The value to be added to each 2D Chart error number (to ensure uniqueness).
Footer | The footer of the chart.
Header | The header of the chart.
Height | Returns/sets the height of an object.
HelpContextID | Specifies the default Help file context ID for an object.
hWnd | The window handle for the control.
Index | Returns/sets the number identifying a control in a control array.
Interior | The background/foreground colors and image for the chart element.
IsBatched | Determines whether changes to chart properties are shown.
IsDoubleBuffered | Determines how chart updates appear to the user.
Left | Returns/sets the distance between the internal left edge of an object and the left edge of its container.
Legend | The legend of the chart.
Name | Returns the name used in code to identify an object.
Object | Returns an object in a control.
Parent | Returns the object on which this object is located.
PropertyPageHelpFile | Specifies an alternate path and filename to the runtime property pages.

Chart2D Object Methods

AboutBox | Displays an About box.
CallAction | Calls an action.
CopyToClipboard | Copies the chart to the clipboard.
DrawToDC | Draws the chart on a specified device.
DrawToFile | Draws the chart into a file.
IsChartEditorElementVisible | Returns the state of the Property Editor element.
Load | Loads a chart description from a file.
LoadURL | Loads a chart Description (an .OC2 file) from a URL.
PrintChart | Prints the chart using the Windows dialog box.
Refresh | Repaints the chart.
Reset | The default state is the property settings and data values that appear in the chart when it is first dropped on a form.
Save | Saves a chart description to a file.
SaveImageAsDibBytes | Saves a bitmap (device independent bitmap) to a Byte array if successful or Empty if it fails.
SaveImageAsJpeg | Saves the chart as a JPEG image file.
SaveImageAsJpegBytes | Performs the same as the existing function SaveImageAsJpeg() except that the image data is not saved to a file, but is returned in a Byte array (memory only) if successful and Empty if it fails.
SaveImageAsPng | Saves the chart as a PNG image file.
SaveImageAsPngBytes | Performs the same as the existing functions SaveImageAsPng() except that the image data is not saved to a file, but is returned in a Byte array (memory only) if successful and Empty if it fails.
ShowChartEditorElement | Determines if a Property Editor tab is shown or not.


Chart2D Object Properties

ActionMaps Property (Chart2D)

AllowUserChanges Property (Chart2D)

Border Property (Chart2D)

CausesValidation Property (Chart2D)

CBorder Property (Chart2D)

ChartArea Property (Chart2D)

ChartGroups Property (Chart2D)

ChartLabels Property (Chart2D)

Container Property (Chart2D)

DataBindings Property (Chart2D)

DataPath Property (Chart2D)

DataSource Property (Chart2D)

DragIcon Property (Chart2D)

DragMode Property (Chart2D)

ErrorOffset Property (Chart2D)

Footer Property (Chart2D)

Header Property (Chart2D)

Height Property (Chart2D)

HelpContextID Property (Chart2D)

hWnd Property (Chart2D)

Index Property (Chart2D)

Interior Property (Chart2D)

IsBatched Property (Chart2D)

IsDoubleBuffered Property (Chart2D)

Left Property (Chart2D)

Legend Property (Chart2D)

Name Property (Chart2D)

Object Property (Chart2D)

Parent Property (Chart2D)

PropertyPageHelpFile Property (Chart2D)


ActionMaps Property (Chart2D)

The action maps for the control.

Syntax

Property ActionMaps As ActionMapCollection (read-only)

See Also

ActionMap Object

ActionMaps Collection

Chart2D Object


AllowUserChanges Property (Chart2D)

Specifies whether the end-user is to be permitted to pop up the property page at runtime.

Syntax

Property AllowUserChanges As Boolean

See Also

Chart2D Object


Border Property (Chart2D)

The border around the entire control.

Syntax

Property Border As Border (read-only)

See Also

Border Object

Chart2D Object


CausesValidation Property (Chart2D)

Returns/sets whether validation occurs on the control which lost focus.

Syntax

Property CausesValidation As Boolean

See Also

Chart2D Object


CBorder Property (Chart2D)

The border around the entire control.

Syntax

Property CBorder As Border (read-only)

Remarks

This property refers to the exactly the same object as the Border property. It provides an alternate name to the Border object as some browsers (Internet Explorer 6x for example) do not allow ActiveX objects to use Border as a property name.

See Also

Border Object

Chart2D Object


ChartArea Property (Chart2D)

The region of the chart containing the data and axes.

Syntax

Property ChartArea As ChartArea (read-only)

See Also

Chart2D Object

ChartArea Object


ChartGroups Property (Chart2D)

The collection of data, styles, series/point labels.

Syntax

Property ChartGroups As ChartGroupCollection (read-only)

See Also

Chart2D Object

ChartGroup Object

ChartGroups Collection


ChartLabels Property (Chart2D)

Text annotations within the chart.

Syntax

Property ChartLabels As ChartLabelCollection (read-only)

See Also

Chart2D Object

ChartLabel Object

ChartLabels Collection


Container Property (Chart2D)

Returns the container of an object.

Syntax

Property Container As Object

See Also

Chart2D Object


DataBindings Property (Chart2D)

Returns/sets a DataBindings collection object that collects the bindable properties that are available to the developer.

Syntax

Property DataBindings As DataBindings (read-only)

See Also

Chart2D Object


DataPath Property (Chart2D)

Specifies a URL containing chart data to load at runtime

Syntax

Property DataPath As String

Remarks

If this property is set, the chart will attempt to load data into the chart from the specified location. If the data cannot be located, it will load the default data.

See Also

Chart2D Object


DataSource Property (Chart2D)

The data control through which the current control is bound to a database.

Syntax

Property DataSource As IdataCursor

See Also

Chart2D Object


DragIcon Property (Chart2D)

Returns/sets the icon to be displayed as the pointer in a drag-and-drop operation.

Syntax

Property DragIcon As StdPicture

See Also

Chart2D Object


DragMode Property (Chart2D)

Returns/sets a value that determines whether manual or automatic drag mode is used.

Syntax

Property DragMode As Integer

See Also

Chart2D Object


ErrorOffset Property (Chart2D)

The value to be added to each 2D Chart error number (to ensure uniqueness).

Syntax

Property ErrorOffset As Long

See Also

Chart2D Object


Footer Property (Chart2D)

The footer of the chart.

Syntax

Property Footer As Title (read-only)

See Also

Chart2D Object

Title Object


Header Property (Chart2D)

The header of the chart.

Syntax

Property Header As Title (read-only)

See Also

Chart2D Object

Title Object


Height Property (Chart2D)

Returns/sets the height of an object.

Syntax

Property Height As Single

See Also

Chart2D Object


HelpContextID Property (Chart2D)

Specifies the default Help file context ID for an object.

Syntax

Property HelpContextID As Long

See Also

Chart2D Object


hWnd Property (Chart2D)

The window handle for the control.

Syntax

Property hWnd As OLE_HANDLE (read-only)

See Also

Chart2D Object


Index Property (Chart2D)

Returns/sets the number identifying a control in a control array.

Syntax

Property Index As Integer (read-only)

See Also

Chart2D Object


Interior Property (Chart2D)

The background/foreground colors and image for the chart element.

Syntax

Property Interior As Interior (read-only)

See Also

Chart2D Object

Interior Object


IsBatched Property (Chart2D)

Determines how chart updates appear to the user.

Syntax

Property IsBatched As Boolean

Remarks

When set to False, changing a property causes the chart display to update immediately. When set to True, property changes are not shown until this property is reset to False.

See Also

Chart2D Object


IsDoubleBuffered Property (Chart2D)

Determines how chart updates appear to the user.

Syntax

Property IsDoubleBuffered As Boolean

Remarks

When set to True, redrawing the chart is buffered to limit flashing. When set to False, redrawing takes place directly on the screen, which results in less memory used.

See Also

Chart2D Object


Left Property (Chart2D)

Returns/sets the distance between the internal left edge of an object and the left edge of its container.

Syntax

Property Left As Single

See Also

Chart2D Object


Legend Property (Chart2D)

The legend of the chart.

Syntax

Property Legend As Legend (read-only)

See Also

Chart2D Object

Legend Object


Name Property (Chart2D)

Returns the name used in code to identify an object.

Syntax

Property Name As String (read-only)

See Also

Chart2D Object


Object Property (Chart2D)

Returns an object in a control.

Syntax

Property Object As Object (read-only)

See Also

Chart2D Object


Parent Property (Chart2D)

Returns the object on which this object is located.

Syntax

Property Parent As Object (read-only)

See Also

Chart2D Object


PropertyPageHelpFile Property (Chart2D)

Specifies an alternate path and filename to the runtime property pages.

Syntax

Property PropertyPageHelpfile As String

Remarks

The help is launched as winhelp or htmlhelp based upon the file extension. If the help file does not exist or is blank, the standard html help file is loaded.

See Also

Chart2D Object


2DChart Object Methods

AboutBox Method (Chart2D)

CallAction Method (Chart2D)

CopyToClipboard Method (Chart2D)

DrawToDC Method (Chart2D)

DrawToFile Method (Chart2D)

IsChartEditorElementVisible Method (Chart2D)

Load Method (Chart2D)

LoadURL Method (Chart2D)

PrintChart Method (Chart2D)

Refresh Method (Chart2D)

Reset Method (Chart2D)

Save Method (Chart2D)

SaveImageAsDibBytes Method (Chart2D)

SaveImageAsJpeg Method (Chart2D)

SaveImageAsJpegBytes Method (Chart2D)

SaveImageAsPng Method (Chart2D)

SaveImageAsPngBytes Method (Chart2D)

ShowChartEditorElement Method (Chart2D)


AboutBox Method (Chart2D)

Displays an “About” box.

Syntax

Sub AboutBox()

See Also

Chart2D Object


CallAction Method (Chart2D)

Calls an action.

Syntax

Sub CallAction(Action As ActionConstants, XCoord As Long, YCoord As Long)

Remarks

Part | Type | Description
Action | Integer | The action to be called. See Action Constants for valid values.
Xcoord | Long | The X-coordinate of the specified location.
Ycoord | Long | The Y-coordinate of the specified location.

See Also

Chart2D Object


CopyToClipboard Method (Chart2D)

Copies the chart to the clipboard

Syntax

Function CopyToClipboard(Format As FormatConstants) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
Format | Integer | Print format used. See Format Constants for valid values.

See Also

Chart2D Object


DrawToDC Method (Chart2D)

Draws the chart on a specified device. Left, Top, Width and Height are measured in pixels.

Syntax

Function DrawToDC(Hdc As Long, Format As FormatConstants, Scale As ScaleConstants, Left As Long, Top As Long, Width As Long, Height As Long) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
Hdc | Long | Microsoft Windows device context handle.
Format | Integer | Print format used. See Format Constants for valid values.
Scale | String | Scaling to perform when drawing. See Scale Constants for valid values.
Left | Long | Offset from left edge of page.
Top | Long | Offset from top of page.
Width | Long | Width of drawn image.
Height | Long | Height of drawn image.

See Also

Chart2D Object


DrawToFile Method (Chart2D)

Draws the chart into a file.

Syntax

Function DrawToFile(FileName As String, Format As FormatConstants) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
FileName | String | File to contain drawing.
Format | Integer | Print format used. See Format Constants for valid values.

See Also

Chart2D Object


IsChartEditorElementVisible Method (Chart2D)

Returns the state of the Property Editor element.

Syntax

Function IsChartEditorElementVisible(Element As Integer) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
Element | Integer | The Property Editor Element. See ChartEditorElement Constants for valid values.

See Also

Chart2D Object


Load Method (Chart2D)

Loads a chart description from a file.

Syntax

Function Load(FileName As String) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
FileName | String | Name of file, including path if necessary.

See Also

Chart2D Object


LoadURL Method (Chart2D)

Loads a chart Description (an .OC2 file) from a URL.

Syntax

Function LoadURL(URLName As String) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
URLName | String | The URL where the chart Description file is located.

See Also

Chart2D Object


PrintChart Method (Chart2D)

Prints the chart using the Windows dialog box. Left, Top, Width and Height are measured in pixels.

Syntax

Function PrintChart(Format As FormatConstants, Scale As ScaleConstants, Left As Long, Top As Long, Width As Long, Height As Long) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
Format | Integer | Print format used. See Format Constants for valid values.
Scale | String | Scaling to perform when printing. See Scale Constants for valid values.
Left | Long | Offset from left edge of page.
Top | Long | Offset from top of page.
Width | Long | Width of printed image (if set to 0, use width specified by print device).
Height | Long | Height of printed image (if set to 0, use height specified by print device).

See Also

Chart2D Object


Refresh Method (Chart2D)

Repaints the chart

Syntax

Sub Refresh()

See Also

Chart2D Object


Reset Method (Chart2D)

The default state is the property settings and data values that appear in the chart when it is first dropped on a form.

Syntax

Sub Reset()

Remarks

This method has also been added to the Control-General property page as a button. Pressing the button resets the 2D or 3D chart to its default state.

See Also

Chart2D Object


Save Method (Chart2D)

Saves a chart description to a file.

Syntax

Function Save(FileName As String) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
FileName | String | Name of file, including path if necessary.

See Also

Chart2D Object


SaveImageAsDibBytes Method (Chart2D)

Saves a bitmap (device independent bitmap) to a Byte array if successful or Empty if it fails.

Syntax

Function SaveImageAsDibBytes()

See Also

Chart2D Object


SaveImageAsJpeg Method (Chart2D)

Saves the chart as a JPEG image file.

Syntax

Function SaveImageAsJpeg(FileName As String, Quality As Long, GrayScale As Boolean, OptimizeCompression As Boolean, ProgressiveJpeg As Boolean) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
FileName | String | The path and file name of the image to be stored.
Quality | Long | A value from 0 to 100. The larger the value, the better the image quality (but a larger file size).
GrayScale | Boolean | GrayScale has a value of True if the image is to be saved as a grayscale. A grayscale image is composed of 256 shades of gray.
OptimizeCompression | Boolean | Set to True to optimize the compression, resulting in a smaller file size (but longer load time).
ProgressiveJpeg | Boolean | Set to True to create a JPEG that will display incrementally.

See Also

Chart2D Object


SaveImageAsJpegBytes Method (Chart2D)

Performs the same as the existing function SaveImageAsJpeg() except that the image data is not saved to a file, but is returned in a Byte array (memory only) if successful and Empty if it fails.

Syntax

Function SaveImageAsJpegBytes(Quality As Long, GrayScale As Boolean, OptimizeCompression As Boolean, ProgressiveJpeg As Boolean)

Remarks

Part | Type | Description
Quality | Long | A value from 0 to 100. The larger the value, the better the image quality (but a larger file size).
GrayScale | Boolean | GrayScale has a value of True if the image is to be saved as a grayscale. A grayscale image is composed of 256 shades of gray.
OptimizeCompression | Boolean | Set to True to optimize the compression, resulting in a smaller file size (but longer load time).
ProgressiveJpeg | Boolean | Set to True to create a JPEG that will display incrementally.

See Also

Chart2D Object


SaveImageAsPng Method (Chart2D)

Saves the chart as a PNG image file.

Syntax

Function SaveImageAsPng(FileName As String, Interlace As Boolean) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
FileName | String | The path and file name of the image to be stored.
Interlace | Boolean | Set to True to create an interlaced PNG file.

See Also

Chart2D Object


SaveImageAsPngBytes Method (Chart2D)

Performs the same as the existing functions SaveImageAsPng() except that the image data is not saved to a file, but is returned in a Byte array (memory only) if successful and Empty if it fails.

Syntax

Function SaveImageAsPngBytes(Interlace As Boolean)

Remarks

Part | Type | Description
Interlace | Boolean | Set to True to create an interlaced PNG file.

See Also

Chart2D Object


ShowChartEditorElement Method (Chart2D)

Syntax

Function ShowChartEditorElement(Element As Integer, Show As Boolean) As Boolean

Remarks

Returns True on success, False on failure.

Part | Type | Description
Element | Integer | The Property Editor component to be shown or hidden. See ChartEditorElement Constants for valid values.
Show | Boolean | If the element is shown or not. True if the element is shown, False if it is not.

See Also

Chart2D Object


Accounting Object

Description

Contains properties specific to the accounting custom annotation format and determines how values of type Accounting are displayed.


Accounting Object Members

Accounting Object Properties

DecimalPlaces | The number of decimal places to display.
NegativeValueColor | The color used to display negative values.
OrderCurrencySignValue | Specifies the order of the currency sign, symbol and style
Parent | The parent object.
SpaceSeparatingCurrency | Whether or not there is a space between the currency symbol and the value.
SpaceSeparatingSign | Whether or not there is a space between the negative sign and the value.
UseBrackets | Whether or not negative values are put in brackets.
UseCurrencySymbol | Whether or not the currency symbol is appended to the value.
UseSmallCents | Whether or not cents are displayed in superscript.


Accounting Object Properties

DecimalPlaces Property (Accounting)

NegativeValueColor Property (Accounting)

OrderCurrencySignValue Property (Accounting)

Parent Property (Accounting)

SpaceSeparatingCurrency Property (Accounting)

SpaceSeparatingSign Property (Accounting)

UseBrackets Property (Accounting)

UseCurrencySymbol Property (Accounting)

UseSmallCents Property (Accounting)


DecimalPlaces Property (Accounting)

The number of decimal places to display.

Type

Property DecimalPlaces As Long

See Also

Accounting Object


NegativeValueColor Property (Accounting)

The color used to display negative values. You can specify RGB colors using the RGB() or QBColor() functions.

Type

Property NegativeValueColor As OLE_COLOR

See Also

Accounting Object


OrderCurrencySignValue Property (Accounting)

Specifies the order of the currency sign, symbol and style.

Type

Property OrderCurrencySignValue As DerivedEnum (read-only)

See Also

Accounting Object

DerivedEnum Object

OrderCurrencySignValue Constants


Parent Property (Accounting)

The parent object.

Type

Property Parent As Object (read-only)

See Also

Accounting Object


SpaceSeparatingCurrency Property (Accounting)

Whether or not there is a space between the currency symbol and the value.

Type

Property SpaceSeparatingCurrency As DerivedBoolean (read-only)

See Also

Accounting Object

DerivedBoolean Object


SpaceSeparatingSign Property (Accounting)

Whether or not there is a space between the negative sign and the value.

Type

Property SpaceSeparatingSign As DerivedBoolean (read-only)

See Also

Accounting Object

DerivedBoolean Object


UseBrackets Property (Accounting)

Whether or not negative values are put in brackets.

Type

Property UseBrackets As DerivedBoolean (read-only)

Example

' Puts negative values in brackets
Chart2D1.ChartArea.Axes("X").ValueFormat.Accounting.UseBrackets = True

See Also

Accounting Object

ValueFormat Object


UseCurrencySymbol Property (Accounting)

Whether or not the currency symbol is appended to the value.

Type

Property UseCurrencySymbol As Boolean

See Also

Accounting Object


UseSmallCents Property (Accounting)

Whether or not cents are displayed in superscript.

Type

Property UseSmallCents As Boolean

See Also

Accounting Object


ActionMap Object

An ActionMap object is one action map (which defines a user event that causes some interactive action within the control).


ActionMap Object Members

ActionMap Object Properties

Action | The action associated with this action map.
Keycode | The keycode for this action.
Message | The message to be passed to the message handler.
Modifier | The modifier flags, if any.
Parent | The parent object.


ActionMap Object Properties

Action Property (ActionMap)

Keycode Property (ActionMap)

Message Property (ActionMap)

Modifier Property (ActionMap)

Parent Property (ActionMap)


Action Property (ActionMap)

The action associated with this action map.

Type

Property Action As ActionConstants

See Also

Action Constants

ActionMap Object


Keycode Property (ActionMap)

The keycode for this action.

Type

Property Keycode As Integer (read-only)

See Also

ActionMap Object


Message Property (ActionMap)

The message to be passed to the message handler.

Type

Property Message As Integer (read-only)

See Also

ActionMap Object


Modifier Property (ActionMap)

The modifier flags, if any.

Type

Property Modifier As Integer (read-only)

See Also

ActionMap Object


Parent Property (ActionMap)

The parent object.

Type

Property Parent As Object (read-only)

See Also

ActionMap Object


ActionMaps Collection

The ActionMaps collection is a collection of all ActionMap objects.


ActionMaps Collection Members

ActionMaps Collection Properties

Count | The current number of ActionMap objects in the collection.
Item | Specifies a specific ActionMap object from the collection.
Parent | The parent object.

ActionMaps Collection Methods

Add | Adds an action map to the collection.
Remove | Removes an action map from the collection.
RemoveAll | Removes all elements in the collection.
Reset | Resets the collection to the default set of actions that are created when a new control is created.


ActionMaps Collection Properties


Count Property (ActionMaps)

The current number of ActionMap objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

ActionMaps Collection


Item Property (ActionMaps)

Specifies a specific ActionMap object from the collection. Indexed by message, modifier flags, and keycode.

Syntax

Property Item(Message As Integer, Modifier As Integer, Keycode As Integer) As ActionMap (read-only)

See Also

ActionMaps Collection


Parent Property (ActionMaps)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ActionMaps Collection


ActionMaps Collection Methods

Add Method (ActionMaps)

Remove Method (ActionMaps)

RemoveAll Method (ActionMaps)

Reset Method (ActionMaps)


Add Method (ActionMaps)

Adds an action map to the collection.

Syntax

Function Add(Message As Integer, Modifier As Integer, Keycode As Integer, Action As Integer) As ActionMap

Remarks

Part | Type | Description
Message | Integer | The message passed to the message handler
Modifier | Integer | Modifier flags; zero if none
Keycode | Integer | The associated keycode (only for WM_KEYDOWN and WM_KEYUP messages)
Action | Integer | The action to be added (value must be an action constant)

See Also

ActionMaps Collection


Remove Method (ActionMaps)

Removes an action map from the collection.

Syntax

Sub Remove(Message As Integer, Modifier As Integer, Keycode As Integer)

Remarks

Part | Type | Description
Message | Integer | The message passed to the message handler
Modifier | Integer | Modifier flags; zero if none
Keycode | Integer | The associated keycode (only for WM_KEYDOWN and WM_KEYUP messages)

See Also

ActionMaps Collection


RemoveAll Method (ActionMaps)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

ActionMaps Collection


Reset Method (ActionMaps)

Resets the collection to the default set of actions that are created when a new control is created.

Syntax

Sub Reset()

See Also

ActionMaps Collection


AlarmZone Object


AlarmZone Object Members

AlarmZone Object Properties

BackgroundColor | Sets the background color of the specified alarm zone.
ForegroundColor | Sets the foreground color of the specified alarm zone.
IsShowing | Whether the alarm zone is displayed.
LowerExtent | Sets the lower extent of the specified alarm zone.
Name | The alarm zone name.
Parent | The parent object.
Pattern | Sets the fill pattern of the specified alarm zone.
UpperExtent | Sets the upper extent of the specified alarm zone.


AlarmZone Object Properties

BackgroundColor Property (AlarmZone)

ForegroundColor Property (AlarmZone)

IsShowing Property (AlarmZone)

LowerExtent Property (AlarmZone)

Name Property (AlarmZone)

Parent Property (AlarmZone)

Pattern Property (AlarmZone)

UpperExtent Property (AlarmZone)


BackgroundColor Property (AlarmZone)

Sets the background color of the specified alarm zone.

Syntax

Property BackgroundColor As OLE_COLOR

See Also

AlarmZone Object


ForegroundColor Property (AlarmZone)

Sets the foreground color of the specified alarm zone.

Syntax

Property ForegroundColor As OLE_COLOR

See Also

AlarmZone Object


IsShowing Property (AlarmZone)

Whether the alarm zone is displayed.

Syntax

Property IsShowing As Boolean

See Also

AlarmZone Object


LowerExtent Property (AlarmZone)

Sets the lower extent of the specified alarm zone.

Syntax

Property LowerExtent As Double

See Also

AlarmZone Object


Name Property (AlarmZone)

The alarm zone name.

Syntax

Property Name As String

See Also

AlarmZone Object


Parent Property (AlarmZone)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

AlarmZone Object


Pattern Property (AlarmZone)

Sets the fill pattern of the specified alarm zone.

Syntax

Property Pattern As FillPatternConstants

See Also

AlarmZone Object


UpperExtent Property (AlarmZone)

Sets the upper extent of the specified alarm zone.

Syntax

Property UpperExtent As Double

See Also

AlarmZone Object


AlarmZones Collection

Alarm Zones are a series of bands that can be placed behind the plotted data, but in front of the chart background.


AlarmZones Collection Members

AlarmZones Collection Properties

Count | The current number of AlarmZone objects in the collection.
Item | Specifies a specific AlarmZone object from the collection.
Parent | The parent object.

AlarmZones Collection Methods

Add | Adds an alarm zone to the collection.
Remove | Removes an alarm zone from the collection.
RemoveAll | Removes all elements in the collection.


AlarmZones Collection Properties


Count Property (AlarmZones)

The current number of AlarmZone objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

AlarmZones Collection


Item Property (AlarmZones)

Specifies a specific AlarmZone object from the collection.

Syntax

Property Item(Index) As AlarmZone (read-only)

See Also

AlarmZones Collection


Parent Property (AlarmZones)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

AlarmZones Collection


AlarmZones Collection Methods


Add Method (AlarmZones)

Adds an alarm zone to the collection.

Syntax

Function Add(Name As String, [Before]) As AlarmZone

See Also

AlarmZones Collection


Remove Method (AlarmZones)

Removes an alarm zone from the collection.

Syntax

Sub Remove(Index)

See Also

AlarmZones Collection


RemoveAll Method (AlarmZones)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

AlarmZones Collection


Axes Collection

The Axes collection is a static collection of three Axis objects, named “X”, “Y” and “Y2”.


Axes Collection Members

Axes Collection Properties

Count | The current number of Axis objects in the collection.
Item | Specifies a specific Axis object from the collection. Indexed by number (with 1 representing the first object in the collection) or by the value of the Name property.
Parent | The parent object.


Axes Collection Properties


Count Property (Axes)

The current number of Axis objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

Axes Collection


Item Property (Axes)

Specifies a specific Axis object from the collection. Indexed by number (with 1 representing the first object in the collection) or by the value of the Name property.

Syntax

Property Item(Index) As Axis

See Also

Axes Collection


Parent Property (Axes)

The parent object.

Syntax

Property Parent As Object

See Also

Axes Collection


Axis Object

An Axis object is one chart axis.


Axis Object Members

Axis Object Properties

AnnotationAngle | The angle from which the axis is annotated for polar and radar charts.
AnnotationMethod | The method used to annotate the axis.
AnnotationPlacement | The placement of the axis annotation and title with respect to the perpendicular axis.
AnnotationRotation | The counterclockwise rotation of the axis annotation text.
AnnotationRotationAngle | The counterclockwise rotation of the axis annotation text.
AxisStyle | The line style and tick length for the axis.
Constant | Used with the Multiplier property to specify a relationship between the Y-axis and the Y2-axis.
DataMax | The value of the high end of the data.
DataMin | The value of the low end of the data.
Font | The font used in the axis.
IsLogarithmic | Whether data is graphed against a logarithmic axis.
Is100Percent | Scales the Y or Y2 axis for stacking charts to a common value of 100 percent.
IsReversed | Whether the axis is drawn and annotated in the reverse direction.
IsShowing | Whether the axis is displayed.
LabelFormat | Specifies the format of the value.
MajorGrid | The grid to be displayed parallel to this axis.
Max | The maximum value of the axis.
Min | The minimum value of the axis.
Multiplier | Used with the Constant property to specify a relationship between the Y-axis and the Y2-axis.
Name | The axis name, which is one of “X”, “Y” or “Y2”.
NumMethod | The method used to calculate axis-numbering.
NumSpacing | The increment between axis numbers.
Origin | Where the perpendicular axis is rendered.
OriginBase | Where on the y-axis the x-axis is located.
OriginPlacement | The location of the origin.
Parent | The parent object.
Precision | The number of digits of precision after the decimal point to be used for axis-numbering.
TickSpacing | The increment between axis-ticks.
TimeScale | The scale for an X-axis representing the time dimension.
Title | The axis title.
TitleFont | This property specifies the Font to use for the title of an Axis.
TitleRotation | The rotation of the axis title.
ValueLabels | The labels for the axis, used when the AnnotationMethod property has the value oc2dAnnotateValueLabels


Axis Object Properties

AnnotationAngle Property (Axis)

AnnotationMethod Property (Axis)

AnnotationPlacement Property (Axis)

AnnotationRotation Property (Axis)

AnnotationRotationAngle Property (Axis)

AxisStyle Property (Axis)

Constant Property (Axis)

DataMax Property (Axis)

DataMin Property (Axis)

Font Property (Axis)

IsLogarithmic Property (Axis)

Is100Percent Property (Axis)

IsReversed Property (Axis)

IsShowing Property (Axis)

LabelFormat Property (Axis)

MajorGrid Property (Axis)

Max Property (Axis)

Min Property (Axis)

Multiplier Property (Axis)

Name Property (Axis)

NumMethod Property (Axis)

NumSpacing Property (Axis)

Origin Property (Axis)

OriginBase Property (Axis)

OriginPlacement Property (Axis)

Parent Property (Axis)

Precision Property (Axis)

TickSpacing Property (Axis)

TimeScale Property (Axis)

Title Property (Axis)

TitleFont Property (Axis)

TitleRotation Property (Axis)

ValueLabels Property (Axis)


AnnotationAngle Property (Axis)

The angle from which the axis is annotated for polar and radar charts.

Syntax

Property AnnotationAngle As DerivedDouble (read-only)

See Also

Axis Object

DerivedDouble Object


AnnotationMethod Property (Axis)

The method used to annotate the axis.

Syntax

Property AnnotationMethod As AnnotationMethodConstants

See Also

Axis Object

AnnotationMethod Constants


AnnotationPlacement Property (Axis)

The placement of the axis annotation and title with respect to the perpendicular axis.

Syntax

Property AnnotationPlacement As AnnotationPlacementConstants

Remarks

This property is ignored on the Y2-axis, and is ignored on the Y-axis in bar charts, stacking bar charts, or charts where the X-axis is annotated using Point-labels.

See Also

AnnotationPlacement Constants

Axis Object


AnnotationRotation Property (Axis)

The counterclockwise rotation of the axis annotation text.

Syntax

Property AnnotationRotation As RotationConstants

Remarks

Only TrueType fonts can be rotated.

See Also

Axis Object

Rotation Constants


AnnotationRotationAngle Property (Axis)

The counterclockwise rotation of the axis annotation text.

Syntax

Property AnnotationRotationAngle As Double

Remarks

Only TrueType fonts can be rotated.

See Also

Axis Object


AxisStyle Property (Axis)

The line style and tick length for the axis.

Syntax

Property AxisStyle As AxisStyle (read only)

See Also

Axis Object

AxisStyle Object


Constant Property (Axis)

Used with the Multiplier property to specify a relationship between the Y-axis and the Y2-axis.

Syntax

Property Constant As Double

Remarks

For example, if the Y-axis is degrees Celsius and the Y2-axis is degrees Fahrenheit, set Multiplier to 9.0/5.0, and set Constant to 32.0. This property can only be used with the Y2-axis.

See Also

Axis Object


DataMax Property (Axis)

The value of the high end of the data.

Syntax

Property DataMax As DerivedDouble (read-only)

Remarks

Data values greater than this value are not displayed. This property is ignored in pie charts, and is ignored on the X-axis in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels.

See Also

Axis Object

DerivedDouble Object


DataMin Property (Axis)

The value of the low end of the data.

Syntax

Property DataMin As DerivedDouble (read-only)

Remarks

Data values less than this value are not displayed. This property is ignored in pie charts, and is ignored on the X-axis in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels.

See Also

Axis Object

DerivedDouble Object


Font Property (Axis)

The font used in the axis. (This is a standard OLE Font object.)

Syntax

Property Font As StdFont

Remarks

There is only one font for all axes.

See Also

Axis Object


IsLogarithmic Property (Axis)

Whether data is graphed against a logarithmic axis.

Syntax

Property IsLogarithmic As Boolean

Remarks

This is ignored in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels or Time-labels.

See Also

Axis Object


Is100Percent Property (Axis)

Scales the Y or Y2 axis for stacking charts to a common value of 100 percent.

Syntax

Property Is100Percent As Boolean

See Also

Axis Object


IsReversed Property (Axis)

Whether the axis is drawn and annotated in the reverse direction.

Syntax

Property IsReversed As Boolean

Remarks

This property is ignored on the Y2-axis if the Multiplier property for the Y-axis is set.

See Also

Axis Object


IsShowing Property (Axis)

Whether the axis is displayed.

Syntax

Property IsShowing As Boolean

Remarks

Note that the Y2-axis is never displayed unless a second chart group has been added, or the Multiplier property for the Y-axis is set.

Example

' Make Y2-axis visible

Chart2D1.ChartArea.Axes("Y2").IsShowing = True

See Also

Axis Object


LabelFormat Property (Axis)

Specifies the format of the value.

Syntax

Property LabelFormat As ValueFormat (read-only)

See Also

Axis Object

ValueFormat Object


MajorGrid Property (Axis)

The grid to be displayed parallel to this axis.

Syntax

Property MajorGrid As GridLines (read-only)

Remarks

In bar and stacking bar charts, the X-axis grid-lines are drawn through each label. This property is ignored on the Y2-axis.

See Also

Axis Object

GridLines Object


Max Property (Axis)

The maximum value of the axis.

Syntax

Property Max As DerivedDouble (read-only)

Remarks

This property is ignored in pie charts, and is ignored on the X-axis in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels.

See Also

Axis Object

DerivedDouble Object


Min Property (Axis)

The minimum value of the axis.

Syntax

Property Min As DerivedDouble (read-only)

Remarks

This property is ignored in pie charts, and is ignored on the X-axis in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels.

See Also

Axis Object

DerivedDouble Object


Multiplier Property (Axis)

Used with the Constant property to specify a relationship between the Y-axis and the Y2-axis.

Syntax

Property Multiplier As Double

Remarks

This property is ignored in pie charts, and is ignored on the X-axis in bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels.

See Also

Axis Object


Name Property (Axis)

The axis name, which is one of “X”, “Y” or “Y2”.

Syntax

Property Name As String

See Also

Axis Object


NumMethod Property (Axis)

The method used to calculate axis-numbering.

Syntax

Property NumMethod As NumMethodConstants

See Also

Axis Object

NumMethod Constants


NumSpacing Property (Axis)

The increment between axis numbers.

Syntax

Property NumSpacing As DerivedDouble (read-only)

Remarks

This is ignored in pie charts, or if IsLogarithmic is set.

See Also

Axis Object

DerivedDouble Object


Origin Property (Axis)

Where the perpendicular axis is rendered.

Syntax

Property Origin As DerivedDouble (read-only)

Remarks

This property can only be used with the X- and Y-axes, and is ignored in pie charts.

See Also

Axis Object

DerivedDouble Object


OriginBase Property (Axis)

Where on the y-axis the x-axis is located.

Syntax

Property OriginBase As Double

Remarks

This property only applies to Polar and Radar chart types.

See Also

Axis Object


OriginPlacement Property (Axis)

The location of the origin.

Syntax

Property OriginPlacement As OriginPlacementConstants

Remarks

This property is ignored on the Y2-axis, in pie or stacking bar charts, or if Origin is set.

See Also

Axis Object

OriginPlacement Constants


Parent Property (Axis)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Axis Object


Precision Property (Axis)

The number of digits of precision after the decimal point to be used for axis-numbering.

Syntax

Property Precision As DerivedLong (read-only)

Remarks

If set to 0 or less, all axis numbers will be integers. Negative precision values indicates precision in powers of 10 (for example, a Precision value of -2 indicates numbering in multiples of 100).

See Also

Axis Object

DerivedLong Object


TickSpacing Property (Axis)

The increment between axis-ticks.

Syntax

Property TickSpacing As DerivedDouble (read-only)

Remarks

This property is ignored in pie charts, or if IsLogarithmic is set.

See Also

Axis Object

DerivedDouble Object


TimeScale Property (Axis)

The scale for an X-axis representing the time dimension.

Syntax

Property TimeScale As TimeScale (read-only)

Remarks

This property can only be used with the X-axis.

See Also

Axis Object

TimeScale Object


Title Property (Axis)

The axis title.

Syntax

Property Title As Label (read-only)

See Also

Axis Object

Label Object

Labels Collection


TitleFont Property (Axis)

This property specifies the Font to use for the title of an Axis.

Syntax

Property TitleFont As StdFont

Remarks

If not specifically set, the TitleFont is assumed to be the same as the AxisFont.

See Also

Axis Object


TitleRotation Property (Axis)

The rotation of the axis title.

Syntax

Property TitleRotation As RotationConstants

Remarks

This property can only be used with vertically-oriented axes.

See Also

Axis Object

Rotation Constants


ValueLabels Property (Axis)

The labels for the axis, used when the AnnotationMethod property has the value oc2dAnnotateValueLabels.

Syntax

Property ValueLabels As ValueLabelCollection (read-only)

See Also

Axis Object

ValueLabels Collection


AxisStyle Object

Controls the line style and tick length for the axis.


AxisStyle Object Members

AxisStyle Object Properties

IsStyleDefault | Indicates whether the default axis data style is used.
LineStyle | The color, pattern, and width of the axis line and ticks.
Parent | The parent object.
TickLength | The length of the ticks on the axis.


AxisStyle Object Properties

IsStyleDefault Property (AxisStyle)

LineStyle Property (AxisStyle)

Parent Property (AxisStyle)

TickLength Property (AxisStyle)


IsStyleDefault Property (AxisStyle)

Indicates whether the default axis data style is used.

Syntax

Property IsStyleDefault As Boolean

See Also

Axis Object

AxisStyle Object

Axes Collection


LineStyle Property (AxisStyle)

The color, pattern, and width of the axis line and ticks.

Syntax

Property LineStyle As LineStyle (read-only)

See Also

Axis Object

AxisStyle Object

Axes Collection

LineStyle Object


Parent Property (AxisStyle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Axis Object

AxisStyle Object

Axes Collection


TickLength Property (AxisStyle)

The length of the ticks on the axis.

Syntax

Property TickLength As Integer

Applies To

Axis Object

Axes Collection

AxisStyle Object

Example

' Set tick length on X axis to 5

Chart2D1.ChartArea.Axes("X").AxisStyle.TickLength = 5


Bar Object

Properties affecting the appearance of a bar chart.


Bar Object Members

Bar Object Properties

ClusterOverlap | The amount that bars overlap each other in a cluster, as a percentage of the bar's width.
ClusterWidth | The space used by the bars in a cluster, as a percentage of the available cluster space.
Parent | The parent object.


Bar Object Properties


ClusterOverlap Property (Bar)

The amount that bars overlap each other in a cluster, as a percentage of the bar's width.

Syntax

Property ClusterOverlap As Long

Remarks

Valid values are between -100 and 100.

Example

' 50% of each bar overlaps the next in cluster

Chart2D1.ChartArea.Bar.ClusterOverlap = 50

See Also

Bar Object


ClusterWidth Property (Bar)

The space used by the bars in a cluster, as a percentage of the available cluster space.

Syntax

Property ClusterWidth As Long

Remarks

Valid values are between 0 and 100. When set to 100, the clusters touch.

See Also

Bar Object


Parent Property (Bar)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Bar Object

ChartArea Object


Border Object

The border around parts of the chart.


Border Object Members

Border Object Properties

Parent | The parent object.
Type | The type of border drawn around the parent object.
Width | The thickness of the border.


Border Object Properties


Parent Property (Border)

The parent object.

Syntax

Property Parent As Object (read-only)

Applies To

Chart2D object

ChartArea object

ChartLabel object

Legend object

Title object


Type Property (Border)

The type of border drawn around the parent object.

Syntax

Property Type As BorderTypeConstants

See Also

BorderType Constants

Chart2D object

ChartArea object

ChartLabel object

Legend object

Title object


Width Property (Border)

The thickness of the border.

Syntax

Property Width As Long

Remarks

Valid values are between 0 and 20.

Applies To

Chart2D object

ChartArea object

ChartLabel object

Legend object

Title object


Bubble Object

Properties affecting the appearance of a bubble chart.


Bubble Object Members

Bubble Object Properties

EncodingMethod | The method used to determine the size of the points.
MaximumSize | The maximum point size.
MinimumSize | The minimum point size.


Bubble Object Properties


EncodingMethod Property (Bubble)

The method used to determine the size of the points.

Syntax

Property EncodingMethod As BubbleMethodConstants

See Also

Bubble Object

BubbleMethod Constants

ChartArea Object


MaximumSize Property (Bubble)

The maximum point size.

Syntax

Property MaximumSize As Double

See Also

Bar Object

ChartArea Object


MinimumSize Property (Bubble)

The minimum point size.

Syntax

Property MinimumSize As Double

Example

' Sets the bubble minimum point size to 3.0

Chart2D1.ChartArea.Bubble.MinimumSize = 3.0

See Also

Bar Object

ChartArea Object


Candle Object

Properties affecting the appearance of candle charts.


Candle Object Members

Candle Object Properties

IsComplex | Determines if the simple or complex style is used for the candle chart display.
Parent | The parent object.


Candle Object Properties


IsComplex Property (Candle)

Determines if the simple or complex style is used for the candle chart display.

Syntax

Property IsComplex As Boolean

Example

' Sets the candle chart to the complex type

Chart2D1.ChartArea.Candle.IsComplex = True

See Also

Candle Object

ChartArea Object


Parent Property (Candle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Candle Object

ChartArea Object


ChartArea Object

The main body of the chart (containing the axes and the graphed data). This does not include the header, footer and legend.


ChartArea Object Members

ChartArea Object Properties

AlarmZones | The AlarmZones that indicate value levels.
AngleUnit | The angle unit for polar and radar charts.
Axes | The chart axes.
Bar | Controls the appearance of a bar chart.
Border | The border enclosing the chart area.
Bubble | Controls the appearance of a bubble chart.
Candle | Controls the appearance of a Candle Chart.
HiLoOpenClose | Controls the appearance of a HiLoOpenClose Chart.
Interior | The background/foreground colors and image for the chart element.
IsHorizontal | Whether the chart is displayed normally (IsHorizontal is False) or inverted (IsHorizontal is True; X-axis becomes Y-axis, and vice versa).
IsShowingOutlines | Whether the chart displays the chart area outlines.
Location | The size and position of the chart area
Markers | The markers that identify a particular data element on the screen.
Parent | The parent object.
Pie | Controls the appearance of a pie chart.
PlotArea | The area containing the graphed data.
Polar | Controls the appearance of a polar chart.
View3D | The 3D effects used when displaying a bar or pie chart.


ChartArea Object Properties

AlarmZones Property (ChartArea)

AngleUnit Property (ChartArea)

Axes Property (ChartArea)

Bar Property (ChartArea)

Border Property (ChartArea)

Bubble Property (ChartArea)

Candle Property (ChartArea)

HiLoOpenClose Property (ChartArea)

Interior Property (ChartArea)

IsHorizontal Property (ChartArea)

IsShowingOutlines Property (ChartArea)

Location Property (ChartArea)

Markers Property (ChartArea)

Parent Property (ChartArea)

Pie Property (ChartArea)

PlotArea Property (ChartArea)

Polar Property (ChartArea)

View3D Property (ChartArea)


AlarmZones Property (ChartArea)

The AlarmZones that indicate value levels.

Syntax

Property AlarmZones As AlarmZoneCollection (read-only)

See Also

ChartArea Object


AngleUnit Property (ChartArea)

The angle unit for polar and radar charts.

Syntax

Property AngleUnit As AngleUnitConstants

See Also

AngleUnit Constants

ChartArea Object


Axes Property (ChartArea)

The chart axes.

Syntax

Property Axes As AxisCollection (read-only)

See Also

Axis Object

Axes Collection

ChartArea Object


Bar Property (ChartArea)

Controls the appearance of a bar chart.

Syntax

Property Bar As Bar (read-only)

See Also

Bar Object

ChartArea Object


Border Property (ChartArea)

The border enclosing the chart area.

Syntax

Property Border As Border (read-only)

See Also

Border Object

ChartArea Object


Bubble Property (ChartArea)

Controls the appearance of a bubble chart.

Syntax

Property Bubble As Bubble (read-only)

See Also

Bubble Object

ChartArea Object


Candle Property (ChartArea)

Controls the appearance of a Candle Chart.

Syntax

Property Candle As Candle (read-only)

See Also

Candle Object

ChartArea Object


HiLoOpenClose Property (ChartArea)

Controls the appearance of a Candle Chart.

Syntax

Property HiLoOpenClose As HiLoOpenClose (read-only)

See Also

ChartArea Object

HiLoOpenClose Object


Interior Property (ChartArea)

The background/foreground colors and image for the chart element.

Syntax

Property Interior As Interior (read-only)

See Also

ChartArea Object

Interior Object


IsHorizontal Property (ChartArea)

Whether the chart is displayed normally (IsHorizontal is False) or inverted (IsHorizontal is True; X-axis becomes Y-axis, and vice versa).

Syntax

Property IsHorizontal As Boolean

Example

' Invert graph display

Chart2D1.ChartArea.IsHorizontal = True

See Also

ChartArea Object


IsShowingOutlines Property (ChartArea)

Whether the chart displays the chart area outlines.

Syntax

Property IsShowingOutlines As Boolean

See Also

ChartArea Object


Location Property (ChartArea)

The size and position of the chart area.

Syntax

Property Location As Location (read-only)

See Also

ChartArea Object

Location Object


Markers Property (ChartArea)

The markers that identify a particular data element on the screen.

Syntax

Property Markers As MarkerCollection (read-only)

See Also

ChartArea Object

Marker Object

Markers Collection


Parent Property (ChartArea)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartArea Object


Pie Property (ChartArea)

Controls the appearance of a pie chart.

Syntax

Property Pie As Pie (read-only)

See Also

ChartArea Object

Pie Object


PlotArea Property (ChartArea)

The area containing the graphed data.

Syntax

Property PlotArea As PlotArea (read-only)

See Also

ChartArea Object

PlotArea Object


Polar Property (ChartArea)

Controls the appearance of a polar chart.

Syntax

Property Polar As Polar (read-only)

See Also

ChartArea Object

Polar Object


View3D Property (ChartArea)

Controls the appearance of a polar chart.

Syntax

Property View3D As View3D (read-only)

See Also

Chart2D Object

ChartArea Object

View3D Object


ChartGroup Object

Description

A ChartGroup object is one chart group, which contains data, styles, and series/point labels.


ChartGroup Object Members

ChartGroup Object Properties

AreSeriesLabelsBound | Whether or not to use the datasource column names to label the series.
ChartType | The type of chart to be displayed.
Data | The data to be displayed.
DrawingOrder | Whether this chart group is drawn first (DrawingOrder = 1) or last (DrawingOrder = 2).
IsStacked | Whether the chart is to be displayed as a stacking chart.
LegendStyles | The legend styles for this chart group.
Name | The chart group name, which is either “1” or “2”.
Parent | The parent object.
PointLabels | The strings to render on the X-axis against their associated point values.
PointLabelsField | The database column name used as point labels.
PointStyles | The chart styles for the points in this chart group.
PointValuesField | The database column name used as value labels.
SeriesFields | The database column name used for series values.
SeriesLabels | The strings to render in the legend against their associated series values.
Styles | The chart styles for the series of this chart group

ChartGroup Object Methods

CoordToDataCoord | Maps a pixel coordinate to a chart coordinate.
CoordToDataCoordObject | Maps a pixel coordinate to a chart coordinate.
CoordToDataIndex | Picks the displayed data closest to the given pixel coordinate.
CoordToDataIndexObject | Picks the displayed data closest to the given pixel coordinate.
DataCoordToCoord | Maps a chart coordinate to a pixel coordinate.
DataCoordToCoordObject | Maps a chart coordinate to a pixel coordinate.
DataIndexToCoord | Picks the displayed data closest to the given pixel coordinate.
DataIndexToCoordObject | Picks the displayed data closest to the given pixel coordinate.
LoadAdoRecordset | Loads data from an ADO recordset.


ChartGroup Object Properties

AreSeriesLabelsBound Property (ChartGroup)

ChartType Property (ChartGroup)

Data Property (ChartGroup)

DrawingOrder Property (ChartGroup)

IsStacked Property (ChartGroup)

LegendStyles Property (ChartGroup)

Name Property (ChartGroup)

Parent Property (ChartGroup)

PointLabels Property (ChartGroup)

PointLabelsField Property (ChartGroup)

PointStyles Property (ChartGroup)

PointValuesField Property (ChartGroup)

SeriesFields Property (ChartGroup)

SeriesLabels Property (ChartGroup)

Styles Property (ChartGroup)


AreSeriesLabelsBound Property (ChartGroup)

Whether or not to use the datasource column names to label the series.

Syntax

Property AreSeriesLabelsBound As Boolean

Remarks

If AreSeriesLabelsBound is true, then the column names are used to label the series. If AreSeriesLabelsBound is false, then the series labels must be set from the Labels subtab of the ChartGroups tab.

See Also

ChartGroup Object


ChartType Property (ChartGroup)

The type of chart to be displayed.

Syntax

Property ChartType As ChartTypeConstants

See Also

ChartGroup Object

ChartType Constants


Data Property (ChartGroup)

The data to be displayed.

Syntax

Property Data As Chart2DData

See Also

ChartGroup Object

Chart2DData Object


DrawingOrder Property (ChartGroup)

Whether this chart group is drawn first (DrawingOrder = 1) or last (DrawingOrder = 2).

Syntax

Property DrawingOrder As Integer

Remarks

The value of this property must be either 1 or 2.

See Also

ChartGroup Object


IsStacked Property (ChartGroup)

Whether the chart is to be displayed as a stacking chart.

Syntax

Property IsStacked As Boolean

Remarks

Applies to Plot, Area, Polar, Radar, and Filled Radar charts.

See Also

ChartGroup Object


LegendStyles Property (ChartGroup)

The legend styles for this chart group.

Syntax

Property LegendStyles As ChartStyleCollection (read-only)

See Also

ChartGroup Object


Name Property (ChartGroup)

The chart group name, which is either “1” or “2”.

Syntax

Property Name As String (read-only)

See Also

ChartGroup Object


Parent Property (ChartGroup)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartGroup Object


PointLabels Property (ChartGroup)

The strings to render on the X-axis against their associated point values.

Syntax

Property PointLabels As LabelCollection (read-only)

Remarks

Used when the AnnotationMethod property for the X-axis is set to oc2dAnnotatePointLabels.

See Also

ChartGroup Object

Label Object

Labels Collection


PointLabelsField Property (ChartGroup)

The database column name used as point labels.

Syntax

Property PointLabelsField As String

See Also

ChartGroup Object


PointStyles Property (ChartGroup)

The chart styles for the points in this chart group.

Syntax

Property PointStyles As PointStyleCollection (read-only)

Remarks

These specify fill pattern, color, point style, point size point color, and pie slice offset. The PointStyles collection is empty by default. PointStyles for individual (set,point) pairs must be added before they can be used.

See Also

ChartGroup Object

PointStyles Collection


PointValuesField Property (ChartGroup)

The database column name used as value labels.

Syntax

Property PointValuesField As String

See Also

ChartGroup Object


SeriesFields Property (ChartGroup)

The database column name used for series values.

Syntax

Property SeriesFields As StringCollection (read-only)

Remarks

In order to set this value, you must first bind the database to the chart.

See Also

ChartGroup Object

Strings Collection


SeriesLabels Property (ChartGroup)

The strings to render in the legend against their associated series values.

Syntax

Property SeriesLabels As LabelCollection (read-only)

See Also

ChartGroup Object

Labels Collection


Styles Property (ChartGroup)

The chart styles for the series of this chart group.

Syntax

Property Styles As ChartStyleCollection (read-only)

Remarks

These specify line pattern, fill pattern, color, line width, point style, point size and point color.

See Also

ChartGroup Object

ChartStyle Object

ChartStyles Collection


ChartGroup Object Methods

CoordToDataCoord Method (ChartGroup)

CoordToDataCoordObject Method (ChartGroup)

CoordToDataIndex Method (ChartGroup)

CoordToDataIndexObject Method (ChartGroup)

DataCoordToCoord Method (ChartGroup)

DataCoordToCoordObject Method (ChartGroup)

DataIndexToCoord Method (ChartGroup)

DataIndexToCoordObject Method (ChartGroup)

LoadAdoRecordset Method (ChartGroup)


CoordToDataCoord Method (ChartGroup)

Maps a pixel coordinate to a chart coordinate.

Syntax

Function CoordToDataCoord(XPixel As Long, YPixel As Long, X As Double, Y As Double) As RegionConstants

Remarks

Returns a value indicating the chart region in which the coordinate is found.

Part | Type | Description
Xpixel | Long | X pixel coordinate
Ypixel | Long | Y pixel coordinate
X | Double | Returned X chart coordinate
Y | Double | Returned Y chart coordinate

See Also

ChartGroup Object

Region Constants


CoordToDataCoordObject Method (ChartGroup)

Maps a pixel coordinate to a chart coordinate.

Syntax

Function CoordToDataCoordObject(XPixel As Long, YPixel As Long) As Chart2DDataCoordResult

Remarks

This method is similar to CoordToDataCoord, except that the Chart2DDataCoordResult object is returned with the X and Y values indicating chart region in which the coordinate is found. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).

Part | Type | Description
Xpixel | Long | X pixel coordinate
Ypixel | Long | Y pixel coordinate

See Also

ChartGroup Object

Region Constants


CoordToDataIndex Method (ChartGroup)

Picks the displayed data closest to the given pixel coordinate.

Syntax

Function CoordToDataIndex(XPixel As Long, YPixel As Long, Focus As FocusConstants, Series As Long, Point As Long, Distance As Long) As RegionConstants

Remarks

Returns a value indicating the chart region in which the coordinate is found.

Part | Type | Description
Xpixel | Long | X pixel coordinate
Ypixel | Long | Y pixel coordinate
Focus | Integer | How the closest series and point is determined. See Focus Constants for valid values.
Series | Long | Returned nearest series
Point | Long | Returned nearest point
Distance | Long | Distance between pixel coordinate and closest displayed data

See Also

ChartGroup Object

Region Constants


CoordToDataIndexObject Method (ChartGroup)

Picks the displayed data closest to the given pixel coordinate.

Syntax

Function CoordToDataIndexObject(XPixel As Long, YPixel As Long, Focus As Integer) As Chart2DDataIndexResult

Remarks

This method is similar to CoordToDataIndex, except that the Chart2DDataIndexResult object is returned with the Series, Point and Distance values that indicate the chart region in which the coordinate is found. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).

Part | Type | Description
Xpixel | Long | X pixel coordinate
Ypixel | Long | Y pixel coordinate
Focus | Integer | How the closest series and point is determined. See Focus Constants for valid values.

See Also

Chart2DDataIndexResult Object

ChartGroup Object


DataCoordToCoord Method (ChartGroup)

Maps a data coordinate to a pixel coordinate.

Syntax

Sub DataCoordToCoord(X As Double, Y As Double, XPixel As Long, YPixel As Long)

See Also

ChartGroup Object


DataCoordToCoordObject Method (ChartGroup)

Maps a chart coordinate to a pixel coordinate.

Syntax

Function DataCoordToCoordObject(X As Double, Y As Double) As Chart2DCoordResult

Remarks

This method is similar to DataCoordToCoord, except that the Chart2DCoordResult object is returned with the Xpixel and Ypixel values. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).

Part | Type | Description
X | Double | X chart coordinate
Y | Double | Y chart coordinate

See Also

ChartGroup Object

Chart2DCoordResult Object


DataIndexToCoord Method (ChartGroup)

Determines a pixel coordinate given a chart group series and point.

Syntax

Sub DataIndexToCoord(Series As Long, Point As Long, XPixel As Long, YPixel As Long)

Remarks

Part | Type | Description
Series | Long | Series value
Point | Long | Point value
Xpixel | Long | Returned X pixel coordinate
Ypixel | Long | Returned Y pixel coordinate

See Also

ChartGroup Object


DataIndexToCoordObject Method (ChartGroup)

Determines a pixel coordinate given a chart group series and point.

Syntax

Function DataIndexToCoordObject(Series As Long, Point As Long) As Chart2DCoordResult

Remarks

This method is similar to DataIndexToCoord, except that the Chart2DCoordResult object is returned with the XPixel and YPixel values. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).

Part | Type | Description
Series | Long | Series value
Point | Long | Point value

See Also

Chart2DCoordResult Object

ChartGroup Object


LoadAdoRecordset Method (ChartGroup)

Loads data from an ADO recordset.

Syntax

Sub LoadAdoRecordset(Recordset As Object, [UseSeriesFields As Boolean = False])

Remarks

This method performs a one-time static load of the recordset data (it does not provide dynamic data binding).

Part | Type | Description
Recordset | Object | Recordset to be loaded
UseSeriesFields | Boolean | Optional – if not specified, the default value is False If false, will take all fields except PointLabelsField and PointValuesField; If true, will take all fields specified in the SeriesFields

Example

Dim aConnection As New Connection

Dim aRecordset As Recordset

Dim RecordsAffected As Long

aConnection.Open "OlData"

Set aRecordset = aConnection.Execute("DemoData", RecordsAffected, adCmdTable)

Chart2D1.ChartGroups(1).LoadAdoRecordset aRecordset

Note: A data source called 'OlData' must be created.

See Also

Chart2D object

ChartGroup Object


ChartGroups Collection

The ChartGroups collection is a static collection of two ChartGroup objects, named “1” and “2”.


ChartGroups Collection Members

ChartGroups Collection Properties

Count | The current number of ChartGroup objects in the collection.
Item | Specifies a specific ChartGroup object from the collection.
Parent | The parent object.


ChartGroups Collection Properties


Count Property (ChartGroups)

The current number of ChartGroup objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

ChartGroups Collection


Item Property (ChartGroups)

Specifies a specific ChartGroup object from the collection.

Syntax

Property Item(Index) As ChartGroup (read-only)

Remarks

Indexed by number (with 1 representing the first object in the collection) or by the value of the Name property.

Example

Note: In Visual Basic, the Item property is understood and does not need to be explicitly set. Other development environments (JavaScript and Delphi, for example), however, do not automatically set this. In these environments, specify the Item property as follows:

' Sets the chart type to Pie
Chart2D1.ChartGroups.Item(1).ChartType = oc2dTypePie

See Also

ChartGroups Collection


Parent Property (ChartGroups)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartGroups Collection


ChartLabel Object

Description

A ChartLabel object is an independent rectangular region which can be attached to the chart.


ChartLabel Object Members

ChartLabel Object Properties

Adjust | Specifies how to adjust the strings within the chart label.
Anchor | Where to position the chart label relative to the attachment location.
AttachCoord | The pixel coordinates of the attachment location.
AttachDataCoord | The data coordinates at which the chart label is to be attached.
AttachDataIndex | The data index to which the chart label is to be attached.
AttachMethod | The attachment method for the chart label.
Border | The border for the chart label.
Font | The font used on the axis.
Interior | The background/foreground colors and image for the chart element.
IsBatched | Whether property changes are currently being batched (i.e., changes to this chart label are not immediately applied).
IsConnected | Whether a line is drawn from the chart label to the attachment position.
IsShowing | Whether the chart label is displayed.
Location | The size and position of the chart label.
Name | The name of the chart label.
Offset | A distance, in the anchor direction, to offset the final chart label position.
Parent | The parent object.
Rotation | Specifies an angle of rotation (in counterclockwise degrees).
Text | The chart label text.


ChartLabel Object Properties

Adjust Property (ChartLabel)

Anchor Property (ChartLabel)

AttachCoord Property (ChartLabel)

AttachDataCoord Property (ChartLabel)

AttachDataIndex Property (ChartLabel)

AttachMethod Property (ChartLabel)

Border Property (ChartLabel)

Font Property (ChartLabel)

Interior Property (ChartLabel)

IsBatched Property (ChartLabel)

IsConnected Property (ChartLabel)

IsShowing Property (ChartLabel)

Location Property (ChartLabel)

Name Property (ChartLabel)

Offset Property (ChartLabel)

Parent Property (ChartLabel)

Rotation Property (ChartLabel)

Text Property (ChartLabel)


Adjust Property (ChartLabel)

Specifies how to adjust the strings within the chart label.

Syntax

Property Adjust As AdjustConstants

See Also

Adjust Constants

ChartLabel Object


Anchor Property (ChartLabel)

Where to position the chart label relative to the attachment location.

Syntax

Property Anchor As AnchorConstants

Example

' Position label below chart

Chart2D1.ChartLabels(1).Anchor = oc2dAnchorSouth

See Also

Anchor Constants

ChartLabel Object


AttachCoord Property (ChartLabel)

The pixel coordinates of the attachment location.

Syntax

Property AttachCoord As Coord (read-only)

See Also

ChartLabel Object

Coord Object


AttachDataCoord Property (ChartLabel)

The data coordinates at which the chart label is to be attached.

Syntax

Property AttachDataCoord As DataCoord (read-only)

See Also

ChartLabel Object

DataCoord Object


AttachDataIndex Property (ChartLabel)

The data index to which the chart label is to be attached.

Syntax

Property AttachDataIndex As DataIndex (read-only)

See Also

ChartLabel Object

DataIndex Object


AttachMethod Property (ChartLabel)

The attachment method for the chart label.

Syntax

Property AttachMethod As AttachMethodConstants

See Also

AttachMethod Constants

ChartLabel Object


Border Property (ChartLabel)

The border for the chart label.

Syntax

Property Border As Border (read-only)

See Also

Border Object

ChartLabel Object


Font Property (ChartLabel)

The font used on the axis. (This is a standard OLE Font object.)

Syntax

Property Font As StdFont

See Also

ChartLabel Object


Interior Property (ChartLabel)

The background/foreground colors and image for the chart element.

Syntax

Property Interior As Interior (read-only)

See Also

ChartLabel Object

Interior Object


IsBatched Property (ChartLabel)

Whether property changes are currently being batched (i.e., changes to this chart label are not immediately applied).

Syntax

Property IsBatched As Boolean

See Also

ChartLabel Object


IsConnected Property (ChartLabel)

Whether a line is drawn from the chart label to the attachment position.

Syntax

Property IsConnected As Boolean

See Also

ChartLabel Object


IsShowing Property (ChartLabel)

Whether the chart label is displayed.

Syntax

Property IsShowing As Boolean

See Also

ChartLabel Object


Location Property (ChartLabel)

The size and position of the chart label.

Syntax

Property Location As Location (read-only)

See Also

ChartLabel Object

Location Object


Name Property (ChartLabel)

The name of the chart label.

Syntax

Property Name As String

See Also

ChartLabel Object


Offset Property (ChartLabel)

A distance, in the anchor direction, to offset the final chart label position.

Syntax

Property Offset As Long

See Also

ChartLabel Object


Parent Property (ChartLabel)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartLabel Object


Rotation Property (ChartLabel)

Specifies an angle of rotation (in counterclockwise degrees).

Syntax

Property Rotation As RotationConstants

See Also

ChartLabel Object

Rotation Constants


Text Property (ChartLabel)

The chart label text.

Syntax

Property Text As Label (read-only)

See Also

ChartLabel Object

Chart2D Object

Label Object

Labels Collection


ChartLabels Collection

The ChartLabels collection is a collection of all ChartLabel objects, which can be indexed by either number or name.


ChartLabels Collection Members

ChartLabels Collection Properties

Count | The current number of ChartGroup objects in the collection.
Item | Specifies a specific ChartGroup object from the collection.
Parent | The parent object.

ChartLabels Collection Methods

Add | Adds a ChartLabel object to the collection. Returns a ChartLabel object.
Remove | Removes a ChartLabel object from the collection.
RemoveAll | Removes all elements in the collection.


ChartLabels Collection Properties


Count Property (ChartLabels)

The current number of ChartLabel objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

ChartLabels Collection


Item Property (ChartLabels)

Specifies a specific ChartLabel object from the collection.

Syntax

Property Item(Index) As ChartLabel (read-only)

Remarks

Indexed by number (with 1 representing the first object in the collection) or by the value of the Name property. If multiple items in the collection share the same name, the first entry (lowest numerical index) will be indicated.

See Also

ChartLabels Collection


Parent Property (ChartLabels)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartLabels Collection


ChartLabels Collection Methods


Add Method (ChartLabels)

Adds a ChartLabel object to the collection. Returns a ChartLabel object.

Syntax

Function Add() As ChartLabel

See Also

ChartLabels Collection


Remove Method (ChartLabels)

Removes a ChartLabel object from the collection. If multiple items in the collection share the same name, the first entry (lowest numerical index) will be indicated.

Syntax

Sub Remove(Index)

Remarks

Part | Type | Description
Index | Variant | An object index (with 1 representing the first element)

See Also

ChartLabels Collection


RemoveAll Method (ChartLabels)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

ChartLabels Collection


ChartStyle Object

A ChartStyle object is one data style.


ChartStyle Object Members

ChartStyle Object Properties

Fill | The color and pattern inside area, bar, and pie charts.
Image | Each ChartStyle has an image property that can be used as the Symbol for a plotted data point.
Line | The color, pattern, and thickness of lines in plots.
Parent | The parent object.
Slice | The offset of exploding slices in pie charts.
Symbol | The color, size, and shape of points in plots.


ChartStyle Object Properties

Fill Property (ChartStyle)

Image Property (ChartStyle)

Line Property (ChartStyle)

Parent Property (ChartStyle)

Slice Property (ChartStyle)

Symbol Property (ChartStyle)


Fill Property (ChartStyle)

The color and pattern inside area, bar, and pie charts.

Syntax

Property Fill As FillStyle (read-only)

See Also

ChartStyle Object

FillStyle Object


Image Property (ChartStyle)

Each ChartStyle has an image property that can be used as the Symbol for a plotted data point.

Syntax

Property Image As Image (read-only)

Remarks

Note that this is only relevant for chart types that use symbols [Plot, Polar, Radar (not filled), Bubble]. The specified image object is sized and used as the plot symbol ChartStyle.Symbol object. The specified image is used when ChartStyle.Symbol.Shape = oc2dShapeImageFile.

See Also

ChartStyle Object


Line Property (ChartStyle)

The color, pattern, and thickness of lines in plots.

Syntax

Property Line As LineStyle (read-only)

See Also

ChartStyle Object

LineStyle Object


Parent Property (ChartStyle)

The parent object

Syntax

Property Parent As Object (read-only)

See Also

ChartStyle Object


Slice Property (ChartStyle)

The offset of exploding slices in pie charts.

Syntax

Property Slice As SliceStyle (read-only)

See Also

ChartStyle Object

SliceStyle Object


Symbol Property (ChartStyle)

The color, size, and shape of points in plots.

Syntax

Property Symbol As SymbolStyle (read-only)

Example

' Position label below chart

Chart2D1.ChartGroups(1).Styles(1).Symbol.Size = 3

See Also

ChartGroup Object

ChartStyle Object

SymbolStyle Object


ChartStyles Collection

The ChartStyles collection is a collection of all ChartStyle objects, indexed by number. One ChartStyle object is defined for each data series in a chart group.


ChartStyles Collection Members

ChartStyles Collection Properties

Count | The current number of ChartStyle objects in the collection.
Item | Specifies a specific ChartStyle object from the collection.
Parent | The parent object.

ChartStyles Collection Methods

Add | Adds a ChartStyle object to the collection. Returns a ChartLabel object.
Remove | Removes a ChartStyle object from the collection.
RemoveAll | Removes all elements in the collection.


ChartStyles Collection Properties


Count Property (ChartStyles)

The current number of ChartStyle objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

ChartStyles Collection


Item Property (ChartStyles)

Specifies a specific ChartStyle object from the collection.

Syntax

Property Item(Index) As ChartStyle (read-only)

Remarks

Indexed by number (with 1 representing the first object in the collection) or by the value of the Name property.

See Also

ChartStyles Collection


Parent Property (ChartStyles)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartStyles Collection


ChartStyles Collection Methods


Add Method (ChartStyles)

Adds a ChartStyle object to the collection. Returns a ChartStyleobject.

Syntax

Function Add([Before]) As ChartStyle

See Also

ChartStyles Collection


Remove Method (ChartStyles)

Removes a ChartStyle object from the collection. Returns False if the method failed.

Syntax

Function Remove(Index) As Boolean

Remarks

Part | Type | Description
Index | Variant | Index of the location of the new object in the collection (if omitted, add at end)

See Also

ChartStyles Collection


RemoveAll Method (ChartStyles)

Removes all elements in the collection, and recreates another element (using thestandard defaults), for each series for the ChartGroup

Syntax

Sub RemoveAll()

See Also

ChartStyles Collection


Chart2DCheckNewPointsResult Object

Stores the results of the Chart2DData Object's CheckNewPointsObject() method.


Chart2DCheckNewPointsResult Object Members

Chart2DCheckNewPointsResult Object Properties

Inside | Returns True if data is inside the X-axis and Y-axis minimum and maximum.
IsOutsideXMax | Returns True if data outside X-axis maximum/.
IsOutsideXMin | Returns True if data outside X-axis minimum..
IsOutsideYMax | Returns True if data outside Y-axis maximum.
IsOutsideYMin | Returns True if data outside Y-axis minimum.


Chart2DCheckNewPointsResult Object Properties

Inside Property (Chart2DCheckNewPointsResult)

IsOutsideXMax Property (Chart2DCheckNewPointsResult)

IsOutsideXMin Property (Chart2DCheckNewPointsResult)

IsOutsideYMax Property (Chart2DCheckNewPointsResult)

IsOutsideYMin Property (Chart2DCheckNewPointsResult)


Inside Property (Chart2DCheckNewPointsResult)

Returns True if data is inside the X-axis and Y-axis minimum and maximum.

Syntax

Property IsInside As Boolean

See Also

Chart2DCheckNewPointsResult Object


IsOutsideXMax Property (Chart2DCheckNewPointsResult)

Returns True if data outside X-axis maximum.

Syntax

Property IsOutsideXMax As Boolean

See Also

Chart2DCheckNewPointsResult Object


IsOutsideXMin Property (Chart2DCheckNewPointsResult)

Returns True if data outside X-axis minimum.

Syntax

Property IsOutsideXMin As Boolean

See Also

Chart2DCheckNewPointsResult Object


IsOutsideYMax Property (Chart2DCheckNewPointsResult)

Returns True if data outside Y-axis maximum.

Syntax

Property IsOutsideYMax As Boolean

See Also

Chart2DCheckNewPointsResult Object


IsOutsideYMin Property (Chart2DCheckNewPointsResult)

Returns True if data outside Y-axis minimum.

Syntax

Property IsOutsideYMin As Boolean

See Also

Chart2DCheckNewPointsResult Object


Chart2DCoordResult Object

A screen coordinate. Stores the results of the ChartGroup Object's DataCoordToCoordObject() and DataIndexToCoordObject() methods.


Chart2DCoordResult Object Members

Chart2DCoordResult Object Properties

X | The X-coordinate object.
Y | The Y-coordinate object.


Chart2DCoordResult Object Properties


X Property (Chart2DCoordResult)

The X-coordinate.

Syntax

Property X As Long

See Also

Chart2DCoordResult Object

ChartGroup Object


Y Property (Chart2DCoordResult)

The Y-coordinate.

Syntax

Property Y As Long

See Also

Chart2DCoordResult Object

ChartGroup Object


Chart2DData Object

The data associated with a particular chart group. This object is OLE creatable: it can be independently created outside of a chart.

Note: The X and Y properties are indexed by series and point, and the FirstPoint, LastPoint and NumPoints properties are indexed by series. For each of these properties, a valid series must be specified. If the data is in array format, the series musty be 1, and all series are affected when one of these properties is changed.


Chart2DData Object Members

Chart2DData Object Properties

DataPath | Specifies a URL containing chart data to load at runtime.
FileName | The name of the file to which data is saved when IsSaved is set to False.
FirstPoint | The first point in the fast update zone. This property is indexed by series.
FirstSeries | The first series in the fast update zone.
HoleValue | The value representing a missing data value (a hole in the chart).
IsBatched | Whether property changes are currently being batched (in which case, changes to the data are not immediately updated).
IsSaved | How to save the data.
LastPoint | The last point in the fast update zone.
LastSeries | The last series in the fast update zone.
Layout | The chart data layout.
NumPoints | The number of points in a series.
NumSeries | The number of data series defined.
Parent | The parent object.
SeriesDisplay | Determines which series are displayed.
X | The X-coordinate of a particular data point.
Y | The Y-coordinate of a particular data point.

Chart2DData Object Methods

AverageDeviation | Returns the Average Deviation of the Y values for the specied series.
CheckNewPoints | Determines if additional data requires a chart repaint.
CheckNewPointsObject | Determines if additional data requires a chart repaint.
CopyXVectorIn | Copies the X values for a specific series of data from a zero-based or one-based array into the chart.
CopyXVectorOut | Copies the X values for a specific series of data from the chart into a zero-based or one-based array.
CopyYVectorIn | Copies the Y values for a specific series of data from a zero-based or one-based array into the chart.
CopyYVectorOut | Copies the Y values for a specific series of data from the chart into a zero-based or one-based array.
CopyYArrayIn | Copies an array of Y data to multiple series.
CopyYArrayOut | Copies Y data for multiple series into an array.
DataCount | Returns the count of non-hole Y values for the specied series.
DataMax | Returns the maximum of the Y values for the specied series.
DataMin | Returns the minimum of the Y values for the specied series.
DataPolynomial | Calculates the set of coefficients of the approximating obtained by the method of least squares using the x and y data specified by the XValues and YValues arrays.
DrawNewPoints | Displays additional data in an existing chart as quickly as possible.
EvaluatePolynomial | Returns the value of the polynomial given by the specified Coefficients for the given independent value.
Load | Loads data from a file.
LoadURL | Loads data from a URL.
Mean | Returns the mean of the Y values for the specied series.
Median | Returns the median of the Y values for the specied series.
Save | Saves data to a file.
SeriesPolynomial | Calculates the set of coefficients of the approximating obtained by the method of least squares using the x and y data of the specified physical Series or 0 for all series.
ShiftPoints | Copies a block of points leftwards in a series.
Sort | Sorts data in order of increasing X-value.
StandardDeviation | Returns the Standard Deviation of the Y values for the specied series.
UpdateDataValue | Replaces data of a specified value with a new value.


Chart2DData Object Properties

DataPath Property (Chart2DData)

FileName Property (Chart2DData)

FirstPoint Property (Chart2DData)

FirstSeries Property (Chart2DData)

HoleValue Property (Chart2DData)

IsBatched Property (Chart2DData)

IsSaved Property (Chart2DData)

LastPoint Property (Chart2DData)

LastSeries Property (Chart2DData)

Layout Property (Chart2DData)

NumPoints Property (Chart2DData)

NumSeries Property (Chart2DData)

Parent Property (Chart2DData)

SeriesDisplay Property (Chart2DData)

X Property (Chart2DData)

Y Property (Chart2DData)


DataPath Property (Chart2DData)

Specifies a URL containing chart data to load at runtime.

Syntax

Property DataPath As String

Remarks

If this property is set, the chart will attempt to load data into the chart from the specified location. If the data cannot be located, it will load the default data.

See Also

Chart2DData Object


FileName Property (Chart2DData)

The name of the file to which data is saved when IsSaved is set to False.

Syntax

Property FileName As String

See Also

Chart2DData Object


FirstPoint Property (Chart2DData)

The first point in the fast update zone.

Syntax

Property FirstPoint(Series As Long) As Long

Remarks

This property is indexed by series.

See Also

Chart2DData Object


FirstSeries Property (Chart2DData)

The first series in the fast update zone.

Syntax

Property FirstSeries As Long

See Also

Chart2DData Object


HoleValue Property (Chart2DData)

The value representing a missing data value (a hole in the chart).

Syntax

Property HoleValue As Double

See Also

Chart2DData Object


IsBatched Property (Chart2DData)

Whether property changes are currently being batched (in which case, changes to the data are not immediately updated).

Syntax

Property IsBatched As Boolean

See Also

Chart2DData Object


IsSaved Property (Chart2DData)

How to save the data.

Syntax

Property IsSaved As Boolean

Remarks

If True, data is saved with the chart. If False and FileName is provided, it is saved to the specified file.

See Also

Chart2DData Object


LastPoint Property (Chart2DData)

The last point in the fast update zone.

Syntax

Property LastPoint(Series As Long) As Long

Remarks

This property is indexed by series.

See Also

Chart2DData Object


LastSeries Property (Chart2DData)

The last series in the fast update zone.

Syntax

Property LastSeries As Long

See Also

Chart2DData Object


Layout Property (Chart2DData)

The chart data layout.

Syntax

Property Layout As DataLayoutConstants

See Also

Chart2DData Object

DataLayout Constants


NumPoints Property (Chart2DData)

The number of points in a series.

Syntax

Property NumPoints(Series As Long) As Long

Remarks

This property is indexed by series.

See Also

Chart2DData Object


NumSeries Property (Chart2DData)

The number of data series defined.

Syntax

Property NumSeries As Long

See Also

Chart2DData Object


Parent Property (Chart2DData)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Chart2DData Object


SeriesDisplay Property (Chart2DData)

Determines which series are displayed.

Syntax

Property SeriesDisplay(Series As Long) As Integer

See Also

Chart2DData Object

Display Constants


X Property (Chart2DData)

The X-coordinate of a particular data point.

Syntax

Property X(Series As Long, Point As Long) As Double

Remarks

This property is indexed by series and point.

See Also

Chart2DData Object


Y Property (Chart2DData)

The Y-coordinate of a particular data point.

Syntax

Property Y(Series As Long, Point As Long) As Double

Remarks

This property is indexed by series and point.

See Also

Chart2DData Object


Chart2DData Object Methods

AverageDeviation Method (Chart2DData)

CheckNewPoints Method (Chart2DData)

CheckNewPointsObject Method (Chart2DData)

CopyXVectorIn Method (Chart2DData)

CopyXVectorOut Method (Chart2DData)

CopyYVectorIn Method (Chart2DData)

CopyYVectorOut Method (Chart2DData)

CopyYArrayIn Method (Chart2DData)

CopyYArrayOut Method (Chart2DData)

DataCount Method (Chart2DData)

DataMax Method (Chart2DData)

DataMin Method (Chart2DData)

DataPolynomial Method (Chart2DData)

DrawNewPoints Method (Chart2DData)

EvaluatePolynomial Method (Chart2DData)

Load Method (Chart2DData)

LoadURL Method (Chart2DData)

Mean Method (Chart2DData)

Median Method (Chart2DData)

Save Method (Chart2DData)

SeriesPolynomial Method (Chart2DData)

ShiftPoints Method (Chart2DData)

Sort Method (Chart2DData)

StandardDeviation Method (Chart2DData)

UpdateDataValue Method (Chart2DData)


AverageDeviation Method (Chart2DData)

Returns the Average Deviation of the Y values for the specied series.

Syntax

Function AverageDeviation(Series As Long) As Double

See Also

Chart2DData Object


CheckNewPoints Method (Chart2DData)

Determines if additional data requires a chart repaint.

Syntax

Function CheckNewPoints(Series As Long, NewPoints As Long, IsOutsideXMin As Boolean, IsOutsideXMax As Boolean, IsOutsideYMin As Boolean, IsOutsideYMax As Boolean) As Boolean

Remarks

Returns True if all data falls within existing axis bounds. If the data is in array format, all series are affected.

Part | Type | Description
Series | Long | Series added to
NewPoints | Long | Number of points added
IsOutsideXMin | Boolean | Returns True if data outside X-axis minimum
IsOutsideXMax | Boolean | Returns True if data outside X-axis maximum
IsOutsideYMin | Boolean | Returns True if data outside Y-axis minimum
IsOutsideYMax | Boolean | Returns True if data outside Y-axis maximum

See Also

Chart2DData Object


CheckNewPointsObject Method (Chart2DData)

Determines if additional data requires a chart repaint.

Syntax

Function CheckNewPointsObject(Series As Long, NewPoints As Long) As Chart2DCheckNewPointsResult

Remarks

This method is similar to CheckNewPoints, except that the Chart2DCheckNewPointsResult object is returned with the Outside[XY]Min and IsOutside[XY]Max values. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).

Part | Type | Description
Series | Long | Series added to
NewPoints | Long | Number of points added

See Also

Chart2DCheckNewPointsResult Object

Chart2DData Object


CopyXVectorIn Method (Chart2DData)

Copies the X values for a specific series of data from a zero-based or one-based array into the chart.

Syntax

Function CopyXVectorIn(Series As Long, vArray) As Boolean

Remarks

Part | Type | Description
Series | Long | Series data is copied to
Array | Variant | Array where the data is to be copied from. The array must be a one-dimensional array of singles, doubles, longs, integers, or dates.

See Also

Chart2DData Object


CopyXVectorOut Method (Chart2DData)

Copies the X values for a specific series of data from the chart into a zero-based or one-based array.

Syntax

Function CopyXVectorOut(Series As Long, vArray) As Boolean

Remarks

Part | Type | Description
Series | Long | Series data is copied from
Array | Variant | Array where the data is to be stored. The array must be a one-dimensional array of singles, doubles, longs, integers, or dates.

See Also

Chart2DData Object


CopyYVectorIn Method (Chart2DData)

Copies the Y values for a specific series of data from a zero-based or one-based array into the chart.

Syntax

Function CopyYVectorIn(Series As Long, vArray) As Boolean

Remarks

Part | Type | Description
Series | Long | Series data is copied to
Array | Variant | Array where the data is to be copied from. The array must be a one-dimensional array of singles, doubles, longs, or integers.

See Also

Chart2DData Object


CopyYVectorOut Method (Chart2DData)

Copies the Y values for a specific series of data from the chart into a zero-based or one-based array.

Syntax

Function CopyYVectorOut(Series As Long, vArray) As Boolean

Remarks

Part | Type | Description
Series | Long | Series data is copied to
Array | Variant | Array where the data is stored. The array must be a one-dimensional array of singles, doubles, longs, or integers.

See Also

Chart2DData Object


CopyYArrayIn Method (Chart2DData)

Copies an array of Y data to multiple series.

Syntax

Function CopyYArrayIn(vArray) As Boolean

Remarks

ComponentOne Chart provides the ability to pass zero-based and one-based arrays. To use CopyYArrayIn, the data must be a two-dimensional array of singles, doubles, longs, or integers. The common X values are usually set with CopyXVectorIn, and the Y values for all series can be set with CopyYArrayIn. Note that to use this method the size of the array passed must match the number of series and points declared by NumSeries and NumPoints. Arrays must be declared with the number of points as its first element, and the number of series as its second element, and your data must be in an Array format. Otherwise, use CopyYVectorIn.

Part | Type | Description
Array | Variant | Name of the array where the data is to be stored

See Also

Chart2DData Object


CopyYArrayOut Method (Chart2DData)

Copies Y data for multiple series into an array.

Syntax

Function CopyYArrayOut(vArray) As Boolean

Remarks

ComponentOne Chart provides the ability to pass zero-based and one-based arrays. To use CopyYArrayOut, the data must be a two-dimensional array of singles, doubles, longs, or integers. The common X values are usually retrieved with CopyXVectorOut, and the Y values for all series can be retrieved with CopyYArrayOut. Note that to use this method the size of the array passed must match the number of series and points declared by NumSeries and NumPoints. Arrays must be declared with the number of points as its first element, and the number of series as its second element, and your data must be in Array format. Otherwise, use CopyYVectorOut.

Part | Type | Description
Array | Variant | Name of the array where the data is stored

See Also

Chart2DData Object


DataCount Method (Chart2DData)

Returns the count of non-hole Y values for the specied series.

Syntax

Function DataCount(Series As Long) As Long

See Also

Chart2DData Object


DataMax Method (Chart2DData)

Returns the maximum of the Y values for the specied series.

Syntax

Function DataMax(Series As Long) As Double

See Also

Chart2DData Object


DataMin Method (Chart2DData)

Returns the minimum of the Y values for the specied series.

Syntax

Function DataMin(Series As Long) As Double

See Also

Chart2DData Object


DataPolynomial Method (Chart2DData)

(DataPolynomial(Xvalues) As Double, Yvalues() As Double, Coefficients() As Double) Calculates the set of coefficients of the approximating obtained by the method of least squares using the x and y data specified by the XValues and YValues arrays.

Syntax

Function DataPolynomial(xArray, yArray, Coefficents) As Boolean

Remarks

The order of the approximating polynomial is specified by the number of elements of the Coefficients array passed to the method which is one more than the order. If the number of elements of the Coefficients array is greater than or equal to the number of data points, the higher order Coefficients elements are zeroed as appropriate. The index of each element of the Coefficients array matches the power of the independent variable in the term of the polynomial.

If the Coefficients are successfully calculated, the method returns True, otherwise, False.

For example, to obtained a third order approprimating polynominal for Series 2:

Dim xvalues(1 To 50) As Double, yvalues(1 To 50) As Double

Dim c(0 To 3) As Double

Call SetXandYValues(xvalues, yvalues)

Call Chart2D.ChartGroups(1).Data.DataPolynomial(xvalues, yvalues, c)

If the method call returns True, then c() defines the approximating polynomial:

Y = c(0) + c(1)*X + c(2)*X**2 + c(3)*X**3

Note: Datapoints with X or Y values equal to the Chart2DData object hole value are excluded from the least squares calculation.

See Also

Chart2DData Object


DrawNewPoints Method (Chart2DData)

Displays additional data in an existing chart as quickly as possible.

Syntax

Function DrawNewPoints(Series As Long, NewPoints As Long) As Boolean

Remarks

Returns True if a fast update was applied. When this returns, the LastPoint property will be adjusted to include the new points. If the data is in array format, all series are affected.

Part | Type | Description
Series | Long | Series added to
NewPoints | Long | Number of points added

See Also

Chart2DData Object


EvaluatePolynomial Method (Chart2DData)

EvaluatePolynomial(double xvalue, Coefficients() As Double)

Returns the value of the polynomial given by the specified Coefficients for the given independent value.

Syntax

Function EvaluatePolynomial(XValue As Double, Coefficents) As Double

Remarks

The index of each element of the Coefficients array matches the power of the independent variable in the term of the polynomial.

For example, to evalute the polynomial:

Y(X) = 4*X**2 + 3*X + 21 at X=5

Dim c(0 To 2) As Double

Dim xvalue As Double, yvalue as Double

c(0) = 21

c(1) = 3

c(2) = 4

x = 5

yvalue = Chart.ChartGroups(1).Data.EvaluatePolynomial(xvalue, c)

See Also

Chart2DData Object


Load Method (Chart2DData)

Loads data from a file.

Syntax

Function Load(FileName As String) As Boolean

Remarks

Returns True on success and False on failure.

Part | Type | Description
FileName | String | File containing data.

See Also

Chart2DData Object


LoadURL Method (Chart2DData)

Loads data from a URL.

Syntax

Function LoadURL(URLName As String) As Boolean

Remarks

Returns True on success and False on failure.

Part | Type | Description
URLName | String | The URL for the file where the data is located.

See Also

Chart2DData Object


Mean Method (Chart2DData)

Returns the mean of the Y values for the specied series.

Syntax

Function Mean(Series As Long) As Double

See Also

Chart2DData Object


Median Method (Chart2DData)

Returns the median of the Y values for the specied series.

Syntax

Function Median(Series As Long) As Double

See Also

Chart2DData Object


Save Method (Chart2DData)

Saves data to a file.

Syntax

Function Save(FileName As String) As Boolean

Remarks

Returns True on success and False on failure.

Part | Type | Description
FileName | String | File to be written to.

See Also

Chart2DData Object


SeriesPolynomial Method (Chart2DData)

SeriesPolynomial(Series As Long, Coefficients() As Double)

Calculates the set of coefficients of the approximating obtained by the method of least squares using the x and y data of the specified physical Series or 0 for all series.

Syntax

Function SeriesPolynomial(Series As Long, Coefficents) As Boolean

Remarks

The order of the approximating polynomial is specified by the number of elements of the Coefficients array passed to the method which is one more than the order. If the number of elements of the Coefficients array is greater than or equal to the number of data points, the higher order Coefficients elements are zeroed as appropriate. The index of each element of the Coefficients array matches the power of the independent variable in the term of the polynomial.

If the Coefficients are successfully calculated, the method returns True, otherwise, False.

For example, to obtained a third order approprimating polynominal for Series 2:

Dim c(0 To 3) As Double

Chart2D.ChartGroups(1).Data.SeriesPolynomial(2, c)

If the method call returns True, then c() defines the approximating polynomial:

Y = c(0) + c(1)*X + c(2)*X**2 + c(3)*X**3

Note: Dataholes are excluded from the least squares calculation.

See Also

Chart2DData Object


ShiftPoints Method (Chart2DData)

Copies a block of points leftwards in a series.

Syntax

Function ShiftPoints(Series As Long, NumPoints As Long, Dest As Long, Src As Long) As Boolean

Remarks

Shifted-out points are set to the value of the HoleValue property. Returns True on success and False on failure. If the data is in array format, all series are affected.

Part | Type | Description
Series | Long | Series containing shifted data.
NumPoints | Long | Number of points to shift.
Dest | Long | Index of shift destination.
Src | Long | Start index of shifted data.

See Also

Chart2DData Object


Sort Method (Chart2DData)

Sorts data in order of increasing X-value.

Syntax

Function Sort() As Boolean

Remarks

Returns True on success and False on failure.

See Also

Chart2DData Object


StandardDeviation Method (Chart2DData)

Returns the Standard Deviation of the Y values for the specied series.

Syntax

Function StandardDeviation(Series As Long) As Double

See Also

Chart2DData Object


UpdateDataValue Method (Chart2DData)

Replaces data of a specified value with a new value.

Syntax

Function UpdateDataValue(OldValue As Double, NewValue As Double) As Long

Remarks

All values matching OldValue will be replaced with NewValue. Returns a count of the number of values replaced.

Part | Type | Description
OldValue | double | The data to be replaced.
NewValue | double | The value replacing the old data.

See Also

Chart2DData Object


Chart2DDataCoordResult Object

Stores the results of the ChartGroup Object's CoordToDataCoordObject() method.


Chart2DDataCoordResult Object Members

Chart2DDataCoordResult Object Properties

X | The X-coordinate.
Y | The Y-coordinate.


Chart2DDataCoordResult Object Properties


X Property (Chart2DDataCoordResult)

The X-coordinate.

Syntax

Property X As Long

Example

' This example maps a pixel coordinate to a chart coordinate

' and adds a chart label to that point

' Declare Coordinate and Label objects

Dim Coordinates as Chart2DDataCoordResult

Dim Label as Object

' Determine the X and Y values for Coordinates

Coordinates = Chart2D1.ChartGroups(1).CoordToDataCoordObject(20,30)

' Add a chart label

Set Label = Chart2D1.ChartLabels.Add

' Assign the ChartLabel to the point picked by the

' CoordToDataCoordObject method

With Chart2D1.ChartGroups(1)

.AttachMethod = oc2dAttachDataCoord

.AttachDataCoord.X = Coordinates.X

.AttachDataCoord.Y = Coordinates.Y

.Text = "My Chart Label"

End With

See Also

Chart2DDataCoordResult Object


Y Property (Chart2DDataCoordResult)

The Y-coordinate.

Syntax

Property Y As Long

Example

' This example maps a pixel coordinate to a chart coordinate

' and adds a chart label to that point

' Declare Coordinate and Label objects

Dim Coordinates as Chart2DDataCoordResult

Dim Label as Object

' Determine the X and Y values for Coordinates

Coordinates = Chart2D1.ChartGroups(1).CoordToDataCoordObject(20,30)

' Add a chart label

Set Label = Chart2D1.ChartLabels.Add

' Assign the ChartLabel to the point picked by the

' CoordToDataCoordObject method

With Chart2D1.ChartGroups(1)

.AttachMethod = oc2dAttachDataCoord

.AttachDataCoord.X = Coordinates.X

.AttachDataCoord.Y = Coordinates.Y

.Text = "My Chart Label"

End With

See Also

Chart2DDataCoordResult Object


Chart2DDataIndexResult Object

Stores the results of the ChartGroup Object's DataIndexToCoordObject() method.


Chart2DDataIndexResult Object Members

Chart2DDataIndexResult Object Properties

Distance | Distance between pixel coordinate and closest displayed data.
Point | Returned nearest point.
Region | The region where the coordinates are located.
Series | Returned nearest series.


Chart2DDataIndexResult Object Properties

Distance Property (Chart2DDataIndexResult)

Point Property (Chart2DDataIndexResult)

Region Property (Chart2DDataIndexResult)

Series Property (Chart2DDataIndexResult)


Distance Property (Chart2DDataIndexResult)

Distance between pixel coordinate and closest displayed data.

Syntax

Property Distance As Long

See Also

Chart2DDataIndexResult Object


Point Property (Chart2DDataIndexResult)

Returned nearest point.

Syntax

Property Point As Long

See Also

Chart2DDataIndexResult Object


Region Property (Chart2DDataIndexResult)

The region where the coordinates are located.

Syntax

Property Region As RegionConstants

See Also

Chart2DDataIndexResult Object

Region Constants


Series Property (Chart2DDataIndexResult)

Returned nearest series.

Syntax

Property Series As Long

See Also

Chart2DDataIndexResult Object


Coord Object

A screen coordinate.


Coord Object Members

Coord Object Properties

Parent | The parent object.
X | The X-coordinate.
Y | The Y-coordinate.


Coord Object Properties


Parent Property (Coord)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Coord Object


X Property (Coord)

The X-coordinate.

Syntax

Property X As Long

Example

' Position label at screen location (10,20)

Chart2D1.ChartLabels(1).AttachCoord.X = 10

Chart2D1.ChartLabels(1).AttachCoord.Y = 20

See Also

Coord Object


Y Property (Coord)

The Y-coordinate.

Syntax

Property Y As Long

Example

' Position label at screen location (10,20)

Chart2D1.ChartLabels(1).AttachCoord.X = 10

Chart2D1.ChartLabels(1).AttachCoord.Y = 20

See Also

Coord Object


Currency Object

Contains properties specific to the currency custom annotation format and determines how values of type Currency are displayed.


Currency Object Members

Currency Object Properties

DecimalPlaces | The number of decimal places to display.
NegativeValueColor | The color used to display negative values.
OrderCurrencySignValue | Specifies the order of the currency sign, symbol and style.
Parent | The parent object.
SpaceSeparating | Whether or not there is a space between the currency symbol and the value.
SpaceSeparatingSign | Whether or not there is a space between the negative sign and the value.
UseBrackets | Whether or not negative values are put in brackets.
UseCurrencySymbol | Whether or not the currency symbol is appended to the value.
UseSmallCents | Whether or not cents are displayed in superscript.


Currency Object Properties

DecimalPlaces Property (Currency)

NegativeValueColor Property (Currency)

OrderCurrencySignValue Property (Currency)

Parent Property (Currency)

SpaceSeparating Property (Currency)

SpaceSeparatingSign Property (Currency)

UseBrackets Property (Currency)

UseCurrencySymbol Property (Currency)

UseSmallCents Property (Currency)


DecimalPlaces Property (Currency)

The number of decimal places to display.

Syntax

Property DecimalPlaces As Long

See Also

Currency Object


NegativeValueColor Property (Currency)

The color used to display negative values.

Syntax

Property NegativeValueColor As OLE_COLOR

Remarks

You can specify RGB colors using the RGB() or QBColor() functions.

See Also

Currency Object


OrderCurrencySignValue Property (Currency)

Specifies the order of the currency sign, symbol and style

Syntax

Property OrderCurrencySignValue As DerivedEnum

See Also

Currency Object

OrderCurrencySignValue Constants


Parent Property (Currency)

The parent object.

Syntax

Property Parent As Object

See Also

Currency Object


SpaceSeparating Property (Currency)

Whether or not there is a space between the currency symbol and the value.

Syntax

Property SpaceSeparatingCurrency As DerivedBoolean (read-only)

See Also

Currency Object

DerivedBoolean Object


SpaceSeparatingSign Property (Currency)

Whether or not there is a space between the negative sign and the value.

Syntax

Property SpaceSeparatingSign As DerivedBoolean (read-only)

See Also

Currency Object

DerivedBoolean Object


UseBrackets Property (Currency)

Whether or not negative values are put in brackets.

Syntax

Property UseBrackets As DerivedBoolean (read-only)

Example

' Puts negative values in brackets

Chart2D1.ChartArea.Axes("X").ValueFormat.Currency.UseBrackets = True

See Also

Currency Object


UseCurrencySymbol Property (Currency)

Whether or not the currency symbol is appended to the value.

Syntax

Property UseCurrencySymbol As Boolean

See Also

Currency Object


UseSmallCents Property (Currency)

Whether or not cents are displayed in superscript.

Syntax

Property UseSmallCents As Boolean

See Also

Currency Object

ValueFormat Object


DataCoord Object

A data coordinate from a specified chart group.


DataCoord Object Members

DataCoord Object Properties

ChartGroup | The specified chart group (an index into the ChartGroups collection).
Parent | The parent object.
X | The X-coordinate.
Y | The Y-coordinate.


DataCoord Object Properties

ChartGroup Property (DataCoord)

Parent Property (DataCoord)

X Property (DataCoord)

Y Property (DataCoord)


ChartGroup Property (DataCoord)

The specified chart group (an index into the ChartGroups collection).

Syntax

Property ChartGroup As Long

See Also

DataCoord Object


Parent Property (DataCoord)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DataCoord Object


X Property (DataCoord)

The X-coordinate.

Syntax

Property X As Double

Example

' Set data coordinate to (2.3, 4.5)

Chart2D1.ChartLabels(1).AttachDataCoord.X = 2.3

Chart2D1.ChartLabels(1).AttachDataCoord.Y = 4.5

See Also

DataCoord Object


Y Property (DataCoord)

The y-coordinate.

Syntax

Property Y As Double

Example

' Set data coordinate to (2.3, 4.5)

Chart2D1.ChartLabels(1).AttachDataCoord.X = 2.3

Chart2D1.ChartLabels(1).AttachDataCoord.Y = 4.5

See Also

ChartLabel Object

DataCoord Object

Marker Object


DataIndex Object

A data index from a specified chart group.


DataIndex Object Members

DataIndex Object Properties

ChartGroup | The specified chart group (an index into the ChartGroups collection).
Parent | The parent object.
Point | The point index.
Series | The series index.


DataIndex Object Properties

ChartGroup Property (DataIndex)

Parent Property (DataIndex)

Point Property (DataIndex)

Series Property (DataIndex)


ChartGroup Property (DataIndex)

The specified chart group (an index into the ChartGroups collection).

Syntax

Property ChartGroup As Long

See Also

DataIndex Object


Parent Property (DataIndex)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DataIndex Object


Point Property (DataIndex)

The point index.

Syntax

Property Point As Long

See Also

DataIndex Object


Series Property (DataIndex)

The series index.

Syntax

Property Series As Long

Example

' Set data series value

Chart2D1.ChartLabels(1).AttachDataIndex.Series = 2

See Also

ChartLabel Object

DataIndex Object

Marker Object


DerivedBoolean Object

A Boolean value, normally calculated by the chart.


DerivedBoolean Object Members

DerivedBoolean Object Properties

IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Value | The current value.


DerivedBoolean Object Properties


IsDefault Property (DerivedBoolean)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

DerivedBoolean Object


Parent Property (DerivedBoolean)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedBoolean Object


Value Property (DerivedBoolean)

The current value.

Syntax

Property Value As Boolean

Example

' Puts a space between the sign and value

Chart2D1.ChartArea.Axes("X").ValueFormat.Accounting.SpaceSeparatingSign = True

See Also

Accounting Object

Currency Object

DerivedBoolean Object

Number Object

Percentage Object


DerivedDouble Object

A double-precision floating-point value, normally calculated by the chart.


DerivedDouble Object Members

DerivedDouble Object Properties

IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Value | The current value.


DerivedDouble Object Properties


IsDefault Property (DerivedDouble)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

DerivedDouble Object


Parent Property (DerivedDouble)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedDouble Object


Value Property (DerivedDouble)

The current value.

Syntax

Property Value As Double

Example

' Set grid line spacing

Chart2D1.ChartArea.Axes("Y").MajorGrid.Spacing.Value = 0.5

See Also

Axis Object

DerivedDouble Object

GridLines Object


DerivedEnum Object

A Integer value, normally calculated by the chart.


DerivedEnum Object Members

DerivedEnum Object Properties

IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Value | The current value.


DerivedEnum Object Properties


IsDefault Property (DerivedEnum)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

DerivedEnum Object


Parent Property (DerivedEnum)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedEnum Object


Value Property (DerivedEnum)

The current value.

Syntax

Property Value As Integer

Example

' Puts the value before the negative sign

Chart2D1.ChartArea.Axes("X").ValueFormat.Number.OrderSignValue = oc2doscValueSign

See Also

Accounting Object

Currency Object

DerivedEnum Object

Number Object

Percentage Object


DerivedLong Object

A long integer value, normally calculated by the chart.


DerivedLong Object Members

DerivedLong Object Properties

IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Value | The current value.


DerivedLong Object Properties


IsDefault Property (DerivedLong)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

DerivedLong Object


Parent Property (DerivedLong)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedLong Object


Value Property (DerivedLong)

The current value.

Syntax

Property Value As Long

Example

' Force X-axis values to be integers

Chart2D1.ChartArea.Axes("X").Precision.Value = 0

See Also

Axis Object

DerivedLong Object

Location Object

PlotArea Object


DerivedString Object

A string value, normally calculated by the chart.


DerivedString Object Members

DerivedString Object Properties

IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Value | The current value.


DerivedString Object Properties


IsDefault Property (DerivedString)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

DerivedString Object


Parent Property (DerivedString)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedString Object


Value Property (DerivedString)

The current value.

Syntax

Property Value As String

Example

' Set time scale format string

Chart2D1.ChartArea.Axes("X").TimeScale.Format.Value = "%H:%M:%S"

See Also

DerivedString Object

TimeScale Object


FillStyle Object

The pattern and color used for a data series in area, bar, and pie charts.


FillStyle Object Members

FillStyle Object Properties

BackgroundColor | The pattern color.
ForegroundColor | The solid color.
IsDefault | Whether the point uses the series default fill style.
Parent | The parent object.
Pattern | The fill pattern.


FillStyle Object Properties

BackgroundColor Property (FillStyle)

ForegroundColor Property (FillStyle)

IsDefault Property (FillStyle)

Parent Property (FillStyle)

Pattern Property (FillStyle)


BackgroundColor Property (FillStyle)

The pattern color.

Example

Me.Chart2D1.Chartgroups(1).Styles(1).Fill.Interior.BackgroundColor = RGB(10, 20, 30)

See Also

FillStyle Object


ForegroundColor Property (FillStyle)

The solid color.

Example

Me.Chart2D1.Chartgroups(1).Styles(1).Fill.Interior.ForegroundColor = RGB(100, 10, 20)

See Also

FillStyle Object


IsDefault Property (FillStyle)

Whether the point uses the series default fill style.

Syntax

Property IsDefault As Boolean

Remarks

Only available when called by an item from the PointStyles Collection.

See Also

ChartStyle object

FillStyle object

Pie object


Parent Property (FillStyle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

FillStyle Object


Pattern Property (FillStyle)

The fill pattern.

Syntax

Property Pattern As FillPatternConstants

Example

' Set fill pattern for first chart style

Chart2D1.ChartGroups(1).Styles(1).Fill.Pattern = oc2dFillHorizontalStripe

See Also

FillPattern Constants

FillStyle Object


Fraction Object

Contains properties specific to the fraction custom annotation format and determines how values of type Fraction are displayed.


Fraction Object Members

Fraction Object Properties

Denominator | The denominator used for fractional values.
DenominatorDigits | The maximum number of digits allowable for the denominator.
Parent | The parent object.


Fraction Object Properties


Denominator Property (Fraction)

The denominator used for fractional values. If you set this property, DenominatorDigits is automatically set to 0.

Syntax

Property Denominator As Long

Example

' Sets the fraction denominator to "100"

Chart2D1.ChartArea.Axes("X").ValueFormat.Fraction.Denominator = 100

See Also

Fraction Object


DenominatorDigits Property (Fraction)

The maximum number of digits allowable for the denominator. If you set this property, Denominator is automatically set to 0.

Syntax

Property DenominatorDigits As Long

See Also

Fraction Object


Parent Property (Fraction)

The parent object

Syntax

Property Parent As Object (read-only)

See Also

Fraction Object

ValueFormat Object


GridLines Object

The horizontal or vertical grid-lines on a chart.


GridLines Object Members

GridLines Object Properties

IsOnTop | Indicates whether Axis gridlines are drawn over or under the charted data.
IsStyleDefault | Indicates whether the default grid data style is used.
Parent | The parent object.
Spacing | The space between grid lines.
Style | The line style to use for grid-lines.


GridLines Object Properties

IsOnTop Property (GridLines)

IsStyleDefault Property (GridLines)

Parent Property (GridLines)

Spacing Property (GridLines)

Style Property (GridLines)


IsOnTop Property (GridLines)

Indicates whether Axis gridlines are drawn over or under the charted data.

Syntax

Property IsOnTop As Boolean

Remarks

For some charts, such as area or other filled charts, it is sometimes desirable to draw the gridlines over the charted data so they can be seen. Set this property to True to show grid lines. The default value is False.

See Also

GridLines Object


IsStyleDefault Property (GridLines)

Indicates whether the default grid data style is used.

Syntax

Property IsStyleDefault As Boolean

See Also

GridLines Object


Parent Property (GridLines)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

GridLines Object


Spacing Property (GridLines)

The space between grid-lines.

Syntax

Property Spacing As DerivedDouble (read-only)

Remarks

No grid-lines are displayed when this value is 0.0.

Example

' Set X-axis grid increment

Chart2D1.ChartArea.Axes("X").MajorGrid.Spacing = 1.0

See Also

DerivedDouble Object

GridLines Object


Style Property (GridLines)

The line style to use for grid-lines.

Syntax

Property Style As LineStyle (read-only)

See Also

Axis Object

GridLines Object

LineStyle Object


HiLoOpenClose Object

Properties affecting the appearance of HiLoOpenClose charts.


HiLoOpenClose Object Members

HiLoOpenClose Object Properties

IsOpenCloseFullWidth | Whether or not the open and close ticks are shown full width.
IsShowingClose | Whether or not the close tick is shown.
IsShowingOpen | Whether or not the open tick is shown.
Parent | The parent object.


HiLoOpenClose Object Properties

IsOpenCloseFullWidth Property (HiLoOpenClose)

IsShowingClose Property (HiLoOpenClose)

IsShowingOpen Property (HiLoOpenClose)

Parent Property (HiLoOpenClose)


IsOpenCloseFullWidth Property (HiLoOpenClose)

Whether or not the open and close ticks are shown full width.

Syntax

Property IsOpenCloseFullWidth As Boolean

Example

' Sets the open and close ticks to full width.

Chart2D1.ChartArea.HiLoOpenClose.IsOpenCloseFullWidth = True

See Also

HiLoOpenClose Object


IsShowingClose Property (HiLoOpenClose)

Whether or not the close tick is shown.

Syntax

Property IsShowingClose As Boolean

See Also

HiLoOpenClose Object


IsShowingOpen Property (HiLoOpenClose)

Whether or not the open tick is shown.

Syntax

Property IsShowingOpen As Boolean

See Also

HiLoOpenClose Object


Parent Property (HiLoOpenClose)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartArea Object

HiLoOpenClose Object


Image Object

The image displayed within the chart element.


Image Object Members

Image Object Properties

FileName | The file name and path of the bitmap or Metafile to be displayed.
HasMinimumSize | Whether the text area should be sized according to the background image.
IsEmbedded | Whether or not the image file is embedded in the chart.
IsTransparent | If True, indicates that the specified bitmap image be rendered as a transparent bitmap.
Layout | How the image appears.
Parent | The parent object.


Image Object Properties

FileName Property (Image)

HasMinimumSize Property (Image)

IsEmbedded Property (Image)

IsTransparent Property (Image)

Layout Property (Image)

Parent Property (Image)


FileName Property (Image)

The file name and path of the bitmap or Metafile to be displayed. Enhanced Metafiles are only supported under Windows 95/98 and Windows NT.

Syntax

Property FileName As String

Example

' Set header background to use TEXTURE.BMP image file

Chart2D1.Header.Image.FileName = c:\pics\TEXTURE.BMP

See Also

Image Object


HasMinimumSize Property (Image)

Whether the text area should be sized according to the background image.

Syntax

Property HasMinimumSize As Boolean

See Also

Image Object


IsEmbedded Property (Image)

Whether or not the image file is embedded in the chart.

Syntax

Property IsEmbedded As Boolean

Remarks

If True, then the file is embedded within the chart. If False, the chart looks for the file in the specified location. Note that if you set this property, you should not change or remove the value of FileName. This property is still required to point to the graphic you want to use so that it can be embedded into the chart at runtime.

See Also

Image Object


IsTransparent Property (Image)

If True, indicates that the specified bitmap image be rendered as a transparent bitmap. The lower left pixel of the bitmap is used to indicate the transparent color mapping.

Syntax

Property IsTransparent As Boolean

See Also

Image Object


Layout Property (Image)

How the image appears.

Syntax

Property Layout As ImageLayoutConstants

See Also

Image Object

ImageLayout Constants


Parent Property (Image)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Image Object

Interior Object


Interior Object

The colors and image file used for the interior of an object.

Interior Object Members

Interior Object Properties

BackgroundColor | The background color.
ForegroundColor | The foreground color.
Image | The bitmap or metafile image name.
Parent | The parent object.


Interior Object Properties

BackgroundColor Property (Interior)

ForegroundColor Property (Interior)

Image Property (Interior)

Parent Property (Interior)


BackgroundColor Property (Interior)

The background color. You can specify RGB colors using the RGB() or QBColor() functions.

Syntax

Property BackgroundColor As OLE_COLOR

Example

' Set header background color to green

Chart2D1.Header.BackgroundColor = RGB(0, 128, 0)

See Also

Interior Object


ForegroundColor Property (Interior)

The foreground color. You can specify RGB colors using the RGB() or QBColor() functions. This property is ignored in the PlotArea object.

Syntax

Property ForegroundColor As OLE_COLOR

See Also

Interior Object


Image Property (Interior)

The bitmap or metafile image name.

Syntax

Property Image As Image (read-only)

See Also

Image Object

Interior Object


Parent Property (Interior)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartArea Object

ChartLabel Object

Interior Object

Legend Object

PlotArea Object

Title Object

Chart2D Object


Label Object

A Label object is one label.


Label Object Members

Label Object Properties

Parent | The parent object.
Text | The label text string.


Label Object Properties


Parent Property (Label)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Label Object


Text Property (Label)

The label text string.

Syntax

Property Text As String

Example

' Adds a label to the collection
Chart2D1.ChartGroups(1).PointLabels.Add ("Some Text")

' Sets the footer to indicate the number of labels
Chart2D1.Footer.Text = "Total # of Labels: " & Chart.Labels.Count

See Also

Axis object

ChartLabel object

Label object

Pie object

Title object

ValueLabel object


Labels Collection

The Labels collection is a collection of all Label objects, indexed by number.


Labels Collection Members

Labels Collection Properties

Count | The current number of Label objects in the collection.
Item | Specifies a specific Label object from the collection.
Parent | The parent object.

Labels Collection Methods

Add | Adds a Label object to the collection.
Remove | Removes a Label object from the collection.
RemoveAll | Removes all elements in the collection.


Labels Collection Properties


Count Property (Labels)

The current number of Label objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

Labels Collection


Item Property (Labels)

Specifies a specific Label object from the collection.

Syntax

Property Item(Index) As Label

Remarks

Indexed by number (with 1 representing the first object in the collection). Also accepts Text value as index similar to Name for chart labels.

See Also

Labels Collection


Parent Property (Labels)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Labels Collection


Labels Collection Methods


Add Method (Labels)

Adds a Label object to the collection. Returns a Label object.

Syntax

Function Add(Text As String, [Before]) As Label

Remarks

Part | Type | Description
Text | String | The text string for the new label
Index | Variant | Index of the location of the new label in the collection (if omitted, add at end). Index can be a number or text.

See Also

Labels Collection


Remove Method (Labels)

Removes a Label object from the collection.

Syntax

Sub Remove(Index)

Remarks

Part | Type | Description
Index | Variant | An object index (with 1 representing the first element). Index can be number or text.

See Also

Labels Collection


RemoveAll Method (Labels)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

Labels Collection


Legend Object

The chart legend.


Legend Object Members

Legend Object Properties

Anchor | Where to anchor the legend to the window.
Border | The border around the legend.
Font | The font used for the legend.
Interior | The background/foreground colors and image for the chart element.
IsReversed | Whether the SeriesLabels in the legend are to be displayed in reverse order.
IsShowing | Whether the legend is to be displayed.
IsShowing2DShading | Series of 2D charts which show 3D effects (ribbon, bar, pie, etc.) appear in the legend with rectangular swatches of color.
Location | The size and position of the legend in the chart.
Orientation | The vertical or horizontal orientation of the legend.
Parent | The parent object.
Text | The text of the legend title.


Legend Object Properties

Anchor Property (Legend)

Border Property (Legend)

Font Property (Legend)

Interior Property (Legend)

IsReversed Property (Legend)

IsShowing Property (Legend)

IsShowing2DShading Property (Legend)

Location Property (Legend)

Orientation Property (Legend)

Parent Property (Legend)

Text Property (Legend)


Anchor Property (Legend)

Where to anchor the legend to the window.

Syntax

Property Anchor As AnchorConstants

See Also

Anchor Constants

Legend Object


Border Property (Legend)

Where to anchor the legend to the window.

Syntax

Property Border As Border (read-only)

See Also

Border Object

Legend Object


Font Property (Legend)

The font used for the legend. (This is a standard OLE Font object.)

Syntax

Property Font As StdFont

See Also

Legend Object


Interior Property (Legend)

The background/foreground colors and image for the chart element.

Syntax

Property Interior As Interior (read-only)

See Also

Interior Object

Legend Object


IsReversed Property (Legend)

Whether the SeriesLabels in the legend are to be displayed in reverse order.

Syntax

Property IsReversed As Boolean

See Also

Legend Object


IsShowing Property (Legend)

Whether the legend is to be displayed.

Syntax

Property IsShowing As Boolean

Example

' Display legend

Chart2D1.Legend.IsShowing = True

See Also

Legend Object


IsShowing2DShading Property (Legend)

Series of 2D charts which show 3D effects (ribbon, bar, pie, etc.) appear in the legend with rectangular swatches of color.

Syntax

Property IsShowing3DShading As Boolean

Remarks

The swatches show 2 or 3 different shades of the series color, indicating the highlighted and shaded colors in addition to the series color. When set to True (default), the 2 or 3 colors in the swatch continue to appear. If set to False, then only the series color appears.

See Also

Legend Object


Location Property (Legend)

The size and position of the legend in the chart.

Syntax

Property Location As Location (read-only)

See Also

Legend Object

Location Object


Orientation Property (Legend)

The vertical or horizontal orientation of the legend.

Syntax

Property Location As Location

See Also

Legend Object

Orientation Constants


Parent Property (Legend)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Legend Object


Text Property (Legend)

The text of the legend title.

Syntax

Property Text As Label (read-only)

See Also

Chart2D Object

Label Object

Legend Object


LineStyle Object

The color, pattern, and width used for a series of data in plot charts. Also used for grid-lines, axis lines and markers.


LineStyle Object Members

LineStyle Object Properties

Color | The line color.
IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Pattern | The line pattern.
Width | The thickness of the line in pixels.


LineStyle Object Properties

Color Property (LineStyle)

IsDefault Property (LineStyle)

Parent Property (LineStyle)

Pattern Property (LineStyle)

Width Property (LineStyle)


Color Property (LineStyle)

The line color. You can specify RGB colors using the RGB() or QBColor() functions. Changing this property also changes the fill color (see FillStyle Object) for that series.

Syntax

Property Color As OLE_COLOR

See Also

LineStyle Object


IsDefault Property (LineStyle)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

LineStyle Object


Parent Property (LineStyle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

LineStyle Object


Pattern Property (LineStyle)

The line pattern.

Syntax

Property Pattern As LinePatternConstants

Example

' Display all grid lines as dashes

Chart2D1.Axes("X").MajorGrid.Style.Pattern = oc2dLineIntegerDash

Chart2D1.Axes("Y").MajorGrid.Style.Pattern = oc2dLineIntegerDash

See Also

LinePattern Constants

LineStyle Object


Width Property (LineStyle)

The thickness of the line in pixels.

Syntax

Property Width As Long

See Also

ChartStyle Object

GridLines Object

LineStyle Object

Marker Object


Location Object

The size and position of a chart area.


Location Object Members

Location Object Properties

Height | The height of the area.
Left | The distance between the left edge of the area and the control's origin.
Parent | The parent object.
Top | The distance between the top of the area and the control's origin
Width | The width of the area.


Location Object Properties

Height Property (Location)

Left Property (Location)

Parent Property (Location)

Top Property (Location)

Width Property (Location)


Height Property (Location)

The height of the area.

Syntax

Property Height As DerivedLong (read-only)

See Also

DerivedLong Object

Location Object


Left Property (Location)

The distance between the left edge of the area and the control's origin.

Syntax

Property Left As DerivedLong (read-only)

See Also

DerivedLong Object

Location Object


Parent Property (Location)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

DerivedLong Object

Location Object


Top Property (Location)

The distance between the top of the area and the control's origin.

Syntax

Property Top As DerivedLong (read-only)

See Also

DerivedLong Object

Location Object


Width Property (Location)

The width of the area.

Syntax

Property Width As DerivedLong (read-only)

Example

' Set header width to 100

Chart2D1.Header.Location.Width.Value = 100

See Also

ChartArea object

ChartLabel object

DerivedLong object

Legend object

Location object

Title object


Marker Object

A Marker object is one data marker (which identifies a Particular data element on the screen).


Marker Object Members

Marker Object Properties

Index | The indices of the data set and point through which the marker is drawn.
IsShowing | Whether the marker is displayed.
IsStyleDefault | Whether to use the default marker data style.
Method | The marker positioning method to use.
Name | The marker name, which is either “X” or “Y”.
Parent | The parent object.
Style | The marker data style to use
Value | The position of the marker in chart coordinates (on plot and area charts).


Marker Object Properties

Index Property (Marker)

IsShowing Property (Marker)

IsStyleDefault Property (Marker)

Method Property (Marker)

Name Property (Marker)

Parent Property (Marker)

Style Property (Marker)

Value Property (Marker)


Index Property (Marker)

The indices of the data set and point through which the marker is drawn.

Syntax

DataIndex object (read-only)

Remarks

This is the only way to specify a marker on pie charts, and the only way to specify an X-marker on bar charts, stacking bar charts, and charts where the X-axis is annotated using Point-labels. If this property is set, the Method property is automatically set to oc2dMarkerDataIndex.

See Also

DataIndex Object

Marker Object


IsShowing Property (Marker)

Whether the marker is displayed.

Syntax

Property IsShowing As Boolean

See Also

Marker Object


IsStyleDefault Property (Marker)

Whether to use the default marker data style.

Syntax

Property IsStyleDefault As Boolean

Example

' Use default marker data style

Chart2D1.ChartArea.Markers("X").IsStyleDefault = True

See Also

Marker Object


Method Property (Marker)

The marker positioning method to use. Setting either the Index or the Value property automatically causes this property to be set.

Syntax

Property Method As MarkerMethodConstants

See Also

Marker Object

MarkerMethod Constants


Name Property (Marker)

The marker name, which is either “X” or “Y”.

Syntax

Property Name As String (read-only)

See Also

Marker Object


Parent Property (Marker)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Marker Object


Style Property (Marker)

The marker data style to use. Note that the same data style is used for both the X and Y-markers.

Syntax

Property Style As LineStyle (read-only)

See Also

LineStyle Object

Marker Object


Value Property (Marker)

The position of the marker in chart coordinates (on plot and area charts). If this property is set, the Method property is automatically set to oc2dMarkerDataCoord.

Syntax

Property Value As DataCoord (read-only)

See Also

ChartArea Object

DataCoord Object

Marker Object


Markers Collection

The Markers collection is a static collection of two Marker objects, named “X” and “Y” (representing the X-marker and the Y-marker).


Markers Collection Members

Markers Collection Properties

Count | The current number of Marker objects in the collection.
Item | Specifies a specific Marker object from the collection.
Parent | The parent object.


Markers Collection Properties


Count Property (Markers)

The current number of Marker objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

Markers Collection


Item Property (Markers)

Specifies a specific Marker object from the collection.

Syntax

Property Item(Index) As Marker

See Also

Markers Collection


Parent Property (Markers)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Markers Collection


Number Object

Contains properties specific to the number custom annotation format and determines how values of type Number are displayed.


Number Object Members

Number Object Properties

DecimalPlaces | The number of decimal places to display.
NegativeValueColor | The color used to display negative values.
OrderSignValue | Specifies the order of the currency sign, symbol and style.
Parent | The parent object.
SpaceSeparatingSign | Whether or not there is a space between the negative sign and the value.
UseBrackets | Whether or not negative values are put in brackets.
UseSeparators | Whether or not the separator character (often a comma) is used.


Number Object Properties

DecimalPlaces Property (Number)

NegativeValueColor Property (Number)

OrderSignValue Property (Number)

Parent Property (Number)

SpaceSeparatingSign Property (Number)

UseBrackets Property (Number)

UseSeparators Property (Number)


DecimalPlaces Property (Number)

The number of decimal places to display.

Syntax

Property DecimalPlaces As Long

Example

' Sets the number of decimal places to 3

Chart2D1.ChartArea.Axes("X").ValueFormat.Number.DecimalPlaces = 3

See Also

Number Object


NegativeValueColor Property (Number)

The color used to display negative values. You can specify RGB colors using the RGB() or QBColor() functions.

Syntax

Property NegativeValueColor As OLE_COLOR

See Also

Number Object


OrderSignValue Property (Number)

Specifies the order of the currency sign, symbol and style.

Syntax

Property OrderSignValue As DerivedEnum (read-only)

See Also

DerivedEnum Object

Number Object

OrderSignValue Constants


Parent Property (Number)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Number Object


SpaceSeparatingSign Property (Number)

Whether or not there is a space between the negative sign and the value.

Syntax

Property SpaceSeparatingSign As DerivedBoolean (read-only)

See Also

DerivedBoolean Object

Number Object


UseBrackets Property (Number)

Whether or not negative values are put in brackets.

Syntax

Property UseBrackets As DerivedBoolean

See Also

DerivedBoolean Object

Number Object


UseSeparators Property (Number)

Whether or not the separator character (often a comma) is used.

Syntax

Property UseSeparators As Boolean

See Also

Number Object

ValueFormat Object


Percentage Object

Contains properties specific to the percentage custom annotation format and determines how values of type Percentage are displayed.


Percentage Object Members

Percentage Object Properties

DecimalPlaces | The number of decimal places to display.
OrderPercentSignValue | Specifies the order of the percent sign, symbol and style.
Parent | The parent object.
SpaceSeparatingPercent | Whether or not there is a space between the percent sign and the value.
SpaceSeparatingSign | Whether or not there is a space between the negative sign and the value.


Percentage Object Properties

DecimalPlaces Property (Percentage)

OrderPercentSignValue Property (Percentage)

Parent Property (Percentage)

SpaceSeparatingPercent Property (Percentage)

SpaceSeparatingSign Property (Percentage)


DecimalPlaces Property (Percentage)

The number of decimal places to display.

Syntax

Property DecimalPlaces As Long

See Also

Percentage Object


OrderPercentSignValue Property (Percentage)

Specifies the order of the percent sign, symbol and style.

Syntax

Property OrderPercentSignValue As DerivedEnum (read-only)

Example

' Sets the order of the percent sign, value and negative sign.

Chart2D1.ChartArea.Axes("X").ValueFormat.Percentage.OrderPercentSignValue = oc2docsvSignValuePercent

See Also

DerivedEnum Object

OrderPercentSignValue Constants

Percentage Object


Parent Property (Percentage)

Specifies the order of the percent sign, symbol and style.

Syntax

Property Parent As Object (read-only)

See Also

Percentage Object


SpaceSeparatingPercent Property (Percentage)

Whether or not there is a space between the percent sign and the value.

Syntax

Property SpaceSeparatingPercent As DerivedBoolean (read-only)

See Also

DerivedBoolean Object

Percentage Object


SpaceSeparatingSign Property (Percentage)

Whether or not there is a space between the negative sign and the value.

Syntax

Property SpaceSeparatingSign As DerivedBoolean (read-only)

See Also

DerivedBoolean Object

Percentage Object

ValueFormat Object


Pie Object

Properties affecting the appearance of a pie chart.


Pie Object Members

Pie Object Properties

MinSlices | The minimum number of slices to display, including the "other" slice.
OtherFillStyle | Color and fill pattern used for the 'other' slice.
OtherLabel | The label for the "other" slice.
OtherSliceStyle | The color and fill pattern used for the "other" slice.
Parent | The parent object.
SortOrder | The order in which to display pie slices.
StartAngle | The angle at which to start drawing the first pie slice.
ThresholdMethod | The method of grouping point values to create the "other" slice.
ThresholdValue | The threshold value, expressed as a percentage, used by the ThresholdMethod property.


Pie Object Properties

MinSlices Property (Pie)

OtherFillStyle Property (Pie)

OtherLabel Property (Pie)

OtherSliceStyle Property (Pie)

Parent Property (Pie)

SortOrder Property (Pie)

StartAngle Property (Pie)

ThresholdMethod Property (Pie)

ThresholdValue Property (Pie)


MinSlices Property (Pie)

The minimum number of slices to display, including the "other" slice.

Syntax

Property MinSlices As Long

See Also

Pie Object


OtherFillStyle Property (Pie)

Color and fill pattern used for the 'other' slice.

Syntax

Property OtherFillStyle As FillStyle (read-only)

See Also

Pie Object


OtherLabel Property (Pie)

The label for the "other" slice.

Syntax

Property OtherLabel As Label (read-only)

See Also

Label Object

Labels Collection

Pie Object


OtherSliceStyle Property (Pie)

The color and fill pattern used for the "other" slice.

Syntax

Property OtherSliceStyle As SliceStyle object (read-only)

See Also

FillStyle Object

Pie Object


Parent Property (Pie)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Pie Object


SortOrder Property (Pie)

The order in which to display pie slices.

Syntax

Property SortOrder As SortOrderConstants

See Also

Pie Object

SortOrder Constants


StartAngle Property (Pie)

The angle at which to start drawing the first pie slice.

Syntax

Property StartAngle As Double

See Also

Pie Object


ThresholdMethod Property (Pie)

The method of grouping point values to create the "other" slice.

Syntax

Property ThresholdMethod As ThresholdConstants

Remarks

If ThresholdMethod is set to oc2dThresholdSliceCutoff, all point values with a percentage less than the value of the ThresholdValue property will be grouped into the "other" slice. If ThresholdMethod is set to oc2dThresholdPercentile, ThresholdValue specifies the upper limit on the percentage of the pie taken up by the "other" slice; as many of the smallest points as possible are grouped together.

See Also

Pie Object

Threshold Constants


ThresholdValue Property (Pie)

The threshold value, expressed as a percentage, used by the ThresholdMethod property. Valid values are between 0.0 and 100.0. If set to 0.0, no "other" slice is created.

Syntax

Property ThresholdValue As Double

Example

' Disable creation of "other" slice

Chart2D1.ChartArea.Pie.ThresholdValue = 0.0

See Also

ChartArea Object

Pie Object


PlotArea Object

The area inside the axes of a chart.


PlotArea Object Members

PlotArea Object Properties

Bottom | Specifies the pixel offset with respect to the bottom edge of the chart area.
Interior | The background/foreground colors and image for the chart area.
IsBoxed | Specifies whether the plot area is enclosed in a box.
Left | Specifies the pixel offset with respect to the left edge of the chart area.
Parent | The parent object.
Right | Specifies the pixel offset with respect to the right edge of the chart area.
Top | Specifies the pixel offset with respect to the top edge of the chart area.


PlotArea Object Properties

Bottom Property (PlotArea)

Interior Property (PlotArea)

IsBoxed Property (PlotArea)

Left Property (PlotArea)

Parent Property (PlotArea)

Right Property (PlotArea)

Top Property (PlotArea)


Bottom Property (PlotArea)

Specifies the pixel offset with respect to the bottom edge of the chart area.

Syntax

Property Bottom As DerivedLong (read-only)

See Also

DerivedLong Object

PlotArea Object


Interior Property (PlotArea)

The background/foreground colors and image for the chart area.

Syntax

Property Interior As Interior (read-only)

See Also

Interior Object

PlotArea Object


IsBoxed Property (PlotArea)

Specifies whether the plot area is enclosed in a box.

Syntax

Property IsBoxed As Boolean

Example

' Enclose plot area in box

Chart2D1.ChartArea.PlotArea.IsBoxed = True

See Also

Pie Object


Left Property (PlotArea)

Specifies the pixel offset with respect to the left edge of the chart area.

Syntax

Property Left As DerivedLong (read-only)

See Also

DerivedLong Object

Pie Object


Parent Property (PlotArea)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Pie Object


Right Property (PlotArea)

Specifies the pixel offset with respect to the right edge of the chart area.

Syntax

Property Right As DerivedLong (read-only)

See Also

DerivedLong Object

Pie Object


Top Property (PlotArea)

Specifies the pixel offset with respect to the top edge of the chart area.

Syntax

Property Top As DerivedLong (read-only)

See Also

ChartArea Object

DerivedLong Object

Pie Object


PointStyles Collection

A ChartStyle object is one data style, that defines how a series of data looks in the chart.
A PointStyles collection is a collection of ChartStyle objects for one or more points in a series. The PointStyles collection is empty by default. PointStyles for individual (set,point) pairs must be added before they can be used.


PointStyles Collection Members

PointStyles Collection Properties

Count | The Current number of ChartStyle objects in the collection.
Item | Specifies a specific ChartStyle object from the collection.
Parent | The parent object.

PointStyles Collection Methods

Add | Adds a custom ChartStyle to the specified series and point.
Move | Moves a ChartStyle's Series and Point.
PointFromIndex | Gets a point from the collection.
Remove | Removes a ChartStyle from a specified series and point.
RemoveAll | Removes all elements in the collection.
RemoveSeries | Removes all elements for a specific series from the collection.
SeriesFromIndex | Gets the series from the collection.


PointStyles Collection Properties


Count Property (PointStyles)

The Current number of ChartStyle objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

PointStyles Collection


Item Property (PointStyles)

Property Item(Series As Long, Point As Long) As ChartStyle

Syntax

Property Count As Long (read-only)

See Also

PointStyles Collection


Parent Property (PointStyles)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

PointStyles Collection


PointStyles Collection Methods

Add Method (PointStyles)

Move Method (PointStyles)

PointFromIndex Method (PointStyles)

Remove Method (PointStyles)

RemoveAll Method (PointStyles)

RemoveSeries Method (PointStyles)

SeriesFromIndex Method (PointStyles)


Add Method (PointStyles)

Adds a custom ChartStyle to the specified series and point.

Syntax

Function Add(Series As Long, Point As Long) As ChartStyle

Remarks

Part | Type | Description
Series | Long | The series you want to add a custom ChartStyle to.
Point | Long | The point in the series you want to change.

See Also

PointStyles Collection


Move Method (PointStyles)

Moves a ChartStyle's Series and Point.

Syntax

Sub Move(oldSeries As Long, oldPoint As Long, newSeries As Long, newPoint As Long)

Remarks

Part | Type | Description
OldSeries | Long | The series you want to move.
OldPoint | Long | The point you want to move.
NewSeries | Long | The new series location.
NewPoint | Long | The new point location.

See Also

PointStyles Collection


PointFromIndex Method (PointStyles)

Gets a point from the collection.

Syntax

Function PointFromIndex(Index) As Long

Remarks

Part | Type | Description
Index | Variant | An object index (with 1 representing the first element).

See Also

PointStyles Collection


Remove Method (PointStyles)

Removes a ChartStyle from a specified series and point.

Syntax

Sub Remove(Series As Long, Point As Long)

Remarks

Part | Type | Description
Series | Long | The series you want to remove a custom ChartStyle from.
Point | Long | The point in the series you want to remove the ChartStyle from.

See Also

PointStyles Collection


RemoveAll Method (PointStyles)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

PointStyles Collection


RemoveSeries Method (PointStyles)

Removes all elements for a specific series from the collection.

Syntax

Sub RemoveSeries(Series As Long)

See Also

PointStyles Collection


SeriesFromIndex Method (PointStyles)

Gets the series from the collection.

Syntax

Function SeriesFromIndex(Index) As Long

Remarks

Part | Type | Description
Index | Variant | An object index (with 1 representing the first element).

See Also

PointStyles Collection


Polar Object

Properties affecting the appearance of polar charts.


Polar Object Members

Polar Object Properties

AxisAllowNegative | Whether or not negative radii are allowed.
IsHalfRange | Determines if the x axis annotation is half or full range.
Parent | The parent object.


Polar Object Properties


AxisAllowNegative Property (Polar)

Whether or not negative radii are allowed.

Syntax

Property AxisAllowNegative As Boolean

See Also

Polar Object


IsHalfRange Property (Polar)

Determines if the x axis annotation is half or full range.

Syntax

Property IsHalfRange As Boolean

Example

' Sets the x axis annotation to half range

Chart2D1.ChartArea.Polar.IsHalfRange = True

See Also

Polar Object


Parent Property (Polar)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartArea Object

Polar Object


Scientific Object

Contains properties specific to the scientific custom annotation format and determines how values of type Scientific are displayed.


Scientific Object Members

Scientific Object Properties

DecimalPlaces | The number of decimal places to display.
Parent | The parent object.
UseSmallExponent | Whether or not the exponent is displayed as a superscript.


Scientific Object Properties


DecimalPlaces Property (Scientific)

The number of decimal places to display.

Syntax

Property DecimalPlaces As Long

Example

' Sets the number of decimal places to 3

Chart2D1.ChartArea.Axes("X").ValueFormat.Scientific.DecimalPlaces = 3

See Also

Scientific Object


Parent Property (Scientific)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Scientific Object


UseSmallExponent Property (Scientific)

Whether or not the exponent is displayed as a superscript.

Syntax

Property UseSmallExponent As Boolean

See Also

Scientific Object

ValueFormat Object


SliceStyle Object

Controls the offset property for exploding pie slices.


SliceStyle Object Members

SliceStyle Object Properties

Display | The display properties for a slice.
Offset | The offset of the pie slice, measured from the center as a percentage of the radius.
Parent | The parent object.


SliceStyle Object Properties


Display Property (SliceStyle)

The display properties for a slice.

Syntax

Property Display As Integer

See Also

SliceStyle Object


Offset Property (SliceStyle)

The offset of the pie slice, measured from the center as a percentage of the radius.

Syntax

Property Offset As DerivedDouble (read-only)

Example

' Sets the offset for the first series to 10% of the pie’s radius

Chart2D1.ChartGroups(1).Styles(1).Slice.Offset = 10

‘ Sets the offset for the third point of the second series

‘ to 15% of the pie’s radius

Chart2D1.ChartGroups(1).PointStyles.Item(2,3).Slice.Offset = 15

See Also

DerivedDouble Object

SliceStyle Object


Parent Property (SliceStyle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ChartStyle Object

ChartStyles Collection

SliceStyle Object


Strings Collection

The Strings collection is a collection of all Strings, indexed by number.


Strings Collection Members

Strings Collection Properties

Count | The current number of Strings in the collection.
Item | Specifies a specific String from the collection.
Parent | The parent object.

Strings Collection Methods

Add | Adds a String to the collection.
Remove | Removes a String from the collection.


Strings Collection Properties


Count Property (Strings)

The current number of Strings in the collection.

Syntax

Property Count As Long (read-only)

See Also

Strings Collection


Item Property (Strings)

Specifies a specific String from the collection. Indexed by number (with 1 representing the first string in the collection).

Syntax

Property Item(Index As Long) As String

See Also

Strings Collection


Parent Property (Strings)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

Strings Collection


Strings Collection Methods


Add Method (Strings)

Adds a String to the collection.

Syntax

Sub Add(String As String, [BeforeIndex])

Example

' Adds a series field

Chart2D1.ChartGroups(1).SeriesFields.Add "Income"

Remarks

Part | Type | Description
String | String | The text string.
BeforeIndex | Variant | Index of the location of the new string in the collection (if omitted, add at end).

See Also

Strings Collection


Remove Method (Strings)

Removes a String from the collection.

Syntax

Sub Remove(Index As Long)

Remarks

Part | Type | Description
Index | Long | An object index (with 1 representing the first element).

See Also

ChartGroup Object

ChartGroups Collection

Strings Collection


SymbolStyle Object

The shape, size, and color used in plot charts for the points in a series.


SymbolStyle Object Members

SymbolStyle Object Properties

Color | The symbol color.
IsDefault | Whether the value is the default value calculated by the chart.
Parent | The parent object.
Shape | The symbol shape.
Size | The relative size of the symbol.


SymbolStyle Object Properties

Color Property (SymbolStyle)

IsDefault Property (SymbolStyle)

Parent Property (SymbolStyle)

Shape Property (SymbolStyle)

Size Property (SymbolStyle)


Color Property (SymbolStyle)

The symbol color. You can specify RGB colors using the RGB() or QBColor() functions.

Syntax

Property Color As OLE_COLOR

Example

' Set symbol color for second chart style to green

Chart2D1.ChartGroups(1).Styles(2).Symbol.Color = RGB(0, 128, 0)

See Also

SymbolStyle Object


IsDefault Property (SymbolStyle)

Whether the value is the default value calculated by the chart.

Syntax

Property IsDefault As Boolean

See Also

ChartStyle Object

SymbolStyle Object


Parent Property (SymbolStyle)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

SymbolStyle Object


Shape Property (SymbolStyle)

The symbol shape.

Syntax

Property Shape As ShapeConstants

See Also

Shape Constants

SymbolStyle Object


Size Property (SymbolStyle)

The relative size of the symbol. Must be 0 or greater. When set to 0, no symbol is displayed.

Syntax

Property Size As Long

See Also

SymbolStyle Object


TimeScale Object

The scale for an X-axis representing the time dimension.


TimeScale Object Members

TimeScale Object Properties

Base | The start of time data, in OLE date format.
Format | The format string for time-axis labels.
Parent | The parent object.
Unit | The unit of time used in the Time-axis.

TimeScale Object Methods

DateToValue | Converts a date to a value representing its position on the Time-axis.
FormatDate | Formats a date using the specified format string.
ValueToDate | Converts a position on the Time-axis to its equivalent date.


TimeScale Object Properties

Base Property (TimeScale)

Format Property (TimeScale)

Parent Property (TimeScale)

Unit Property (TimeScale)


Base Property (TimeScale)

The start of time data, in OLE date format.

Syntax

Property Base As Date

See Also

TimeScale Object


Format Property (TimeScale)

The format string for time-axis labels.

Syntax

Property Format As DerivedString (read-only)

See Also

DerivedString Object

TimeScale Object


Parent Property (TimeScale)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

TimeScale Object


Unit Property (TimeScale)

The unit of time used in the Time-axis.

Syntax

Property Unit As TimeUnitConstants

See Also

SymbolStyle Object

TimeScale Object

TimeUnit Constants


TimeScale Object Methods


DateToValue Method (TimeScale)

Converts a date to a value representing its position on the Time-axis.

Syntax

Function DateToValue(Date As Date) As Double

Remarks

Part | Type | Description
Date | Date | The date to be converted

See Also

TimeScale Object


FormatDate Method (TimeScale)

Formats a date using the specified format string.

Syntax

Property Format As DerivedString (read-only)

Example

' Set time unit to seconds

Chart2D1.ChartArea.Axes("X").TimeScale.Unit = oc2dTimeSeconds

Remarks

Part | Type | Description
Date | Date | The date to be formatted.
Format | String | The format string to use.

See Also

TimeScale Object


ValueToDate Method (TimeScale)

Converts a position on the Time-axis to its equivalent date.

Syntax

Function ValueToDate(Value As Double) As Date

Remarks

Part | Type | Description
Value | Double | The Time-axis position to be converted.

See Also

Axis Object

TimeScale Object


Title Object

A chart title (header or footer).


Title Object Members

Title Object Properties

Adjust | How multiple text lines are aligned within the title.
Border | The border around the title.
Font | The font used in the title.
Interior | The background/foreground colors and image for the chart element.
IsShowing | Whether the title is to be displayed.
Location | The size and position of the title in the chart.
Parent | The parent object.
Text | The text displayed in the title.


Title Object Properties

Adjust Property (Title)

Border Property (Title)

Font Property (Title)

Interior Property (Title)

IsShowing Property (Title)

Location Property (Title)

Parent Property (Title)

Text Property (Title)


Adjust Property (Title)

How multiple text lines are aligned within the title.

Syntax

Property Adjust As AdjustConstants

See Also

Adjust Constants

Title Object


Border Property (Title)

The border around the title.

Syntax

Property Border As Border (read-only)

See Also

Border Object

Title Object


Font Property (Title)

The font used in the title. (This is a standard OLE Font object.)

Syntax

Property Font As StdFont

See Also

TimeScale Object


Interior Property (Title)

The background/foreground colors and image for the chart element.

Syntax

Property Interior As Interior (read-only)

See Also

Interior Object

TimeScale Object


IsShowing Property (Title)

Whether the title is to be displayed.

Syntax

Property IsShowing As Boolean

Example

' Display chart header
Chart2D1.Header.IsShowing = True

See Also

TimeScale Object


Location Property (Title)

The size and position of the title in the chart.

Syntax

Property Location As Location (read-only)

See Also

Location Object

TimeScale Object


Parent Property (Title)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

TimeScale Object


Text Property (Title)

The text displayed in the title.

Syntax

Property Text As Label (read-only)

See Also

Chart2D Object

Label Object

Labels Collection

TimeScale Object


ValueFormat Object

The format in which value labels are displayed.


ValueFormat Object Members

ValueFormat Object Properties

Accounting | Contains properties specific to the accounting category
Category | The ValueLabels type.
Currency | Contains properties specific to the Currency category.
Format | The format string for the current ValueFormat.
Fraction | Contains properties specific to the Fraction category.
Number | Contains properties specific to the Number category.
Parent | The parent object.
Percentage | Contains properties specific to the Percentage category.
Scientific | Contains properties specific to the Scientific category.


ValueFormat Object Properties

Accounting Property (ValueFormat)

Category Property (ValueFormat)

Currency Property (ValueFormat)

Format Property (ValueFormat)

Fraction Property (ValueFormat)

Number Property (ValueFormat)

Parent Property (ValueFormat)

Percentage Property (ValueFormat)

Scientific Property (ValueFormat)


Accounting Property (ValueFormat)

Contains properties specific to the accounting category.

Syntax

Property Accounting As AccountingVF

See Also

Accounting Object

ValueFormat Object


Category Property (ValueFormat)

The ValueLabels type.

Syntax

Property Category As Integer

See Also

Category Constants

ValueFormat Object


Currency Property (ValueFormat)

Contains properties specific to the Currency category.

Syntax

Property Currency As CurrencyVF (read-only)

Example

' Sets the ValueFormat custom annotation format to type Currency
Chart2D1.ChartArea.Axes("X").LabelFormat.Category = oc2dCategoryCurrency

See Also

Currency Object

ValueFormat Object


Format Property (ValueFormat)

The format string for the current ValueFormat.

Syntax

Property Format As String

See Also

ValueFormat Object


Fraction Property (ValueFormat)

Contains properties specific to the Fraction category.

Syntax

Property Fraction As FractionVF (read-only)

See Also

Fraction Object

ValueFormat Object


Number Property (ValueFormat)

Contains properties specific to the Number category.

Syntax

Property Number As NumberVF (read-only)

See Also

Number Object

ValueFormat Object


Parent Property (ValueFormat)

The parent object

Syntax

Property Parent As Object (read-only)

See Also

ValueFormat Object


Percentage Property (ValueFormat)

Contains properties specific to the Percentage category.

Syntax

Property Percentage As PercentageVF (read-only)

See Also

Percentage Object

ValueFormat Object


Scientific Property (ValueFormat)

Contains properties specific to the Scientific category.

Syntax

Property Scientific As ScientificVF (read-only)

See Also

Axis Object

Axes Collection

ValueFormat Object

Scientific Object


ValueLabel Object

A ValueLabel object is one text string labelling a significant axis value.


ValueLabel Object Members

ValueLabel Object Properties

Label | The label for this Value-label.
Parent | The parent object.
Value | The chart coordinate at which to display the Value-label.


ValueLabel Object Properties


Label Property (ValueLabel)

The label for this Value-label.

Syntax

Property Label As Label (read-only)

Example

' Set chart coordinate for this label

Chart2D1.ChartArea.Axes("X").ValueLabels.Add 1,"First ValueLabel"

Chart2D1.ChartArea.Axes("X").ValueLabels(1).Value = 1.0/

See Also

Label Object

Labels Collection

ValueLabel Object


Parent Property (ValueLabel)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ValueLabel Object


Value Property (ValueLabel)

The chart coordinate at which to display the Value-label.

Syntax

Property Value As Double

See Also

Axis Object

ValueLabel Object


ValueLabels Collection

The ValueLabels collection is a collection of all ValueLabel objects, indexed by number.


ValueLabels Collection Members

ValueLabels Collection Properties

Count | The current number of ValueLabel objects in the collection.
Item | Specifies a specific ValueLabel object from the collection.
Parent | The parent object.

ValueLabels Collection Methods

Add | Adds a ValueLabel object to the end of the collection.
Remove | Removes a ValueLabel object from the collection.
RemoveAll | Removes all elements in the collection.


ValueLabels Collection Properties


Count Property (ValueLabels)

The current number of ValueLabel objects in the collection.

Syntax

Property Count As Long (read-only)

See Also

ValueLabels Collection


Item Property (ValueLabels)

Specifies a specific ValueLabel object from the collection. Indexed by number (with 1 representing the first object in the collection).

Syntax

Property Item(Index) As ValueLabel (read-only)

See Also

ValueLabels Collection


Parent Property (ValueLabels)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

ValueLabels Collection


ValueLabels Collection Methods


Add Method (ValueLabels)

Adds a ValueLabel object to the end of the collection. Returns a ValueLabel object.

Syntax

Function Add(Value As Double, Text As String) As ValueLabel

Remarks

Part | Type | Description
Value | Double | The chart coordinate of the new Value-label.
Text | String | The text for the new Value-label.

See Also

ValueLabels Collection


Remove Method (ValueLabels)

Removes a ValueLabel object from the collection.

Syntax

Sub Remove(Index)

Remarks

Part | Type | Description
Index | Variant | An object index (with 1 representing the first element).

See Also

ValueLabels Collection


RemoveAll Method (ValueLabels)

Removes all elements in the collection.

Syntax

Sub RemoveAll()

See Also

ValueLabels Collection


View3D Object

The three-dimensional features of a chart. Note that Depth and either Elevation or Rotation must be non-zero for a three-dimensional effect to appear.


View3D Object Members

View3D Object Properties

Depth | The apparent chart depth as a percentage of chart width.
Elevation | The apparent degree of inclination of the eye-point above the X-axis.
Parent | The parent object.
Rotation | The apparent degree of rotation of the eye-point to the right of the Y-axis.
Shading | The type of shading applied to 3D areas of the chart.


View3D Object Properties

Depth Property (View3D)

Elevation Property (View3D)

Parent Property (View3D)

Rotation Property (View3D)

Shading Property (View3D)


Depth Property (View3D)

The apparent chart depth as a percentage of chart width. Valid values are from 0 to 500.

Syntax

Property Depth As Long

Example

' Set chart depth to 10

Chart2D1.ChartArea.View3D.Depth = 10

See Also

View3D Object


Elevation Property (View3D)

The apparent degree of inclination of the eye-point above the X-axis. Valid values are from 0 to 45.

Syntax

Property Elevation As Long

See Also

View3D Object


Parent Property (View3D)

The parent object.

Syntax

Property Parent As Object (read-only)

See Also

View3D Object


Rotation Property (View3D)

The apparent degree of rotation of the eye-point to the right of the Y-axis. Valid values are from 0 to 45.

Syntax

Property Rotation As Long

See Also

View3D Object


Shading Property (View3D)

The type of shading applied to 3D areas of the chart.

Syntax

Property Shading As Integer

See Also

ChartArea Object

Shading Constants

View3D Object


Event Reference

The following lists the events supported by the control (in addition to the standard events such as Click).


Event Method Members

Event Methods

Annotation | Allows full customization of axis annotations.
ModifyEnd | Notify the application that user interaction has ended.
ModifyStart | Notify the application that user interaction has started, giving the application a way to disallow it.
PlotAreaModify | Notify the application that the chart has been translated, zoomed, or scaled.
Repaint | Notify the application that a region has been repainted.
Resize | Notify the application that the chart has been resized.
View3DModify | Notify the application that the 3D effect in a chart has changed.
ZoomAxisModify | Zooms a chart, retaining the axes.


Event Methods

Annotation Event

ModifyStart Event

ModifyEnd Event

PlotAreaModify Event

Repaint Event

Resize Event

View3DModify Event

ZoomAxisModify Event


Annotation Event

Allows full customization of axis annotations.

Example

Private Sub Chart2D1_FormatAxisAnno(ByVal axis As Integer, ByVal Value As Double, Label As String, Color As stdole.OLE_COLOR)

Remarks

Part | Type | Description
axis | Integer | The number of the axis firing the event. The axis number is defined by its element number in the Chart.ChartArea.Axes collection, i.e., Chart.ChartArea.Axes(axis) = axis firing the event. This allows the user to customize the axis annotation string based upon the axis parameters - Min and Max for examples.
Value | Double | The numeric value to be annotated.
Label | String | A string representing the value to be placed in the axis annotation area. This value may be modified by the event as appropriate. The modified value will be placed in the axis annotation area.
Color | Stdole.OLE_COLOR | The foreground color used to draw the annotation text in the annotation area. This color may be different for each annotation.


ModifyStart Event

Notify the application that user interaction has started, giving the application a way to disallow it.

Remarks

Part | Type | Description
IsOK | Boolean | True if this user interaction is allowed, False if disallowed (modifiable).


ModifyEnd Event

Notify the application that user interaction has ended.


PlotAreaModify Event

Notify the application that the chart has been translated, zoomed, or scaled.

Remarks

Part | Type | Description
IsReset | Boolean | Indicates whether scaling and translation are to be reset to their default values.
Left | Long | Left margin value (modifiable).
Right | Long | Right margin value (modifiable).
Top | Long | Top margin value (modifiable).
Bottom | Long | Bottom margin value (modifiable).
IsOK | Boolean | True if this user interaction is allowed, False if disallowed (modifiable).


Repaint Event

Notify the application that a region has been repainted.

Remarks

Part | Type | Description
hDC | Long | Microsoft Windows device context handle.
Left | Long | Distance between left edge of redrawn rectangle and left edge of chart.
Top | Long | Distance between top edge of redrawn rectangle and top edge of chart.
Width | Long | Width of redrawn rectangle.
Height | Long | Height of redrawn rectangle.


Resize Event

Notify the application that the chart has been resized.

Remarks

Part | Type | Description
Width | Long | New width.
Height | Long | New height.


View3DModify Event

Notify the application that the 3D effect in a chart has changed.

Remarks

Part | Type | Description
Rotation | Long | The apparent degree of rotation of the eye-point to the right of the Y-axis (must be between 0 and 45; modifiable).
Elevation | Long | The apparent degree of inclination of the eye-point above the X-axis (must be between 0 and 45; modifiable).
IsOK | Boolean | True if this user interaction is allowed, False if disallowed (modifiable).


ZoomAxisModify Event

Zooms a chart, retaining the axes.

Remarks

Part | Type | Description
XaxisMin | Double | Minimum X axis value.
XaxisMax | Double | Maximum X axis value.
YaxisMin | Double | Minimum Y axis value.
YaxisMax | Double | Maximum Y axis value.
Y2AxisMax | Double | Maximum Y2 axis value.
IsOk | Boolean | True if this user interaction is allowed, False if disallowed (modifiable).


Constants Reference

The following provides reference information on the constants used by the 2D Chart control. The constants are listed alphabetically.


Constants Members

Action Constants

Adjust Constants

Anchor Constants

AngleUnit Constants

AnnotationMethod Constants

AnnotationPlacement Constants

AttachMethod Constants

AxisID Constants

BorderType Constants

BubbleMethod Constants

Category Constants

ChartEditorElement Constants

ChartType Constants

DataLayout Constants

Display Constants

Error Constants

FillPattern Constants

Focus Constants

Format Constants

ImageLayout Constants

LinePattern Constants

MarkerMethod Constants

NumMethod Constants

Orientation Constants

OrderCurrencySignValue Constants

OrderPercentSignValue Constants

OrderSignValue Constants

OriginPlacement Constants

Region Constants

Rotation Constants

Scale Constants

Shading Constants

Shape Constants

SortOrder Constants

Threshold Constants

TimeUnit Constants


Action Constants

Specifies a user action.

Constant | Action
oc2dActionNone | No action.
oc2dActionModifyStart | Start a user interaction
oc2dActionModifyEnd | Notify application that user interaction has ended.
oc2dActionRotate | Rotate the chart.
oc2dActionScale | Scale the chart.
oc2dActionTranslate | Translate the chart.
oc2dActionZoomStart | Start zoom.
oc2dActionZoomUpdate | Update the zoom area selection “rubberband”
oc2dActionZoomEnd | Zoom into chart at the area selected by the “rubberband”.
oc2dActionZoomAxisEnd | Zoom into chart at the area selected by the "rubberband", maintaining the axis location.
oc2dActionZoomCancel | Cancel zoom in progress.
oc2dActionReset | Restore all scaling and translations to 2D Chart defaults.
oc2dActionProperties | Display property page.


Adjust Constants

Specifies the alignment of multiple lines of text in a header or footer.

Constant | Alignment
oc2dAdjustLeft | Aligned to left edge.
oc2dAdjustRight | Aligned to right edge.
oc2dAdjustCenter | Centered.


Anchor Constants

Specifies the position of the Legend or ChartLabel object relative to the chart interior. (Note that oc2dAnchorCenter and oc2dAnchorAutomatic can only be specified for ChartLabel objects.)

Constant | Positioning
oc2dAnchorNorth | Above chart.
oc2dAnchorSouth | Below chart.
oc2dAnchorEast | To right of chart.
oc2dAnchorWest | To left of chart.
oc2dAnchorNorthWest | Above and to left of chart.
oc2dAnchorNorthEast | Above and to right of chart.
oc2dAnchorSouthWest | Below and to left of chart.
oc2dAnchorSouthEast | Below and to right of chart.
oc2dAnchorCenter | Center over attachment position (ChartLabel object only).
oc2dAnchorAuto | Use object-specified best location (ChartLabel object only).


AngleUnit Constants

Specifies the angle unit for Polar, Radar and Filled Radar charts.

Constant | Description
oc2dAngleUnitDegrees | Sets angle unit to degrees.
oc2dAngleUnitRadians | Sets angle unit to radians.
oc2dAngleUnitGrads | Sets angle unit to gradians.


AnnotationMethod Constants

Specifies the annotation method.

Constant | Description
oc2dAnnotatePointLabels | Annotate using Point-labels (X-axis only).
oc2dAnnotateTimeLabels | Annotate using Time-labels (X-axis only).
oc2dAnnotateValueLabels | Annotate using ValueLabels property.
oc2dAnnotateValues | Annotate using chart's X- or Y-values
oc2dAnnotateValuesEvent | The Annotation event is fired and the Label string passed in is preset to the string that would normally be used if the AnnotationMethod is set to Values.
oc2dAnnotateTimeLabelsEvent | The event is fired and the Label string passed in is preset to the string that would normally be used if the AnnotationMethod is set to TimeLabels.


AnnotationPlacement Constants

Specifies the placement of the axis annotation and title.

Constant | Placement
oc2dAnnotateAuto | At origin.
oc2dAnnotateMaximum | At axis maximum.
oc2dAnnotateMinimum | At axis minimum.
oc2dAnnotateOrigin | Along the origin.


AttachMethod Constants

Specifies how a chart label is attached to a chart.

Constant | Description
oc2dAttachCoord | Attach at specified pixel coordinate.
oc2dAttachDataCoord | Attach to specified data coordinates.
oc2dAttachDataIndex | Attach to specified data indices.
oc2dAttachDataIndexDataY | Attach using data index for X coordinate, and data value for Y coordinate.


AxisID Constants

Specifies a chart axis.

Constant | Axis
oc2dAxisX | X-axis.
oc2dAxisY | Y-axis.
oc2dAxisY2 | Y2-axis (second Y-axis).


BorderType Constants

Valid border styles.

Constant | Style
oc2dBorderNone |
oc2dBorder3DOut |
oc2dBorder3DIn |
oc2dBorderEtchedOut |
oc2dBorderEtchedIn |
oc2dBorderShadow |
oc2dBorderPlain |
oc2dBorderFrameIn |
oc2dBorderFrameOut |
oc2dBorderBevel |


BubbleMethod Constants

Specifies how to determine the size of the bubble at each point.

Constant | Method
oc2dBubbleDiameter | Sizes symbols according to diameter.
oc2dBubbleArea | Sizes symbols according to area.


Category Constants

Specifies the value format category.

Constant | Style
oc2dCategoryStandard | No custom formatting.
oc2dCategoryNumber | Formatted with commas 1,234.56.
oc2dCategoryCurrency | Formatted with commas and dollar signs $1,234.56.
oc2dCategoryAccounting | Formatted with commas and left-aligned dollar signs $1,234.56.
oc2dCategoryPercentage | Formatted with percent sign 12.34%.
oc2dCategoryFraction | Formatted as fraction 1,234 56/100.
oc2dCategoryScientific | Formatted to scientific notation 1.23E+03.
oc2dCategoryCustom | User specified format strings.


ChartEditorElement Constants

Specifies the Property Editor tab.

Constant | Description
oc2dceeAlarmZones | AlarmZones tab
oc2dceeAlarmZonesColors | AlarmZones tab, Colors subtab
oc2dceeAlarmZonesGeneral | AlarmZones tab, General subtab
oc2dceeControl | Control tab
oc2dceeControlGeneral | Control tab, General subtab
oc2dceeControlGeneralIsBatched | Control tab, General subtab
oc2dceeControlGeneralIsDoubleBuffered | Control tab, General subtab
oc2dceeControlGeneralLoad | Control tab, General subtab, Load button
oc2dceeControlGeneralReset | Control tab, General subtab
oc2dceeControlGeneralSave | Control tab, General subtab, Save button
oc2dceeControlBorder | Control tab, Border subtab
oc2dceeControlInterior | Control tab, Interior subtab
oc2dceeControlImage | Control tab, Image subtab
oc2dceeControlAbout | Control tab, About subtab
oc2dceeAxes | Axes tab
oc2dceeAxesGeneral | Axes tab, General subtab
oc2dceeAxesAnnotation | Axes tab, Annotation subtab
oc2dceeAxesScale | Axes tab, Scale subtab
oc2dceeAxesTitle | Axes tab, Title subtab
oc2dceeAxesGrid | Axes tab, Grid subtab
oc2dceeAxesGridStyle | Axes tab, GridStyle subtab
oc2dceeAxesFont | Axes tab, Font subtab
oc2dceeAxesPolarRadar | Axes tab, Polar/Radar subtab
oc2dceeAxesAxisStyle | Axes tab, AxisStyle subtab
oc2dceeChartGroups | ChartGroups tab
oc2dceeChartGroupsBubble | ChartGroups tab, Bubble subtab
oc2dceeChartGroupsGeneral | ChartGroups tab, General subtab
oc2dceeChartGroupsData | ChartGroups tab, Data subtab
oc2dceeChartGroupsDataEdit | ChartGroups tab, Data subtab, Edit button
oc2dceeChartGroupsDataLoad | ChartGroups tab, Data subtab, Load button
oc2dceeChartGroupsDataSave | ChartGroups tab, Data subtab, Save button
oc2dceeChartGroupsDataSeries | ChartGroups tab, Data subtab, Series button
oc2dceeChartGroupsDataSort | ChartGroups tab, Data subtab, Sort button
oc2dceeChartGroupsLabels | ChartGroups tab, Labels subtab
oc2dceeChartGroupsBinding | ChartGroups tab, Binding subtab
oc2dceeChartGroupsInternet | ChartGroups tab, Internet subtab
oc2dceeChartGroupsHiLoOpenClose | ChartGroups tab, HiLoOpenClose subtab
oc2dceeChartGroupsCandle | ChartGroups tab, Candle subtab
oc2dceeChartGroupsPolar | ChartGroups tab, Polar subtab
oc2dceeChartGroupsBar | ChartGroups tab, Bar subtab
oc2dceeChartGroupsPie | ChartGroups tab, Pie subtab
oc2dceeChartGroupsOtherSlice | ChartGroups tab, OtherSlice subtab
oc2dceeChartStyles | ChartStyles tab
oc2dceeChartStylesAdd | ChartStyles tab, Add button
oc2dceeChartStylesFillStyle | ChartStyles tab, FillStyle subtab
oc2dceeChartStylesImage | ChartStyles tab, Image subtab
oc2dceeChartStylesLineStyle | ChartStyles tab, LineStyle subtab
oc2dceeChartStylesRemove | ChartStyles tab, Remove button
oc2dceeChartStylesSlicesStyle | ChartStyles tab, SliceStyle subtab
oc2dceeChartStylesSymbolStyle | ChartStyles tab, SymbolStyle subtab
oc2dceeTitles | Titles tab
oc2dceeTitlesGeneral | Titles tab, General subtab
oc2dceeTitlesLabel | Titles tab, Label subtab
oc2dceeTitlesLocation | Titles tab, Location subtab
oc2dceeTitlesBorder | Titles tab, Border subtab
oc2dceeTitlesInterior | Titles tab, Interior subtab
oc2dceeTitlesFont | Titles tab, Font subtab
oc2dceeTitlesImage | Titles tab, Image subtab
oc2dceeView3D | View3D tab
oc2dceeView3Dgeneral | View 3D tab, General subtab
oc2dceeMarkers | Markers tab
oc2dceeMarkersGeneral | Markers tab, General subtab
oc2dceeMarkersAttach | Markers tab, Attach subtab
oc2dceeMarkersLineStyle | Markers tab, LineStyle subtab
oc2dceeLegend | Legend tab
oc2dceeLegendGeneral | Legend tab, General subtab
oc2dceeLegendLocation | Legend tab, Location subtab
oc2dceeLegendBorder | Legend tab, Border subtab
oc2dceeLegendInterior | Legend tab, Interior subtab
oc2dceeLegendFont | Legend tab, Font subtab
oc2dceeLegendImage | Legend tab, Image subtab
oc2dceeLegendTitle | Legend tab, Title subtab
oc2dceeChartArea | ChartArea tab
oc2dceeChartAreaGeneral | ChartArea tab, General subtab
oc2dceeChartAreaLocation | ChartArea tab, Location subtab
oc2dceeChartAreaBorder | ChartArea tab, Border subtab
oc2dceeChartAreaInterior | ChartArea tab, Interior subtab
oc2dceeChartAreaImage | ChartArea tab, Image subtab
oc2dceePlotArea | PlotArea tab
oc2dceePlotAreaGeneral | PlotArea tab, General subtab
oc2dceePlotAreaInterior | PlotArea tab, Interior subtab
oc2dceePlotAreaImage | PlotArea tab, Image subtab
oc2dceeChartLabels | ChartLabels tab
oc2dceeChartLabelsGeneral | ChartLabels tab, General subtab
oc2dceeChartLabelsLabel | ChartLabels tab, Label subtab
oc2dceeChartLabelsBorder | ChartLabels tab, Border subtab
oc2dceeChartLabelsInterior | ChartLabels tab, Interior subtab
oc2dceeChartLabelsFont | ChartLabels tab, Font subtab
oc2dceeChartLabelsLocation | ChartLabels tab, Location subtab
oc2dceeChartLabelsImage | ChartLabels tab, Image subtab


ChartType Constants

Specifies the chart display type.

Constant | Display Type
oc2dTypePlot | Plot
oc2dTypeBar | Bar chart
oc2dTypePie | Pie chart
oc2dTypeStackingBar | Stacking bar chart
oc2dTypeArea | Area chart
oc2dTypeHiLo | HiLo chart
oc2dTypeHiLoOpenClose | HiLoOpenClose chart
oc2dTypeCandle | Candle Chart
oc2dTypePolar | Polar Chart
oc2dTypeRadar | Radar Chart
oc2dTypeFilledRadar | Filled Radar Chart
oc2dTypeBubble | Bubble Chart


DataLayout Constants

Specifies the layout of the data to be graphed.

Constant | Description
oc2dDataArray | Array data
oc2dDataGeneral | General data


Display Constants

Sets the display properties for a series.

Constant | Description
oc2dDisplayShow | Displays series.
oc2dDisplayHide | Includes series in the data set, but is not drawn.
oc2dDisplayExclude | Excludes series from the data set.


Error Constants

Specifies the error detected by the chart.

Constant | Description
ocErrorBadArrayDimensions | Wrong dimensions in SafeArray passed to a function.
ocErrorDllNotCompatible | DLL Version is not compatible.
ocErrorInvalidIndex | Invalid index found in variant.
ocErrorInvalidFormat | Invalid custom format.
ocErrorNotConnected | Object does not have a parent.
ocErrorReadOnly | Property is read-only and cannot be modified.
ocErrorOutOfRange | Numeric value is out of range.
ocErrorInvalidEnum | Invalid enumerated value for property.
ocErrorInvalidValue | Invalid value for property.
ocErrorNoSuchProperty | Property does not exist for this instance of the object
ocErrorDuplicateValue | Collection already contains a duplicate value.
ocErrorNoSuchItem | Cannot find item in collection
ocErrorCannotCreateObject | Cannot create object.
ocErrorSeriesArrayNotOne | Series index must be 1 for Array data layout.
ocErrorTypeMismatch | Property set to wrong object Type.
ocErrorReadOnlyWhenBound | Property is read-only when the chart group is bound to an external database.


FillPattern Constants

Valid fill patterns.

Constant | Pattern
oc2dFillNone |
oc2dFillSolid |
oc2dFill25Percent |
oc2dFill50Percent |
oc2dFill75Percent |
oc2dFillHorizontalStripe |
oc2dFillVerticalStripe |
oc2dFill45DegreeStripe |
oc2dFill135DegreeStripe |
oc2dFillDiagHatched |
oc2dFillCrossHatched |
oc2dFillBackwardDiagonal |
oc2dFillCross |
oc2dFillDiagonalCross |
oc2dFillForwardDiagonal |
oc2dFillHorizontal |
oc2dFillVertical |


Focus Constants

Specifies how the nearest series and point value are determined.

Constant | Description
oc2dFocusX | Use X-axis to determine closest value.
oc2dFocusY | Use Y-axis to determine closest value.
oc2dFocusXY | Use both axes to determine closest value.


Format Constants

Specifies the format to use when printing.

Constant | Description
oc2dFormatBitmap | Bitmap (.BMP)
oc2dFormatMetafile | Metafile (.WMF)
oc2dFormatEnhMetafile | Enhanced metafile (.EMF)
oc2dFormatStandardMetafile | Standard Metafile (.WMF)


ImageLayout Constants

Valid image file layouts.

Constant | Description
oc2dImageCentered | Image is centered.
oc2dImageTiled | Image is tiled.
oc2dImageFitted | Image is resized to fit as much of the area as possible, while maintaining the aspect ratio.
oc2dImageStretched | Image is resized to fit the entire area.
oc2dImageStretchedToWidth | Image is stretched to fit the area width.
oc2dImageStretchedToHeight | Image is stretched to fit the area height.
oc2dImageCropFitted | Image is fitted to the smaller of the two dimensions.


LinePattern Constants

Valid line patterns.

Constant | Style
oc2dLineNone |
oc2dLineSolid |
oc2dLineLongDash |
oc2dLineDotted |
oc2dLineIntegerDash |
oc2dLineLongIntegerLongDash |
oc2dLineDashDot |


MarkerMethod Constants

Specifies the marker positioning method used.

Constant | Description
oc2dMarkerDataCoord | Specify position in data coordinates.
oc2dMarkerDataIndex | Specify position as an index into a data set.


NumMethod Constants

Specifies the method used to calculate axis numbering.

Constant | Numbering
oc2dNumPrecision | Use current value of axis precision.
oc2dNumRound | Use rounded numbers (most significant digit is 1, 2 or 5).


Orientation Constants

Specifies orientation.

Constant | Description
oc2dOrientVertical | Vertical orientation.
oc2dOrientHorizontal | Horizontal orientation.


OrderCurrencySignValue Constants

Specifies the order of the currency sign, symbol and style.

Constant | Order
oc2docsvValueSignCurrency | Value, Sign, Currency "123.45-$"
oc2docsvSignValueCurrency | Sign, Value, Currency "-123.45$"
oc2docsvValueCurrencySign | Value, Currency, Sign "123.45$-"
oc2docsvSignCurrencyValue | Sign, Currency, Value "-$123.45"
oc2docsvCurrencyValueSign | Currency, Value, Sign "$123.45-"
oc2docsvCurrencySignValue | Currency, Sign, Value "$-123.45"


OrderPercentSignValue Constants

Specifies the order of the percent sign, symbol and style.

Constant | Order
oc2docsvValueSignPercent | Value, Sign, Percent "23.45-%"
oc2docsvSignValuePercent | Sign, Value, Percent "-23.45%"
oc2docsvValuePercentSign | Value, Percent, Sign "23.45%-"
oc2docsvSignPercentValue | Sign, Percent, Value "-%23.45"
oc2docsvPercentValueSign | Percent, Value, Sign "%23.45-"
oc2docsvPercentSignValue | Percent, Sign, Value "%-23.45"


OrderSignValue Constants

Specifies the order and value of the negative sign.

Constant | Description
oc2doscValueSign | Places the value before the negative sign "123.45-"
oc2dosvSignValue | Places the negative sign before the value "-123.45"


OriginPlacement Constants

Specifies the location of the origin.

Constant | Location
oc2dOriginAuto | Origin at axis minimum if chart is a plot or area chart and data is either all positive or all negative; origin at zero otherwise.
oc2dOriginMaximum | Origin at axis maximum.
oc2dOriginMinimum | Origin at axis minimum.
oc2dOriginZero | Origin at zero.


Region Constants

Specifies a region of a chart.

Constant | Region
oc2dRegionInChartArea | Located in chart area (main body of chart).
oc2dRegionInLegend | Located in legend.
oc2dRegionInHeader | Located in header.
oc2dRegionInFooter | Located in footer.
oc2dRegionNone | None of the above.


Rotation Constants

Specifies an angle of rotation (in counterclockwise degrees).

Constant | Angle of Rotation
oc2dRotateNone | No rotation.
oc2dRotate90Degrees | Rotate 90 degrees.
oc2dRotate270Degrees | Rotate 270 degrees.


Scale Constants

Specifies the scaling to use when printing.

Constant | Description
oc2dScaleNone | Same size as actual chart.
oc2dScaleToWidth | Scale to specified width, preserving aspect ratio.
oc2dScaleToHeight | Scale to specified height, preserving aspect ratio.
oc2dScaleToFit | Scale to existing window (minimum of height and width), preserving aspect ratio.
oc2dScaleToMax | Enlarge to size of page.


Shading Constants

Specifies the shading method for the 3D areas in graphs.

Constant | Description
oc2dShadingColor | 3D color is created by a darker version of the front color.
oc2dShadingDithered | 3D color is created by dithering the front color.
oc2dShadingNone | No special 3D color is applied.


Shape Constants

Valid symbol shapes.

Constant | Shape
oc2dShapeNone |
oc2dShapeDot |
oc2dShapeBox |
oc2dShapeTriangle |
oc2dShapeDiamond |
oc2dShapeStar |
oc2dShapeVerticalLine |
oc2dShapeHorizontalLine |
oc2dShapeCross |
oc2dShapeCircle |
oc2dShapeSquare |
oc2dShapeInvertTriangle |
oc2dShapeDiagonalCross |
oc2dShapeOpenTriangle |
oc2dShapeOpenDiamond |
oc2dShapeOpenInvertTriangle |


SortOrder Constants

Specifies the order in which pie slices should be displayed.

Constant | Slice Order
oc2dSortOrderDescending | Descending order.
oc2dSortOrderAscending | Ascending order.
oc2dSortOrderNone | Data order.


Threshold Constants

Specifies the method used to determine which point values will be grouped into the "other" slice in pie charts. The value of the ThresholdValue property is used when grouping.

Constant | Description
oc2dThresholdSliceCutoff | Group all values whose individual percentage is less than ThresholdValue.
oc2dThresholdPercentile | Group values whose total percentage is less than ThresholdValue.


TimeUnit Constants

Specifies the time unit to use in a time-axis.

Constant | Time Unit
oc2dTimeSeconds | Seconds
oc2dTimeMinutes | Minutes
oc2dTimeHours | Hours
oc2dTimeDays | Days
oc2dTimeWeeks | Weeks
oc2dTimeMonths | Months
oc2dTimeYears | Years