265
Version 2.0.8.2 [02/21/02 3:26 PM] The Standard in Industrial Automation and Scientific Components for Real-Time Applications Plot Pack Manual Version 2.0

Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Version 2.0.8.2 [02/21/02 3:26 PM]

The Standard in Industrial Automation and Scientific Components for Real-Time Applications

Plot Pack ManualVersion 2.0

Page 2: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Copyright

Iocomp Components – Plot Pack Manualii

This page intentionally left blank

Page 3: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Copyright

Iocomp Components – Plot Pack Manual iii

Author Patrick CarrollTechnical Reviewer Todd OsterProofreader Cyrus Edson

Copyright

Copyright 1998-2002 Iocomp Software Incorporated. All rights reserved.

Portions of the software described in this document copyright Microsoft Corporation, BorlandCorporation, and Linus Torvalds. All Rights Reserved.

NO PART OF THIS PUBLICATION MAY BE REPRODUCED, STORED IN A RETRIEVALSYSTEM OR TRANSMITTED BY ANY MEANS, ELECTRONIC, MECHANICAL,PHOTOCOPYING, RECORDING, OR OTHERWISE, WITHOUT WRITTEN PERMISSION FROMTHE PUBLISHER. EXCEPT FOR THE LIMITED WARRANTY AS DESCRIBED IN THE ENDUSER LICENSE AGREEMENT, THE INFORMATION AND MATERIAL CONTAINED IN THISBOOK ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTY CONCERNING THEACCURACY, ADEQUACY, OR COMPLETENESS OF SUCH INFORMATION OR MATERIAL ORTHE RESULTS TO BE OBTAINED FROM USING SUCH INFORMATION OR MATERIALCONTAINED WITHIN THIS MANUAL OR DOCUMENTATION. NEITHER IOCOMPSOFTWARE NOR THE AUTHOR SHALL BE RESPONSIBLE FOR ANY CLAIMSATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER INACCURACIES IN THEINFORMATION OR MATERIAL CONTAINED IN THIS BOOK, AND IN NO EVENT SHALLIOCOMP SOFTWARE OR THE AUTHOR BE LIABLE FOR DIRECT, INDIRECT, SPECIAL,INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF SUCHINFORMATION OR MATERIAL. SOME STATES DO NOT ALLOW LIMITATIONS OFDURATION OF ANY IMPLIED WARRANTY, SO THE ABOVE LIMITATIONS MAY NOTAPPLY TO YOU.

TrademarksIocomp and the Iocomp Logo are registered trademarks of Iocomp Software Incorporated. Microsoft,Visual Basic, Visual C++, Visual FoxPro, Windows, Microsoft Office, and ActiveX are trademarks orregistered trademarks of Microsoft Corporation. Borland, Delphi, Kylix, C++ Builder, VCL, and CLXare trademarks or registered trademarks of the Borland Corporation. Linux is a registered trademark ofLinus Torvalds. All other names, products, or marks are trademarks or registered trademarks of theirrespective companies.

Initial Printing 03/2001

Manufactured in the United States of America

Page 4: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualiv

Table of Contents

COPYRIGHT -------------------------------------------------------------------------------------------------------- III

TRADEMARKS----------------------------------------------------------------------------------------------------- III

TABLE OF CONTENTS ------------------------------------------------------------------------------------------ IV

CHAPTER 1 - INTRODUCTION--------------------------------------------------------------------------------- 1VISUAL C++ SPECIAL COMPILER NOTE --------------------------------------------------------------------------- 2BORLAND DELPHI, KYLIX, AND C++ BUILDER SPECIAL COMPILER NOTE------------------------------------ 3COMPONENT NAMING CONVENTIONS------------------------------------------------------------------------------ 3SOURCE CODE UNIT NAMING CONVENTIONS --------------------------------------------------------------------- 3

CHAPTER 2 - DECIDING WHICH COMPONENT TO USE --------------------------------------------- 4IPLOT ------------------------------------------------------------------------------------------------------------------- 5

Properties----------------------------------------------------------------------------------------------------------- 6Depreciated Properties ------------------------------------------------------------------------------------------- 6Methods ------------------------------------------------------------------------------------------------------------- 7Events---------------------------------------------------------------------------------------------------------------- 7

IXYPLOT--------------------------------------------------------------------------------------------------------------- 8Properties----------------------------------------------------------------------------------------------------------- 9Depreciated Properties ------------------------------------------------------------------------------------------- 9Methods ----------------------------------------------------------------------------------------------------------- 10Events-------------------------------------------------------------------------------------------------------------- 10

CHAPTER 3 - OVERALL THEORY -------------------------------------------------------------------------- 11SPECIFIC EXAMPLES: ----------------------------------------------------------------------------------------------- 12

Visual Basic/VBA/VBScript ------------------------------------------------------------------------------------ 12Visual C++ ------------------------------------------------------------------------------------------------------- 12C++ Builder------------------------------------------------------------------------------------------------------ 13Delphi/Kylix ------------------------------------------------------------------------------------------------------ 13

PLOT OBJECTS------------------------------------------------------------------------------------------------------- 13PLOT OBJECT INDEX------------------------------------------------------------------------------------------------ 13PLOT OBJECT NAME------------------------------------------------------------------------------------------------ 14GET PLOT OBJECT INDEX BY NAME------------------------------------------------------------------------------ 14GET PLOT OBJECT NAME BY INDEX ------------------------------------------------------------------------------ 14

CHAPTER 4 - AXES ----------------------------------------------------------------------------------------------- 15SPAN------------------------------------------------------------------------------------------------------------------ 16MIN AND MAX ------------------------------------------------------------------------------------------------------ 16ROTATED AXES ----------------------------------------------------------------------------------------------------- 17LABEL FORMATS---------------------------------------------------------------------------------------------------- 17

Simple Values---------------------------------------------------------------------------------------------------- 17Exponential Values --------------------------------------------------------------------------------------------- 17

Page 5: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manual v

Prefix Values -----------------------------------------------------------------------------------------------------17Date/Time Values ------------------------------------------------------------------------------------------------17Price32nds---------------------------------------------------------------------------------------------------------17

REVERSE SCALES ----------------------------------------------------------------------------------------------------18SCALE TYPES---------------------------------------------------------------------------------------------------------18

Linear --------------------------------------------------------------------------------------------------------------18Logarithmic Base 10 ---------------------------------------------------------------------------------------------18

LABELSEPARATION--------------------------------------------------------------------------------------------------19LABELSMARGIN -----------------------------------------------------------------------------------------------------19LABELSMINLENGTH ------------------------------------------------------------------------------------------------20LABELSMINLENGTHAUTOADJUST --------------------------------------------------------------------------------21STACKINGENDSMARGIN--------------------------------------------------------------------------------------------21TRACKING ------------------------------------------------------------------------------------------------------------22USER INTERFACE ----------------------------------------------------------------------------------------------------22CUSTOMIZING TICK LABELS----------------------------------------------------------------------------------------23

Visual Basic Example --------------------------------------------------------------------------------------------23Visual C++ Example---------------------------------------------------------------------------------------------24

PROPERTIES-----------------------------------------------------------------------------------------------------------25METHODS -------------------------------------------------------------------------------------------------------------25EVENTS----------------------------------------------------------------------------------------------------------------25

CHAPTER 5 - DATA VIEW --------------------------------------------------------------------------------------26CHANNELS ------------------------------------------------------------------------------------------------------------27ANNOTATIONS -------------------------------------------------------------------------------------------------------27DATA CURSORS ------------------------------------------------------------------------------------------------------28LIMITS-----------------------------------------------------------------------------------------------------------------28LAYER ORDER--------------------------------------------------------------------------------------------------------29GRIDS -----------------------------------------------------------------------------------------------------------------29MAJOR AND MINOR LINES------------------------------------------------------------------------------------------30STACKED AXES AND GRID LINES----------------------------------------------------------------------------------31PROPERTIES-----------------------------------------------------------------------------------------------------------33METHODS -------------------------------------------------------------------------------------------------------------33EVENTS----------------------------------------------------------------------------------------------------------------33

CHAPTER 6 - CHANNELS ---------------------------------------------------------------------------------------34TRACE LINES ---------------------------------------------------------------------------------------------------------35DATA MARKERS -----------------------------------------------------------------------------------------------------36INDIVIDUAL DATA MARKERS --------------------------------------------------------------------------------------36CHANNEL FILL -------------------------------------------------------------------------------------------------------37TRACKING ------------------------------------------------------------------------------------------------------------37RING BUFFER---------------------------------------------------------------------------------------------------------38DIGITAL CHANNEL SUPPORT ---------------------------------------------------------------------------------------38ASYNCHRONOUS AND SYNCHRONOUS DATA --------------------------------------------------------------------39CHANNEL DATA LOGGING------------------------------------------------------------------------------------------40FASTDRAW -----------------------------------------------------------------------------------------------------------40

iPlot Component Channel: iPlotChannel: --------------------------------------------------------------------43iXYPlot Component Channel: iPlotXYChannel: -------------------------------------------------------------45

Page 6: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualvi

PROPERTIES---------------------------------------------------------------------------------------------------------- 46METHODS ------------------------------------------------------------------------------------------------------------ 46EVENTS--------------------------------------------------------------------------------------------------------------- 46

CHAPTER 7 - LEGEND ------------------------------------------------------------------------------------------ 47PREDEFINED COLUMNS -------------------------------------------------------------------------------------------- 48TURN ON AND OFF COLUMN TITLES ----------------------------------------------------------------------------- 49PROPERTIES---------------------------------------------------------------------------------------------------------- 49METHODS ------------------------------------------------------------------------------------------------------------ 49EVENTS--------------------------------------------------------------------------------------------------------------- 49

CHAPTER 8 - TOOLBAR ---------------------------------------------------------------------------------------- 50CONFIGURE INDIVIDUAL BUTTONS ------------------------------------------------------------------------------- 51IMPLEMENTED EXTERNALLY -------------------------------------------------------------------------------------- 51BUTTON DESCRIPTIONS -------------------------------------------------------------------------------------------- 51

Resume Button --------------------------------------------------------------------------------------------------- 51Pause Button ----------------------------------------------------------------------------------------------------- 51Axes Scroll Mode Button --------------------------------------------------------------------------------------- 51Axes Zoom Mode Button---------------------------------------------------------------------------------------- 51Zoom In Button--------------------------------------------------------------------------------------------------- 52Zoom Out Button------------------------------------------------------------------------------------------------- 52Select Button------------------------------------------------------------------------------------------------------ 52Zoom Box Button ------------------------------------------------------------------------------------------------ 52Cursor Button ---------------------------------------------------------------------------------------------------- 52Edit Button-------------------------------------------------------------------------------------------------------- 52Copy Button ------------------------------------------------------------------------------------------------------ 52Save Button ------------------------------------------------------------------------------------------------------- 53Print Button------------------------------------------------------------------------------------------------------- 53

PROPERTIES---------------------------------------------------------------------------------------------------------- 53METHODS ------------------------------------------------------------------------------------------------------------ 53EVENTS--------------------------------------------------------------------------------------------------------------- 53

CHAPTER 9 - ANNOTATIONS -------------------------------------------------------------------------------- 54ANNOTATION TYPES------------------------------------------------------------------------------------------------ 55

Text ---------------------------------------------------------------------------------------------------------------- 55Line ---------------------------------------------------------------------------------------------------------------- 55Rectangle---------------------------------------------------------------------------------------------------------- 55LineX -------------------------------------------------------------------------------------------------------------- 56LineY--------------------------------------------------------------------------------------------------------------- 56

ANNOTATION REFERENCE RELATIONSHIPS---------------------------------------------------------------------- 57DataView Reference--------------------------------------------------------------------------------------------- 57Channel Reference ---------------------------------------------------------------------------------------------- 57

MOVEABLE ANNOTATIONS ---------------------------------------------------------------------------------------- 58HOW TO ADD ANNOTATIONS-------------------------------------------------------------------------------------- 58

Text Annotation Example--------------------------------------------------------------------------------------- 58Line Annotation Example--------------------------------------------------------------------------------------- 58Rectangle Annotation Example -------------------------------------------------------------------------------- 59

Page 7: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manual vii

LineX Example ----------------------------------------------------------------------------------------------------59LineY Example ----------------------------------------------------------------------------------------------------59

HOW TO REMOVE ANNOTATIONS----------------------------------------------------------------------------------59ANNOTATION CLICK EVENT----------------------------------------------------------------------------------------60PROPERTIES-----------------------------------------------------------------------------------------------------------60METHODS -------------------------------------------------------------------------------------------------------------60EVENTS----------------------------------------------------------------------------------------------------------------60

CHAPTER 10 – DATA CURSORS ------------------------------------------------------------------------------61CURSOR TYPES-------------------------------------------------------------------------------------------------------61

Value X-Y Cursor [ValueXY] -----------------------------------------------------------------------------------61Value X Cursor [ValueX] ---------------------------------------------------------------------------------------62Value Y Cursor [ValueY]----------------------------------------------------------------------------------------62Period Cursor [DeltaX] -----------------------------------------------------------------------------------------63Peak-Peak Cursor [DeltaY] ------------------------------------------------------------------------------------63Frequency Cursor [InverseDeltaX]----------------------------------------------------------------------------64

ADDING AND REMOVING CURSORS -------------------------------------------------------------------------------64Data Cursor Example--------------------------------------------------------------------------------------------65

ACCESSING INDIVIDUAL CURSOR PROPERTIES-------------------------------------------------------------------65Controlling User Popup Menu ---------------------------------------------------------------------------------65Controlling Hints -------------------------------------------------------------------------------------------------65Controlling Cursor Pointers ------------------------------------------------------------------------------------65

IPLOT COMPONENT SPECIFIC NOTES ------------------------------------------------------------------------------65IXYPLOT COMPONENT SPECIFIC NOTES--------------------------------------------------------------------------66CURSOR EVENTS -----------------------------------------------------------------------------------------------------66PROPERTIES-----------------------------------------------------------------------------------------------------------67METHODS -------------------------------------------------------------------------------------------------------------67EVENTS----------------------------------------------------------------------------------------------------------------67

CHAPTER 11 - LIMITS--------------------------------------------------------------------------------------------68LINEX -----------------------------------------------------------------------------------------------------------------68LINEY -----------------------------------------------------------------------------------------------------------------69BANDX----------------------------------------------------------------------------------------------------------------69BANDY----------------------------------------------------------------------------------------------------------------70POLYBANDX ---------------------------------------------------------------------------------------------------------70PLOYBANDY ---------------------------------------------------------------------------------------------------------71ADDING AND REMOVING LIMITS ----------------------------------------------------------------------------------71

Single-Line Limit Examples-------------------------------------------------------------------------------------72Band Limit Examples --------------------------------------------------------------------------------------------72Poly Band Limit Examples --------------------------------------------------------------------------------------72

PROPERTIES-----------------------------------------------------------------------------------------------------------74METHODS -------------------------------------------------------------------------------------------------------------74EVENTS----------------------------------------------------------------------------------------------------------------74

CHAPTER 12 - LABELS ------------------------------------------------------------------------------------------75HOW TO ADD LABELS-----------------------------------------------------------------------------------------------76

Horizontal Label Example --------------------------------------------------------------------------------------76

Page 8: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualviii

Vertical Label Example----------------------------------------------------------------------------------------- 76HOW TO REMOVE LABELS ----------------------------------------------------------------------------------------- 76PROPERTIES---------------------------------------------------------------------------------------------------------- 77METHODS ------------------------------------------------------------------------------------------------------------ 77EVENTS--------------------------------------------------------------------------------------------------------------- 77

CHAPTER 13 - VISUAL LAYOUT MANAGER------------------------------------------------------------ 78TUTORIAL------------------------------------------------------------------------------------------------------------ 79

How to Move Objects ------------------------------------------------------------------------------------------- 79Resizing Plot Objects-------------------------------------------------------------------------------------------- 81How to Stack Axes ----------------------------------------------------------------------------------------------- 83Rotating X and Y-Axes ------------------------------------------------------------------------------------------ 85

CHAPTER 14 - ADDING DATA -------------------------------------------------------------------------------- 86ADDXY -------------------------------------------------------------------------------------------------------------- 86

Complete AddXY Example ------------------------------------------------------------------------------------- 86Visual Basic------------------------------------------------------------------------------------------------------------------------------------------- 86Visual C++ [Disp Inteface] ------------------------------------------------------------------------------------------------------------------------- 87Visual C++ [High-Speed iDispatch Interface] --------------------------------------------------------------------------------------------------- 87C++ Builder------------------------------------------------------------------------------------------------------------------------------------------- 88Delphi/Kylix ------------------------------------------------------------------------------------------------------------------------------------------ 89Internet Explorer [Client-Side, VBScript] -------------------------------------------------------------------------------------------------------- 89

Special ActiveX Example: -------------------------------------------------------------------------------------- 90Visual Basic------------------------------------------------------------------------------------------------------------------------------------------- 91Visual C++ [Disp Interface] ------------------------------------------------------------------------------------------------------------------------ 91Visual C++ [High-Speed iDispatch Interface] --------------------------------------------------------------------------------------------------- 92Internet Explorer [Client-Side, VBScript] -------------------------------------------------------------------------------------------------------- 93

OTHER DATA ADDING METHODS--------------------------------------------------------------------------------- 93ADDYELAPSEDSECONDS ------------------------------------------------------------------------------------------ 94ADDYELAPSEDTIME ----------------------------------------------------------------------------------------------- 94ADDYNOW ---------------------------------------------------------------------------------------------------------- 94ADDXYARRAYS ---------------------------------------------------------------------------------------------------- 95ADDEMPTY ---------------------------------------------------------------------------------------------------------- 95ADDXNULL [IPLOTX COMPONENT ONLY]----------------------------------------------------------------------- 95ADDNULL [IXYPLOTX COMPONENT ONLY] -------------------------------------------------------------------- 96MODIFYING/READING DATA -------------------------------------------------------------------------------------- 96RUNNING Y-VALUE MIN, MAX, AND MEAN -------------------------------------------------------------------- 97EMPTY DATA POINTS----------------------------------------------------------------------------------------------- 98

CHAPTER 15 - NULL DATA HANDLING ------------------------------------------------------------------ 99ADDING A NULL Y DATA POINT AT A SPECIFIC X DATA POINT (IPLOT ONLY) ---------------------------- 99ADDING A NULL X & Y DATA (IXYPLOT ONLY) -------------------------------------------------------------- 99SETTING A NULL Y DATA POINT AT A SPECIFIC X DATA POINT -------------------------------------------- 100FULL SOURCE EXAMPLE ------------------------------------------------------------------------------------------ 100

Visual Basic ----------------------------------------------------------------------------------------------------- 101Visual C++ [Disp Inteface]----------------------------------------------------------------------------------- 101Visual C++ [High-Speed iDispatch Inteface] ------------------------------------------------------------- 102Delphi/Kylix ----------------------------------------------------------------------------------------------------- 103C++ Builder----------------------------------------------------------------------------------------------------- 103

Page 9: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manual ix

Internet Explorer ----------------------------------------------------------------------------------------------- 104

CHAPTER 16 - USER INTERFACE CONTROL---------------------------------------------------------- 105THE BUILT-IN TOOLBAR ------------------------------------------------------------------------------------------ 105SCROLLABLE AND ZOOMABLE AXES---------------------------------------------------------------------------- 106ZOOMING TOOLS--------------------------------------------------------------------------------------------------- 106SELECT TOOL------------------------------------------------------------------------------------------------------- 106CURSOR TOOL------------------------------------------------------------------------------------------------------ 106CONTEXT SENSITIVE RIGHT-CLICK MENUS (POPUP MENUS) ------------------------------------------------ 107

Axis Object ------------------------------------------------------------------------------------------------------ 107DataView Object------------------------------------------------------------------------------------------------ 107Toolbar Object -------------------------------------------------------------------------------------------------- 107Legend Object--------------------------------------------------------------------------------------------------- 107DataCursor Object --------------------------------------------------------------------------------------------- 107

RUNTIME PROPERTY EDITOR------------------------------------------------------------------------------------- 108Right-Click on Plot Object ------------------------------------------------------------------------------------ 108Preventing or Disabling UI Interaction --------------------------------------------------------------------- 108

Disabling All UI Interaction on a Plot Object-------------------------------------------------------------------------------------------------- 108Disabling Popup Menu on a Plot Object or On Entire Component ------------------------------------------------------------------------- 109

Toolbar Runtime Property Editor Button ------------------------------------------------------------------- 109

CHAPTER 17 - TRACKING------------------------------------------------------------------------------------ 110TRACKING STYLES------------------------------------------------------------------------------------------------- 111

ScaleMinMax [Y-Axis Default] ------------------------------------------------------------------------------- 111ScaleMax--------------------------------------------------------------------------------------------------------- 112ScaleMin --------------------------------------------------------------------------------------------------------- 112ScrollSmooth [X-Axis Default] ------------------------------------------------------------------------------- 112Scroll Page ------------------------------------------------------------------------------------------------------ 112ExpandCollapse ------------------------------------------------------------------------------------------------ 112

TRACKING ALIGN FIRST STYLES--------------------------------------------------------------------------------- 113Min---------------------------------------------------------------------------------------------------------------- 113Max --------------------------------------------------------------------------------------------------------------- 113Auto--------------------------------------------------------------------------------------------------------------- 114None [All Axis Default]---------------------------------------------------------------------------------------- 114

TRACKING SCROLL COMPRESS MAX---------------------------------------------------------------------------- 114ENABLING AND DISABLING TRACKING ------------------------------------------------------------------------- 115

Channel Tracking Properties --------------------------------------------------------------------------------- 116Axis Tracking Properties -------------------------------------------------------------------------------------- 116User Interaction ------------------------------------------------------------------------------------------------ 116Manual Tracking ----------------------------------------------------------------------------------------------- 116

CHAPTER 18 - INTERPOLATION--------------------------------------------------------------------------- 117NONE ---------------------------------------------------------------------------------------------------------------- 117STRAIGHT LINE ---------------------------------------------------------------------------------------------------- 118CUBIC SPLINE ------------------------------------------------------------------------------------------------------ 119POLYNOMIAL------------------------------------------------------------------------------------------------------- 120RATIONAL ---------------------------------------------------------------------------------------------------------- 121

Page 10: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualx

DIFFERENTIAL------------------------------------------------------------------------------------------------------ 122

CHAPTER 19 - LOADING AND SAVING DATA--------------------------------------------------------- 123DATA FORMATS---------------------------------------------------------------------------------------------------- 123

SaveDataToFile------------------------------------------------------------------------------------------------- 123LoadDataFromFile--------------------------------------------------------------------------------------------- 124SavePropertiesToFile ------------------------------------------------------------------------------------------ 124LoadPropertiesFromFile -------------------------------------------------------------------------------------- 125

DATA LOG FORMATS ---------------------------------------------------------------------------------------------- 125LogFileName ---------------------------------------------------------------------------------------------------- 125LogBufferSize --------------------------------------------------------------------------------------------------- 125LogActivate ------------------------------------------------------------------------------------------------------ 126LogDeactivate--------------------------------------------------------------------------------------------------- 126

ADDDATAARRAY EXAMPLE ------------------------------------------------------------------------------------- 126IMAGE FORMATS--------------------------------------------------------------------------------------------------- 127

CHAPTER 20 - GRAPHICAL EXPORT--------------------------------------------------------------------- 128ENHANCED METAFILEFORMAT---------------------------------------------------------------------------------- 128BITMAP-------------------------------------------------------------------------------------------------------------- 128JPEG ---------------------------------------------------------------------------------------------------------------- 128PNG ----------------------------------------------------------------------------------------------------------------- 129GETBYTESJPEG METHOD---------------------------------------------------------------------------------------- 129

CHAPTER 21 - PRINTING ------------------------------------------------------------------------------------- 130PRINTING OPTIONS ------------------------------------------------------------------------------------------------ 130

Page Orientation ----------------------------------------------------------------------------------------------- 130Printer Dialog--------------------------------------------------------------------------------------------------- 130Margins ---------------------------------------------------------------------------------------------------------- 131

SIMPLE CHART PRINT --------------------------------------------------------------------------------------------- 131USING WITH EXTERNAL REPORTING PACKAGES OR CUSTOM CODE ---------------------------------------- 131

Clipboard Transfer --------------------------------------------------------------------------------------------- 132IPictureDisp Object Transfer --------------------------------------------------------------------------------- 132Save to Enhanced Metafile ------------------------------------------------------------------------------------ 132

PRINTING TIPS------------------------------------------------------------------------------------------------------ 132

CHAPTER 22 - AUTOSCALE AND AUTOLABEL------------------------------------------------------- 1331-2-5 RULE --------------------------------------------------------------------------------------------------------- 133MODIFYING THE 1-2-5 RULE ------------------------------------------------------------------------------------- 136

DesiredIncrement----------------------------------------------------------------------------------------------- 136Desired Start ---------------------------------------------------------------------------------------------------- 137

TRACKING ---------------------------------------------------------------------------------------------------------- 137

CHAPTER 23 - VISUAL C++ DISP VS. IDISPATCH INTERFACE --------------------------------- 138DISP INTERFACE [LATE BINDING] ------------------------------------------------------------------------------- 138IDISPATCH INTERFACE [EARLY BINDING] ---------------------------------------------------------------------- 139

CHAPTER 24 - USING WITH DATABASE ---------------------------------------------------------------- 141

Page 11: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manual xi

INTEGRATED TEXT FILE SAVING AND LOADING--------------------------------------------------------------- 141SIMPLE X AND Y DATA------------------------------------------------------------------------------------------- 141TIME/DATE X AND Y DATA-------------------------------------------------------------------------------------- 141ADDING VERY LARGE AMOUNTS OF DATA TO THE CHART-------------------------------------------------- 142

CHAPTER 25 - LAYOUT CONTROL THROUGH CODE --------------------------------------------- 143LAYOUT MANAGER------------------------------------------------------------------------------------------------ 143LAYOUT OBJECT ZORDER ---------------------------------------------------------------------------------------- 143LAYOUT OBJECT STARTPERCENT AND STOPPERCENT-------------------------------------------------------- 144

Horizontal Layout Object ------------------------------------------------------------------------------------- 144Vertical Layout Object----------------------------------------------------------------------------------------- 144DataViewZVert ------------------------------------------------------------------------------------------------- 145DataViewZHorz------------------------------------------------------------------------------------------------- 145

TOOLBAR AND LEGEND ------------------------------------------------------------------------------------------- 146X AND Y-AXES ---------------------------------------------------------------------------------------------------- 146

StackingEndsMargin ------------------------------------------------------------------------------------------- 146LAYOUT OBJECT HORIZONTAL ---------------------------------------------------------------------------------- 147FULL LAYOUT THROUGH CODE EAMPLE ----------------------------------------------------------------------- 149

Visual Basic/VBA/VBScript ----------------------------------------------------------------------------------- 150DELPHI/KYLIX ----------------------------------------------------------------------------------------------------- 151

Visual C++ [Disp Interface] --------------------------------------------------------------------------------- 152Visual C++ [High-Speed iDispatch Inteface] ------------------------------------------------------------- 153C++ Builder----------------------------------------------------------------------------------------------------- 155

CHAPTER 26 - PERFORMANCE TUNING---------------------------------------------------------------- 156COMPONENT SIZE-------------------------------------------------------------------------------------------------- 156FRAME RATE ------------------------------------------------------------------------------------------------------- 156

AutoFrameRate ------------------------------------------------------------------------------------------------- 157UpdateFrameRate ---------------------------------------------------------------------------------------------- 157BeginUpdate----------------------------------------------------------------------------------------------------- 158EndUpdate------------------------------------------------------------------------------------------------------- 158

SYSTEM HARDWARE ---------------------------------------------------------------------------------------------- 158Processor -------------------------------------------------------------------------------------------------------- 158Memory ---------------------------------------------------------------------------------------------------------- 159Video Card ------------------------------------------------------------------------------------------------------ 159Special ActiveX Example: ------------------------------------------------------------------------------------- 159

Visual Basic----------------------------------------------------------------------------------------------------------------------------------------- 160Visual C++ [Disp Interface] ---------------------------------------------------------------------------------------------------------------------- 161Visual C++ [High-Speed iDispatch Interface] ------------------------------------------------------------------------------------------------- 162Internet Explorer [Client-Side, VBScript] ------------------------------------------------------------------------------------------------------ 163

CHAPTER 27 - MEMORY UTILIZATION----------------------------------------------------------------- 164DATA STORAGE ---------------------------------------------------------------------------------------------------- 164

Memory Usage Calculations---------------------------------------------------------------------------------- 1642GB Application RAM Barrier ------------------------------------------------------------------------------- 165

RESOURCE MEMORY VS. RAM MEMORY ---------------------------------------------------------------------- 165RAM Memory --------------------------------------------------------------------------------------------------- 165Resource Memory ---------------------------------------------------------------------------------------------- 165

Page 12: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualxii

RING BUFFER------------------------------------------------------------------------------------------------------- 166

CHAPTER 28 - IMPLEMENTING TOOLBAR EXTERNALLY -------------------------------------- 168RESUME BUTTON -------------------------------------------------------------------------------------------------- 168PAUSE BUTTON ---------------------------------------------------------------------------------------------------- 168AXES SCROLL MODE BUTTON ----------------------------------------------------------------------------------- 168AXES ZOOM MODE BUTTON ------------------------------------------------------------------------------------- 168ZOOM IN BUTTON-------------------------------------------------------------------------------------------------- 168ZOOM OUT BUTTON ----------------------------------------------------------------------------------------------- 169SELECT BUTTON --------------------------------------------------------------------------------------------------- 169ZOOM BOX BUTTON ----------------------------------------------------------------------------------------------- 169CURSOR BUTTON -------------------------------------------------------------------------------------------------- 169EDIT BUTTON------------------------------------------------------------------------------------------------------- 169COPY BUTTON------------------------------------------------------------------------------------------------------ 169SAVE BUTTON------------------------------------------------------------------------------------------------------ 169PRINT BUTTON ----------------------------------------------------------------------------------------------------- 169

CHAPTER 29 - IMPLEMENTING LEGEND EXTERNALLY ---------------------------------------- 170CHANNEL NAME LISTING ----------------------------------------------------------------------------------------- 170CHANNEL TRACE LINE STYLE AND COLOR LISTING ---------------------------------------------------------- 171CHANNEL MARKER STYLE AND COLOR LISTING -------------------------------------------------------------- 172CHANNEL ASSOCIATED X-AXIS --------------------------------------------------------------------------------- 173CHANNEL ASSOCIATED Y-AXIS --------------------------------------------------------------------------------- 173CHANNEL CURRENT X/Y COORDINATE ------------------------------------------------------------------------ 173

CHAPTER 30 - ASP (ACTIVE SERVER PAGES) -------------------------------------------------------- 174

CHAPTER 31 - INTERNET EXPLORER (CLIENT SIDE)--------------------------------------------- 175CREATING THE PLOT PACK ACTIVEX OBJECT IN YOUR WEB PAGE ---------------------------------------- 175

ClassID List for Plot Pack Components--------------------------------------------------------------------- 176INSTALLING THE PLOT PACK ACTIVEX CONTROL ON THE CLIENT------------------------------------------ 176LICENSING THE PLOT PACK ACTIVEX CONTROL -------------------------------------------------------------- 177ACCESSING THE PLOT PACK ACTIVEX CONTROL FROM VBSCRIPT----------------------------------------- 177FULL SOURCE EXAMPLE ------------------------------------------------------------------------------------------ 178

APPENDIX A - PLOT PACK PROPERTY EDITORS --------------------------------------------------- 179CONTROL GENERAL ----------------------------------------------------------------------------------------------- 179CONTROL TITLE---------------------------------------------------------------------------------------------------- 181CONTROL PRINT---------------------------------------------------------------------------------------------------- 182CONTROL HINTS --------------------------------------------------------------------------------------------------- 183CONTROL FILE I/O------------------------------------------------------------------------------------------------- 184TRANSLATION ------------------------------------------------------------------------------------------------------ 185ANNOTATION DEFAULTS------------------------------------------------------------------------------------------ 186CHANNELS GENERAL---------------------------------------------------------------------------------------------- 189CHANNEL TRACE -------------------------------------------------------------------------------------------------- 191INTERPOLATION ---------------------------------------------------------------------------------------------------- 192CHANNELS MARKERS --------------------------------------------------------------------------------------------- 193

Page 13: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manual xiii

CHANNELS FILL---------------------------------------------------------------------------------------------------- 195CHANNELS DIGITAL ----------------------------------------------------------------------------------------------- 197CHANNEL FILE I/O------------------------------------------------------------------------------------------------- 198CURSORS GENERAL ----------------------------------------------------------------------------------------------- 199CURSORS HINT ----------------------------------------------------------------------------------------------------- 202CURSORS MENU ITEMS-------------------------------------------------------------------------------------------- 203LIMITS GENERAL -------------------------------------------------------------------------------------------------- 205AXES GENERAL ---------------------------------------------------------------------------------------------------- 210AXES TITLE--------------------------------------------------------------------------------------------------------- 213AXES LABELS ------------------------------------------------------------------------------------------------------ 214AXES TRACKING --------------------------------------------------------------------------------------------------- 216AXES CURSOR------------------------------------------------------------------------------------------------------ 218AXES SCROLL ------------------------------------------------------------------------------------------------------ 219AXES SCALE-------------------------------------------------------------------------------------------------------- 220LEGEND ------------------------------------------------------------------------------------------------------------- 221TOOLBAR ----------------------------------------------------------------------------------------------------------- 224DATA VIEW--------------------------------------------------------------------------------------------------------- 227LABELS-------------------------------------------------------------------------------------------------------------- 229

APPENDIX B - ACTIVEX HTML PROPERTIES AND EVENTS ------------------------------------ 231HTML PAGE IMPORTANT NOTES-------------------------------------------------------------------------------- 231

Boolean Values: ------------------------------------------------------------------------------------------------ 231Double Values:-------------------------------------------------------------------------------------------------- 231

PROPERTIES--------------------------------------------------------------------------------------------------------- 231VBSCRIPT EVENTS ------------------------------------------------------------------------------------------------ 238JAVASCRIPT EVENTS ---------------------------------------------------------------------------------------------- 239LPK FILE TUTORIAL ---------------------------------------------------------------------------------------------- 242

Web Page ActiveX Licensing: What is an LPK File? ----------------------------------------------------- 242Steps to create an LPK File...--------------------------------------------------------------------------------- 243

APPENDIX C -- WHAT IS DATETIME FORMAT? ----------------------------------------------------- 247

APPENDIX E -- FREQUENTLY ASKED QUESTIONS ------------------------------------------------- 250

INDEX---------------------------------------------------------------------------------------------------------------- 251

Page 14: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Table of Contents

Iocomp Components – Plot Pack Manualxiv

This page intentionally left blank

Page 15: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 1 - Introduction

Iocomp Components – Plot Pack Manual 1

Chapter 1 - Introduction

Welcome to the Iocomp Plot Pack Manual. This manual, in addition to our help files and examplesource code projects included on our website, provides a full suite of documentation for understandinghow our Plot Pack components are constructed, operate, and are used to enhance the applications youdevelop.

The Plot Pack currently includes two components: the iPlot component which is designed fory = f(x) (Incrementing X Values) types of plotting data and the iXYPlot component which is designedfor plotting data that does not follow this equation and may have multiple Y solutions for any given Xvalue.

This manual is broken up into several chapters covering different aspects of the Plot Components. Thecomponents have been designed entirely on an object oriented approach, making them well suited forboth simple and complex charting applications while leaving themselves open to the addition of manyfeatures and enhancements. The following icons are used throughout the manual for emphasis…

Important Note: ! Useful Tip: Reminder:

Sample Code Conventions

All simple examples are formatted using a Visual Basic-like syntax. Depending upon yourcompiler, the syntax of accessing plot objects and properties may differ. Some specific examplesfor each major development environment are provided, formatted for that specific compiler.

As an example, to access the TitleText property for the first X-Axis you would use the followingdifferent syntax for these major development environments…

Microsoft Visual Basic/VBA/VBScriptiPlotX1.XAxis(0).Title = "Sample Title"

Borland Delphi/KylixiPlot1.XAxis[0].Title := 'Sample Title';

Microsoft Visual C++m_iPlotX1.GetXAxis(0).SetTitle("Sample Title"); //Disp Interfacem_iPlotX1->XAxis[0]->Title = "Sample Title"; //iDispatch Interface

Borland C++ BuilderiPlot1->XAxis[0]->Title = "Sample Title";

Page 16: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 1 - Introduction

Iocomp Components – Plot Pack Manual2

Visual C++ Special Compiler Note

You will need to include several ActiveX wrapper header files in your include statements toaccess Plot Component sub objects…

//include the following for iPlotX#include "iplotx.h"#include "iplotchannelx.h"

//include the following for iXYPlotX#include "ixyplotx.h"#include "ixyplotchannelx.h"

//include the following for iPlotX and iXYPlotX#include "iplotaxisx.h"#include "iplotlegendx.h"#include "iplottoolbarx.h"#include "iplotdataviewx.h"#include "iplotannotationx.h"#include "iplotlabelx.h"#include "iplotlimitx.h"#include "iplotdatacursorx.h"

Enumerated types of ActiveX controls are only supported by Visual C++ if you are using thehigh-speed iDispatch interface to an ActiveX control. Refer to the chapter on Visual C++ Dispvs. iDispatch Interface for more information on using the high-speed iDispatch interface. Referto the help file for values associated with enumerated properties if you are using the DispInterface.

Microsoft Visual C++ does not support integration of our help files in to the Visual C++ IDE.You can view our help files through one of the following methods…

1. Click on your START menu button, select Programs, and then Iocomp. In this folder youwill find links to our help files for our ActiveX and VCL/CLX components as well as links torelease notes, website information, and a link to the directory where our products areinstalled.

2. Navigate to the folder where you installed our products (generally c:\iocomp\product orc:\program files\iocomp\components). In this folder are our ActiveX and VCL help fileswhich you can open directly as well as release notes, and the actual component binaries andsource files.

3. Download one of the appendices listed in this manual for the ActiveX and VCL help. Theseappendices contain the same information in the ActiveX and VCL help files, but has beenformatted for printing.

Page 17: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 1 - Introduction

Iocomp Com

Borland Delphi, Kylix, and C++ Builder Special Compiler Note

You will need to include “iTypes” in your USE statement to access enumerated types ofcomponents.

Componen

This thesecomp

If weand iXiXYP

You cCLX and e

Source Co

The sLinuxcode you wcompappencan ddictat

You should be sure to use our VCL/CLX version of our componentssince this is the native source code of our products. The ActiveX

versions are simply VCL components wrapped with the Delphi DAX

ponents – Plot Pack Manual 3

t Naming Conventions

manual covers the ActiveX, VCL, and CLX component versions of our components. Since three component architectures differ in many ways, the actual class names of theseonents differ slightly.

are talking generically about a component, we will refer to the Plot Components as iPlotYPlot. In the ActiveX version of the components, the actual class names are iPlotX and

lotX. In the VCL and CLX versions, the class names are TiPlot and TiXYPlot.

an extrapolate this to all of the components produced by Iocomp Software. All VCL andcomponents start with "Ti" and do not end in "X". All ActiveX components start with Ind in "X".

de Unit Naming Conventions

ource of our components is written in Borland Delphi for Windows and Borland Kylix for, corresponding to the VCL and CLX versions of our components respectively. The source

is identical between these two component standards, minus some IFDEF differences thatill see in the source. The major difference is in the naming of the Unit files. All VCLonent Unit files start with "i". All CLX component Unit file names are the same with "Q"ded on the front. The class names of the components are still the same. Delphi and Kylix

ecipher the difference between the VCL and CLX versions due to their inheritance which ised by our iInclude.inc file and corresponding IFDEFs.

framework to make them compatible with ActiveX developmentenvironments. If you use our VCL/CLX version, you will be able totake advantage of special Delphi, Kylix, and C++ Builder VCL/CLXfeatures such as the ability to compile the components into yourapplication binary.

Page 18: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

4

Chapter 2 - Deciding Which Component To Use

The Plot Pack includes several different components for your charting applications. Each componenthas been designed for a particular type of chart.

Feature iPlot iXYPlotUnlimited number of ChannelsUnlimited number of Data CursorsUnlimited number of LimitsChannel Ring BuffersAnnotations (Text, Line, and Rectangle)Unlimited number of X&Y-AxesBuilt in Toolbar and LegendLinear and Logarithmic ScalesReversible ScalesValue, Prefix, Exponent, and Data/Time ScaleLabel stylesHorizontal or Vertical orientation of AxesData Point MarkersIntelligent AutoScale of Axes in humanreadable format (1-2-5 Rule)Visual Layout manager (Design-Time andRun-Time)Stackable Scales (See Visual LayoutManager)Printing, Saving, Picture interface, andCopyToClipBoardAutomated Data Logging to DiskSingle-Line CursorCross-Hair CursorData FillOptimized Drawing Routines for Large DataSetsData Set restricted to y = f(x)Data Drill DownInterpolation

Wondering why the iXYPlot component has such as strange name? Thiscomponent was named this way to help our ActiveX customers. If the class

Iocomp Components – Plot Pack Manual

name had been named iPlotXY then under ActiveX the component class wouldhave been iPlotXYX, which would have been confusing.

Page 19: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual 5

The following ActiveX, VCL and CLX components are included with the Plot Pack…

iPlot

The iPlot component has been designed for y = f(x) based graphs. Supports data with a continuouslyincrementing x-value. Typical uses are for Strip Chart, Chart Recorder, or Scrolling Chart types ofplotting applications. This is the chart that should be used for almost all plotting applications.

The Plot component also supports data fill (see Channel #1 example above) to a specified referenceline as well as specialized AddData functions for time based data.

Drawing routines have been optimized in this component to provide high-speed access and drawing(paint and scroll) operations. This is made possible due to the fact that the data sets need to followthe for y = f(x) function.

The iPlot main interface contains several properties, methods, and events that affect the overallappearance and operation of the entire component.

Page 20: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual6

Properties

AnnotationDefaultBrushColor AnnotationDefaultBrushStlye AnnotationDefaultFontColorAnnotationDefaultFont AnnotationDefaultPenColor AnnotationDefaultPenStlyeAnnotationDefaultPenWidth Annotation AutoFrameRateBackGroundColor BackGroundPicture BorderStyleChannel ComponentHandle DataCursorDataView DataViewZHorz DataViewZVertHintsFontColor HintsFont HintsHidePauseHintsPause HintsShow LabelsLegend Limit LogBufferSizeLogFileName Logging Active OptionSaveAllPropertiesOuterMarginBottom OuterMarginLeft OuterMarginRightOuterMarginTop PrintMarginBottom PrintMarginLeftPrintMarginRight PrintMarginTop PrintOrientationPrintShowDialog ToolBar UpdateFrameRateUserCanEditObjects XAxis XYAxesReverseYAxis

Refer to the Plot Object Sections for properties of the Plot Objects. These properties are only for the main plotinterface. Refer to Appendix C & D for more detailed information about the iPlot main interface properties.

Depreciated Properties

The following properties have been depreciated due to the inclusion of newer functionalityprovided. These properties are provided for backward compatibility only.

TitleFontColor TitleFont TitleMarginTitleText TitleVisible

Page 21: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual 7

Methods

AddAnnotation AddChannel AddDataArrayAddDataCursor AddDataView AddLabelAddLegend AddLimit AddToolBarAddTranslation AddXAxis AddYAxisAnnotationCount BeginUpdate ChannelCountClearAllData CopyToClipBoard DataCursorCountDataViewCount DeleteAllTranslations DeleteAnnotationDeleteChannel DeleteDataCursor DeleteDataViewDeleteLabel DeleteLegend DeleteLimitDeleteToolBar DeleteTranslation DeleteXAxisDeleteYAxis DisableAllTracking DisableLayoutManagerEnableAllTracking EnableLayoutManager EndUpdateGetBytesJPEG GetChannelIndexByName GetNowGetSnapShotPicture GetTranslationOriginalString GetTranslationReplacementStringGetXAxisIndexByName GetYAxisIndexByName LabelCountLegendCount LimitCount LoadDataFromFileLoadPropertiesFromFile LoadTranslationsFromFile LockLogActivate LogDeactivate PrintChartRemoveAllAnnotations RemoveAllChannels RemoveAllDataCursorsRemoveAllDataViews RemoveAllLabels RemoveAllLegendsRemoveAllLimits RemoveAllToolBars RemoveAllXAxesRemoveAllYAxes RepaintAll SaveDataToFileSaveImageToBitmap SaveImageToJPEG SaveImageToMetaFileSave SavePropertiesToFile SaveTranslationsToFileToolBarCount TranslationCount UnlockXAxisCount YAxisCount

Refer to the Plot Object Sections for methods of the Plot Objects. These methods are only for the main plot interface. Referto Appendix C and D for more detailed information about the iPlot main interface methods.

Events

OnAfterPrint OnBeforePrint OnClickAnnotationOnClickDataPoint OnDataCursorChange OnKeyDownOnKeyPress OnKeyUp OnMouseDownOnMouseMove OnMouseUp OnXAxisCustomizeLabelOnXAxisMinChange OnXAxisSpanChange OnYAxisCustomizeLabelOnYAxisMinChange OnYAxisSpanChange

Refer to Appendix C and D for more detailed information about the iPlot main interface events.

Page 22: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual8

iXYPlot

The iXYPlot component has been designed for graphs that don’t have continuously incrementingx-values, and are not based on a y = f(x) function. Since we don’t restrict that the graph bebased on a y = f(x) function, there are some features that are not included or are differentbetween the iXYPlot component and the iPlot component such as…

Null Data Handling: to specify a null data point (for inserting in breaks between trend line pointto point connections or for signifying that a null data point exists), you will first have to adddummy data for a null data point and then set that data point to null.

Drawing Routines: the drawing routines in the iXYPlot component are not as optimized as inthe iPlot component since each channel is not based on y = f(x). For large data sets, performancemay be sluggish. Use the iPlot component whenever possible if your data is based on y = f(x)and you are using large data sets.

Channel Fill: Since there can be any number of Y values for a particular X value, it is notpossible to fill below or above a curve that can fit to these data points.

Interpolation: Since there can be any number of Y values for a particular X value, it is notpossible to perform interpolation or curve fitting functions to the channel data.

Speed: Special speed enhancements are included in the iPlot component that require the dataadded to it to be based on y = f(x) . The iXYPlot component will lose some speed improvementswith large data sets.

Page 23: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual 9

The iXYPlot main interface contains several properties, methods, and events that affect theoverall appearance and operation of the entire component.

Properties

AnnotationDefaultBrushColor AnnotationDefaultBrushStlye AnnotationDefaultFontColorAnnotationDefaultFont AnnotationDefaultPenColor AnnotationDefaultPenStlyeAnnotationDefaultPenWidth Annotation AutoFrameRateBackGroundColor BackGroundPicture BorderStyleChannel ComponentHandle DataCursorDataView DataViewZHorz DataViewZVertHintsFontColor HintsFont HintsHidePauseHintsPause HintsShow LabelsLegend Limit LogBufferSizeLogFileName Logging Active OptionSaveAllPropertiesOuterMarginBottom OuterMarginLeft OuterMarginRightOuterMarginTop PrintMarginBottom PrintMarginLeftPrintMarginRight PrintMarginTop PrintOrientationPrintShowDialog ToolBar UpdateFrameRateUserCanEditObjects XAxis XYAxesReverseYAxis

Refer to Appendix C and D for more detailed information about the iXYPlot main interface properties.

Depreciated Properties

The following properties have been depreciated due to the inclusion of newer functionalityprovided. These properties are provided for backward compatibility only.

TitleFontColor TitleFont TitleMarginTitleText TitleVisible

Page 24: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 2 - Deciding Which Component To Use

Iocomp Components – Plot Pack Manual10

Methods

AddAnnotation AddChannel AddDataArrayAddDataCursor AddDataView AddLabelAddLegend AddLimit AddNullAddToolBar AddTranslation AddXAxisAddYAxis AnnotationCount BeginUpdateChannelCount ClearAllData CopyToClipBoardDataCursorCount DataViewCount DeleteAllTranslationsDeleteAnnotation DeleteChannel DeleteDataCursorDeleteDataView DeleteLabel DeleteLegendDeleteLimit DeleteToolBar DeleteTranslationDeleteXAxis DeleteYAxis DisableAllTrackingDisableLayoutManager EnableAllTracking EnableLayoutManagerEndUpdate GetBytesJPEG GetChannelIndexByNameGetNow GetSnapShotPicture GetTranslationOriginalStringGetTranslationReplacementString GetXAxisIndexByName GetYAxisIndexByNameLabelCount LegendCount LimitCountLimitCount LoadDataFromFile LoadPropertiesFromFileLoadTranslationsFromFile Lock LogActivateLogDeactivate PrintChart RemoveAllAnnotationsRemoveAllChannels RemoveAllDataCursors RemoveAllDataViewsRemoveAllLabels RemoveAllLegends RemoveAllLimitsRemoveAllToolBars RemoveAllXAxes RemoveAllYAxesRepaintAll SaveDataToFile SaveImageToBitmapSaveImageToJPEG SaveImageToMetaFile SaveSavePropertiesToFile SaveTranslationsToFile ToolBarCountTranslationCount Unlock XAxisCountYAxisCount

Refer to the Plot Object Sections for methods of the Plot Objects. These methods are only for the main plotinterface. Refer to Appendix C and D for more detailed information about the iPlot main interface methods.

Events

OnAfterPrint OnBeforePrint OnClickAnnotationOnClickDataPoint OnDataCursorChange OnKeyDownOnKeyPress OnKeyUp OnMouseDownOnMouseMove OnMouseUp OnXAxisCustomizeLabelOnXAxisMinChange OnXAxisSpanChange OnYAxisCustomizeLabelOnYAxisMinChange OnYAxisSpanChange

Page 25: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 3 - Overall Theory

Ioco

Chapter 3 - Overall Theory

The Plot Pack components are object-oriented components that are designed for very high speed plottingand ease of use by both the application programmer and application user.

The hierarchy of the Plot Pack components is shared among the many different types of plottingcomponents that we offer. This allows programmers to use or Plot Components interchangeably sincemost of the properties, objects, and methods are common. There are several objects that make up thebase for our Plot Components, and the hierarchy is as follows…

There can be any number of Plot Objects associated with each Plot Component. This gives rise to ourMultiple Axes, Multiple Annotations, Multiple Labels, and Multiple Channel features. To access one ofthese Plot Component sub-objects, you would need to specify the index value of that object. Forexample…

Generic Example:

iComponent1.PlotObject(0).Property = Value

iPlot or iXYPlot

Plot Objects

AnnotationLegendChannel

XAxis YAxis

iPlotAxisDataView DataCursor LimitToolBar Label Translation

The iPlotAxis object is the ancestor of the iPlotXAxis and iPlotYAxis (Shown

mp Components – Plot Pack Manual 11

above as XAxis and YAxis) objects. It should not be accessed directly. Towork with the X and/or Y-Axis, use the X-Axis and Y-Axis interfaces instead.

Page 26: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 3 - Overall Theory

Iocomp Components – Plot Pack Manual12

Specific Examples:

Visual Basic/VBA/VBScript

iComponentX1.DataView(0).GridShow = TRUEiComponentX1.XAxis(0).Min = 100iComponentX1.YAxis(0).Min = 100iComponentX1.Channel(0).Name = "Channel 1"iComponentX1.Legend(0).Visible = TRUEiComponentX1.ToolBar(0).ShowEditButton = FALSEiComponentX1.Annotation(0).Text = "Sample Annotation"iComponentX1.DataCursor(0).Style = ipcsDeltaXiComponentX1.Limit(0).XAxisName = "X-Axis 1"iComponentX1.Labels(0).Caption = "Chart Y vs. Time"

Visual C++

//Disp Interfacem_iComponentX1.GetDataView(0).SetGridShow(TRUE);m_iComponentX1.GetXAxis(0).SetMin(100);m_iComponentX1.GetYAxis(0).SetMin(100);m_iComponentX1.GetChannel(0).SetName("Channel 1");m_iComponentX1.GetLegend(0).SetVisible(TRUE);m_iComponentX1.GetToolBar(0).SetShowEditButton(FALSE);m_iComponentX1.GetAnnotation(0).SetText("Sample Annotation");m_iComponentX1.GetDataCursor(0).SetStyle(3); //ipcsDeltaXm_iComponentX1.GetLimit(0).SetXAxisName("X-Axis 1");m_iComponentX1.GetLabels(0).SetCaption("Chart Y vs. Time");

//iDispatch InterfaceiComponentX1->DataView[0]->GridShow = TRUE;iComponentX1->XAxis[0]->Min = 100;iComponentX1->YAxis[0]->Min = 100;iComponentX1->Channel[0]->Name = "Channel 1";iComponentX1->Legend[0]->Visible = TRUE;iComponentX1->ToolBar[0]->ShowEditButton = FALSE;iComponentX1->Annotation[0]->Text = "Sample Annotation";iComponentX1->DataCursor[0]->Style = ipcsDeltaX;iComponentX1->Limit[0]->XAxisName = "X-Axis 1";iComponentX1->Labels[0]->Caption = "Chart Y vs. Time";

Page 27: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 3 - Overall Theory

Ioc

C++ Builder

iComponent1->DataView[0]->GridShow = TRUE;iComponent1->XAxis[0]->Min = 100;iComponent1->YAxis[0]->Min = 100;iComponent1->Channel[0]->Name = "Channel 1";iComponent1->Legend[0]->Visible = TRUE;iComponent1->ToolBar[0]->ShowEditButton = FALSE;iComponent1->Annotation[0]->Text = "Sample Annotation";iComponent1->DataCursor[0]->Style = ipcsDeltaX;iComponent1->Limit[0]->XAxisName = "X-Axis 1";iComponent1->Labels[0]->Caption = "Chart Y vs. Time";

Delphi/KylixiComponent1.DataView[0].GridShow := TRUE;iComponent1.XAxis[0].Min := 100;iComponent1.YAxis[0].Min := 100;iComponent1.Channel[0].Name := 'Channel 1';iComponent1.Legend[0].Visible := TRUE;iComponent1.ToolBar[0].ShowEditButton := FALSE;iComponent1.Annotation[0].Text := 'Sample Annotation';iComponent1.DataCursor[0].Style := ipcsDeltaX;iComponent1.Limit[0].XAxisName := 'X-Axis 1';iComponent1.Labels[0].Caption := "Chart Y vs. Time";

Pl

Pl

The index values are all zero based, meaning the first object’s index is 0, the second is 1,

omp Components – Plot Pack Manual 13

ot Objects

As shown above, the plot component is made up of many sub objects, referred to in this manualas plot objects. Plot Objects allow for the multiple axis, multiple channel, multiple limit,multiple label, and multiple data cursor features of the component by allowing an unlimitednumber of plot objects. Note that some plot objects currently only support one object of theirtype, such as the DataView, Legend, and Toolbar, but will be upgraded in the future.

ot Object Index

To access a specific plot object, such as the third channel for example, you need to use the indexof that plot object. Note that a plot object indices start at 0…

iComponent1.Channel(2).Property = ValueiComponent1.Channel(2).Procedure

! the third is 2, and so on. Currently only one Data View, one Legend, and one Toolbarobject is supported at this time and is left open for future expansion. The Axes object isnot accessed directly. Access the X-Axis and Y-Axis objects through the individual X-Axis and Y-Axis objects.

Page 28: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 3 - Overall Theory

Iocomp Components – Plot Pack Manual14

Plot Object Name

All plot objects have a unique index value that is generated when they are created. You can alsoassociate a name to a plot object using the Name starting property of each plot object.

Each plot object is generally referenced by its index, but you can also use the name of a plotobject when referencing. This allows you to use your own system of referencing multiplechannels or axes without using the index values. Also, some properties used by other plotobjects to reference other plot objects require the name of the plot object instead of the index.

iComponent1.Channel(0).ProcedureiComponent1.Channel(iComponent1.GetChannelIndexByName("Channel 1").ProcedureiComponent1.DataCursor(1).ChannelName = "Channel 1"iComponent1.DataCursor(1).ChannelName = iComponent1.Channel(0).Name

Get Plot Object Index By Name

You can retrieve the index of a channel or axis by using the following procedure and passing thename of the object…

Index = iComponent1.GetChannelIndexByName("Channel 1")Index = iComponent1.GetXAxisIndexByName("XAxis 1")Index = iComponent1.GetYAxisIndexByName("YAxis 1")

Get Plot Object Name by Index

You can retrieve the name of any plot object as follows…

NameString = iComponent1.Channel(Index).NameNameString = iComponent1.XAxis(Index).NameNameString = iComponent1.YAxis(Index).NameNameString = iComponent1.DataCursor(Index).NameNameString = iComponent1.Limit(Index).NameNameString = iComponent1.Labels(Index).Name

Page 29: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Io

Chapter 4 - Axes

The Axes Plot Object refers to both the X-Axis and Y-Axes Plot Objects. You need to have at least oneX-Axis and one Y-Axis to be able to display data in the chart. Every channel that contains data willneed to be associated with one X-Axis and one Y-Axis to be able to display data.

Many of the operations of a chart are handled through the axes. The axis object not only provides avisual display of the X-Axis and Y-Axis scales, but are dynamic in that they allow the user to scroll theplot data that is displayed, zoom in and out, and otherwise have complete control over the data displayedin the chart even while you are adding data in real-time! The Axes also have built-in scrolling andscaling capabilities that make implementing a very professional chart very easy. This automatedscrolling and scaling is referred to as “Tracking”, and is fully automated. Refer to the chapter entitled“Tracking” for more information on fine-tuning and configuring the tracking features.

Axis Objects

To move, resize, and stack axes and other plot objects show above, refer to the chapter

comp Components – Plot Pack Manual 15

entitled “Visual Layout Manager” for more information about using the Visual LayoutManager. If you need to dynamically modify the chart layout at runtime or throughyour program code, refer to the chapter entitled “Layout Control Through Code”

Page 30: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

16

As you will notice above, there is one X-Axis and actually two Y-Axis. This is useful if you haveseveral data channels where you would like to have a shared, common X-Axis but want to haveseparate, independent Y-Axis with different scales. The above examples show the Y-Axes stacked.You can also have them oriented side by side if you wish.

Both the X-Axis and Y-Axis objects support multiple axes, so you can have as many Y-Axes of eachtype as you wish. Each channel, however, can only be associated with one X and one Y-Axis at any onetime.

Below you will find explanations of some of the features supported by both the X and Y-Axes…

Span

To set the breadth of values that are displayed on the axis, set the Span property. The Spanproperty specifies the value displayed between the min and maximum values of the axis. Forexample, if you wish the axis to display 1000 units of data, set the Span property to 1000. If theuser scrolls the axis, they are modifying the Min property of the scale, but the span will alwaysbe constant. If the user zooms the axis, then the Span value will change according to theZoomFactor. (i.e. if the user zooms in by a factor of 2, then the Span will be reduced in halffrom 1000 to 500)

iPlot1.YAxis(0).Span = 1000iPlot1.YAxis(0).Span = 1000

Min and Max

The Min property is used to set the minimum value of the axis that is currently visible. The Maxproperty is read only and is simply a calculation of Max = Min + Span.

iPlot1.Min = 10

'Max is a read-only valueMaxValue = iPlot1.Max

...is the same as...

MaxValue = iPlot1.YAxis(0).Min + iPlot1.YAxis(0).Span

The minimum and maximum values that the axes support are as follows...

Iocomp Components – Plot Pack Manual

Maximum Value: +1x10300 or +1E300Minimum Value: -1x10300 or -1E300Data Precision: 15 places

Page 31: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocom

Rotated Axes

The X and Y-Axes can be rotated so that you can plot both horizontally and vertically basedupon your application needs. Refer to the Visual Layout Manager chapter for more informationor use the XYAxesReverse property from the main plot component interface.

iPlot1.XYAxesReverse = True

Label Formats

All Axes support the following label format styles..

Simple Values198678.5672578

Exponential Values2.35E+002245.34564E-128

Prefix Values2.2K3.4M

Date/Time Values3 Jan 01 5:23pm01/31/2001

Price32nds100.231

application by using the Visual Layout Manager inside of our customproperty editor. Refer to the chapter “Visual Layout Manager” for moreinformation on using the Visual Layout Manager.

Price32nds is for use in the Bond and Securities Market. The value is

p

You can easily rotate the X and Y-Axes without using code in your

Components – Plot Pack Manual 17

displayed where 23 is in 32nds and 1 is in 256ths. Therefore, in decimalthe price above is: 100 +23/32 + 1/256 = 100.72265625.Pass the actual double value of 100.72265625 to display it as Price32ndsformat as 100 231 to your application end user

Page 32: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocomp Components – Plot Pack Manual18

Reverse Scales

All Axes can be reversed. By default, the axes increase in value from left to right or bottom totop. This can be reversed by setting a simple property called ReverseScale.

iPlot1.XAxis(0).ReverseScale = TRUE

Scale Types

All Axes support the following scale types…

LinearThis is the standard type of scale that most programmers will use in their charts. Scalescan range from values between –1x10300 to 1x10300

Logarithmic Base 10Supports logarithmic base-10 type data. Scales can range from base-10 log values of1x10-300 to 1x10300.

Reversed

Log Scale

Page 33: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocomp Components – Plot Pack Manual 19

LabelSeparation

Use LabelSeparation to get or set the minimum separation between scale labels. LabelSeparationrepresents the percentage of a character size and is based on the LabelsFont used for the axis. Avalue of 0.5 is equal to half the size of a character. The actual separation maybe greater due to theAutoScale reducing the number of major ticks to keep the scale labels in a human readable format(1-2-5 Rule).

iPlot1.XAxis(0).LabelSeparation = 2iPlot1.YAxis(0).LabelSeparation = 2

LabelsMargin

Use LabelsMargin to get or set the spacing between the major tick and major tick labels.LabelsMargin represents the percentage of a character size and is based on the LabelsFont used forthe axis. A value of 0.5 is equal to half the size of a character.

iPlot1.XAxis(0).LabelsMargin = 0.25iPlot1.YAxis(0).LabelsMargin = 0.25

LabelsMargin

LabelSeparation

LabelSeparation

Page 34: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

20

LabelsMinLength

Use LabelsMinLength to get or set the minimum label length used in calculating the number ofscale labels (Major Ticks) during AutoScale for horizontal layout objects.

For vertical layout objects, this is used in calculating the minimum width of the layout object. Setthis value larger to ensure that the vertical layout object is of a minimum width to accommodatelarger values without needing to increase in size.

This property prevents common “oscillations” that occur when the scale flips between, for example,4 digits at the top of the scale to three digits. To prevent oscillations in this example, set the minlength to 4 so that when the top of the scale goes down to three digits, the width is kept at four digits.

AutoScale automatically calculates the number of scale labels based on the LabelsFont,LabelSeparation, and LabelsMinLength properties to ensure labels that are in a human readableformat (1-2-5 Rule).

iPlot1.XAxis(0).LabelsMinLength = 5iPlot1.YAxis(0).LabelsMinLength = 10

LabelsMinLength

LabelsMinLength

All margins use units of characters. This allows the component to dynamically

Iocomp Components – Plot Pack Manual

! adjust the scales based upon the font used instead of using rigid pixelspecifications. A value of 0.25 would be equivalent to ¼ the size (width orheight, depending on if the margin relates to a horizontal or vertical margin) of asingle character from the font being used in the layout object.

Page 35: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocomp Components – Plot Pack Manual 21

LabelsMinLengthAutoAdjust

Use LabelsMinLengthAutoAdjust to specify whether the LabelsMinLength property isautomatically adjusted as the minimum required label length increases.

While plotting, or user scrolling/zooming, the actual minimum label length may become greater thanthe LabelsMinLength property value. This will result it the axis growing in size to accommodatethe wider label. If the plotting data or user changes the displayed data causing the label width tovary, it may cause an annoying oscillation of the display plot objects sizes. To prevent thisoscillation, set this property to TRUE.

The LabelsMinLength property is stored when the TrackingEnabled property is set to FALSE.The LabelsMinLength property will be restored to the previous value when TrackingEnabledproperty is set back to TRUE.

iPlot1.XAxis(0).LabelsMinLengthAutoAdjust = True

StackingEndsMargin

Use StackingEndsMargin to get or set the margin at the end of the axis when stacked.StackingEndsMargin represents the percentage of a character size and is based on the LabelFontused for the axis. A value of 0.5 is equal to half the size of a character.

Note that this feature currently only supports the Axes layout objects. Also note that the stackingmargin only applies to layout objects that touch each other and only affects the ends that touch.

In the following example, the first Y-Axis (on the bottom) has a starting percent of 0 and endingpercent of 50. The second Y-Axis (on top) has a starting percent of 50 and an ending percent of 100.The Stacking Ends Margin allocates additional space to separate the two stacked axes. The totalspacing is 0.5 characters in this example, with the StackingEndsMargin values being cumulative.The StackingEndsMargin will have no effect on the ends of the ends of the axes unless they touchanother axis.

iPlot1.YAxis(0).StartPercent = 0iPlot1.YAxis(0).StopPercent = 50iPlot1.YAxis(0).StackingEndsMargin = 0.25

iPlot1.YAxis(1).StartPercent = 50iPlot1.YAxis(1).StopPercent = 100iPlot1.YAxis(1).StackingEndsMargin = 0.25

Page 36: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

22

Tracking

Tracking refers to the Auto-Scale and Auto-Scroll features of the axes. The axes have thecapability to adjust their scales and scroll dynamically at runtime according to several propertiesthat you setup. This makes it easy to implement a chart that looks and functions the way that youwould like without complex coding on your part. Refer to the chapter on Tracking for moredetailed information.

User Interface

By default, the component is setup to allow scrolling and zooming of the axes by yourapplication user. The application user is also able to edit the axis properties either through apopup menu or through the run-time menu button on the toolbar. You can control the userinterface by using the Enabled and PopupEnabled properties of the axes to control whether theuser can scroll/zoom or be able to bring up the popup menu for the axis to edit properties of thataxis.

StackingEndsMargin(0.5 Total = 0.25 + 0.25)

If you are using stacked axes, you may notice that the grid appears to bedrawn funny in the DataView area. To fix this, assign the grid to the

special value “<All>” so that major ticks for all axes are used to draw

Iocomp Components – Plot Pack Manual

the grid lines.

e.g.

iComponent.DataView(0).GridYAxisName = “<All>”

Page 37: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocomp Components – Plot Pack Manual 23

Customizing Tick LabelsThe X and Y Axis scales are automatically configured for you using the AutoScale andAutoLabel (1-2-5 Rule) features of the Plot Components. However, you may wish to customizeall or some of the displayed labels with your own text.

For example, let's replace all of the X-Axis labels with their string equivalents. We will use theOnXAxisCustomizeLabel event. This event will fire each time a label above is painted on the X-Axi, passing the Index of the Axis being painted, the current Value of the label being painted indouble format, and a pointer to the actual Label in String format. We will modify the Labelvariable which will then be displayed in place of the original value.

Here is the chart before using the event. We have six labels, one through ten...Visual Basic Example

Private Sub iPlotX1_OnXAxisCustomizeLabel(ByVal Index As Long, ByVal ValueAs Double, ALabel As String)

'Examine the Value passed in the event. This event will fire for each'label in the Axis (Index of the Axis is passed in the Index parameter),'passing the Value of the Label in the Value parameter. Modify the'ALabel string that is passed to change the label to any desired string.Select Case Value

Case 0: ALabel = "Zero"Case 2: ALabel = "Two"Case 4: ALabel = "Four"Case 6: ALabel = "Six"Case 8: ALabel = "Eight"Case 10: ALabel = "Ten"

End SelectEnd Sub

Page 38: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

24

Visual C++ Example

void CPlotcustomizelabeltestDlg::OnXAxisCustomizeLabel_m_iPlotX1(long Index,double Value, BSTR FAR* ALabel){

//Examine the Value passed in the event. This event will fire for each//label in the Axis (Index of the Axis is passed in the Index parameter),//passing the Value of the Label in the Value parameter. Modify the//ALabel string that is passed to change the label to any desired string.if (Value == 0) { *ALabel = ::SysAllocString(L"Zero"); };if (Value == 2) { *ALabel = ::SysAllocString(L"Two"); };if (Value == 4) { *ALabel = ::SysAllocString(L"Four"); };if (Value == 6) { *ALabel = ::SysAllocString(L"Six"); };if (Value == 8) { *ALabel = ::SysAllocString(L"Eight"); };if (Value == 10) { *ALabel = ::SysAllocString(L"Ten"); };

}

Here is the chart after using the OnXAxisCustomizeLabel event...

Iocomp Components – Plot Pack Manual

!Warning! Many development languages do not support Casestatements even evaluating Double values. The example above uses aCase Statement for simplicity only. If you are using any languagebesides Visual Basic you will need to use IF statements instead

Page 39: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 4 - Axes

Iocomp

Properties

CursorPrecision CursorScaler DateTimeFormatDesiredIncrement DesiredStart EnabledHeight Horizontal InnerMarginLabelSeparation LabelsFontColor LabelsFontLabelsFormatStyle LabelsMargin LabelsMinLengthAutoAdjustLabelsMinLength LabelsPrecision LabelsPrecisionStyleMajorLength MasterUIInput MaxMin MinorCount MinorLengthName OuterMargin PopupEnabledRestoreValuesOnResume ReverseScale ScaleLinesColorScaleLineShow ScaleType ScrollMaxScrollMin ScrollMinMaxEnabled SpanStackingEndsMargin StartPercent StopPercentTitleFontColor TitleFont TitleTitleMargin TitleShow TrackingAlignFirstStyleTrackingEnabled TrackingScrollCompressMax TrackingStyleVisible Width ZOrder

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

GetLabelText NewTrackingData PercentToPositionPixelsToPosition PositionToPercent PositionToPixelsResetFirstAlign UpdateResumeValues ValueOnScaleZoom

Refer to Appendix C and D for more detailed information about this plot object’s methods.

Events

OnXAxisCustomizeLabel OnXAxisMinChange OnXAxisSpanChangeOnYAxisCustomizeLabel OnYAxisMinChange OnYAxisSpanChange

Components – Plot Pack Manual 25

! All events are on the main component interface and not on the sub-object interface.

Page 40: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp Components – Plot Pack Manual26

Chapter 5 - Data View

The Data View object is the center-point of the Plot Pack components. This is the area where your datapoints, trend lines, data cursors, limits, and annotations are displayed.

Currently, only one data view is available. The Data View only displays graphical representations of theChannel data. In a future release, a grid data view object will be made available to show numericalrepresentations of your chart data.

Data View Object

Page 41: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp

Channels

The channels objects are configured by using the properties and methods of the channel object. Toadd a channel, execute the AddChannel method from the main interface. To add data or toconfigure a particular channel, use the index of the channel with the channel sub-interface…

Index = iComponent.AddChanneliComponent.Channel(Index).ProcedureiComponent.Channel(Index).Property

Here are some specific examples…

iComponent.Channel(0).AddXY(12.3, 14.56432)Value = iComponent.Channel(0).GetXMeaniComponent.Channel(0).Color = vbRediComponent.Channel(0).MarkersStyle = ipmsSquare

Index = iComponent.GetChannelIndexByName("Channel 1")iComponent.Channel(Index).AddXY(12.3, 14.56432)Value = iComponentChannel(Index).GetXMeaniComponent.Channel(Index).Color = vbRediComponent.Channel(Index).MarkersStyle = ipmsSquare

Anno

Aanpa

H

Components – Plot Pack Manual 27

Refer to the “Channels” Chapter for more information about using the Channels Object

tations

nnotations are configured by using the properties and methods of the annotation object. To add annotation, execute the AddAnnotation method from the main interface. To configure articular annotation, use the index of the annotation with the annotation sub-interface…

Index = iComponent.AddAnnotationiComponent.Annotation(Index).ProcedureiComponent.Annotation(Index).Property

ere are some specific examples…

iComponent.Annotation(0).ChannelName = "Channel 1"iComponent.Annotation(0).ChannelName = iComponent.Channel(0).NameiComponent.Annotation(0).BrushColor = vbRediComponent.Annotation(0).X = 12.5iComponent.Annotation(0).Y = 37.25iComponent.Annotation(0).TextRotation = ira180

Refer to the “Annotations” Chapter for more information about using the Annotation Object

! Remember that one channel is added to the component by default when it is created.You can execute the RemoveAllChannels method in your form loading handler ifyou wish to remove all channels and start with a component with no channels.

Page 42: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

28

Data Cursors

Data are configured by using the properties and methods of the DataCursor object. To add a datacursor, execute the AddDataCursor method from the main interface. To configure a particular datacursor, use the index of the data cursor with the data cursor sub-interface…

Index = iComponent.AddDataCursoriComponent.DataCursor(Index).ProcedureiComponent.DataCursor(Index).Property

Here are some specific examples…

iComponent.DataCursor(0).ChannelName = "Channel 1"iComponent.DataCursor(0).ChannelName = iComponent.Channel(0).NameiComponent.DataCursor(0).HintShow = FalseValue = iComponent.DataCursor(0).ValueXValue = iComponent.DataCursor(0).ValueYiComponent.DataCursor(0).Style = ipcsDeltaX

Lim

Remember that one data cursor is added to the component by default when it is created.

You can execute the RemoveAllDataCursors method in your form loading handler if you

Iocomp Components – Plot Pack Manual

Refer to the “Data Cursors” Chapter for more information about using the Cursors Object

its

Limits configured by using the properties and methods of the limit object. To add a limit, executethe AddLimit method from the main interface. To configure a particular limit, use the index of thelimit with the annotation sub-interface…

Index = iComponent.AddLimitiComponent.Limit(Index).ProcedureiComponent.Limit(Index).Property

Here are some specific examples…

iComponent.Limit(0).XAxisName = "XAxis 1"iComponent.Limit(0).YAxisName = "YAxis 1"iComponent.Limit(0).XAxisName = iComponent.XAxis(0).NameiComponent.Limit(0).YAxisName = iComponent.YAxis(0).NameiComponent.Limit(0).Line1Position = 25.0iComponent.Limit(0).Line2Position = 37.2iComponent.Limit(0).Style = iplsBandX

Refer to the “Limits” Chapter for more information about using the Limits Object

! wish to remove all data cursors and start with a component with no data cursors. DataCursors are initially hidden by default(i.e. their visible properties are set to False). Toshow the data cursors, click on the data cursor button on the toolbar at runtime, set theVisible property of the data cursor to True, or execute the DoButtonClickCursorprocedure from the toolbar object.

Page 43: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp Components – Plot Pack Manual 29

Layer Order

Objects in the Data View area, such as the grid, channels, limits, annotations, and data cursorsare draw in the following order from bottom to top…

• Grid• Channels• Limits• Annotations• Data Cursors

In a future release, the ability to change the layer order of the objects in the Data View area willbe made available. Access to objects in the Data View area is obtained through the Channel,Annotation, and Limit objects, as the DataView object is just a container for these objects.

GridsThe grid lines you see beneath your plotted data in the DataView area can be configured byusing the properties listed below or by using the built-in property editor. The grid lines aredrawn with respect to a specified set of X and Y-Axis Major and Minor tick marks as well asaround the DataView area. You can setup the grid lines to be drawn to any, all, or none of theselines as you desire.

Grid Lines

Page 44: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

30

Major and Minor Lines

The GridLineShowXMajors and GridLineShowYMajors properties control whether a line isdrawn with respect to the X and Y Major tick marks on your axis. The drawn lines will scrollwith the axis when it is scrolled either by the application user or by the AutoScroll capability ofthe chart.

Similarly, the GridLineShowXMinors and GridLineShowYMinors properties control whethera line is drawn with respect to the X and Y Minor tick marks on your axis.

If you need to draw grid lines that match up with all Axes or that scrollindependently with their associated Axes, utilize the special “<All>” axis which

Major TickGrid Line

Minor TickGrid Line

will instruct the grid lines to be drawn for all visible Axes of that type. Forexample, if you are stacking three Y-Axes, you will probably want the horizontal

Iocomp Components – Plot Pack Manual

grid lines to match up with the major ticks of each axis. To do this, simply set theGridYAxisName property of the DataView object to “<All>”.

iComponent.DataView(0).GridXAxisName = "<All>"iComponent.DataView(0).GridYAxisName = "<All>"

Page 45: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp Components – Plot Pack Manual 31

Stacked Axes and Grid Lines

When you use stacked axes in the plot components, the standard setting of one Y-Axis or X-Axisto draw the grid lines doesn’t always look correct. For example, the following grid lines do notwork for this stacked-axes chart…

Grid Lines Drawn to Only One Y-Axis

Page 46: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp Components – Plot Pack Manual32

The chart would look better if the Y-Axis grid lines were drawn to the ticks of all Y-Axis. To fixthis, simply set the GridYAxisName property to the special value of “<All>”…

iPlot1.DataView(0).GridYAxisName = "<All>"

The resulting chart would look like the following…

Grid Lines Drawn to All Y-Axes

Page 47: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 5 - Data View

Iocomp Components – Plot Pack Manual 33

Properties

BackgroundColor BackgroundTranparent EnabledGridLineColor GridLineMajorStyle GridLineMinorStyleGridLineShowBottom GridLineShowLeft GridLineShowRightGridLineShowTop GridLineShowXMajors GridLineShowXMinorsGridLineShowYMajors GridLineShowYMinors GridShowGridXAxisName GridYAxisName HeightHorizontal Name PopupEnabledStartPercent StopPercent TitleVisible Width ZOrder

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

None. Open for future expansion.

Events

None. Open for future expansion.

Page 48: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

34

Chapter 6 - Channels

The Channel objects are the Plot Component objects that contain your Chart Data (Data Points) andprovide the interface for adding data and sending tracking data to the associated axes.

There can be an unlimited number of channels in your chart. Each is addressed differently andindependent of all of the other channels in the chart. Each channel is associated with a particular X andY-Axis so that it may draw its data in the Data View in relation to the X and Y Scales.

Each channel can have an associated channel data trace line that connects individual data points, channeldata marker to show individual data points, and data fill (iPlot component only) to flood fill a color orpattern to a reference line. Channels can be synchronous or asynchronous, depending on your needs.Display of digital data is also supported.

Channel Object

If you open the run-time property editor and navigate to the channel’s tab,

Iocomp Components – Plot Pack Manual

you will be able to access the Stats page which gives you current PointCount, Memory, and other important statistics about the selected channel.

Page 49: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Ioc

Trace Lines

Trace Lines are the lines drawn between data points on the graph. You can specify the line’scolor, width, and style to help differentiate it from other trace lines in your chart. For graphs thatdon’t require lines drawn between data points, you can turn off the trace line by setting theTraceVisible property to False.

Curve fitting or Interpolation (e.g. Straight Line, Cubic Spline, Polynomial, Rational,Differential, etc) is also supported by the iPlot component channel object in addition tostraight trace lines.Refer to the chapter entitled “Interpolation” for more information.

The following line styles are available…

Style DescriptioniplsSolid A solid line.iplsDash A line made up of a series of dashes.iplsDot A line made up of a series of dots.iplsDashDot A line made up of alternating dashes and dots.iplsDashDotDot A line made up of a serious of dash-dot-dot combinations.

Since we use the Windows API (ActiveX and VCL components), trace line styles such

as dashed, dot, and dot dash styles do not work with line widths greater than 1 (i.e. with

omp Components – Plot Pack Manual 35

line widths greater than 1, the trace line will always be solid.). Adding the ability todraw line widths greater than 1 using non-solid lines would seriously affect the speedof the component, so it is recommended that the data point markers and channel colorsbe used to differentiate between channels with line widths greater than 1.

Page 50: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual36

Data Markers

By default, when a data point is drawn on the plot component DataView area, a single-pixelpoint is used. You can, however, use larger symbols or markers to denote a data point on thechart. This is useful in differentiating between channel data points and for highlighting true datapoints.

The following types of markers are available. Additional types will be added as needed and isopen for future expansion.

Style DescriptionipmsCircle CircleipmsSquare SquareipmsDiamond DiamondipmsCross CrossipmsPlus PlusipmsTriangleUp Triangle Pointing UpipmsTriangleDown Triangle Pointing DownipmsTriangleLeft Triangle Pointing LeftipmsTriangleRight Triangle Pointing Right

Individual Data Markers

By default, when data markers are drawn, the same data marker is used for all data points. Youcan specify different Data Markers for individual points. When the Data Marker is initiallyadded to the channel, its properties are initially set to the default values specified for the channel.First, set the MarkersAllowIndividual property to True to allow individual specification of eachdata marker. You can then later use the following properties to modify a data marker.

'Setup ChanneliPlot1.Channel(0).MarkersVisible = TrueiPlot1.Channel(0).MarkersStyle = ipmsDiamond 'The default style for all

'data markersiPlot1.Channel(0).MarkersAllowIndividual = True

'Data Point 1index = iPlot1.Channel(0).AddXY (10, 75) 'We'll let this data marker

'use the default values'Data Point 2index = iPlot1.Channel(0).AddXY (10, 75)iPlot1.Channel(0).DataMarkerShow(Index) = False 'Hide this specific

'data marker'Data Point 3index = iPlot1.Channel(0).AddXY (11, 72)iPlot1.Channel(0).DataMarkerStyle(index) = ipmsPlus 'Change the style

'of this data marker

Page 51: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual 37

Channel Fill

The iPlot component supports the ability to flood fill an area between the trace line and aspecified base line (either above or below the trace line). The Fill feature is not available withthe iXYPlot component since its datasets are not based on y = f(x) .

To specify a baseline for the flood fill, use the FillReference property on a specific channel.

Tracking

Tracking refers to the AutoScale and AutoScrolling features of the axes. When new data isadded to the channel, tracking data is sent to the associated X and Y-Axes for the channelregarding the newly added data. This data is used by the chart to automatically scale and scrollthe axes and channel data.

By default, tracking data is sent to both the X and Y-Axes referred to by the channel’sXAxisName and YAxisName properties. You can enable or disable the sending of tracking datato a specific X or Y-Axis by using the XAxisTrackingEnabled and YAxisTrackingEnabledproperties.

ReferenceLine = 0

ReferenceLine = 60

ReferenceLine = 80

Page 52: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

38

Ring BufferBy default, the chart will buffer all of the data points added to all channels into RAM. Thisbuffered data makes it possible to scroll back to older data (history) and other related functions.

The RingBuffer property allows you to control how much data is stored in available memory. Ifyou set the RingBuffer property to 10,000, then memory will be allocated for 10,000 datapoints. After you add 10,000 data points, the oldest data will begin to be replaced by newlyadded data points. The Ring Buffer is a FIFO (First In First Out) type buffer. You can findmore information on using the Ring Buffer feature in the chapter entitled “Memory Utilization”.

Digital Channel SupportIf your data sets contain binary data (0’s and 1’s, True and False, etc.), then you can set theDigitalEnabled property to True to enable Digital Channel support.

When Digital Channel Support is on, Y values that are = 0 are plotted on the Y-Axis scaleaccording to the DigitalReferenceLow value. Y values that are < 0 or > 0 are plotted on the Y-Axis scale according to the DigitalReferenceHigh value. The result is two possible values for Yon the Y-Axis.

Apsh

and are independent of other channels.Also, Remember that the RingBuffer is specified as the number of data pointsthat will be stored in the buffer.

Remember that the RingBuffer properties are assigned to individual channels,

Iocomp Components – Plot Pack Manual

ll data will be squared off, with a horizontal line drawn from the last data point to the next dataoint, and then a vertical line drawn between the last horizontal line to the next data point asown below in Channel #2…

!Some compilers treat True as –1 or 1, so any value that is not 0 is treated as aDigital High or Logic = True .

Page 53: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual 39

Asynchronous and Synchronous Data

The Plot Components are able to handle Asynchronous Data (several channels that don’t havesynchronized X-Axis or Time data values) or Synchronous Data (several channels that have X-Axis or Time data values that are the same. i.e. there is one data point in each channel for anygiven X-Axis or Time data value).

The only difference between the two data set types relates to the use of the following features ofthe chart…

• Using the AddDataArray method: This method allows you to add data to all channelsby passing the channel data as an array to the main plot interface instead of individuallyto each channel. This method requires that your data be synchronous.

If you data is asynchronous, you can add data using the AddDataArray method by usingtwo special data point values for those data points which don’t exist for a particularchannel or for those data points which are null values…

Set the data value to 5E-301 for Null Value Data PointsSet the data value to 5E-302 for Empty Value Data Points

Data Points

Page 54: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

40

• Using the Channel Data Logging feature off of the main plot interface instead ofindividually from each channel: If you are using asynchronous data in conjunction withthe AddDataArray method, then you must ensure that the LogBufferSize property is setto 0 or 1 to disable caching of data before it is written to the log file from the maininterface. If you data is synchronous, then the LogBufferSize can be set to any value youwish to use.

Channel Data Logging

This feature is useful if you need an automated way of saving chart data to disk as it is beingadded in real-time. The saved data can be used by an external program or can be used to reloadthe data back into the chart at a later time.

Channel Data Logging can be setup for each individual channel. You can also setup the maininterface for automatic Channel Data Logging of all channels to disk, but you must be usingSynchronous Data.

Refer to the chapter entitled “Loading and Saving Data” for more detailed information.

Fas

Iocomp Components – Plot Pack Manual

tDraw

Quick Description: This feature, only available with the iPlot component, increases the drawingefficiency of the channel data when drawing large data sets to the Data View area. This isaccomplished by reducing the number of drawing operations required to draw your channel data.

Benefits: Dramatically speeds up drawing of data points and trace lines to the screen when you areshowing a large number of data points.

Drawbacks: Can create aliasing effects if you are using the smooth-scrolling features of thecomponent. However, it is guaranteed to show you the extremes of the data points at all times.

! The directory specified when using the channel data logging feature must existon the target system and the application’s user must have permissions to write tothat directory or file. Otherwise, an exception error will be generated.

Page 55: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual 41

Technical Description: when this feature is turned on, the iPlot component reduces the numberof repaints to the screen by only drawing the data points that would be visible on the videoscreen. It does this by determining how many data points would be drawn in any one videoscreen pixel, and then representing all of those data points as a single data point.

The following shows how the number of data points and trace lines are reduced during thepainting process of channel data when utilizing the FastDraw feature of the component.The firstgrid (each square is a pixel) shows the data points and trace lines as they would be drawn ifFastDraw was disabled…

Each line segment represents a drawing operation. Each dot represents a data point in thechannel object. Counting the number of line segments and data markers results in 15 drawingoperations.

This is what the screen would actually look like, remembering that each square is a pixel…

Page 56: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual42

Now, lets try to reduce the number of drawing operations in the third column. In the thirdcolumn (shaded in yellow for emphasis), we have four data points and three line segments.Since the line segments are simply overlapping each other, we can reduce the number of linedraws by performing the following method…

1. Determine the first and last data point in the column of data points (P3 and P4).2. Determine the maximum and minimum Y values in the column of data points (Represented

by diamond-shaped points).3. Do not draw the data markers between the first and last data points in the column

(Represented by gray-data points)4. Connect a line between the previous data point in the previous column(P2) to the first data

point(P3).5. Connect a line between the next data point in the next column (P5) to the last data point(P4).6. Draw a perpendicular line between the Y maximum and Y minimum values.

Again, counting the number of line segments drawn and data markers drawn results in 11drawing operations. This results in a reduction of 4 drawing operations when compared to notusing FastDraw. The greater the number of data points that fit in a single column of pixels, themore FastDraw can reduce the number of drawing operations, resulting in faster redraws andoverall speed of the component.

To sum up FastDraw, if we assume that the data points are equally spaced across the DataViewarea, turning on FastDraw will reduce the number of drawing operations when there are morethan two data points per column of pixels in the Data View. In other words, the followingformula must be satisfied…

((Number of Visible Data Points) / (DataView Width in Pixels)) > 2

If the number of data points is not equally spaced across the DataView, FastDraw will speed upthe drawing of the component when more than two data points occupy the same column of pixelsin the DataView area.

P1

P2

P3P6

P5P4

Page 57: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocom

Channel Types

Each component in the Plot Pack is setup to handle a specific plotting task using a channel typespecific to that plot component. The channel type denotes which features are available foradding data to that channel. The channel types available for use are as follows.

Refer to the chapter entitled “Adding Data” for more detailed information on using the differentadd data methods described below.

iPlot Component Channel: iPlotChannel:

This is the channel type used by the iPlot component. Implements Date Time adding methodsand method for adding X Null data points. For Date Time adding methods, it is assumed that theX-Axis is the Time Axis. You can rotate the axes if you wish the Time Axis (the X-Axis) to bevertical instead of horizontal.

• AddXY : adds data points in X and Y data point pairs.

Index = iPlot1.Channel(ChannelNumber).AddXY(XValue, YValue)Index = iPlot1.Channel(0).AddXY(10.34, 25.43)

• AddXYArrays : adds data points from two variant arrays, each containing x and yvalues. The number of elements in each array must be identical (i.e. if XData contains100 elements, YData must contain 100 elements), otherwise an exception will begenerated.

Index = iPlot1.Channel(ChannelNumber).AddXYArrays(XArray, YArray)

This procedure is able to handle variant arrays that start at element 0 or any value thatyou require. If you array starts at element XData(10), then that value will be used to addthe first data point.

It is recommended that you loop through your array and use the AddXY method to

add data to the chart as that is much faster than using the AddXYArrays proceduredue to the use of Variants. This procedure has been added as a convenient way of

p Components – Plot Pack Manual 43

• AddYArray : Adds multiple y values with a specified X-Axis spacing interval. Forexample, if your variant array (Y values) contains 100 elements and your XInterval is 1,then the plot component will plot all of your Y values with an increasing X value of 1.First data point is (1, YData(0)), second data point is (2,YData(1)), third data point is(3,YData(2)), fourth data point is (4, YData(3)), etc.

Index = iPlot1.Channel(ChannelNumber).AddYArray(XInterval, YArray)

passing variant arrays to the channel to add data, but is slower than simply loopingthrough the array in your program. If your data is already in Variant array format(i.e. not a double array), then there is no performance penalty by using theAddXYArrays procedure.

Page 58: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

44

This procedure is able to handle variant arrays that start at element 0 or any value thatyou require. If you array starts at element XData(10), then that value will be used to addthe first data point.

The interval depends on whether your X-Axis is in Date/Time format or not. If

• AddYElapsedSeconds : adds a Y data point at an X coordinate specified by the numberof elapsed seconds since the ResetElapsedStartTime method was called.

Index = iPlot1.Channel(0).AddYElapsedSeconds(YValue)Index = iPlot1.Channel(0).AddYElapsedSeconds(25.43)

• AddYElapsedTime : adds a Y data point at an X coordinate specified by the amount oftime (in DateTimeFormat) since the ResetElapsedStartTime method was called.

Index = iPlot1.Channel(0).AddYElapsedTime(YValue)Index = iPlot1.Channel(0).AddYElapsedTime(25.43)

• AddYNow : adds a Y data point at an X coordinate specified by the current system time(in DateTimeFormat).

Index = iPlot1.Channel(0).AddYNow(YValue)Index = iPlot1.Channel(0).AddYNow(25.43)

• AddXNull : adds a data point at a specified X data point. The Y value will be set to Null.

Index = iPlot1.Channel(0).AddXNull(XValue)Index = iPlot1.Channel(0).AddXNull(10.34)

• AddXEmpty : adds an empty data point at a specified X coordinate with no Ycoordinate. An empty data point is a data point with no X or Y Value, only an indexplaceholder for the data point. Since this data point doesn’t have an X or Y Value, noData Marker is shown and the trace line will not be drawn to this data point. This isuseful for adding data point “placeholders” so that you can set the X and Y value of thedata point at a later time.

Index = iPlot1.Channel(0).AddXEmpty(XValue)Index = iPlot1.Channel(0).AddXEmpty (10.34)

Refer to the chapter entitled “Null Data and Empty Data Handling” for moreinformation on Null and Empty Data Points.

LabelsFormatStyle of the X-Axis is iptfDateTime, then the interval must bespecified in Date/Time format. Otherwise, the interval is expressed in seconds orthe units that are used on your X-Axis.

Iocomp Components – Plot Pack Manual

! The iPlot component does not support null X data points. Use the iXYPlotcomponent if you need to create null X and Y data points.

Page 59: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

Iocomp Components – Plot Pack Manual 45

iXYPlot Component Channel: iPlotXYChannel:

This is the channel type used by the iXYPlot component. Supports adding data using theAddXY method. Also supported is the AddNull method for adding null data points

• AddXY : adds data points in X and Y data point pairs.

iPlot1.Channel(0).AddXY(XValue, YValue)iPlot1.Channel(0).AddXY(10.34, 25.43)

• AddXYArrays : adds data points from two variant arrays, each containing X and Yvalues. The number of elements in each array must be identical (i.e. if XArray contains100 elements, YArray must contain 100 elements), otherwise an exception will begenerated.

iPlot1.Channel(0).AddXYArrays(XArray, YArray)

This procedure is able to handle variant arrays that start at element 0 or any value thatyou require. If you array starts at element XData(10), then that value will be used to addthe first data point.

• AddNull : sets a data point as a null data point (both X and Y coordinates).

Index = iPlot1.Channel(0).AddNull()

'or you can add a point and then set it to null laterIndex = iPlot1.Channel(0).AddXY(15.4,17.9)iPlot1.Channel(0).DataNull(Index) = TRUE

• AddEmpty : sets a data point as an empty data point. An empty data point is a data pointwith no X or Y Value, only an index placeholder for the data point. Since this data pointdoesn’t have an X or Y Value, no Data Marker is shown and the trace line will not bedrawn to this data point. This is useful for adding data point “placeholders” so that youcan set the X and Y value of the data point at a later time.

Index = iPlot1.Channel(0).AddEmpty()

'You can later set the X and Y coordinates of this'data point by using the DataX and DataY propertiesiPlot1.Channel(0).DataX(Index) = XValueiPlot1.Channel(0).DataY(Index) = YValue

Refer to the chapter entitled “Null Data and Empty Data Handling” for moreinformation on Null and Empty Data Points.

Page 60: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 6 - Channels

46

Properties

Color Count DataEmptyDataMarkerShow DataMarkerStyle DataNullDataX DataY DigitalEnabledDigitalReferenceHigh DigitalReferenceLow DigitalReferenceStyleElapsedStartTime Enabled FastDrawEnabledFillColor FillEnabled FillReferenceFillStyle FillUseChannelColor InterpolationStyleLogBufferSize LogFileName LoggingActiveMarkersAllowIndividual MarkersBrushColor MarkersBrushStyleMarkersBrushUseChannelColor MarkersPenColor MarkersPenStyleMarkersPenUseChannelColor MarkersPenWidth MarkersSizeMarkersStyle MarkersVisible NamePopupEnabled RingBufferSize RunningYMaxRunningYMean RunningYMin TagTitleText TraceLineStyle TraceLineWidthTraceVisible VisibleInLegend VisibleXAxisName XAxisTrackingEnabled YAxisNameYAxisTrackingEnabled

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

AddEmpty [iXYPlot Only] AddXEmpty [iPlot Only] AddXNull [iPlot Only]AddXYArrays AddXY AddYArrayAddYElapsedSeconds [iPlot Only] AddYElapsedTime [iPlot Only] AddYNow [iPlot Only]Clear GetXMax GetXMeanGetXMin GetYInterpolated [iPlot Only] GetYMaxGetYMean GetYMin LoadDataFromFileLoadPropertiesFromFile LogActivate LogDeactivateResetElapsedStartTime SaveDataToFile SavePropertiesToFile

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Events

OnClickDataPoint

Iocomp Components – Plot Pack Manual

! All events are on the main component interface and not on the sub-object interface.

Page 61: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 7 - Legend

Iocomp

Chapter 7 - Legend

The Legend object provides display of channel names and their associated line and marker colorsymbols for easy reference by your application user.

Legend Object

Components – Plot Pack Manual 47

! Currently, the legend can only be vertical. Horizontal support will be added in afuture release.

Page 62: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 7 - Legend

48

Predefined Columns

By default, only the “Line” column is shown in the legend as well as the Channel Title. You canchoose to show or hide the following columns in the chart as well as their associated titles…

• Line : Displays the line style and line color of the channel.• Marker : Displays the marker style and marker color of the channel.• X-Axis Title : Displays the X-Axis title associated with this channel.• Y-Axis Title : Displays the Y-Axis title associated with this channel.• X-Value: Displays the last added data point’s X-Value for this channel.• Y-Value: Displays the last added data point’s Y-Value for this channel.• Y-Max: Displays the maximum Y-Value for this channel.• Y-Min: Displays the minimum Y-Value for this channel.• Y-Mean: Displays the mean Y-Value for this channel.

ChannelNameMaxWidth property. This property specifies the maximum width, incharacters, of Titles displayed in the legend. If the Title exceeds the number ofcharacters specified, it will word-wrap to the next line.

Only the Channel Title is shown in the “Title” Column. The Channel Title is set by

If you are using long Titles for your channels, you can utilize the

Iocomp Components – Plot Pack Manual

! using the ChannelTitle property of the channel. The Name property of each channelis the name that is used programmatically and is not the title seen by end user of thechart.

Page 63: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 7 - Legend

Iocomp C

Turn On and Off Column Titles

By default, the title of each column in the legend is not shown. You can choose to show the titleof each column by setting the ColumnTitlesVisible = True or by using the built-in propertyeditor to make the Column Titles Visible.

Properties

BackGroundColor BackGroundTransparent ChannelNameMaxWidthColumnSpacing ColumnTitlesFontColor ColumnTitlesFontColumnTitlesVisible Enabled FontColorFont Height HorizontalMarginBottom MarginLeft MarginRightMarginTop Name PopupEnabledRowSpacing SelectedItemBackGroundColor SelectedItemFontColorSelectedItemFont ShowColumnLine ShowColumnMarkerShowColumnXAxisTitle ShowColumnXValue ShowColumnYAxisTitleShowColumnYMax ShowColumnYMean ShowColumnYMinShowColumnYValue StartPercent StopPercentVisible Width ZOrder

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

None. Open for future expansion.

Events

None. Open for future expansion.

If you change previous data points, the YMax, YMin, and YMean values will

! no longer be valid. To refresh these values if you change previous datapoints, call GetYMax, GetYMin, and/or GetYMean to force a recalculationof these values after making your chages.

In versions prior to Version 2.0.4 Service Pack 2, the X-Value and Y-Valuecolumns were used to display the current position of the cursor. This has

omponents – Plot Pack Manual 49

been changed so that cursor position data is shown in a hint window next tothe cursor line(s). Refer to the chapter on Cursors for more informationabout displaying cursor data.

Page 64: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 8 - ToolBar

Iocomp Components – Plot Pack Manual50

Chapter 8 - ToolBar

The ToolBar object provides access for your application user to many built-in features of the Plot Packcomponents such as Tracking Control, Zooming, Scrolling, Cursor, Clipboard, Print, Save, access to theRun-Time Property Editor, and many other functions which can be expanded.

The built-in toolbar makes it easy to use our component without needing a separate, external componentor additional program code to implement a toolbar. Of course, if you need additional features that ourtoolbar doesn’t provide or if you need to include functions in a unified application toolbar, you candispense with this toolbar and implement a toolbar externally. Refer to the chapter entitled“Implementing Toolbar Externally” for more detailed information.

Currently, the toolbar only supports being aligned to the top of the component. Moving and sizing thetoolbar as well as support for multiple toolbars is left open for future expansion.

ToolBar Object

Page 65: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 8 - ToolBar

Iocomp Components – Plot Pack Manual 51

Configure Individual Buttons

There are currently 10 buttons available for display and use in the toolbar. You can individuallyshow or hide buttons by using the “Show” properties listed below. Additional buttons will beadded and is open for future expansion.

Implemented Externally

There are various methods and properties implemented for use in your programs code to controlthe toolbar outside of the Plot Component. Refer to the chapter on “Implementing ToolBarExternally” for more information.

Button Descriptions

Resume Button

This button resumes all tracking on all axes. Also, all cursors arehidden and all axes are re-zoomed to their stored values. To ensure thatnew axis zoom settings are saved, right-click on the appropriate axis andselect "Update Resume Values".

Pause Button

This button pauses tracking on all axes.

Axes Scroll Mode Button

There are two modes available when clicking the mouse on an axis andmoving the mouse up/down or right/left. This button allows the axis toscroll.

Axes Zoom Mode Button

There are two modes available when clicking the mouse on an axis andmoving the mouse up/down or right/left. This button allows the axis tozoom.

Page 66: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 8 - ToolBar

Iocomp Components – Plot Pack Manual52

Zoom In Button

This button increases the zoom on all axes by a factor 2x.

Zoom Out Button

This button decreases the zoom on all axes by a factor 2x.

Select Button

Used for selecting items in the data view area. Generates events that canbe used by the programmer to react to selection of items such as datapoints, annotations, areas of the data view, etc. Also used for movingannotations that have their UserCanMove property set to TRUE.

Zoom Box Button

This button allows the user to draw a box on the DataView area and zoomall axes around the selected area.

Cursor Button

This button shows or hides all data cursors.

Edit Button

This button brings up the run-time property editor for the component.

Copy Button

This button copies an Enhanced Metafile Format version of the component tothe clipboard.

Page 67: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 8 - ToolBar

Iocomp Components – Plot Pack Manual 53

Save Button

This button brings up a save dialog to save out snapshots of the chart inseveral supported graphic formats.

Print Button

This button brings up a print selection dialog to print out the currentchart to a system or network printer. The chart as it is drawn when thisbutton is pressed is used to generate the chart printout.

Properties

CursorActive Enabled HeightHorizontal Name PopupEnabledShowAxesModeButtons ShowCopyButton ShowCursorButtonShowEditButton ShowPauseButton ShowPrintButtonShowResumeButton ShowSaveButton ShowSelectButtonShowZoomBoxButton ShowZoomInOutButtons StartPercentStopPercent Visible WidthZoomBoxActive ZoomInOutFactor ZOrder

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

DoButtonClickCopy DoButtonClickCursor DoButtonClickEditDoButtonClickPause DoButtonClickPrint DoButtonClickResumeDoButtonClickSave DoButtonClickScrollAxesMode DoButtonClickSelectDoButtonClickZoomAxesMode DoButtonClickZoomBox DoButtonClickZoomInDoButtonClickZoomOut TurnOffCursor

Refer to Appendix C and D for more detailed information about this plot object’s properties.Also refer to the Implementing Toolbar Externally chapter for more information.

Events

None. Open for future expansion.

Page 68: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

Iocomp Components – Plot Pack Manual54

Chapter 9 - Annotations

The Annotation Objects are the text and shapes that can be displayed in the DataView, overlaid overyour channel data. Annotations can be positioned in relation to a particular channel or to the DataViewarea, depending on whether you want the annotations to scroll or track with the channel data or be fixedin place within the DataView.

Annotations can be in the form of text strings, lines, or rectangles. Additional annotation types will beadded and is open for future expansion.

Text Annotation Object Graphical Annotation Objects

Page 69: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

Iocomp Components – Plot Pack Manual 55

Annotation Types

Text

Text annotations. Font size, style, name, color properties, and text rotation can be set foreach individual text annotation. Use the X and Y properties to set the center-point of theText Object. The text will be centered both horizontally and vertically around this point.

Line

Line annotations. Width, length, and line color properties can be set for each individualline annotation. Use the X and Y properties to set the beginning point of the line (X,Y)and the X2 and Y2 properties to set the end point of the line (X2, Y2).

Rectangle

Rectangle annotations. Width, length, line color, fill style, and fill color properties can beset for each individual rectangle annotation. Use the X and Y properties to set the center-point of the Rectangle Object. The rectangle will be centered both horizontally andvertically around this point. Use the Width and Height properties to set the rectangle’swidth and height. Use the PenColor, PenWidth, and PenStyle properties to set theborder line properties. Use the BrushColor and BrushStyle properties to set the fillproperties.

Sample Annotation

X, Y Center Point

X, Y Center Point

BrushColor andBrushStylePenColor,

PenStyle, andPenWidth

X, Y Start Point X2, Y2 End PointPenColor,PenStyle, andPenWidth

Page 70: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

56

LineX

X-Axis Line Annotation. Set the X coordinate to specify the X-Axis value that will be used todraw a line perpendicular to the X-Axis. The length of the line goes from positive infinity tonegative infinity on the Y-Axis.

LineY

Y-Axis Line Annotation. Set the Y coordinate to specify the Y-Axis value that will be used todraw a line perpendicular to the Y-Axis. The length of the line goes from positive infinity tonegative infinity on the X-Axis.

X-Axis Value

PenColor,PenStyle, andPenWidth

Y-Axis Value

PenColor,PenStyle, andPenWidth

Reversing Axes has no effect on DataView aligned Annotations. The reference

Iocomp Components – Plot Pack Manual

values specified are always left to right (0-100) and bottom to top in relation tothe Data View.

Page 71: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

Iocomp Components – Plot Pack Manual 57

Annotation Reference RelationshipsWhen setting the X, Y, X2, and Y2 coordinates of each annotation object, these coordinates canrefer either to a specific channel or to the DataView itself.

DataView ReferenceTo have the annotation be referenced to a particular channel, set the Reference propertyto iprtDataView. The coordinates will now refer to the DataView and will in effect bestatic in relation to the axes and channels in the chart. The range of values possible forthe X and Y coordinates are from 0 – 100. A value of 0 would correspond to the left (Xcoordinate) or bottom (Y coordinate) of the DataView area. A value of 100 wouldcorrespond to the right (X coordinate) or top (Y coordinate) of the DataView area. Avalue of 50 would be halfway in-between.

Channel ReferenceTo have the annotation be referenced to a particular channel, set the ChannelNameProperty to the name of the channel and set the Reference property to iprtChannel. Thecoordinates specified will now be in reference to the X and Y-Axes associated with thatchannel. In effect, the annotation will move with the channel as the channel andassociated axes are scrolled.

Reference = iprtDataViewAnnotation references the Data View

Reference = iprtChannelAnnotation references the specified Channel’s Axes

Page 72: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

Iocomp Components – Plot Pack Manual58

Moveable Annotations

Annotations can be moveable by your application end user by setting the UserCanMove propertyof each annotation object.

Index = iPlot1.Annotation(0).UserCanMove = True

When this property is set to true, the application end-user at runtime will be able to grab a holdof and drag annotations within the DataView area.

How to Add Annotations

To add an annotation to the chart, simply execute the following method…

Index = iPlot1.AddAnnotation

The return value is an unique index for use in manipulating the object. After adding the object,you can set the properties of the annotation, such as setting the object as a text annotation and itsassociated font properties or setting the object as a line annotation and its associated lineproperties. [Note: Font properties in the example below will differ depending on your compiler]

Text Annotation Example

iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = "Channel 1"iPlot1.Annotation(Index).X = 18.33 'Center X CoordinateiPlot1.Annotation(Index).Y = 59.85 'Center Y CoordinateiPlot1.Annotation(Index).Style = ipasText 'Text AnnotationiPlot1.Annotation(Index).FontColor = vbWhite 'White FontiPlot1.Annotation(Index).Text = "Sample Annotation"iPlot1.Annotation(Index).TextRotation = ira180 'Rotate up-side-down

Line Annotation Example

iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(Index).X = 18.33 'Starting X CoordinateiPlot1.Annotation(Index).Y = 59.85 'Starting Y CoordinateiPlot1.Annotation(Index).X2 = 67.4 'Ending X CoordinateiPlot1.Annotation(Index).Y2 = 104.85 'Ending Y CoordinateiPlot1.Annotation(Index).Style = ipasLine 'Line AnnotationiPlot1.Annotation(Index).PenColor = vbWhite 'White LineiPlot1.Annotation(Index).PenStyle = psSolid 'Solid LineiPlot1.Annotation(Index).PenWidth = 2

Page 73: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

Iocomp Components – Plot Pack Manual 59

Rectangle Annotation Example

iPlot1.Annotation(Index).Reference = iprtDataViewiPlot1.Annotation(Index).X = 55.25 'Center X % CoordinateiPlot1.Annotation(Index).Y = 75.25 'Center Y % CoordinateiPlot1.Annotation(Index).Style = ipasRectangle 'Rectangle AnnotationiPlot1.Annotation(Index).PenColor = vbWhite 'White BorderiPlot1.Annotation(Index).PenStyle = psDash 'Dashed LineiPlot1.Annotation(Index).PenWidth = 1iPlot1.Annotation(Index).BrushColor = vbYellow 'Yellow FilliPlot1.Annotation(Index).BrushStyle = bsDiagCross

LineX Example

iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(Index).X = 18.33 'X CoordinateiPlot1.Annotation(Index).Style = ipasLineX 'LineX AnnotationiPlot1.Annotation(Index).PenColor = vbWhite 'White LineiPlot1.Annotation(Index).PenStyle = psSolid 'Solid LineiPlot1.Annotation(Index).PenWidth = 2

LineY Example

iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(Index).Y = 59.85 'Y CoordinateiPlot1.Annotation(Index).Style = ipasLineY 'LineY AnnotationiPlot1.Annotation(Index).PenColor = vbWhite 'White LineiPlot1.Annotation(Index).PenStyle = psSolid 'Solid LineiPlot1.Annotation(Index).PenWidth = 2

How to Remove Annotations

To remove an annotation, execute the DeleteAnnotation method, passing the unique index valueof the annotation to delete. To delete all annotations, execute the RemoveAllAnnotationsmethod. Note that these methods are on the main component interface.

Page 74: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 9 - Annotations

60

Annotation Click Event

This event, actually an event on the main component interface, is fired every time a user clickson an annotation when the Select Button is engaged. The event passes back the Index of theAnnotation that is clicked.

‘Visual BasicOnClickAnnotation(ByVal Index As Long)

//Visual C++CProgramDlg::OnClickAnnotation(long Index)

//Delphi-Kylix-C++ BuilderTForm1.iPlot1ClickAnnotation(Index: Integer)

Properties

BrushColor BrushStyle ChannelNameEnabled FontColor FontHeight Name PenColorPenStyle PenWidth PopupEnabledReference Style TextTextRotation Visible WidthX2 X Y2Y

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

None. Open for future expansion.

Events

OnClickAnnotation

Iocomp Components – Plot Pack Manual

! All events are on the main component interface and not on the sub-object interface.

Page 75: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp Components – Plot Pack Manual 61

Chapter 10 – Data Cursors

The Cursor is a tool included with the Plot Pack components, which allows the user to display individualdata points on the screen in the Plot Legend. This tool is available for use from the integrated toolbar,and can also be used by your program code through the built-in events and interfaces that support thecursor.

The cursor tool work differently depending on the type of component being used. All of the cursorsdisplay their data in a hint window next to the cursor. If you wish to display the cursor data in your ownwindow or in an external control, refer to the available events at the end of this chapter.

The Plot pack components support an unlimited number of cursors through code and through the run-time property editor. One cursor is automatically added for easy use by the cursor toolbar button.

Cursor Types

By default, the cursors are initially set as “Value X-Y” cursors, which in the iPlot componentdraws a line perpendicular to the X-Axis and displays the X and Y data point values for aparticular channel. You can change the type of cursor either by right-clicking on the cursor atrun-time or through code by accessing the Cursor Object. You can also change the labels in thepopup menu for each cursor, customizing it for your particular application.

Value X-Y Cursor [ValueXY]

This cursor style displays the current X and Y-Axis value for a data point in a particularchannel. This example shows a data point on Channel #1 at X=40.0 and Y=2.0000.

Page 76: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp Components – Plot Pack Manual62

Value X Cursor [ValueX]

This cursor style displays the current X-Axis value for a data point in a particularchannel. This example shows a data point on Channel #1 at X=40.0.

Value Y Cursor [ValueY]

This cursor style displays the current Y-Axis value for a data point in a particularchannel. This example shows a data point on Channel #1 Y=2.0000.

Page 77: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp Components – Plot Pack Manual 63

Period Cursor [DeltaX]

This cursor style displays the value of the distance between the two displayed cursorswhen measuring two data points along the X-Axis. This example shows a data point onChannel #1 at X=40.0 and Y=2.0000.

Peak-Peak Cursor [DeltaY]

This cursor style displays the value of the distance between the two displayed cursorswhen measuring two data points along the Y-Axis. This example shows a peak-to-peakdistance value of 13.559.

Page 78: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

64

Frequency Cursor [InverseDeltaX]

This cursor style displays the current X and Y-Axis value for a data point in a particularchannel. This example shows a data point on Channel #1 at X=40.0 and Y=2.0000.

Adding and Removing Cursors

To add a data cursor to the chart, simply execute the following method…

index = iPlot1.AddDataCursor

To delete a data cursor from the chart, simply execute the following method…

iPlot1.DeleteDataCursor(index)

To remove all data cursors from the chart, simply execute the following method…

iPlot1.RemoveAllDataCursors

The return value is an unique index for use in manipulating the object. After adding the object,you can set the properties of the data cursor, such changing the cursor style, the hint windowfont, hint orientation, etc. [Note: Font properties in the example below will differ depending onyour compiler]

Iocomp Components – Plot Pack Manual

! If you are using Interpolation to draw the trace line, please note that the Data Cursorsdo not yet support the display of X or Y coordinate data for Interpolated trace lines.The X and Y coordinate data will reflect Straight Line Traces only.

Page 79: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp Components – Plot Pack Manual 65

Data Cursor Example

iPlot1.DataCursor(index).Style = ipcsValueXYiPlot1.DataCursor(index).MenuItemCaptionValueXY = "XY Coordinates"iPlot1.DataCursor(index).MenuItemVisibleValueX = FalseiPlot1.DataCursor(index).MenuItemVisibleValueY = FalseiPlot1.DataCursor(index).ChannelName = "Channel 1"iPlot1.DataCursor(index).FontColor = vbCyan

CursorXValue = iPlot1.DataCursor(index).ValueXCursorYValue = iPlot1.DataCursor(index).ValueY

Accessing Individual Cursor Properties

There are many properties that can be used to customize the look and feel as well as theoperation of the cursor in your application.

Controlling User Popup Menu

By default, the popup menu allows users to change the style of the cursor. You cancontrol the user selections that are available by using the “MenuItemCaption” and“MenuItemVisible” properties of the cursor object. The “MenuItemCaption”properties allow you to customize the label used to describe the type of cursor styleavailable to the user. The “MenuItemVisible” properties allow you to customizewhether a particular cursor style is available to the user.

Controlling Hints

You can control the behavior of the cursor by using the available hint properties of thecursor object. The HintHideOnRelease property is useful if you only want the hintwindow to be visible when the user has clicked, and holds down the mouse button on aparticular cursor. You can also choose to hide the hint permanently using the HintShowproperty so that you can show cursor data outside the component. Use theOnCursorChange event on the main plot interface to be notified that the cursor haschanged position.

Controlling Cursor Pointers

You can programmatically change the cursor positions by using the Pointer1Positionand Pointer2Position properties. The Pointer2Position property is only valid for thosecursors that use two pointers.

iPlot Component Specific Notes

If the cursor is in-between data points in a particular channel, then the cursor will display linearinterpolated (y = mx + b) values. Also, the value displayed for each channel depends on whichX and Y-Axes that channel is associated with.

Page 80: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp Components – Plot Pack Manual66

iXYPlot Component Specific Notes

The iXYPlot Component’s cursor, if in ipcsValueXY mode, will display a crosshair cursor instead ofa single line. This is due to the fact that there can be many different y solutions from any particularx value.

Cursor Events

If you need to know when the user is moving the cursor tool on the DataView area, you can use theOnCursorChange event to detect this. You can then query the DataCursor object for the currentPointer1Position and Pointer2Position properties (depending on the Cursor Style) to determine the Xand Y values for that channel under the cursor or to determine the calculated values from specializedcursor styles.

OnCursorChange(CursorIndex as Integer)iComponent.DataCursor(CursorIndex).Pointer1PositioniComponent.DataCursor(CursorIndex).Pointer2Position

Page 81: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 10 – Data Cursors

Iocomp

Properties

ChannelName Color EnabledFontColor Font HintHideOnReleaseHintOrientationSide HintPosition HintShowMenuItemCaptionDeltaX MenuItemCaptionDeltaY MenuItemCaptionInverseDeltaXMenuItemCaptionValueX MenuItemCaptionValueXY MenuItemCaptionValueYMenuItemVisibleDeltaX MenuItemVisibleDeltaY MenuItemVisibleInverseDeltaXMenuItemVisibleValueX MenuItemVisibleValueXY MenuItemVisibleValueYName Pointer1Position Pointer2PositionPopupEnabled Status StyleUseChannelColor Visible ValueXValueY

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

None. Open for future expansion.

Events

OnDataCursorChange

Components – Plot Pack Manual 67

! All events are on the main component interface and not on the sub-object interface.

Page 82: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual68

Chapter 11 - Limits

Limits (a.k.a. Process Windows) are objects that you can define and place on the chart. This is usefulfor showing a set of limits or process windows where data should be contained.

There are six types of Limits and Process Windows (referred to as Band Limits) available in the chart.Each limit is associated with an X-Axis and Y-Axis. Band Limits can be setup to be drawn as a filledband or two lines. You can create an unlimited number of limits and limit types per chart.

LineX

This type of limit is a vertical line positioned at a specific X-Axis value, perpendicular to the X-Axis. You can modify the line style, color, and width. Do not use the line width to simulate aband limit as the line width is in pixels (not accurate for limit use), and the band limits use theactual axis values.

LineX Limit

Page 83: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual 69

LineYThis type of limit is a vertical line positioned at a specific Y-Axis value, perpendicular to the Y-Axis. You can modify the line style, color, and width. Do not use the line width to simulate aband limit as the line width is in pixels (not accurate for limit use), and the band limits use theactual axis values.

BandXThis type of limit is a set of two lines or a filled-band positioned at two specific X-Axis values,perpendicular to the X-Axis. You can modify the starting X Value and ending X Value to createthe band. You can also modify fill properties such as fill style and fill color. If you specify a fillstyle of clear, then the band will be comprised of two parallel lines.

LineY Limit

Page 84: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual70

BandYThis type of limit is a set of two lines or a filled-band positioned at two specific Y-Axis values,perpendicular to the Y-Axis. You can modify the starting Y Value and ending Y Value to createthe band. You can also modify fill properties such as fill style and fill color. If you specify a fillstyle of clear, then the band will be comprised of two parallel lines.

PolyBandXThis type of limit is a dynamic set of connected points (two X Values, and one Y Value),resulting in two lines or a filled-band perpendicular to the X-Axis. Use AddBandElement to addindividual band elements to make up the entire band. Each band element will be connected tothe previous and next band element to make up the band.

Page 85: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual 71

PloyBandY

This type of limit is a dynamic set of connected points (two Y Values, and one X Value),resulting in two lines or a filled-band perpendicular to the Y-Axis. Use AddBandElement to addindividual band elements to make up the entire band. Each band element will be connected tothe previous and next band element to make up the band.

Adding and Removing Limits

To add a data limit to the chart, simply execute the following method…

index = iPlot1.AddLimit

The return value is an unique index for use in manipulating the object. After adding the object,you can set the properties of the limit, such as changing the limit style, the limit fill (ifapplicable), and the limit color.

To remove a limit from the chart, simply execute the following method…

iPlot1.DeleteLimit(Index)

To remove all limits, simply execute the following method…

iPlot1.RemoveAllLimits

Page 86: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual72

Single-Line Limit Examples

iPlot1.Limit(index).Style = iplsLimitYiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).LineStyle = psSolidiPlot1.Limit(index).Line1Position = 25 'Position on Y-Axis

iPlot1.Limit(index).Style = iplsLimitXiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).LineStyle = psSolidiPlot1.Limit(index).Line1Position = 25 'Position on X-Axis

Band Limit Examples

iPlot1.Limit(index).Style = iplsLimitYiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).FillStyle = bsDiagCrossiPlot1.Limit(index).Line1Position = 25 'Position on Y-AxisiPlot1.Limit(index).Line2Position = 55 'Position on Y-Axis

iPlot1.Limit(index).Style = iplsLimitXiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).FillStyle = bsDiagCrossiPlot1.Limit(index).Line1Position = 25 'Position on X-AxisiPlot1.Limit(index).Line2Position = 55 'Position on X-Axis

Poly Band Limit Examples

iPlot1.Limit(index).Style = iplsLimitYiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).FillStyle = bsDiagCrossiPlot1.Limit(index).AddBandElement(25, 75, 45) '25: Position on X-Axis

'75: Upper limit Y-Axis'45: Lower limit Y-Axis

iPlot1.Limit(index).AddBandElement(30, 85, 50) '30: Position on X-Axis'85: Upper limit Y-Axis'50: Lower limit Y-Axis

iPlot1.Limit(index).AddBandElement(35, 90, 50) '35: Position on X-Axis'90: Upper limit Y-Axis'50: Lower limit Y-Axis

iPlot1.Limit(index).AddBandElement(40, 80, 45) '40: Position on X-Axis'80: Upper limit Y-Axis'45: Lower limit Y-Axis

iPlot1.Limit(index).AddBandElement(45, 70, 40) '45: Position on X-Axis'70: Upper limit Y-Axis'40: Lower limit Y-Axis

Page 87: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual 73

iPlot1.Limit(index).Style = iplsLimitXiPlot1.Limit(index).Color = vbRediPlot1.Limit(index).FillStyle = bsDiagCrossiPlot1.Limit(index).AddBandElement(25, 75, 45) '25: Position on Y-Axis

'75: Upper limit X-Axis'45: Lower limit X-Axis

iPlot1.Limit(index).AddBandElement(30, 85, 50) '30: Position on Y-Axis'85: Upper limit X-Axis'50: Lower limit X-Axis

iPlot1.Limit(index).AddBandElement(35, 90, 50) '35: Position on Y-Axis'90: Upper limit X-Axis'50: Lower limit X-Axis

iPlot1.Limit(index).AddBandElement(40, 80, 45) '40: Position on Y-Axis'80: Upper limit X-Axis'45: Lower limit X-Axis

iPlot1.Limit(index).AddBandElement(45, 70, 40) '45: Position on Y-Axis'70: Upper limit X-Axis'40: Lower limit X-Axis

To remove all band elements, use the ClearAllElements method…

iPlot1.Limit(index).ClearAllElements 'Remove All Band Elements

Page 88: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 11 - Limits

Iocomp Components – Plot Pack Manual74

Properties

Color Enabled FillStyleLine1Position Line2Position LineStyleLineWidth Name PopupEnabledStyle Visible XAxisNameYAxisName

Refer to the help files for more detailed information about this plot object’s properties.

Methods

AddBandElement ClearAllElements

Refer to the help files for more detailed information about this plot object’s methods.

Events

None. Open for future expansion.

Page 89: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 12 - Labels

Iocomp Com

Chapter 12 - Labels

The Label Objects hold text that can be used as a horizontal chart title, common stacked-axesvertical title, footer, etc. By default, one label object is added to the chart to hold the chart title.You can add any number of label objects to the Plot component and change their position andproperties using our built-in property editor and visual layout manager.

Label Labels

For backward compatibility with older versions of our Plot Components, the first

! label cannot be removed. This is due to the fact that the first label is mapped tothe depreciated title properties of the component. All Title properties such asTitleText, TitleFont, and TitleMargin are mapped to the first label object.

Remember that it is easier to add labels and setup their properties using our built-

ponents – Plot Pack Manual 75

in property editor. The examples here illustrate manipulating the object throughcode.

Page 90: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 12 - Labels

Iocomp Components – Plot Pack Manual76

How to Add Labels

To add a Label to the chart, simply execute the following method…

index = iPlot1.AddLabel

The return value is a unique index for use in manipulating the object. After adding the object, you canset the properties of the label, such as setting the object associated font properties or setting the caption.[Note: Font properties in the example below will differ depending on your compiler]

Horizontal Label Example

iPlot1.Labels(Index).Alignment = iahCenteriPlot1.Labels(Index).Caption = "Sample Chart X vs. Y"iPlot1.Labels(Index).Font = "Times New Roman"iPlot1.Labels(Index).Horizontal = TrueiPlot1.Labels(Index).MarginBottom = 0.25iPlot1.Labels(Index).MarginLeft = 0iPlot1.Labels(Index).MarginRight = 0iPlot1.Labels(Index).MarginTop = 0.25

Vertical Label Example

iPlot1.Labels(Index).Alignment = iahCenteriPlot1.Labels(Index).Caption = "Stacked Y-Axes"iPlot1.Labels(Index).Font = "Times New Roman"iPlot1.Labels(Index).Horizontal = FalseiPlot1.Labels(Index).MarginBottom = 0.25iPlot1.Labels(Index).MarginLeft = 0iPlot1.Labels(Index).MarginRight = 0iPlot1.Labels(Index).MarginTop = 0.25

How to Remove LabelsTo remove a label, execute the DeleteLabel method, passing the unique index value of the labelto delete. To delete all labels, execute the RemoveAllLabels method. Note that these methodsare on the main component interface.

Page 91: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 12 - Labels

Iocomp Components – Plot Pack Manual 77

Properties

Alignment Caption EnabledFontColor Font HeightHorizontal MarginBottom MarginLeftMarginRight MarginTop NamePopupEnabled StartPercent StopPercentVisible Width ZOrder

Refer to Appendix C and D for more detailed information about this plot object’s properties.

Methods

None. Open for future expansion.

Events

None. Open for future expansion.

Page 92: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual78

Chapter 13 - Visual Layout Manager

The Visual Layout Manger included in each Plot Pack component enables you to easily layout yourchart plot objects with very little effort. The Layout Manager is available at design-time through ourcustom property editors or available to your application users at run-time with our run-time propertyeditor.

The Layout Manger makes it possible to visually layout your chart without writing a single line of codeand without using complicated properties. You can of course use your own programming code to makechanges to the chart layout at runtime, but the Layout Manger makes it simple and easy to do visually.

To access the Visual Layout Manger, open up the property editor for the Plot Component and click onthe “Layout” tab.

The Plot control on your form is represented by the blue rectangle with icons for all of the current layoutobjects contained within the control such as the X-Axis, Y-Axis, Data View, Legend, and ToolbarLayout Objects. The Data View Object is fixed in position and in size (it resizes to fill all availablespace) and all other objects move in relation to the Data View.

Page 93: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual 79

Tutorial

How to Move Objects

Click and hold down the left mouse button on the Y-Axis. Notice that the Y-Axis object turns froma gray background to a yellow background on your screen.

Drag and drop the “Y-Axis 1” object in-between the Data View and “Legend 1”. Notice that arectangle will move along with your cursor. This indicates that you are moving the object over validpositions that are available.

Page 94: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual80

Release the mouse button to complete the move of the Y-Axis object. Notice that the Y-Axis objecthas moved to the position specified and all of the other objects have been repositioned to maximizethe size of the Data View area.

Page 95: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual 81

Resizing Plot Objects

To resize a Plot Object, such as an axis, hold your mouse cursor over one of the ends of theobject to be resized. Notice that the mouse cursor changes to a double arrow pointer, indicatingthat you are about to resize the Plot Object.

Hold down the left mouse button. Notice that the object is highlighed in yellow to indicate thatyou are resizing that particular object on your screen.

Page 96: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual82

Drag your mouse to resize the object. Notice that the object dynamically changes size as you resizeit. Release the mouse button when finished.

Note: The only objects that can be resized at this time are the X and Y-Axis objects.

Page 97: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual 83

How to Stack Axes

The Visual Layout Manger make it easy to stack multiple axes on top of one another.

To stack axes, first make sure that the axes to stack are sized so that they don’t overlap. If the axesoverlap, then the stacking process will not work.

Page 98: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Iocomp Components – Plot Pack Manual84

Drag and drop one of the axis objects on top of another axis that you wish to stack with.

Release the mouse button and the two axes will stack, with all other plot objects readjusting.

Page 99: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 13 - Visual Layout Manager

Io

Rotating X and Y-AxesTo swap the positions of the X and Y-Axes, right-click on the Data View object and select “X-Y-Axes Reverse” . This will reverse the positions of all X and Y-Axes objects.

Reversing or Rotating Axes has no effect on DataView aligned Annotations. The

comp Components – Plot Pack Manual 85

reference values specified are always left to right (0-100) and bottom to top in relationto the Data View.

Page 100: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

86

Chapter 14 - Adding Data

Adding Data to the Plot Pack components is a very easy and straightforward process. Since the channelsin the chart are not required to be synchronous, you can simply add your data points in X/Y coordinatepairs as required.

There

AddX

Comp

Vi

If you will be adding data from unsynchronized events (such as from data

acquisition hardware) and run into a problem where some data will cause

Iocomp Components – Plot Pack Manual

are currently four methods for adding data to the Plot Components.

Y

This method allows you to add data to the plot component in x and y data value pairs. This is thesimplest method to use when adding data to the Plot Components. This method is compatiblewith both the iPlot and iXYPlot components.

lete AddXY ExampleThe following example assumes that you have placed a single iPlot component on your formalong with a standard push button named “PlotButton”. When you initially create the plotobject, it automatically adds one X-Axis, one Y-Axis, and one Channel for you by default.

Each example will plot 100 random Y data points with an increasing X value.

sual Basic

Private Sub PlotButton_Click()Dim x As LongDim XData As DoubleDim YData As Double

For x = 1 To 100'Increment X DataXData = XData + 1

'Generate Random Y DataYData = Rnd(1) * 100

'Plot XY Data PairiPlotX1.Channel(0).AddXY XData, YData

Next xEnd Sub

other data to scroll off the screen, take a look at the multiple X and Y-Axissupport. You can have each channel assigned to its own axes, independentof other channels. You can then add data in a synchronous or asynchronousmanner as needed.

Page 101: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual 87

Visual C++ [Disp Inteface]

//Place at top of cpp file#include "iplotx.h"#include "iplotaxisx.h"#include "iplotlegendx.h"#include "iplotchannelx.h"#include "iplottoolbarx.h"#include "iplotdataviewx.h"#include "iplotannotationx.h"#include "iplotlabelsx.h"

void CFormDlg::OnPlotButton(){

double XData;double YData;

XData = 0;YData = 0;

for(int i=0; i<100; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data Pairm_iPlotX.GetChannel(0).AddXY(XData, YData);

};}

Visual C++ [High-Speed iDispatch Interface]

//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

void CFormDlg::OnPlotButton(){

double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);

Page 102: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual88

XData = 0;YData = 0;

for(int i=0; i<1000000; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data PairiPlotX1->Channel[0]->AddXY(XData, YData);

};}

C++ Builder

#include <stdlib.h> //Place at top of cpp file

void __fastcall TForm1::PlotButtonClick(TObject *Sender){

double XData;double YData;

XData = 0;YData = 0;

for(int i=0; i<100; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (random(100));

//Plot XY Data PairiPlot1->Channel[0]->AddXY(XData, YData);

};}

Page 103: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual 89

Delphi/Kylix

procedure TForm1.PlotButtonClick(Sender: TObject);var

x : Integer;XData : Double;YData : Double;

beginfor x := 1 To 100 do

begin//Increment X CounterXData := XData + 1;

//Generate Random DataYData := Random(100);

//Plot XY Data PairiPlot1.Channel[0].AddXY(XData, YData);

end;end;

Internet Explorer[Client-Side, VBScript]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Internet Explorer Plot Pack Example</title></head><body><object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"width="500" height="200"></object><input type="button" value="Plot" name="PlotButton"><script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick()

Dim xDim XDataDim YData

For x = 1 To 100'Increment X CounterXData = XData + 1

'Generate Random DataYData = Rnd(1) * 100

'Plot XY Data PairiPlotX1.Channel(0).AddXY XData, YData

Nextend sub--></script></body></html>

Page 104: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual90

Sample Output from Example

Special ActiveX Example:

When iterating through a large loop and access sub objects of the ActiveX plot component, it ismore efficient to create a temporary variable to keep track of the sub object in memory instead ofhaving to access it during each iteration of the loop.

In the example above, we go through a loop 100 times. We access the channel sub object 100times for each AddXY method. There is a very small performance penalty when accessing thechannel, which is magnified when looping, and can be noticeable with very large loops. Torectify this, we can sacrifice a small amount of memory to greatly speed up large loops. We willset a local variable to reference the channel sub-object only once, and then reuse the localvariable in the loop.

In the following example we will create a temporary variable to hold the channel sub object andwill loop through 1,000,000 data points. You can flip between the method used in the exampleabove and the example shown below to see the difference in speed. (Approximately 2x-4x fasterusing the local variable method shown below depending on your compiler).

Page 105: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual 91

Visual Basic

Private Sub PlotButton_Click()Dim x As LongDim XData As DoubleDim YData As DoubleDim TempChannel as iPlotChannelX

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000'Increment X DataXData = XData + 1

'Generate Random Y DataYData = Rnd(1) * 100

'Plot XY Data PairTempChannel.AddXY XData, YData

Next xEnd Sub

Visual C++ [Disp Interface]

//Place at top of cpp file#include "iplotx.h"#include "iplotaxisx.h"#include "iplotlegendx.h"#include "iplotchannelx.h"#include "iplottoolbarx.h"#include "iplotdataviewx.h"#include "iplotannotationx.h"

void CFormDlg::OnPlotButton(){

double XData;double YData;CiPlotChannelX TempChannel;

XData = 0;YData = 0;

TempChannel = m_iPlotX1.GetChannel(0);

for(int i=0; i<1000000; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data PairTempChannel.AddXY(XData, YData);

};}

Page 106: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual92

Visual C++ [High-Speed iDispatch Interface]

//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

void CFormDlg::OnPlotButton(){

double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;CComPtr<iPlotLibrary::IiPlotChannelX> tempChannel;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);

tempChannel = iPlotX1->Channel[0];

XData = 0;YData = 0;

for(int i=0; i<1000000; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data PairtempChannel->AddXY(XData, YData);

};}

Page 107: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual 93

Internet Explorer[Client-Side, VBScript]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Internet Explorer Plot Pack Example</title></head><body><object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"width="500" height="200"></object><input type="button" value="Plot" name="PlotButton"><script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick()

Dim xDim XDataDim YDataDim TempChannel

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000'Increment X CounterXData = XData + 1

'Generate Random DataYData = Rnd(1) * 100

'Plot XY Data PairTempChannel.AddXY XData, YData

Nextend sub--></script></body></html>

Other Data Adding Methods

The iPlot component has several other methods for adding data that are specific only to the iPlotcomponent. These methods make it very easy to add data in real-time using the component’sbuilt-in timer or the computer’s internal system clock.

Page 108: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

94

AddYElapsedSecondsThis method adds Y data that you specify, and Y data from an internal “seconds” counter. This isuseful if you are acquiring data in real-time and wish to use the built-in seconds timer and you do nothave access to independent time data from your data source.

iComponent.Channel(0).AddYElapsedSeconds(YData)

AddYElapsedTimeThis method adds Y data that you specify and Y data from an internal time counter. This is useful ifyou are acquiring data in real-time and wish to use the built-in timer and you do not have access toindependent time data from your data source.

iComponent.Channel(0).AddYElapsedTime(YData)

DateTime Note: the X value that is used is in Date/Time format [i.e. 1 Day = 1, 1 hour = 1/24, 1minute = 1/(24*60)]. Refer to the section on Date/Time formats for more information on usingDate/Time values.

AddYNowThis method adds Y data that you specify, and Y data from your computer’s internal system clock(Operating System’s Clock). This is useful if you are acquiring data in real-time and wish to usecurrent system time and you do not have access to independent time data from your data source.

iComponent.Channel(0).AddYElapsedTime(YData)

DateTime Note: the X value that is used is in Date/Time format [i.e. 1 Day = 1, 1 hour = 1/24,1minute = 1/(24*60)]. Refer to the section on Date/Time formats for more information on usingDate/Time values.

If you have a service or program that automatically runs on your computer to

property to the current system time.

synchronize your time with the NIST time computers via the internet, with

!The time value added for the x-axis is calculated as the number of seconds thathave elapsed since the date/time value of the ElapsedStartTime property. To setthe ElapsedStartTime property to the current system time (i.e. Reset the ElapsedTime used by the AddYElapsedSeconds and AddYElapsedTime methods),execute the ResetElapsedStartTime method to set the ElapsedStartTime

Iocomp Components – Plot Pack Manual

your corporate network servers, or any other program that may modify yoursystem clock, you may run into problems using this method. This is becausethe chart (and your actual data) expects time to increment properly. It isrecommended that you do not use this method with such utilities, as there canbe unpredictable results.

Page 109: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual 95

AddXYArrays

This method adds data points from two variant arrays, each containing x and y values. Thenumber of elements in each array must be identical (i.e. if XArray contains 100 elements,YArray must contain 100 elements), otherwise an exception will be generated)

iComponent.Channel(0).AddXYArrays(XArray, YArray)

This procedure is able to handle variant arrays that start at element 0 or any value that yourequire. If you array starts at element XData(10), then that value will be used to add the firstdata point.

AddEmpty

This method sets a data point as an empty data point. An empty data point is a data point with noX or Y Value, only an index placeholder for the data point. Since this data point doesn’t have anX or Y Value, no Data Marker is shown and the trace line will not be drawn to this data point.This is useful for adding data point “placeholders” so that you can set the X and Y value of thedata point at a later time.

Index = iPlot1.Channel(0).AddEmpty()

'You can later set the X and Y coordinates of this'data point by using the DataX and DataY propertiesiPlot1.Channel(0).DataX(Index) = XValueiPlot1.Channel(0).DataY(Index) = YValue

iPlot1.Channel(0).DataX(Index) = 10.5iPlot1.Channel(0).DataY(Index) = 57.4

See Chapter “Null Data and Empty Data Handling” for more information.

AddXNull [iPlotX component only]

This method adds a data point at a specified X data point. The Y value will be set to Null.

iComponent.Channel(0).AddXNull(XData)iComponent.Channel(0).AddXNull(10.5)

See Chapter “Null Data and Empty Data Handling” for more information.

Page 110: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual96

AddNull [iXYPlotX component only]

• This method adds a data point as a null data point (both X and Y coordinates). You mustfirst add a data point using AddXY using dummy data, obtain the index of that data point,and then pass that index to set the data point to null.

Index = iPlot1.Channel(0).AddNull()

See Chapter “Null Data and Empty Data Handling” for more information.

Modifying/Reading Data

If you need to modify or read a data point after adding it to a channel, you can use the followingproperty to change the X or Y value of a data point. You will need to know the index of the datapoint to make this modification(the index was passed back by the AddXY and other add datafunctions)…

'Add a data point and get the data point's IndexIndex = iComponent.Channel(0).AddXY(10.5, 20.5)

'Change the data point's X and Y ValueiComponent.Channel(0).DataX(Index) = 11iComponent.Channel(0).DataY(Index) = 21

'Read the data point's X and Y ValueDataPointXValue = iComponent.Channel(0).DataX(Index)DataPointYValue = iComponent.Channel(0).DataY(Index)

If you are using the iPlot component, you can also use a special method on the channel calledGetYInterpolated. If you know a X value, then you can query the component for thecorresponding Y value of a data point at the X value. Since double values are not precise, the Yvalue returned will be interpolated using the trace line drawn between a data point before andafter the given X value.

YValue = iComponent.Channel(Index).GetYInterpolated(XValue)

Note: this method does not exist on the iXYPlot component since there can be many numeroussolutions to any given X value.

Page 111: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp

Running Y-Value Min, Max, and Mean

The Channel objects have three specialized properties that provide the following informationabout the channel without requiring extensive calculations by the component…

• RunningYMax• RunningYMin• RunningYMean

These values represent the Maximum Y, Minimum Y, and Mean Y values in the specifiedchannel. Since these values are calculated as you add data, accessing these values is very quicksince calculation of the max, min, and mean do not have to be done on every query.

'Use these values to get the running mean of the corresponding values'This method is quick because it is calculated during every addition'of a data point instead of every time the value is checkedYMaxValue = iComponent.Channel(Index).RunningYMaxYMinValue = iComponent.Channel(Index).RunningYMinYMeanValue = iComponent.Channel(Index).RunningYMean

The drawback to using these values is that if you change previous data points, these values willno longer be valid. To refresh these values if you change previous data points, call GetYMax,GetYMin, and/or GetYMean to force a recalculation of these values. You can use the GetYMax,GetYMin, and GetYMean values if you wish to have these values recalculated every time, butyou will see a performance decrease due to the overhead.

'Use these values to force a recalculation for every callYMaxValue = iComponent.Channel(Index).GetYMaxYMinValue = iComponent.Channel(Index).GetYMinYMeanValue = iComponent.Channel(Index).GetYMean

Components – Plot Pack Manual 97

! If you are utilizing Empty or Null data points, the RunningYMean value willnot be correct, as it does not exclude these values from the Mean calculation.

Page 112: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 14 - Adding Data

Iocomp Components – Plot Pack Manual98

Empty Data Points

In some situations, you may want to add a data point but not specify its X and/or Y Value. Whena data point is missing it’s X and/or Y value, the data point is ignored by the Plot componentwhen drawing the trace line. This results in a trace line between two valid data points andignoring the empty data point.

In contrast, null data points create a “break” in the trace line.

To add an empty data point, use the AddXEmpty if you are using the iPlot component to add anempty data point with an X value and an empty Y value. Use the AddEmpty method if you areusing the iXYPlot component to add an empty data point with no X or Y value. You can thenuse the DataX and/or DataY properties to specify the data point X and/or Y values at a later time.

'Add an empty data point to the iPlot componentIndex = iComponent.Channel.AddXEmpty(10.5) 'Specify the X coordinate

'Add an empty data point to the iXYPlot componentIndex = iComponent.Channel.AddEmpty()

See Chapter “Null Data and Empty Data Handling” for more information.

Page 113: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual 99

Chapter 15 - Null Data Handling

By default, the Plot Pack components are setup to draw a trace line between every point on the chart inthe order that they are added to the channel. The Null Data handling features allows you to specifycertain Y data values as null data points, preventing the chart from connecting these data points to actualdata points.

This feature is typically used in data acquisition hardware applications where you lose connection withthe hardware, but want to show on the chart that no data was collected at a particular X (usually TimeAxis value) and you have an undefined Y value (a.k.a. Null Data Point).

For example, notice the break in the trend line between the 4th and 6th data points. The 5th data point wasplotted with a null Y value, so it does not show up in the chart and no line is drawn through that datapoint.

Adding a Null Y Data Point at a Specific X Data Point (iPlot Only)

The AddXNull() method is used to add a specified X data point with the corresponding Y datapoint being null (i.e. undefined). Simply pass the X value (e.g. 2.56)

iComponent.Channel(0).AddXNull(2.56)

Adding a Null X & Y Data (iXYPlot Only)

The AddNull() method is used to add a data point with both an X and Y null value.

iComponent.Channel(0).AddNull()

4th Point

6th Point

Null Y Data Point Added atThis X Value (5th point)

Y-Axis

X-Axis

Page 114: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual100

Setting a Null Y Data Point at a Specific X Data Point

The DataNull() method is used to change a Y data point to a null value for an X/Y data point pairthat has already been plotted on the chart. Simply pass the X value (e.g. 2.56)

iComponent.Channel(0).DataNull(2.56)

Full Source Example

The following examples assume you have placed an iPlot Component on your form and haveplaced a simple pushbutton named “PlotButton” on your form. The example will plot 50 randomdata points with some random Null Data points for illustrative purposes.

Sample Output from Example

Page 115: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual 101

Visual Basic

Private Sub PlotButton_Click()Dim x As LongDim XData As LongDim YData As Long

For x = 1 To 50XData = XData + 2YData = Rnd(1) * 100

'85% of the time plot the X and Y Data Value'15% of the time plot the X Value and Y as nullIf Rnd(1) < 0.85 Then

'Plot X and Y Data PairiPlotX1.Channel(0).AddXY XData, YData

Else'Plot X Data and Y Null DataiPlotX1.Channel(0).AddXNull XData

End IfNext x

End Sub

Visual C++ [Disp Inteface]

void CFormDlg::OnPlotButton(){

double XData;double YData;

XData = 0;YData = 0;

for(int i=0; i<50; i++){

XData = XData + 2;YData = (rand()/(double)RAND_MAX)*100;

//85% of the time plot the X and Y Data Value//15% of the time plot the X Value and Y as Nullif ((rand()/(double)RAND_MAX) < 0.85)

{//Plot X and Y Data Pairm_iPlotX1.GetChannel(0).AddXY(XData, YData);

}else{

//Plot X Data and Y Null Datam_iPlotX1.GetChannel(0).AddXNull(XData);

}};

}

Page 116: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual102

Visual C++ [High-Speed iDispatch Inteface]

//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

void CFormDlg::OnPlotButton(){

double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);

XData = 0;YData = 0;

for(int i=0; i<50; i++){

XData = XData + 2;YData = (rand()/(double)RAND_MAX)*100;

//85% of the time plot the X and Y Data Value//15% of the time plot the X Value and Y as Nullif ((rand()/(double)RAND_MAX) < 0.85)

{//Plot X and Y Data PairiPlotX1->Channel[0]->AddXY(XData, YData);

}else{

//Plot X Data and Y Null DataiPlotX1->Channel[0]->AddXNull(XData);

}};

}

Page 117: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual 103

Delphi/Kylix

procedure TForm1.PlotButtonClick(Sender: TObject);var

x : Integer;XData : Double;YData : Double;

beginfor x := 1 To 50 do

beginXData := XData + 2;YData := Random(100);

//85% of the time plot the X and Y Data Value//15% of the time plot the X Value and Y as NullIf Random(11) < 8.5 then

//Plot XY Data PairiPlot1.Channel[0].AddXY(XData, YData)

else//Plot X Data and Y Null DataiPlot1.Channel[0].AddXNull(XData);

end;end;

end;

C++ Builder

#include <stdlib.h> //Place at top of cpp file

void __fastcall TForm1::PlotButtonClick(TObject *Sender){

double XData;double YData;

XData = 0;YData = 0;

for(int i=0; i<50; i++){

XData = XData + 2;YData = (random(100));

//85% of the time plot the X and Y Data Value//15% of the time plot the X Value and Y as Nullif (random(11) < 8.5)

{//Plot X and Y Data PairiPlot1->Channel[0]->AddXY(XData, YData);

}else{

//Plot X Data and Y Null DataiPlot1->Channel[0]->AddXNULL(Xdata);

}};

}

Page 118: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 15 - Null Data Handling

Iocomp Components – Plot Pack Manual104

Internet Explorer[Client-Side, VBScript]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Internet Explorer Plot Pack Example</title></head><body><object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"width="500" height="200"></object><input type="button" value="Plot" name="PlotButton"><script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick()

Dim xDim XDataDim YData

For x = 1 To 50XData = XData + 2YData = Rnd(1) * 100

'85% of the time plot the X and Y Data Value'15% of the time plot the X Value and Y as nullIf Rnd(1) < 0.85 Then

'Plot X and Y Data PairiPlotX1.Channel(0).AddXY XData, YData

Else'Plot X Data and Y Null DataiPlotX1.Channel(0).AddXNull XData

End IfNext

end sub--></script></body></html>

Page 119: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 16 - User Interface Control

Iocomp Components – Plot Pack Manual 105

Chapter 16 - User Interface Control

This chapter will cover using the User Interface controls that included with the Plot Pack. These controlobjects are available to your end user at runtime while using your compiled application.

The main user interfaces in the Plot Pack components that are available at runtime for the applicationuser are:

The Built-in Toolbar

The toolbar provides quick and easy to use control over the function of the chart by your enduser at runtime in your application. All functions are implemented inside of the chart without theneed to implement these in your own application code.

Button Meaning

Resume Button: Resumes tracking on ALL axes

Pause Button: Pauses tracking for ALL axes

Axes Mode Buttons: Changes the mode that the axes are inwhen using the mouse. The first icon puts the axes in scrollmode. The second icon puts the axes in zoom mode.

Zoom In/Out Buttons: Zooms ALL axes in our out according tothe ZoomInOutFactor property..Select Button: Used for selecting items in the data view area.Generates events that can be used by the programmer to react toselection of items such as data points, annotations, areas of thedata view, etc.Zoom Box Button: Allows the user to draw a "Zoom Box" onthe DataView area to zoom ALL axes.Cursor Button: Show or hide all data cursors. Values for eachchannel are displayed in a hint window next to the cursor(s).Edit Button: Brings up the Run-Time property editor for theuser to change most control properties.Copy Button: Copies the current component image to theclipboard.Save Button: Brings up a dialog to allow the user to save chartdata to currently supported file types.

Print Button: Allows user to print image of chart to printer.

Page 120: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 16 - User Interface Control

106

Scrollable and Zoomable Axes

All X and Y-Axes can be scrolled or zoomed by the user at runtime, even while data is beingplotted to the chart.

By default, the chart is set into “Scroll Mode” . This means that when a user clicks on anaxis, holds down the mouse button, and drags the cursor, that axis will scroll up or downdepending on the user’s direction of movement.

When the user selects “Zoom Mode” from the toolbar, clicking and dragging the axis willcause the axis scale to zoom in our out, depending on the user’s direction of movement (UpZooms In, Down Zooms Out, Left Zooms Out, Right Zooms In).

Whenever an axis is scrolled or zoomed, tracking on that axis will pause until restarted. You can

pause or resume tracking on all axes by using the Resume and Pause Buttons, or byright-clicking on an individual axis and toggling “Tracking Enabled”.

Zooming Tools

There are three tools available to the user to zoom all axes at the same time…

Zoom In Button: this tool will zoom all axes according to theZoomInOutFactor property.Zoom Out Button: this tool will de-zoom all axes according to theZoomInOutFactor property.Zoom Box Button: this tool will allow a user to click and drag out a box onthe DataView area. All axes will be zoomed to display this selected area.

Selec

Curs

Iocomp Components – Plot Pack Manual

t Tool

The select tool is used by the application end-user to select items in the data view area at run-time, such as annotations, data points, etc.

or Tool

The cursor tool hides or shows all available cursors. See the chapter on the Cursor for moredetailed information.

To reset the zoom, click on the Resume Button . To accept themodified zoom of the axis, right-click on the axis and select “Use NewValues”.

Page 121: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 16 - User Interface Control

Iocomp Co

Context Sensitive Right-Click Menus (Popup Menus)

Each object in the Plot Component has it’s own context sensitive right-click menu. The availableoptions depend on the object being selected.

Axis Object

You can resume or pause tracking on an individual axis by right-clicking on the axis andselecting “Tracking Enabled”

If the user has zoomed or scrolled the axis, the option “Use New Values” will beavailable. This will change the properties of the axis to use the new Min and Span valuesthat correspond to the scrolled or zoomed axis.

The edit menu item will allow the user to bring up the runtime property editor for thisobject.

DataView Object

Right-Clicking on the DataView will allow the user to bring up the runtime propertyeditor for this object.

Toolbar Object

Right-Clicking on the Toolbar will allow the user to bring up the runtime property editorfor this object.

Legend Object

Right-Clicking on the Legend will allow the user to bring up the runtime property editorfor the selected channel.

DataCursor Object

Right-Clicking on a Data Cursor will allow the user modify the properties andfunctionality of the selected Data Cursor object.

You can disable the Popup Menus on each individual object by using the

Enabled and PopupEnabled properties of each plot object. For example,to keep the application user from scrolling the X-Axis, you can set the

mponents – Plot Pack Manual 107

Enabled property of the X-Axis to FALSE(iComponent.XAxis(0).Enabled = FALSE). This will prevent the userfrom interacting with the X-Axis with either the mouse or keyboard inputdevices.

Page 122: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 16 - User Interface Control

108

Runtime Property Editor

The runtime property editor allows your application user to have complete control over the plotcomponent control at runtime. Some features are disabled in the runtime property editor, such asadding and deleting axes or channels, since these functions are to be handled by the application’scode and may lead to problems and program errors at runtime.

The Runtime Property allows the user to make changes to almost all aspects of the control duringexecution such as modifying axes properties, changing channel properties, using the VisualLayout Manager, etc.

There are two ways that your application user can directly access the Runtime Property Editor atruntime…

Right-Click on Plot Object

When a user right-clicks on a Plot Object and selects “Edit…”, the runtime property editor willbe displayed along with the particular Plot Object that was selected (Such as The X-Axis or theparticular channel selected in the Legend).

iComponent1.UserCanEditObjects = FALSE

Prev

You can prevent the user from being able to bring up the runtime property

Iocomp Components – Plot Pack Manual

enting or Disabling UI Interaction

You can disable or enable the following on the component as a whole or on a specific plot objectas needed.

Disabling All UI Interaction on a Plot Object

Set the Enabled property on each Plot Object, such as the Axis, to prevent scrolling, thelegend to prevent selection, etc. All plot objects support the Enabled property, but someobjects don’t accept user interaction at this time (such as limits) so this property isignored.

iComponent.XAxis(0).Enabled = FalseiComponent.YAxis(0).Enabled = FalseiComponent.Legend(0).Enabled = False

editor through right-clicks by setting the UserCanEditObjects property toFALSE.

Page 123: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 16 - User Interface Control

Iocomp Com

Disabling Popup Menu on a Plot Object or On Entire Component

Set the PopupEnabled property on each Plot Object, such as the Axis, to prevent the userfrom bringing up the Popup Menu. All plot objects support the PopupEnabled property,but some objects don’t accept user interaction at this time (such as limits) so this propertyis ignored. The main plot interface supports the UserCanEditObjects which disables allrun-time property access by the application user, but does not disable all popup menus.

iComponent.UserCanEditObjects = FalseiComponent.XAxis(0).Enabled = FalseiComponent.YAxis(0).Enabled = FalseiComponent.Legend(0).Enabled = False

Toolbar Runtime Property Editor Button

The Toolbar Runtime Property Editor Button brings up the runtime property editor for theentire plot component control.

iComponent1.Toolbar(0).ShowEditButton = FALSE

You will notichanges are mComponent.

ponents – Plot Pack Manual 109

ce that the Runtime Property Editor is missing the OK, Apply, and Cancel button. Whenade by your application’s end-user, the changes are immediately reflected in the Plot

You can prevent the user from being able to bring up the runtime propertyeditor from the toolbar by setting the ShowEditButton property to FALSE

Page 124: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocomp Components – Plot Pack Manual110

Chapter 17 - Tracking

Tracking is a general term for the Auto-Scale and Auto-Scrolling features of the Plot Pack. Thesefeatures pertain to how the axes react to the addition of new data to the chart with respect to the sizing ofthe span of the axes and the position of the axes with respect to this new data. Tracking Data isinformation from the channel, regarding newly added data points, that is passed to the axes so that theycan adjust according to your needs.

The Plot Pack Channel and Axes objects support a feature called Tracking. Whenever a channel drawsdata to the DataView window, it sends Tracking Data to its associated X and Y-Axes. This trackingdata tells the axis where new data is being plotted so that the axis can scroll or adjust it various sizingproperties (Min, Max, and Span) to keep the newly added data in view.

By default, the Plot Components Axes and Channel Tracking Settings are setup as follows…

• X-Axis is setup for Smooth Scrolling. Whenever new data is added to the chart (assume data isadded from left to right), the X-Axis will smoothly scroll to keep the most recent data in view.

iComponent.Xaxis(0).TrackingStyle = iptsScrollSmooth

• Y-Axis is setup for Scale Min Max Adjust. The axis will scale the Min and Span properties tokeep the new tracking data in view.

iComponent.Yaxis(0).TrackingStyle = iptsScaleMinMax

Channel

X-Axis Y-Axis

Tracking Data Tracking Data

Page 125: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocom

• All Channels are set to have their tracking data sent to their associated axes

iComponent.Channel(0).TrackingStyle = iptsScrollSmooth

• All Axes have their Tracking enabled so that they will adjust to new tracking data from thechannels.

iComponent.Xaxis(0).TrackingEnabled = TRUE iComponent.Yaxis(0).TrackingEnabled = TRUE

You can independently setup your own scaling and tracking options for each axis and channel if youwish if the default settings do not fit your needs. The next few sections will discuss the differentAutoScale and Tracking options that are available…

Tracking Styles

There are five different styles that can be set on each axis that control how the axes are Auto-Scaledwhen new tracking data is received from each channel. All axes support the 1-2-5 rule whichprovides “human readable” scales. See the chapter on AutoScale and AutoLabel for moreinformation on the automatic scaling and label features of the Plot Pack.

Scale

1-2-5 Rule: This is a feature of the AutoScale capability built into the axes ofall Plot Pack components. The rule has been designed to provide major ticklabels that are “human readable”. In studies, most people like to see numbers

increment by numbers that are multiples of 1, 2, or 5. For example, on a scalethat is between 0 and 100, people like to see a scale that increments like 0, 10,

p Components – Plot Pack Manual 111

MinMax [Y-Axis Default]

This tracking mode will adjust the min and span properties on the axis to ensure that new databeing added to the channel is kept in the visible DataView area. This is generally used with theY-Axis for Strip Chart applications.

iComponent.Xaxis(0).TrackingStyle = iptsScaleMinMaxiComponent.Yaxis(0).TrackingStyle = iptsScaleMinMax

20, 30, 40, 50, 60, 70, 80, 90, and 100. If there is not enough room on thechart, then the next best “Human Readable” format is 0, 20, 40, 60, 80, 100.A scale of 0, 17, 33, 50, 67, 83, and 100 would not fit into the 1-2-5 rule, andwouldn’t look good to a human anyway. The 1-2-5 Rule will ensure that thescales always look professional. Refer to the AutoLabel and AutoScaleChapter for more information on the 1-2-5 Rule.

Page 126: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocomp Components – Plot Pack Manual112

ScaleMax

This tracking mode will adjust only the max properties on the axis to ensure that new data beingadded to the channel is kept in the visible DataView area. If tracking data indicates that the datais below the min property of the axis, then the min value will not be changed.

iComponent.Xaxis(0).TrackingStyle = iptsScaleMaxiComponent.Yaxis(0).TrackingStyle = iptsScaleMax

ScaleMin

This tracking mode will adjust only the min properties on the axis to ensure that new data beingadded to the channel is kept in the visible DataView area. If tracking data indicates that the datais above the max property of the axis, then the max value will not be changed.

iComponent.Xaxis(0).TrackingStyle = iptsScaleMiniComponent.Yaxis(0).TrackingStyle = iptsScaleMin

ScrollSmooth [X-Axis Default]

If the data is off axis, then this tracking mode will adjust the axis to show the new tracking dataat the end of the scale. This style is generally used with the X-Axis for Strip Chart applications.

iComponent.Xaxis(0).TrackingStyle = iptsScrollSmoothiComponent.Yaxis(0).TrackingStyle = iptsScrollSmooth

Scroll Page

If the data is off axis, then this tracking mode will adjust the axis in discrete blocks (will shownext major tick) to show the new tracking data at the end of the scale. This style is generally usedwith the X-Axis for Strip Chart applications.

iComponent.Xaxis(0).TrackingStyle = iptsScrollPageiComponent.Yaxis(0).TrackingStyle = iptsScrollPage

ExpandCollapse

This tracking mode will adjust the min and span properties on the axis to ensure that all databeing added to the channel is kept in the visible DataView area. It will also ensure that the allvisible data is expanded to the maximum viewing size within the data view by sizing the span upand down and the data changes in the viewable area.

Warning!: This style is not recommended for all situations because the routines used to achievethis effect can place a large load on the computer’s processor under certain situations.

iComponent.Xaxis(0).TrackingStyle = iptsExpandCollapseiComponent.Yaxis(0).TrackingStyle = iptsExpandCollapse

Page 127: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocomp Components – Plot Pack Manual 113

Tracking Align First Styles

There are four styles that can be used to instruct the axes on how to align themselves when the firstdata point is plotted to the chart. You can have the data begin plotting on one extreme side of thechart or another depending on this setting.

Min

This style adjusts the axis to show the first data point on the beginning of the scale.

iComponent.Xaxis(0).TrackingAlignFirstStyle = ipafsMiniComponent.Yaxis(0).TrackingAlignFirstStyle = ipafsMin

Example TrackingAlignFirstStyle Set to ipafsMin

Max

This style adjusts the axis to show the first data point on the end of the scale.

iComponent.Xaxis(0).TrackingAlignFirstStyle = ipafsMaxiComponent.Yaxis(0).TrackingAlignFirstStyle = ipafsMax

Page 128: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocomp Components – Plot Pack Manual114

Example TrackingAlignFirstStyle Set to ipafsMax

Auto

This style leaves the axis unchanged if the first data point is already in view. If the first datapoint is out of view, then the axis is adjusted to show the first data point on the beginning of thescale.

iComponent.Xaxis(0).TrackingAlignFirstStyle = ipafsAutoiComponent.Yaxis(0).TrackingAlignFirstStyle = ipafsAuto

None [All Axis Default]

The axes are not adjusted on the first data point. This is the default for all axes and is the mostcommonly used Align First Style.

iComponent.Xaxis(0).TrackingAlignFirstStyle = ipafsNoneiComponent.Yaxis(0).TrackingAlignFirstStyle = ipafsNone

Tracking Scroll Compress Max

This feature specifies the maximum span value that is used to compress the axis when it receivestracking data. When the TrackingEnabled property is set to TRUE, the Span property will beincreased (Compressed) to include the new Tracking Data if the current Span property is less thanthe TrackingSrollCompressMax property value.

Page 129: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

Iocomp Components – Plot Pack Manual 115

Notice that the data in the plot has been plotted up to an X-Axis value of 100. If theTrackingScrollCompressMax property is set to 500, then X-Axis span will begin to increase as newdata is being added. When the Span property reaches the same value as theTrackingScrollCompressMax property, a value of 500, then the TrackingStyle will take over fromthat point on. In a default chart, the X-Axis would begin to Smooth Scroll after the Span propertyhad reached a value of 500.

Example:

iComponent.Xaxis(0).TrackingScrollCompressMax = 500

Enabling and Disabling Tracking

You can enable or disable the transfer of tracking data from the Channel to the Axes by settingindependent properties on either the channel or axes. This gives you complete control over howtracking is implemented.

Page 130: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 17 - Tracking

1

Channel Tracking Properties

You can disable the transmission of tracking data that comes from a channel to a particular axisby setting that channel’s XAxisTrackingEnabled or YAxisTrackingEnabled properties. Thisallows you to only send tracking data to one, both, or none of the associated axes for thischannel. The default value is TRUE.

iComponent.Channel(0).XAxisTrackingEnabled = TRUEiComponent.Channel(0).YAxisTrackingEnabled = TRUE

Axis Tracking Properties

You can disable the reception of tracking data for a particular axis by setting theTrackingEnabled property for the axis. The default value is TRUE.

iComponent.XAxis(0).TrackingEnabled = TRUEiComponent.YAxis(0).TrackingEnabled = TRUE

User Interaction

The end user of your application can also enable or disable tracking for all channels by using thePause and Resume buttons on the built-in toolbar. Refer to the chapter on the toolbar for moreinformation.

Manual Tracking

If you need to manually send tracking information to the axes, use the following procedure,passing the new data…

iComponent.XAxis(Index).NewTrackingData(XData)iComponent.YAxis(Index).NewTrackingData(YData)

iComponent.XAxis(Index).NewTrackingData(10.5)iComponent.YAxis(Index).NewTrackingData(27.2)

If all you are interested in doing is preventing the axes from scrolling all together,

then you should turn off the Tracking on all axes. Set the TrackingEnabled

Iocomp Components – Plot Pack Manual16

property to False for all axes. The effect will be that all of the axes will notrespond to tracking data, and will not scroll. If you want to prevent user’s fromscrolling the axes, set the Enabled property of the axis to False to prevent userinteraction with the axis.

Page 131: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Iocomp Components – Plot Pack Manual 117

Chapter 18 - Interpolation

This feature, sometimes referred to as Curve -Fitting though that is not always the case, is supported byour iPlot component. Interpolation is the process by which a line or series is drawn according to anestimation function or set of functions based on existing known data point values.

There are several types of Interpolation available for the channel object. All of the current Interpolationstyles draw curves that intersect existing data points.

None

This is not really an Interpolation Style of the component, but is used when you do not want atrace line drawn between data points. You simply want to show the known data points on thegraph without a line interconnecting the data points. To draw no line, set the TraceVisibleproperty to FALSE.

iPlot1.Channel(0).TraceVisible = False

Page 132: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Iocomp Components – Plot Pack Manual118

Straight Line

This type of interpolation simply draws a straight line between each data point. This can resultin “jagged-looking” curves.

iPlot1.Channel(0).InterpolationStyle = ipistStraightLine

Page 133: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Iocomp Components – Plot Pack Manual 119

Cubic Spline

This type of interpolation draws a curve based on Cubic Spline curve fitting interpolationequations.

iPlot1.Channel(0).InterpolationStyle = ipistCubicSpline

Page 134: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Iocomp Components – Plot Pack Manual120

Polynomial

This type of interpolation draws a curve based on Polynomial Interpolation curve fittingequations and is only good for small data sets (~100 data points)

Polynomial degree is fixed at [n – 1] with n =number of data points.

iPlot1.Channel(0).InterpolationStyle = ipistPolynomial

Page 135: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Ioco

Rational

This type of interpolation draws a curve based on Rational Interpolation curve fitting equations.This is an alternative to the Polynomial Interpolation with functions that have poles. Thisinterpolation is good for small to medium-sized data sets.

iPlot1.Channel(0).InterpolationStyle = ipistRational

Sometimes when using the curve fitting styles, an exception may be generated

by the curve-fitting function due to the data being outside of the bounds of thefunction. If the data in your channel causes the function to go outside its

mp Components – Plot Pack Manual 121

bounds (e.g. causes the function to divide by zero or generate a larger numberthan can be handled by a double value), then an exception will be generatedwithin the component causing the painting routine to fail. This will result inpartially drawn curves and/or data points.

Page 136: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 18 - Interpolation

Iocomp Components – Plot Pack Manual122

Differential

This type of interpolation draws a curve based on Differential Interpolation. This style drawshorizontal and vertical lines between data points. A line is drawn horizontal between one point’sX and Y-Value to the next data point’s X-Value. A vertical line is then drawn perpendicularfrom the end point up or down to the Y-Value of the second data point.

iPlot1.Channel(0).InterpolationStyle = ipistDifferential

Page 137: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 19 - Loading and Saving Data

Iocomp Components – Plot Pack Manual 123

Chapter 19 - Loading and Saving Data

The Plot Pack components support several different methods for storing and retrieving data and controlimage snapshots both to and from the local file system or to and from a network server. Additionally,several data text, data log, and binary image file formats are also supported. The component interfaceshave been left open for future expansion and support of additional file types and formats.

Data Formats

The plot pack components natively support several text formats for saving and loading channel data.The saved data can be used in other applications (such as Microsoft Excel) or can be used to reloadchannel data into another instance of the control at a later date or program execution. Saving andloading of channel properties, such as channel trace width, line color, and other control properties isalso supported.

There are two interfaces that are supported for loading and saving data. One is specific to aparticular channel and the other is for all channels. To save and load data for a specific channel, usethe methods below from a specific channel interface (e.g. iPlot1.Channel(0).SaveToDataFile).To save and load data for all channels in the chart, use the methods below from the main plotcomponent interface (e.g. iPlot1.SaveToDataFile).

The supported data formats are as follows…

• Text (Tab Delimited) File

SaveDataToFile

This method will save out the data for the specified channel or all channels to a tab delimited textfile specified by FileName.

iPlot1.Channel(0).SaveDataToFile(FileName)

Sample File Output:

0 01 12 20 01 12 29 9

Page 138: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 19 - Loading and Saving Data

124

iPlot1.SaveDataToFile(FileName)

Sample File Output:

LoadData

Thiby cha

FortheX dwh

ii

SaveProp

Thispeor aconLoaSavpro

ii

Channel 1(X) Channel 1(Y) Channel 2(X) Channel 2(Y)1 5 0 Null2 10.458 1 30.6273 12.444 2 43.4334 6.411 3 38.5136 11.558 4 46.8177 11.132 5 48.3458 9.933 6 43.9539 7.983 7 33.25211 24.529 8 46.51312 5.405 9 47.48613 5.433 10 Null14 18.013 11 39.85

Iocomp Components – Plot Pack Manual

FromFile

s method will load in the data for the specified channel from a tab delimited text file specifiedFileName. The first column must be the X channel data and the second column must be the Ynnel data.

loading data from the main plot interface, the first column is for the first channel’s X data, second column is for the first channel’s Y data, the third column is for the second channel’sata, the fourth column is for the second channel’s Y data, and so on. The first row is ignoreden loading data from the main plot interface.

Plot1.Channel(0).LoadDataFromFile(FileName)Plot1.LoadDataFromFile(FileName)

ertiesToFile

s method will save out the properties for the specified channel to a tab delimited text filecified by FileName. Note, the file contains property information about the specified channelll channels such as trace line width, line color, marker setup information, etc and does nottain XY data. The properties that are streamed out are generally only used with thedPropertiesFromFile method and not with external applications. Note the main interface’sePropertiesToFile method will stream out all properties of the control, not just the individualperties for each channel.

Plot1.Channel(0).SavePropertiesToFile(FileName)Plot1.SavePropertiesToFile(FileName)

Page 139: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 19 - Loading and Saving Data

Iocomp C

LoadPropertiesFromFile

This method will load in the properties for the specified channel from a text file specified byFileName. Note, the file contains property information about the specified channel or allchannels such as trace line width, line color, marker setup information, etc and does not containXY data. The properties that are streamed in are generally only used with theSavePropertiesToFile method and not with external applications. Note the main interface’sLoadPropertiesFromFile method will stream in all properties of the control, not just theindividual properties for each channel.

iPlot1.Channel(0).LoadPropertiesFromFile(FileName)iPlot1.LoadPropertiesFromFile(FileName)

Data Log Formats

The Plot Pack components also support real-time logging of channel data to a text file on your localhard drive. This differs from the Data Formats above in that data is appended to a text file (TabDelimited) as data is being added to the chart.

LogF

Thplaall

LogB

Thspbuacaftsizfilin

omponents – Plot Pack Manual 125

ileName

is property specifies the path and filename of the log. If you are developing for a cross-tform application, then you will need to ensure that the path and filename are appropriate for OS file systems or for the target OS file systems.

iPlot1.Channel(0).LogFileName = FileName

ufferSize

is property specifies the size of the buffer to use when logging channel data to the fileecified by the LogFileName property. When data from the chart has filled the buffer, theffered data is then written to the log file. This is useful if you want to spread out the disk writecess by the plot component. (i.e. if you don’t use a buffer, then a write to the log is executeder every data point is added. This may not be desirable in some situations. With the buffere set, you can have the component only write to the log after a specified amount of data hasled the buffer, therefore reducing the number of writes to the log file). The value specified isunits of # of data points.

! You will need to ensure that the directory specified has already beencreated on the target data storage area before activating the log.

Page 140: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 19 - Loading and Saving Data

Iocomp Components – Plot Pack Manual126

iPlot1.Channel(0).LogBufferSize = 10

Note that if you are using the log from the main interface, you will be writing out a log file that containsdata for all channels. You must use the AddDataArray method to add data from the main interface ifyou are using the main interface logging feature.

LogActivate

This method will start the logging of new data points to the specified file. Note that older datapoints will not be added to the log file, only new ones that have been added after executing thismethod.

iPlot1.Channel(0).LogActivate

LogDeactivate

This property will stop the logging of new data points to the specified log file.

iPlot1.Channel(0).LogDeactivate

AddDataArray Example

If you are using the logging feature from the main plot interface where you are logging allchannels to a single log file, you have to use the AddDataArray method to add data to thechannels. The first parameter refers to the common X Value for all of the channels, and the arraycontains one Y Value for each channel. The array type can be double or any variant type thatcan be converted to a double. The following example shows how to add data to the chart.

'Random Datadim TempArray(100) as Doublefor x = 0 to 99

TempArray(x) = rnd(1)*100next xiPlot1.AddDataArray(XValue, TempArray)

'Data From Some Other Sourcedim TempArray(100) as Doublefor x = 0 to 99

TempArray(x) = YValueSourcenext xiPlot1.AddDataArray(XValue, TempArray)

'Your Data is already in array formatiPlot1.AddDataArray(XValue, YValuesArray)

Also refer to the Adding Data Chapter for more information on using AddDataArray, aboutusing AddDataArray in pseudo-Asynchronous mode, or for handling null or empty value data.

Page 141: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 19 - Loading and Saving Data

Iocomp Components – Plot Pack Manual 127

Image Formats

There are also several image formats that are supported for saving static images of the plotcomponent (except for the toolbar object). This is useful for exporting the image for use in anexternal reporting tool, for dynamic creation of images for ASP web pages, or for other uses whereyou need a “snapshot” graphic of the chart. Supported image formats are as follows…

• Enhanced Metafile Format (EMF)• Windows/OS2 Bitmap (BMP, RGB Encoded)• Independent JPEG Group Format (JPEG, JPG)• Portable Network Graphics Format (PNG, 16 million colors) {Coming Soon…}

Also See Chapter on Graphic Export.

Page 142: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 20 - Graphical Export

Iocomp Components – Plot Pack Manual128

Chapter 20 - Graphical Export

There are also several image formats that are supported for saving static images of the plot component(except for the toolbar object). This is useful for exporting the image for use in an external reportingtool, for dynamic creation of images for ASP web pages, or for other uses where you need a “snapshot”graphic of the chart. Supported image formats are as follows…

• Enhanced Metafile Format (EMF)• Windows/OS2 Bitmap (BMP, RGB Encoded)• Independent JPEG Group Format (JPEG, JPG)• Portable Network Graphics Format (PNG, 16 million colors) {Coming Soon…}

Enhanced MetaFileFormat

This format is compact, and allows resizing in another application. This file type is only supportedon Windows platforms and is not supported under Linux. We recommend that you use TrueTypefonts (Vector Fonts) in the Plot component when using this file format since TrueType fonts resizebetter than bitmap-based fonts.

iComponent.SaveImageToMetaFile(Filename)iComponent.SaveImageToMetaFile("c:\my documents\plotimage001.emf")

Bitmap

This format is generally used where you need to use a Windows-OS/2 compatible bitmap file. Thefile is uncompressed, so it is generally not recommended since other, compressed formats areavailable.

iComponent.SaveImageToBitmap(Filename)iComponent.SaveImageToBitmap("c:\my documents\plotimage001.bmp")

JPEG

This format is compact, lossy compressed, and is widely supported. However, we recommend thatyou use our EMF or PNG file types if possible since they produce smaller file sizes and the finalgraphic output is more suited for these other formats.

iComponent.SaveImageToJPEG(Filename, Compression, Progressive)iComponent.SaveImageToJPEG("c:\my documents\plotimage001.emf", 100, True)

Note: Compression is a value between 0-100 and reflects the amount of lossy compression appliedto the image. A value of 25 will give very good compression, but the image will be degraded. Werecommend that you always use a value of 100. Progressive refers to the interlacing encoding usedin some browsers.

Page 143: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 20 - Graphical Export

Iocomp Components – Plot Pack Manual 129

PNG

This format is compact, loss-less compressed (same quality as a bitmap, no loss of quality), and iswidely supported. This file format is a replacement for the GIF standard (which is encumbered withpatent issues, only supports 256 colors, and doesn’t compress as well as PNG), and is supported byall version 4.0 web browsers and above on all platforms.

…Note, this format is not yet available…

GetBytesJPEG Method

This method is useful in ASP web pages where you want to send a JPEG image of the Plotcomponent to a web client. GetBytesJPEG allows you to send a JPEG image directly to the webclient without using intermediate files.

Microsoft IIS Server ASP Page (VBScript)

<%@ Language=VBScript %><!--METADATA NAME="iPlotLibrary" TYPE="TypeLib"UUID="{DA259054-D93B-498C-8C10-DEBD83EF1357}"--><%'Setup ResponseResponse.Expires = 0Response.Buffer = TrueResponse.Clear

'Create ActiveX ControlSet iPlotX1 = Server.CreateObject("iPlotLibrary.iPlotX")

'Set Some PropertiesiPlotX1.Width=500iPlotX1.Height=300iPlotX1.Labels(0).Caption = "Test Chart 1"

iPlotX1.ToolBar(0).Visible = False

'Plot Some Random Datafor x = 0 to 100

iPlotX1.Channel(0).AddXY x, sin(x) * 100next

'Stream JPEG ImageResponse.ContentType = "image/jpeg"Response.BinaryWrite(iPlotX1.GetBytesJPEG(100, TRUE))

'CleanupSet iPlotX1 = Nothing

%>

Page 144: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 21 - Printing

Iocomp Components – Plot Pack Manual130

Chapter 21 - Printing

The Iocomp Plot Pack components have built-in, basic capabilities for printing copies of your chart to alocal or network printer. Features include…

1. Ability to show or hide standard printer dialog before print2. Set Page Orientation3. Setup Page Margins

When you print out a copy of your chart, the entire image of the chart will be printed except for thetoolbar, and the chart will be expanded to fit the entire page depending on your page orientation andpage margin settings. The printing support in the Plot Pack components is designed to provide a verysimple and easy to use interface for outputting your charts to paper. If you need more complex reportingcapabilities, you will need to use a reporting package or custom code.

Printing Options

Page Orientation

To specify the orientation of the chart to be printed, modify the PrinterOrientation property..

iComponent1.PrinterOrientation = poPortriat

…or…

iComponent1.PrinterOrientation = poLandacape

Printer Dialog

To specify that the standard print dialog is displayed when the Print method is executed, then setthe PrintShowDialog property to TRUE.

iComponent1.PrintShowDialog = TRUE

Page 145: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 21 - Printing

Iocomp Components – Plot Pack Manual 131

Margins

To set the paper margins, set the following properties to the margins you require. Units are ininches…

iComponent1.PrintMarginRight = 10iComponent1.PrintMarginLeft = 10iComponent1.PrintMarginTop = 10iComponent1.PrintMarginBottom = 10

Simple Chart PrintTo print out a copy of the currently displayed chart in your program, execute the following methodon the control…

iPlot1.Print()

This method will print a copy of the current chart, stretched to the size of the page up to the marginproperties that were previously set without the toolbar.

Using with External Reporting Packages or Custom CodeIf you require more complex printing options, then you will need to use an external reportingpackage or your own customized code. For these other options, you can access a copy of the chartimage for use as follows…

Chart Sizes to fillentire page inside ofspecified margins

Bottom Margin

Right MarginLeft Margin

Top Margin

Page 146: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 21 - Printing

1

Clipboard Transfer

iComponent1.CopyToClipBoard()

This method will copy an enhanced metafile version of the chart to the standard clipboard for useelsewhere in your program.

Note: use this option carefully. This method will be using your clipboard, and there is apossibility that other applications or even your application may be using the clipboard at thesame time.

IPictureDisp Object Transfer

Image1.Picture = iComponent1.GetSnapShotPicture()

This method will return an IPictureDisp object image formatted as a metafile.

Save to Enhanced Metafile

iComponent1.Save()

This method will save a copy of the chart image to an enhanced metafile format file for useelsewhere.

Printing Tips

Many programmers like to see dark background charts with light colored channels and channelmarkers when viewing the Plot Components in a program. However, this color scheme doesn’tlook very good on a printout and can waste printer toner, ink, and can lead to wrinkled paper oninkjet printers.

To counteract these printing issues, it is best to change the colors used in the chart just beforeprinting, print out the chart, and then reset the colors back to their original settings. For example…

iComponent1.BeginUpdate() {Stops painting to the control to reduce flicker}

{Set background colors for Chart and DataView areas to a light color or white}

iComponent1.Print()

{Set background colors back to their original settings}

iComponent1.EndUpdate() {This resumes painting to the control}

Always, always, always use TrueType fonts to get the best results when saving to a

Iocomp Components – Plot Pack Manual32

graphic format or when printing. When using non-TrueType fonts, you may seedistorted fonts or incorrect kerning.

Page 147: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 22 - AutoScale and AutoLabel

Iocomp Components – Plot Pack Manual 133

Chapter 22 - AutoScale and AutoLabel

All axes support automatic scaling and formatting of their labels and tick marks. The automated scale(AutoScale feature) refers to the automatic scrolling of the axis with respect to newly added data and isrelated to the axis’ tracking feature. The AutoLabel feature refers to the 1-2-5 rules that ensure thescales look “human readable”, that is to say fall on major ticks and values that look good to a human.

1-2-5 Rule

This rule refers to how the scales label positions and features are automatically calculated by thecomponent. This means that the component attempts to ensure that the scale contains major ticklabels increment by 1, 2, or 5 (or multiples such as 10, 100, 1000, etc) within the bounds that yousetup using the Axis’ Min and Max properties. In short, the scale will attempt to fit in as manymajor tick labels as possible

For example, if your scale goes from –500 to +500, the component will attempt to fit as manylabels between –500 and + 500 that are increment by 1, 2, or 5 and so on. For example, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500 is a possible listing of major ticks in such asscale that would satisfy the 1-2-5 rule. Another example is –500, -250, 0, 250, 500. An examplethat wouldn’t fit would be –500, -389, -278, -167, -56, 56, 167, 278, 389, 500. Besides, that kindof scale doesn’t look “human readable”

Which scale is used depends on the font size specified for the Axis’ labels. The scale willattempt to fit in a scale with the maximum number of labels possible. How many can fit dependsseveral configurable factors.

Below you will find a list of rules used for the AutoScale and AutoLabel features. Thecomponent will go thorough the list in order and attempt to fit the maximum number of labels

Page 148: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 22 - AutoScale and AutoLabel

Iocomp Components – Plot Pack Manual134

Linear Scale

The scale will attempt to fit the maximum number of labels where the major tick labelsare divisible by 1, 2, or 5.

Date/Time Scale

The scale will attempt to fit the maximum number of labels possible by moving throughthe following order starting from Milliseconds and going out to Years. For example, ifgenerating labels on human-readable minutes is not possible, the scale will automaticallyswitch to creating labels using hours instead. If that is not possible, it will move on todays, etc.

Milliseconds: 1, 2, 5, 10, 20, 50, 100, 200, or 500Seconds: 1, 5, 10, 15, or 30Minutes: 1, 5, 10, 15, or 30Hours: 1, 2, or 12Days: 1, 7, or 14Months: 1, 2, 3, or 6Years: 1, 2, or 5

Page 149: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 22 - AutoScale and AutoLabel

Iocomp Components – Plot Pack Manual 135

Price32nds Scale

The scale will attempt to fit the maximum number of labels possible where the majorticks are divisible by...

1/256, 2/256, 4/256, 1/32, 2/32, 4/32, 8/32, or 16/32

Log10 Scale

The scale will attempt to fit the maximum number of labels possible where the majorticks are divisible by...

2, 5, 10, 20, 50, 100, or 200

Page 150: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 22 - AutoScale and AutoLabel

Iocomp Components – Plot Pack Manual136

Modifying the 1-2-5 Rule

DesiredIncrement

If the 1-2-5 Rule doesn’t work in your particular situation, you can “tune” the AutoLabelfeature by using the DesiredIncrement property of the axis. This property let’s youoverride the 1-2-5 rule and specify the increment used in the AutoLabel calculations

For example, let’s say you have a scale from 0 to 10. The Scale automatically creates ascale 0, 2.0, 4.0, 6.0, 8.0, 10.0.

But, you want the scale to increment by values of 2.5. So you would set theDesiredIncrement property to “2.5”, and if the new scale will fit in the space allotted,you would see a scale: 0, 2.5, 5.0, 7.5, 10.0.

For scales that do not scroll, you can also specify a fixed DesiredStart property to forcethe scale to start the first major tick at a specified value.

Page 151: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 22 - AutoScale and AutoLabel

Iocomp Components – Plot Pack Manual 137

Desired Start

You can also force the AutoScale routine to start on a particular major tick value insteadof the default Min value of the axis. Let’s say, for example you have a scale from 0 to10. The initial chart starts the scale off at the minimum value of the scale which is 0.0…

But, you want the first major tick to start off at 0.5. So you would set the DesiredStartproperty to 0.5, forcing the scale to start at 0.5…

Tracking

Tracking refers to how the scale reacts when new data is added to the chart, such as smoothlyscrolling to show new data that is added. Refer to the chapter on Tracking for more information.

Page 152: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 23 - Visual C++ Disp vs. iDispatch Interface

138

Chapter 23 - Visual C++ Disp vs. iDispatch Interface

Visual C++ supports two different types of ways to interface with an ActiveX component...

Disp Interface [Late Binding]

This is the type of interface that is used if you add an ActiveX component to your project and usemember variables to access your component. This type of interface is slower than the iDispatchinterface, and is not recommended for our Plot Components.

Disp Coding Example

//Using the Disp InterfaceIndex = m_iPlotX1.AddChannel();m_iPlotX1.GetChannel(Index).SetMarkersStyle(4); //ipmsPlusm_iPlotX1.GetChannel(Index).SetTraceLineWidth(2);m_iPlotX1.GetChannel(Index).AddXY(XValue, YValue);

Sample data rates for our iPlotX component running on an AMD 900Mhzcomputer showing the speed differences between the Disp and iDispatch

interface speed. One million data points were plotted on the chart, and the time

Iocomp Components – Plot Pack Manual

taken to perform the plot was recorded below…• Disp Interface, AddXY Method: 85,000 data points/second• Disp Interface, AddXYArrays Method: 560,000 data points/second• iDispatch Interface, AddXY Method: 1,256,000 data points/second• iDispatch Interface, AddXYArrays Method: 516,000 data points/second

Page 153: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 23 - Visual C++ Disp vs. iDispatch Interface

Iocomp Components – Plot Pack Manual 139

iDispatch Interface [Early Binding]This is the type of interface that is used if you add an ActiveX component to your form (by right-clicking on the form and selecting “Insert ActiveX Control”) or when you create an ActiveXcomponent dynamically at runtime. This interface is used with your use the #import directive inyour project to dynamically import the TLB during compilation.

The iDispatch Interface is much faster when accessing methods and properties of the Plot Packcomponent and is the recommended interface for using our components. Also, accessing sub-objects of the components such as channels is much easier and you are able to use the namespaceof the components to access enumerated properties.

iDispatch Coding Example

//Using the iDispatch InterfaceIndex = iPlotX1.AddChannel();iPlotX1->Channel[Index].MarkersStyle = ipmsPlus;iPlotX1->Channel[Index].TraceLineWidth = 2;iPlotX1->Channel[Index].AddXY(XValue, YValue);

For example, to use the iDispatch Interface, do the following...

1. Insert an ActiveX component onto your form by right clicking on the form and selecting “InsertActiveX Component.”

2. Place the following code at the top of your form’s CPP file...

//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

Page 154: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 23 - Visual C++ Disp vs. iDispatch Interface

Iocomp Components – Plot Pack Manual140

3. To access the component placed on the form (we named the IDC of the component in thisexample “IDC_IPLOTX1”, refer to the following example. This example uses a local variable toaccess the component, but you can easily use a global variable instead.

double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);

4. Now to access the component, use the newly created variable “iPlotX1”5. The syntax of accessing the component is similar to Visual Basic and Borland C++ Builder.

Here are a few examples...

//Disp Interface (Slow Speed)m_iComponentX1.DataView(0).SetGridShow(TRUE);m_iComponentX1.XAxis(0).SetMin(100);m_iComponentX1.YAxis(0).SetSpan(100);m_iComponentX1.Channel(0).SetName(“Channel 1”);m_iComponentX1.Legend(0).SetVisible(TRUE);m_iComponentX1.ToolBar(0).SetShowEditButton(FALSE);m_iComponentX1.Annotation(0).SetText(“Sample Annotation”);m_iComponentX1.DataCursor(0).SetStyle(3); //ipcsDeltaXm_iComponentX1.Limit(0).SetXAxisName(“X-Axis 1”);m_iComponentX1.Labels(0).SetCaption(“Chart Y vs. Time”);

//iDispatch Interface (High-Speed)iComponentX1->DataView[0]->GridShow = TRUE;iComponentX1->XAxis[0]->Min = 100;iComponentX1->YAxis[0]->Span = 100;iComponentX1->Channel[0]->Name = “Channel 1”;iComponentX1->Legend[0]->Visible = TRUE;iComponentX1->ToolBar[0]->ShowEditButton = FALSE;iComponentX1->Annotation[0]->Text = “Sample Annotation”;iComponentX1->DataCursor[0]->Style = ipcsDeltaX;iComponentX1->Limit[0]->XAxisName = “X-Axis 1”;iComponentX1->Labels[0]->Caption = “Chart Y vs. Time”;

6. Notice that you no longer have to use get and set methods to access properties or to access subobjects. Simply use the properties as you would in Visual Basic.

7. Since we are using the namespace for the iPlotLibrary, you can also use enumerated properties,such as “ipcsDeltaX” in the example above.

Page 155: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 24 - Using With Database

Iocom

Chapter 24 - Using With Database

Adding data to the Plot Pack component chart from a database is straightforward. Simply loop throughthe data in your recordset and add a data point from each record into the chart. The following issuesshould be kept in mind to increase performance or to perform more complex swapping of data.

Integrated Text File Saving and LoadingThe Plot Pack components natively support loading and saving of data from tab delimited text fileson a per channel or per chart basis. Refer to the chapter entitled “Loading and Saving Data”.

Simple X and Y DataTo add simple integer or double (floating point) data from your database to the chart, simply loadyour database recordset, and then loop through each record, adding each X and Y data point by usingthe AddData method (by passing X and Y values in double format)…

'Create Database Connection and Recordset'Loop through recordset until EOFiPlot1.Channel(0).AddXY RecordFieldXValue, RecordFieldYValue'End Loop

Time/Date X and Y DataTo add Time or Date Based data from a database, you will first need to convert the value from itsoriginal format to a Double format before adding it to the chart if it is not already in Double format.(i.e. if the data is in string format as ‘March 1, 2001’ then it will need to be converted to it’scorresponding Date/Time double format value. For more information about Date/Time formats seethe chapter entitled “Adding Data”)

Many development environments have functions that automate this procedure. For example, if the Xvalue in the Database is a Time or Date value then you use the following…

'Create Database Connection and Recordset'Loop through recordset until EOFDoubleFormatXValue = DateValue(RecordFieldXValue)iPlot1.Channel(0).AddXY DoubleFormatXValue, RecordFieldYValue'End Loop

ii

Don’t forget that if you are using Date/Time format values, you need to setup the

p Components – Plot Pack Manual 141

Plot1.XAxis(0).LabelsFormatStyle = iptfDateTimePlot1.YAxis(0).LabelsFormatStyle = iptfDateTime

associated axis to use DateTime formatted labels. Refer to the chapter entitled“Adding Data” for more information about DateTime format.

Page 156: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 24 - Using With Database

Iocomp Components – Plot Pack Manual142

Adding Very Large Amounts of Data to The ChartIf you plan on adding very large amounts of data to the chart (millions of data points or more), thenyou have to take into account the memory limits of Windows Applications (2GB per application andassociated components), network speed to transfer large amounts of data, and the processing timeneeded to move the data through memory or from a database located on your local hard drive or overa network.

• 1,000,000 data points = 22.35 MB of memory storage• 5,000,000 data points = 111.75 MB of memory storage• 10,000,000 data points = 223.50 MB of memory storage• 25,000,000 data points = 558.75MB of memory storage• 50,000,000 data points = 1.09 GB of memory storage

If you try and load all of this data at once, you will overload the PCI system bus or Ethernet Networksince this is a huge amount of data to move at one time. You may want to consider loading the datadynamically as needed instead of trying to load all of the data at once.

Also see the chapter entitled “Memory Utilization” for more information.

Page 157: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual 143

Chapter 25 - Layout Control Through Code

Generally, you will use the built-in property editor to setup and layout objects (layout objects plotobjects such as the axes, data view, toolbar, and legend). Review the chapter entitled “Visual LayoutManger” for more information. You can, however, modify the placement of layout objects in yourprogram’s code at run-time by using the following methods and properties.

Layout Manager

The layout manager automatically adjusts the position of layout objects such as the axes, toolbar,and legend for you. If you are manually adjusting the layout of layout objects through code, it ishelpful to disable the layout manager while you are making changes and then re-enable the layoutmanager when you are finished.

To Disable the Layout Manager, execute the following…iPlot1.DisableLayoutManager

To Enable the Layout Manager, execute the following…iPlot1.EnableLayoutManager

Layout Object ZOrder

The ZOrder of a plot object determines how it is displayed in relation of other plot objects of thesame type. Each plot object has a ZOrder property that determines how the layout object is paintedon the control in relation to other layout objects. If two layout objects of the same type have thesame ZOrder, then they are considered to be “stacked”.

For example, Y-Axis 1 & 2 have the same ZOrder, so they take up the same vertical position and aretherefore “stacked”…

ZOrder 1ZOrder 0

YAxis 0

YAxis 2

YAxis 1

Stacked Axes

Page 158: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual144

Layout Object StartPercent and StopPercentTo specify how much area a particular layout object takes up, you will need to set the Start andStop Percent properties. These properties are currently only supported by the X-Axis, Y-Axis,and Label objects.

A Start percent of 25% for a vertical layout object means that the layout object begins drawing25% from the bottom of the area reserved for the axes. A Start percent of 25% for a horizontallayout object means that the layout object begins drawing 25% from the left side of thecomponent.

A Stop percent of 75% for a vertical layout object means that the layout object ends drawing75% from the bottom of the area reserved for the axes. A Stop percent of 75% for a horizontallayout object means that the layout object ends drawing 75% from the left side of the component.

Horizontal Layout ObjectiPlot1.XAxis(0).StartPercent = 25iPlot1.XAxis(0).StopPercent = 75

Vertical Layout ObjectiPlot1.YAxis(0).StartPercent = 25iPlot1.YAxis(0).StopPercent = 75

25% 75%

100%0%

75%

25%

100%

0%

Page 159: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual 145

DataViewZVert and DataViewZHorz

Since the DataView is both a horizontal and vertical layout object, you need to use theseproperties off of the main plot component interface to set the relative ZOrder position of theDataView in relation to other horizontal and vertical layout objects.

DataViewZVert

To place the DataView in ZOrder #2 relative to other vertical layout objects, you would set theDataViewZVert property equal to 2.

iPlot1.DataViewZVert = 2

DataViewZHorz

To place the DataView in ZOrder #1 relative to other horizontal layout objects, you would setthe DataViewZHorz property equal to 1.

iPlot1.DataViewZHorz = 1

ZOrder 1ZOrder 0

YAxis 0

YAxis 2

YAxis 1

ZOrder 3

YAxis 3Data View

ZOrder 2

ZOrder 0 XAxis 0

XAxis 1

Data ViewZOrder 1

ZOrder 2

Page 160: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

146

Toolbar and Legend

Currently the Visual Layout Manager in the property editor does not support changing the ZOrder ofthe Toolbar. You can however change the ZOrder of the Toolbar relative to other horizontal layoutobjects (such as the DataView or X-Axes) by changing the ZOrder of the Toolbar through code atrun-time. Note: this feature is not yet fully supported for positions other than the top of thecomponent. The toolbar must always be the topmost ZOrder (i.e. the ZOrder must always be greaterthan other horizontal layout objects).

The Visual Layout Manager does support changing the ZOrder of the Legend in a graphical manner.You can also change the ZOrder of the Legend relative to other vertical layout objects (such as theDataView or Y-Axes) by changing the ZOrder of the Legend through code at run-time. Thefollowing would place the legend at the left side of the component…

iPlot1.Legend(0).ZOrder = 0

X and

The the lhow

Stac

USu

NmIp1tcu

Iocomp Components – Plot Pack Manual

Y-Axes

plot component axes are designed to automatically take care of drawing, aligning, and maintainayout of the axes for you. You do, however, have control over several parameters that affect the automated layout is handled.

kingEndsMargin

se StackingEndsMargin to get or set the margin at the end of the axis when stacked.tackingEndsMargin represents the percentage of a character size and is based on the LabelFontsed for the axis. A value of 0.5 is equal to half the size of a character.

ote that this feature currently only supports the Axes layout objects. Also note that the stackingargin only applies to layout objects that touch each other and only affects the ends that touch.

n the following example, the first Y-Axis (on the bottom) has a starting percent of 0 and endingercent of 50. The second Y-Axis (on top) has a starting percent of 50 and an ending percent of00. The Stacking Ends Margin allocates additional space to separate the two stacked axes. Theotal spacing is 0.5 characters in this example, with the StackingEndsMargin values beingumulative. The StackingEndsMargin will have no effect on the ends of the ends of the axesnless they touch another axis

! Only one toolbar and one legend are supported at this time. Always use anindex value of 0 when accessing the ToolBar or Legend.

Page 161: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp C

iPlot1.YAxis(0).StartPercent = 0iPlot1.YAxis(0).StopPercent = 50iPlot1.YAxis(0).StackingEndsMargin = 0.25

iPlot1.YAxis(1).StartPercent = 50iPlot1.YAxis(1).StopPercent = 100iPlot1.YAxis(1).StackingEndsMargin = 0.25

Layout Object Horizontal

This property should not be modified by the developer and is for internal use by the component tomanage the layout and rotation of layout objects. To rotate the X and Y-Axes, use theXYAxesReverse property off of the main plot component interface…

iPlot1.XYAxesReverse = True

All axes margins use units of character widths and heights. This allows

StackingEndsMargin(0.5 = 0.25 + 0.25)

0%

50%

100%

the component to dynamically adjust the scales based upon the font

omponents – Plot Pack Manual 147

used instead of using rigid pixel specifications. A value of 0.25 wouldbe equivalent to size (horizontal or vertical depending on if the marginrelates to a horizontal or vertical margin) of a single character from thefont being used in the layout object.

Page 162: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual148

Plot Component Outer MarginYou can change the inner margin of the plot component, thereby creating a margin between thelayout objects and the edge of the component. The margin values are specified in pixels.

The following example sets a 5-pixel margin around the inside of the Plot Component…

iPlot1.OuterMarginLeft = 5 '5 Pixel MarginiPlot1.OuterMarginRight = 5 '5 Pixel MarginiPlot1.OuterMarginTop = 5 '5 Pixel MarginiPlot1.OuterMarginBottom = 5 '5 Pixel Margin

OuterMarginRightLayout Objects

OuterMarginTop

OuterMarginLeft

OuterMarginBottom

Page 163: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Ioco

Full Layout Through Code EampleThe following example demonstrates adding an additional X-Axis and two additional Y-Axes,moving the X-Axis and Y-Axes by manipulating the ZOrder of all of the appropriate layoutobjects, and then adjusting two of the Y-Axes to be stacked. The code assumes you have addeda fairly large iPlot component to your form and you are placing the code in your form load event.

The

You don’t have to hand-code the layout of objects unless you wish or need to do so.

mp Components – Plot Pack Manual 149

output from the program should look like the following…

You can always use the Visual Layout Manager to arrange the layout objectswithout using any code in your program. Refer to the chapter entitled “VisualLayout Manager” for more information about using the Visual Layout Manager..

Y-Axis (1)

Y-Axis (0) X-Axis (0)

X-Axis (1)Y-Axis (2)Label (0)

Page 164: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual150

Visual Basic/VBA/VBScript

'Add one additional X-Axis'There is already one X-Axis in the chart by defaultiPlotX1.AddXAxis

'Add two additional Y-Axes'There is already one Y-Axis in the chart by defaultiPlotX1.AddYAxisiPlotX1.AddYAxis

'Disable the Layout Manager so that it doesn't interfere'with our manual layout codeiPlotX1.DisableLayoutManager

'Configure ZOrder of Horizontal Layout ObjectsiPlotX1.XAxis(0).ZOrder = 0iPlotX1.DataViewZHorz = 1iPlotX1.XAxis(1).ZOrder = 2iPlotX1.Labels(0).ZOrder = 3iPlotX1.ToolBar(0).ZOrder = 4

'Configure ZOrder of Vertical Layout Objects'Note that the first two Y-Axes will have the same ZOrder,'making them stacked axesiPlotX1.YAxis(0).ZOrder = 0iPlotX1.YAxis(1).ZOrder = 0iPlotX1.DataViewZVert = 1iPlotX1.YAxis(2).ZOrder = 2iPlotX1.Legend(0).ZOrder = 3

'Configure the Start and Stop Percent of the two Y-Axes we wish to stackiPlotX1.YAxis(0).StartPercent = 0iPlotX1.YAxis(0).StopPercent = 50iPlotX1.YAxis(1).StartPercent = 50iPlotX1.YAxis(1).StopPercent = 100

'Configure the Stacking Ends Margins for each of the stacked axes to allow'for a separation total of half of a character between the ends of the axes'that touch each otheriPlotX1.YAxis(0).StackingEndsMargin = 0.25iPlotX1.YAxis(1).StackingEndsMargin = 0.25

'Assign the Grid to use the Y-Axis on the far right so that the Grid looks'consistentiPlotX1.DataView(0).GridYAxisName = iPlotX1.YAxis(2).Name

'Re-Enable the Layout ManageriPlotX1.EnableLayoutManager

Page 165: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual 151

Delphi/Kylix

//Add one additional X-Axis//There is already one X-Axis in the chart by defaultiPlot1.AddXAxis;

//Add two additional Y-Axes//There is already one Y-Axis in the chart by defaultiPlot1.AddYAxis;iPlot1.AddYAxis;

//Disable the Layout Manager so that it doesn't interfere with our manual//layout codeiPlot1.DisableLayoutManager;

//Configure ZOrder of Horizontal Layout ObjectsiPlot1.XAxis[0].ZOrder := 0;iPlot1.DataViewZHorz := 1;iPlot1.XAxis[1].ZOrder := 2;iPlot1.Labels[0].ZOrder := 3;iPlot1.ToolBar[0].ZOrder := 4;

//Configure ZOrder of Vertical Layout Objects//Note that the first two Y-Axes will have the same ZOrder, making them//stacked axesiPlot1.YAxis[0].ZOrder := 0;iPlot1.YAxis[1].ZOrder := 0;iPlot1.DataViewZVert := 1;iPlot1.YAxis[2].ZOrder := 2;iPlot1.Legend[0].ZOrder := 3;

//Configure the Start and Stop Percent of the two Y-Axes we wish to stackiPlot1.YAxis[0].StartPercent := 0;iPlot1.YAxis[0].StopPercent := 50;iPlot1.YAxis[1].StartPercent := 50;iPlot1.YAxis[1].StopPercent := 100;

//Configure the Stacking Ends Margins for each of the stacked axes to allow//for a separationtotal of half of a character between the endsof the axes//that touch each otheriPlot1.YAxis[0].StackingEndsMargin := 0.25;iPlot1.YAxis[1].StackingEndsMargin := 0.25;

//Assign the Grid to use the Y-Axis on the far right so that the Grid looks//consistentiPlot1.DataView[0].GridYAxisName := iPlot1.YAxis[2].Name;

//Re-Enable the Layout ManageriPlot1.EnableLayoutManager;

Page 166: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual152

Visual C++ [Disp Interface]

Place the following include statements at the top of your cpp file…#include "iplotx.h"#include "iplotaxisx.h"#include "iplotlegendx.h"#include "iplottoolbarx.h"#include "iplotdataviewx.h"#include "iplotlabels.h"

================================================================//Add one additional X-Axis//There is already one X-Axis in the chart by defaultm_iPlotX1.AddXAxis();

//Add two additional Y-Axes//There is already one Y-Axis in the chart by defaultm_iPlotX1.AddYAxis();m_iPlotX1.AddYAxis();

//Disable the Layout Manager so it doesn't interfere with manual layout codem_iPlotX1.DisableLayoutManager();

//Configure ZOrder of Horizontal Layout Objectsm_iPlotX1.GetXAxis(0).SetZOrder(0);m_iPlotX1.SetDataViewZHorz(1);m_iPlotX1.GetXAxis(1).SetZOrder(2);m_iPlotX1.GetLabels(0).SetZOrder(3);m_iPlotX1.GetToolBar(0).SetZOrder(4);

//Configure ZOrder of Vertical Layout Objects. Note that the first two//Y-Axes will have the same ZOrder, making them stacked axesm_iPlotX1.GetYAxis(0).SetZOrder(0);m_iPlotX1.GetYAxis(1).SetZOrder(0);m_iPlotX1.SetDataViewZVert(1);m_iPlotX1.GetYAxis(2).SetZOrder(2);m_iPlotX1.GetLegend(0).SetZOrder(3);

//Configure the Start and Stop Percent of the two Y-Axes we wish to stackm_iPlotX1.GetYAxis(0).SetStartPercent(0);m_iPlotX1.GetYAxis(0).SetStopPercent(50);m_iPlotX1.GetYAxis(1).SetStartPercent(50);m_iPlotX1.GetYAxis(1).SetStopPercent(100);

//Configure the Stacking Ends Margins for each//of the stacked axes to allow for a separation//total of half of a character between the ends//of the axes that touch each otherm_iPlotX1.GetYAxis(0).SetStackingEndsMargin(0.25);m_iPlotX1.GetYAxis(1).SetStackingEndsMargin(0.25);

//Assign the Grid to use the Y-Axis on the far right//so that the Grid looks consistentm_iPlotX1.GetDataView(0).SetGridYAxisName(m_iPlotX1.GetYAxis(2).GetName());

//Re-Enable the Layout Managerm_iPlotX1.EnableLayoutManager();

Page 167: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual 153

Visual C++ [High-Speed iDispatch Inteface]

Place the following include statements at the top of your file…//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

================================================================double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);//Add one additional X-Axis//There is already one X-Axis in the chart//by defaultiPlotX1->AddXAxis();

//Add two additional Y-Axes//There is already one Y-Axis in the chart//by defaultiPlotX1->AddYAxis();iPlotX1->AddYAxis();

//Disable the Layout Manager so that//it doesn't interfere with our manual//layout codeiPlotX1->DisableLayoutManager();

//Configure ZOrder of Horizontal Layout ObjectsiPlotX1->XAxis[0]->ZOrder = 0;iPlotX1->DataViewZHorz = 1;iPlotX1->XAxis[1]->ZOrder = 2;iPlotX1->Labels[0]->ZOrder = 3;iPlotX1->ToolBar[0]->ZOrder = 4;

//Configure ZOrder of Vertical Layout Objects//Note that the first two Y-Axes will have the//same ZOrder, making them stacked axesiPlotX1->YAxis[0]->ZOrder = 0;iPlotX1->YAxis[1]->ZOrder = 0;iPlotX1->DataViewZVert = 1;iPlotX1->YAxis[2]->ZOrder = 2;iPlotX1->Legend[0]->ZOrder = 3;

//Configure the Start and Stop Percent of the//two Y-Axes we wish to stackiPlotX1->YAxis[0]->StartPercent = 0;

Page 168: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual154

iPlotX1->YAxis[0]->StopPercent = 50;iPlotX1->YAxis[1]->StartPercent = 50;iPlotX1->YAxis[1]->StopPercent = 100;

//Configure the Stacking Ends Margins for each//of the stacked axes to allow for a separation//total of half of a character between the ends//of the axes that touch each otheriPlotX1->YAxis[0]->StackingEndsMargin = 0.25;iPlotX1->YAxis[1]->StackingEndsMargin = 0.25;

//Assign the Grid to use the Y-Axis on the far right//so that the Grid looks consistentiPlotX1->DataView[0]->GridYAxisName = iPlotX1->YAxis[2]->Name();

//Re-Enable the Layout ManageriPlotX1->EnableLayoutManager();

Page 169: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 25 - Layout Control Through Code

Iocomp Components – Plot Pack Manual 155

C++ Builder

//Add one additional X-Axis//There is already one X-Axis in the chart//by defaultiPlot1->AddXAxis();

//Add two additional Y-Axes//There is already one Y-Axis in the chart//by defaultiPlot1->AddYAxis();iPlot1->AddYAxis();

//Disable the Layout Manager so that//it doesn't interfere with our manual//layout codeiPlot1->DisableLayoutManager();

//Configure ZOrder of Horizontal Layout ObjectsiPlot1->XAxis[0]->ZOrder = 0;iPlot1->DataViewZHorz = 1;iPlot1->XAxis[1]->ZOrder = 2;iPlot1->Labels[0]->ZOrder = 3;iPlot1->ToolBar[0]->ZOrder = 4;

//Configure ZOrder of Vertical Layout Objects//Note that the first two Y-Axes will have the//same ZOrder, making them stacked axesiPlot1->YAxis[0]->ZOrder = 0;iPlot1->YAxis[1]->ZOrder = 0;iPlot1->DataViewZVert = 1;iPlot1->YAxis[2]->ZOrder = 2;iPlot1->Legend[0]->ZOrder = 3;

//Configure the Start and Stop Percent of the//two Y-Axes we wish to stackiPlot1->YAxis[0]->StartPercent = 0;iPlot1->YAxis[0]->StopPercent = 50;iPlot1->YAxis[1]->StartPercent = 50;iPlot1->YAxis[1]->StopPercent = 100;

//Configure the Stacking Ends Margins for each//of the stacked axes to allow for a separation//total of half of a character between the ends//of the axes that touch each otheriPlot1->YAxis[0]->StackingEndsMargin = 0.25;iPlot1->YAxis[1]->StackingEndsMargin = 0.25;

//Assign the Grid to use the Y-Axis on the far right//so that the Grid looks consistentiPlot1->DataView[0]->GridYAxisName = iPlot1->YAxis[2]->Name();

//Re-Enable the Layout ManageriPlot1->EnableLayoutManager();

Page 170: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual156

Chapter 26 - Performance Tuning

By default, the Plot Components are designed to provide real-time performance even at high data rateson most system and application configurations. However, there are certain limitations and realities ofthe Windows and Linux operating systems, as well as graphics and processor hardware considerations.

For example, you will have no problem displaying tens of thousands of data points per second on a charton a standard Windows 95/98/ME/NT/2000 or Linux system. However, the operating system can onlydraw to the screen at a certain rate depending on your processor speed, video card speed, system load,and/or the pixel size of the area being drawn on the video display.

Overall Component Speed = (Component Size) * (Frame Rate) * (System Speed)* (Video Card Speed) * (System Load)

To achieve the best real-time performance with extremely high data rates and frame rates, you will needto take the following items into consideration when setting up the component and or your computersystem…

Component Size

This is by far the most important item that affects the perceived speed and processor usage onyour system.

For example, when you display a video file on a standard system (high frame rate video, 500Mhzprocessor, 64MB Ram, 1024x768 system), you will see the processor usage climb as youincrease the size of the video window. This happens because the operating system has to drawmore pixels to the screen as you increase the size of the window.

This is also the case with components. If you try to run a Plot component at full screen(1024x768 for example), the operating system has to work harder to draw the increased numberof pixels to the system.

Frame Rate

All of Iocomp’s components include properties and methods that allow you to control how oftenthe control is repainted when changes are made to the components such as adding data orscrolling axes. Properties and methods that allow this control are: AutoFrameRate,UpdateFrameRate, BeginUpdate, and EndUpdate. These features allow you to eitherautomatically or manually control how often the control’s display area is updated.

Page 171: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual 157

AutoFrameRate

The AutoFrameRate property specifies whether the control automatically controls theframe repaint rate. With AutoFrameRate enabled, the control will automatically throttlethe number of repaints per second that the control executes according to the number offrame per second specified in the UpdateFrameRate property. By using the AutoFrame Rate feature, you can control the number of repaints that the operating system hasto make for the control, therefore reducing the amount of processing time used by thiscomponent.

iComponent1.AutoFrameRate = TRUE

UpdateFrameRate

The UpdateFrameRate property specifies the frame rate at which the controlautomatically repaints in frame per second. Every time a data point is plotted or when auser scrolls the axes, the control has to repaint itself to reflect the new changes.

iComponent1.UpdateFrameRate = 10

The frame rate is used to improve performance by controlling the number of times thecontrol repaints itself per second. To activate automatic frame rate control, theUpdateFrameRate property must be non zero. You can also use the manualBeginUpdate and EndUpdate method to manually control repainting even if theUpdateFrameRate feature is turned on.

Each time a change occurs to the control that requires a repaint, the control willdetermine if a new frame needs to be displayed. The FrameTime is one second divided bythe UpdateFrameRate. If a change occurs to the control before the FrameTime haselapsed, the control is not repainted. If a change occurs to the control after theFrameTime has elapsed, the control is repainted and the next frame is started.

There must be a steady stream of changes to the control that require repainting for theautomatic frame rate control to function correctly. The rate of change per second must begreater than the UpdateFrameRate for the desired frame rate to be achieved. Oncechanges to the control that require repainting have been stopped, call the EndUpdatemethod to force the control to repaint the last changes that may be cached.

When the frame rate control is inactive, the control will attempt to repaint when a changeis made to the control that requires a repaint. The actual number of repaints per second isdependent of the system hardware, system activity, and the number of request beingmade to repaint the control.

The frame rate can be manually controlled by using the BeginUpdate and EndUpdatemethods. Make sure that the UpdateFrameRate property is set to 0 to disable automaticframe rate control. Your code will need to keep track of the last update before beginning

Page 172: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual158

a new frame. To begin a new frame, call the EndUpdate method and then theBeginUpdate method to start the next frame.

Note: if the user is interacting with the component, such as scrolling axes, clickingtoolbar buttons, etc, the UpdateFrameRate is ignored. This allows the control to repaintquickly when the user is using the UI of the component so that it doesn’t appear sluggishwith very slow Update Rates.

BeginUpdate

This method is used to manually stop all painting to the control if needed. This is usefulif you plan on adding a very large amount of data to the chart or wish to make manychanges to the chart, but don’t want the chart to repaint until you have completed youroperations.

iComponent1.BeginUpdate

EndUpdate

This method is used in conjunction with the AutoFrameRate feature mentioned above. Itcan also be used to manually resume all painting to the control if needed whenAutoFrameRate is turned off.

iComponent1.EndUpdate

System Hardware

Most modern or new computer systems are easily capable of displaying real-time data to thevideo display. If you need to display our controls with very high data rates on large videodisplays with large component sizes, then you will need to ensure that your computer hardware isup to the task.

Processor

Having a faster processor generally will improve overall performance of your system andwill increase the speed of draws to your video screen. Most modern systems(approximately 400Mhz or higher) have processors fast enough to handle most real-timeapplications used with our controls.

Page 173: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Comp

Memory

The amount of memory is generally not that important to the speed of displaying data tothe screen. The amount of RAM memory only comes into play when you are bufferingmany millions of data points into the chart, and have very low amounts of RAM in yoursystem. If you run out of physical RAM, the operating system has to use the hard disk tostore additional program memory, which is significantly slower than using physicalRAM. See the next chapter regarding Memory Utilization of our Plot Pack components.

Note: Windows NT and 2000 allow you to set specific minimum and maximum sizes forthe virtual memory swap file. If you will be storing may millions of data points in thechart, ensure that your maximum virtual memory swap file settings are set toaccommodate the expected memory usage.

Video Card

Many computer manufacturers have opted to include video card chipsets into the systembios/chipset. Generally, these types of video chipsets are not designed for displayinghigh-speed data to the video display. Also, some video cards that are included withsystems are similarly not designed for displaying high-speed data.

It is recommended that you use a high quality (many are not expensive), acceleratedvideo card in your system if you will be using very large component sizes or videoresolutions.

Special Acti

When more ehaving

In the times f

Many people ask about their processor usage being very high whenadding data at very high data rates. Generally this is not a problem

since repaints to the screen have very low priority on the system, andif other processes need processor time during very heavy system

onents – Plot Pack Manual 159

veX Example:

iterating through a large loop and access sub objects of the ActiveX plot component, it isfficient to create a temporary variable to keep track of the sub object in memory instead of to access it during each iteration of the loop.

example above, we go through a loop 100 times. We access the channel sub object 100or each AddXY method. There is a very small performance penalty when accessing the

loads, the repaints will be dropped.

By using the AutoFrameRate feature of our components, you canreduce the actual processor load on the system due to repaints by ourcontrols if needed.

Page 174: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual160

channel, which is magnified when looping, and can be noticeable with very large loops. Torectify this, we can sacrifice a small amount of memory to greatly speed up large loops. We willset a local variable to reference the channel sub-object only once, and then reuse the localvariable in the loop.

In the following example we will create a temporary variable to hold the channel sub object andwill loop through 1,000,000 data points. You can flip between the method used in the exampleabove and the example shown below to see the difference in speed. (Approximately 2x-4x fasterusing the local variable method shown below depending on your compiler).

Visual BasicPrivate Sub PlotButton_Click()

Dim x As LongDim XData As DoubleDim YData As DoubleDim TempChannel as iPlotChannelX

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000'Increment X DataXData = XData + 1

'Generate Random Y DataYData = Rnd(1) * 100

'Plot XY Data PairTempChannel.AddXY XData, YData

Next xEnd Sub

Page 175: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual 161

Visual C++ [Disp Interface]

//Place at top of cpp file#include "iplotx.h"#include "iplotaxisx.h"#include "iplotlegendx.h"#include "iplotchannelx.h"#include "iplottoolbarx.h"#include "iplotdataviewx.h"#include "iplotannotationx.h"

void CFormDlg::OnPlotButton(){

double XData;double YData;CiPlotChannelX TempChannel;

XData = 0;YData = 0;

TempChannel = m_iPlotX1.GetChannel(0);

for(int i=0; i<1000000; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data PairTempChannel.AddXY(XData, YData);

};}

Page 176: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual162

Visual C++ [High-Speed iDispatch Interface]

//Place at top of cpp file#import "iPlotLibrary.tlb" named_guids#include "atlbase.h"extern CComModule _Module;using namespace iPlotLibrary;

void CFormDlg::OnPlotButton(){

double XData;double YData;CWnd* m_Wnd;IUnknown* m_iUnknown;CComPtr<iPlotLibrary::IiPlotX> iPlotX1;CComPtr<iPlotLibrary::IiPlotChannelX> tempChannel;

//Get interface to Plot Component//Assuming that name of component on form is IDC_IPLOTX1 in this examplem_Wnd = GetDlgItem(IDC_IPLOTX1);m_iUnknown = m_Wnd->GetControlUnknown();m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \

(LPVOID*)&iPlotX1);

tempChannel = iPlotX1->Channel[0];

XData = 0;YData = 0;

for(int i=0; i<1000000; i++){

//Increment X DataXData = XData + 1;

//Generate Random Y DataYData = (rand()/(double)RAND_MAX)*100;

//Plot XY Data PairtempChannel->AddXY(XData, YData);

};}

Also see chapter "Visual C++ Disp vs. iDispatch Interface" for moreinformation about the High-Speed iDispatch Interface.

Page 177: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 26 - Performance Tuning

Iocomp Components – Plot Pack Manual 163

Internet Explorer[Client-Side, VBScript]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Internet Explorer Plot Pack Example</title></head><body><object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"width="500" height="200"></object><input type="button" value="Plot" name="PlotButton"><script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick()

Dim xDim XDataDim YDataDim TempChannel

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000'Increment X CounterXData = XData + 1

'Generate Random DataYData = Rnd(1) * 100

'Plot XY Data PairTempChannel.AddXY XData, YData

Nextend sub--></script></body></html>

Page 178: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 27 - Memory Utilization

Iocomp Components – Plot Pack Manual164

Chapter 27 - Memory Utilization

The Plot Pack components include several mechanisms for controlling the amount of RAM memory thatis used to store channel data. By storing all or some of the data for each channel, the plot componentmakes it possible to use the built in scrolling, zooming, and cursor tools to be able to look at historicaldata and to be able to print and save that data to other formats.

The following sections will discuss how the Plot Pack components store data and how to control theamount of RAM memory that is used to suit your needs.

Data Storage

Memory Usage Calculations

Since the plot pack components are designed to handle asynchronous data channels (i.e. the datapoints from one channel don’t have to be in sync with data points in another channel), each datapoint use 2 double values and a Boolean value to represent a single data point

2 doubles and a Boolean value are used to represent one data point.2 Double Values = 20 bytes (double = 10 bytes)1 Boolean Value = 4 bytesTotal = 20 + 4 = 24 bytes per data point

Therefore, each data point that you add to the chart takes up 24 bytes of memory. If you expectto add 1 million (1,000,000) data points to your chart, you can expect to use…

24 bytes * 1,000,000 = 24,000,000 bytes24 million bytes / 1024 bytes per KB = 23,437.5 KB23,437.5 KB / 1024 KB per MB = 22.89 MB for 1,000,000 Data Points

…a total of 22.89 MB for all 1 million data points. If you have 5 channels with 100,000 datapoints added to each channel that would be…

24 bytes * 5 channels * 100,000 = 12,000,000 bytes12 million bytes / 1024 bytes per KB = 11,718.8 KB11,718.8 KB / 1024 KB per MB = 11.44 MB for 5 channels

…a total of 11.44MB of data storage needed for 5 channels with 100,000 data points eachchannel.

Future versions of our Plot Pack will include the capability to specify the data storage style whereyou can trade-off functionality of our component for increased number of allowable points to bestored in the component.

Page 179: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 27 - Memory Utilization

Iocomp Components – Plot Pack Manual 165

2GB Application RAM Barrier

Under the Windows 32-bit operating system, each application is limited to using a total 2GB ofRAM Memory (2048 MB). This includes memory usage by everything in the program,including variables in your code and memory used by all components in the application(ActiveX, VCL, or CLX components). Keep this in mind when determining how much data youcan fit into the chart as exceeding the 2GB RAM Usage barrier can result in nasty out of memoryor other program and system errors. If you run into this issue, then either use the Ring Bufferfeature of the Plot Pack, reduce the number of data points added to the chart, or periodically savethe data to an external file and clear out the buffer before adding additional data points. Futureversions of Windows will support larger memory usage sizes. Consult your developmentenvironment documentation and Windows documentation for more information about futureupdates to this limitation

Under Linux (CLX components only) the amount of memory accessible by an applicationdepends on your kernel version, kernel build, and development environment. This can rangebetween 2GB and 64GB depending on your situation, but is generally a 2GB limit for mostdistributions. Consult your development environment documentation and Linux distributiondocumentation for more information.

Resource Memory vs. RAM Memory

RAM Memory

Modern operating systems such as Microsoft Windows 95/98/ME/NT/2000 and Linuxsupport Virtual Memory and can handle the addition of data sets of this size. This meansthat in a system with…

• 64MB of Physical RAM• 128MB of Virtual Memory

…you can support 192 MB of data from the operating system and running applications.

If you are using 1,000,000 data points in your chart (22.89 MB of data), this can easily fitin your available system RAM memory. If you need additional memory, increase theallocation of virtual memory (See your System control panel or operating systemdocumentation) or install additional RAM modules.

Resource Memory

Resource Memory, on the other hand, depends on your operating system and is notrelated to the amount of Physical RAM or Virtual Memory you have allocated for youroperating system. Resources refer to memory allocated to brushes, pens, windows, fontmanagers, and other operating system dependent resources. Operating systems such asWindows 95/98/ME have a smaller limit on the amount of resources that can be allocatedat any one time compared to Windows NT/2000/XP systems. This is a function of the

Page 180: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 27 - Memory Utilization

166

operating system and does not matter how much RAM you have installed, even if youhave gigabytes of memory installed.

This resource memory barrier limits the number of programs, windows, and controls thatyou can have open at any one time. You should have no problem running several PlotPack components (Service Pack 1 release or greater) in your application.

You can run approximately 1500 windows + controls on a Windows 95/98/ME system,and approximately 3000 windows + controls on a Windows NT/2000 system. WindowsXP is expected to have even higher limits. Note that this is highly dependent on otherapplications, services, and other programs running on your system and is intended only asa guide.

Ring Buffer

By default, the plot components store all data that has been added to available system RAMmemory. To control the amount of memory that is used by the charts, you can take advantage of theRing Buffer support in the plot components.

The Ring Buffer is a FIFO (First-In First-Out. In other words, when the buffer is full, the first datapoint added is the first data point to be overwritten) type buffer where you specify the maximumamount of data points that can fit in the buffer. Once that maximum number is exceeded, then datais removed from the buffer starting with the first data points that were initially added.

To eof d

i

When you set the Ring Buffer to a non-zero value, then memory will beallocated for that number of data points whether or not those data points

nable the Ring Buffer for a particular channel, set the RingBufferSize property for the numberata points that you wish to remain in the buffer for a specific channel.

Plot1.Channel(0).RingBufferSize = 10000

! actually exist. The advantage to this type of buffer is that you will alwaysknow if the buffer you have set exceeds the available RAM + VirtualMemory on your system ahead of time, instead of find this out after runningthe chart overnight!

The RingBufferSize is specified in the number of data points allowed in the

Iocomp Components – Plot Pack Manual

buffer for this particular channel. This property setting does not affect otherchannels.

Page 181: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 27 - Memory Utilization

Iocomp

To disable the ring buffer and storage all data to available memory (up to the 2GB per applicationlimit), set the ring buffer property to zero…

iPlot1.Channel(0).RingBufferSize = 0

Oldest DataOverwritten[Tail]

Newly AddedData Points

[Head]

Components – Plot Pack Manual 167

Ring Buffer (FIFO)

Page 182: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 28 - Implementing Toolbar Externally

Iocomp Components – Plot Pack Manual168

Chapter 28 - Implementing Toolbar Externally

The built-in toolbar is intended to be a very simple and easy to use toolbar, providing basic user toolsand functionality for the Plot Pack components. If you need a more advanced toolbar, or if you want toinclude functionality for other features of your application, you will need to use an external toolbarcontrol.

The Plot Pack components have interfaces that allow you to easily map and perform the same functionsas the built-in toolbar. Many development environments come with their own toolbar controls and youcan find many other third-party toolbars with many advanced features. You will need to use our toolbarinterfaces in the event code that is generated by the toolbar that you use. Each function interface willperform the same action as if the user had clicked on the corresponding built-in toolbar button.

Methods that are available to perform toolbar functions are as follows…

Resume Button

iComponent.ToolBar(0).DoButtonClickResume

Pause Button

iComponent.ToolBar(0).DoButtonClickPause

Axes Scroll Mode Button

iComponent.ToolBar(0).DoButtonClickScrollAxesMode

Axes Zoom Mode Button

iComponent.ToolBar(0).DoButtonClickZoomAxesMode

Zoom In Button

iComponent.ToolBar(0).DoButtonClickZoomOut

Page 183: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 28 - Implementing Toolbar Externally

Iocom

Zoom Out Button

iComponent.ToolBar(0).DoButtonClickZoomIn

Select Button

iComponent.ToolBar(0).DoButtonClickSelect

Zoom Box Button

iComponent.ToolBar(0).DoButtonClickZoomBox

Cursor Button

iComponent.ToolBar(0).DoButtonClickCursor

Edit Button

iComponent.ToolBar(0).DoButtonClickEdit

Copy Button

iComponent.ToolBar(0).DoButtonClickCopy

Save Button

iComponent.ToolBar(0).DoButtonClickSave

Print Button

iComponent.ToolBar(0).DoButtonClickPrint

p Components – Plot Pack Manual 169

! Currently, only one toolbar is supported. Always use ToolBar(0) when referencingthe toolbar. In a future release, the Plot Components will support multiple toolbars.

Page 184: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 29 - Implementing Legend Externally

Iocomp Components – Plot Pack Manual170

Chapter 29 - Implementing Legend Externally

The built-in legend automatically provides the following functionality…

• Channel Trace Line Style and Color Listing• Channel Marker Style and Color Listing• Channel Name Listing• Channel Associated X-Axis• Channel Associated Y-Axis• Channel Current X/Y Coordinate

… if you wish to implement your own legend outside of our component, you can emulate the featureslisted above as follows…

Channel Name Listing

The value displayed in the Title column is actually not the ChannelName property, but theChannelTitle property. The ChannelTitle property controls what is displayed in the Title column.To access a particular Channel Title, use the following…

iPlot1.Channel(0).ChannelTitle

…where 0 is the Channel index corresponding to the first channel.

Page 185: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 29 - Implementing Legend Externally

Iocomp Components – Plot Pack Manual 171

To access all of the Channel Titles in a loop, execute the following…

For x = 0 to iPlot1.ChannelCount -1ChannelTitleTextString = iPlot1.Channel(x).ChannelTitle

Next x

Channel Trace Line Style and Color ListingThe colored line displayed in the first represents the line style and color of the channel’s trace line.Note that the width of the line is not represented and that the line style is simulated to make it easierto distinguish among the different line styles available. To access a particular Channel Line Style orLine Color, use the following…

iPlot1.Channel(0).TraceLineStyleiPlot1.Channel(0).Color

…where 0 is the Channel index of the 1st channel. The following line styles are available…

Line Style Integer ValueiplsDash 0iplsDashDot 1iplsDashDotDot 2iplsDot 3iplsSolid 4

To access all of the Channel Trace Line Styles and Colors in a loop, execute the following…

For x = 0 to iPlot1.ChannelCount -1ChannelLineStyleValue = iPlot1.Channel(x).TraceLineStyleChannelLineColor = iPlot1.Channel(x).ColorChannelLineStyle = iPlot1.Channel(x).TraceLineStyle

Next x

Channel Trace Line Channel Marker

Page 186: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 29 - Implementing Legend Externally

Iocomp Components – Plot Pack Manual172

Channel Marker Style and Color Listing

The colored marker displayed in the first represents the marker style and color of the channel’smarker. There are several properties that affect the look of a Channel Marker. A marker is drawnusing a style to determine the shape of the marker, a pen (for drawing the outline), and a brush (fordrawing the “fill”). To access the properties of markers for a particular channel, use the following…

iPlot1.Channel(0).MarkersBrushColoriPlot1.Channel(0).MarkersBrushStyleiPlot1.Channel(0).MarkersBrushUseChannelColoriPlot1.Channel(0).MarkersPenColoriPlot1.Channel(0).MarkersPenStyleiPlot1.Channel(0).MarkersPenUseChannelColoriPlot1.Channel(0).MarkersPenWidthiPlot1.Channel(0).MarkersSizeiPlot1.Channel(0).MarkersStyle

…where 0 is the Channel index corresponding to the first channel. The following marker styles,brush styles are line styles are available…

Markers Style Integer ValueipmsCircle 0ipmsSquare 1ipmsDiamond 2ipmsCross 3ipmsPlus 4ipmsTriangleUp 5ipmsTriangleDown 6ipmsTriangleLeft 7ipmsTriangleRight 8

Brush Style Integer ValuebsSolid 0bsClear 1bsHorizontal 2bsVertical 3bsFDiagonal 4bsBDiagonal 5bsCross 6bsDiagCross 7

Pen Style Integer ValuepsSolid 0psDash 1psDot 2psDashDot 3psDashDotDot 4psClear 5

Page 187: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 29 - Implementing Legend Externally

Iocomp Components – Plot Pack Manual 173

Channel Associated X-AxisTo obtain the associated X-Axis for a particular channel, use the following…

iPlot1.Channel(0).XAxisName

Channel Associated Y-AxisTo obtain the associated Y-Axis for a particular channel, use the following…

iPlot1.Channel(0).YAxisName

Channel Current X/Y CoordinateThe X and Y columns in the legend display the current X and Y coordinates for the most recentlyadded data point for a particular channel. In the example below, the green channel (Channel 6)shows a current Y value of 30, which corresponds to the X-Value displayed in the graph and inthe legend.

To access any particular X or Y coordinate of a particular data point, use the following whereIndex is the index of the data point being requested (0 would be the first data point, 1 the second,2 the third, etc.)…

XValue = iPlot1.Channel(0).DataX(Index)YValue = iPlot1.Channel(0).DataY(Index)

To access the X and Y coordinate of the most recently added data point, use the following…

XValue = iPlot1.Channel(0).DataX(iPlot1.Channel(0).Count – 1)Yvalue = iPlot1.Channel(0).DataY(iPlot1.Channel(0).Count – 1)

Page 188: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 30 - ASP (Active Server Pages)

Iocomp Components – Plot Pack Manual174

Chapter 30 - ASP (Active Server Pages)

Working with ASP pages in conjunction with a Microsoft IIS server (Windows NT 4.0, Windows 2000,Windows XP) allows you to instantiate our component on the server side, add data to the chart, and thenstream an image of the chart to your end user without using temporary files. This is all done withoutneeding to run a copy of our component on the web browser client, allowing for cross-platform supportof our component in static mode.

Here is a simple example that shows how to create a Plot component on the web server, set someproperties of the component, add some data, and then stream out a JPEG image of the component toyour client by using the Response object. ASP Page code is interpreted on the web server before it issent to the client, so the following script would be replaced with a JPEG image in the resulting HTMLcode sent to the browser.

Microsoft IIS Server ASP Page (VBScript)

<%@ Language=VBScript %><!--METADATA NAME="iPlotLibrary" TYPE="TypeLib"UUID="{DA259054-D93B-498C-8C10-DEBD83EF1357}"--><%'Setup ResponseResponse.Expires = 0Response.Buffer = TrueResponse.Clear

'Create ActiveX ControlSet iPlotX1 = Server.CreateObject("iPlotLibrary.iPlotX")

'Set Some PropertiesiPlotX1.Width=500iPlotX1.Height=300iPlotX1.Labels(0).Caption = "Test Chart 1"

iPlotX1.ToolBar(0).Visible = False

'Plot Some Random Datafor x = 0 to 100

iPlotX1.Channel(0).AddXY x, sin(x) * 100next

'Stream JPEG ImageResponse.ContentType = "image/jpeg"Response.BinaryWrite(iPlotX1.GetBytesJPEG(100, TRUE))

'CleanupSet iPlotX1 = Nothing

%>

Page 189: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 31 - Internet Explorer (Client Side)

Iocom

Chapter 31 - Internet Explorer (Client Side)

Our ActiveX version of our Plot Pack components can be used to display Real-Time chart data in theMicrosoft Internet Explorer Browser. This chapter covers running our Plot Pack ActiveX componentson a client’s Internet Explorer Browser. If you only require static images to be displayed on a usersmachine and you wish to support all operating systems and browsers other than Microsoft InternetExplorer and Windows, then please refer to our chapter on ASP (Active Server Pages) and/or ApacheWeb Modules.

The following requirements must be met to be able to display Real-Time data from your network serverto your local client’s web browser…

1. The client must be running 32-bit Windows.2. The client must be running Microsoft Internet Explorer 3.01 or higher version3. You must provide code or another ActiveX component in your HTML webpage code to transfer

data from the web server or other network server or computer. If your web page will beacquiring data from the client’s machine or if you will be statically embedding your data in theweb page (or statically through ASP or other server side scripts), then this is not needed. SOAPas well as direct database-linking support will be provided in a future release.

Cre

Tc

<w<

Mcyy

Netscape and The Mozilla project do have solutions for embedding ActiveXcontrols in their browsers on Windows machines with varying degrees of

p Components – Plot Pack Manual 175

ating the Plot Pack ActiveX Object in Your Web Page

o create an ActiveX object on the client’s machine, you would need to include the following htmlode in the body section of your web page…

object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"idth="500" height="200">/object>

any HTML development tools such as InterDev and FrontPage will automatically generate thisode for you, and will also stream out design-time properties of the control to the html document forou. If you are using an HTML development tool that doesn’t automatically generate this code forou, you will need to manually type in the information as needed.

! success. Some solutions support properties and events, others do not. Iocompdoes not support these solutions at this time, but will support future versionsof Netscape, Mozilla, and other browsers when they attain sufficient supportfor embedding ActiveX controls.

Page 190: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 31 - Internet Explorer (Client Side)

176

ClassID List for Plot Pack Components

iPlot1791C036-8981-492A-BD28-F2331BC9B7C7

iXYPlotD1CAE8F4-6DFF-4187-B1B8-DDCF91F98A8A

Refer to Appended <Insert Appendix Number Here>: ActiveX HTML Properties and Events for alisting of all of the supported properties and events than can be used with our Plot Pack componentsin an HTML web page.

Installing the Plot Pack ActiveX Control on the Client

To automatically install and update our Plot Pack ActiveX controls on your client machine, you willneed to modify the “object” tag used in the previous section as follows…

<object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1" width="500"height="200" codebase="pathname/iPlotLibrary.cab#2,0,0,0"></object>

The addition of codebase=”pathname/iPlotLibrary.cab#2,0,0,0” instructs Internet Explorer todownload, install, and register the Plot Pack ActiveX components (compressed in a CAB file) underthe following conditions…

1. The Plot Pack ActiveX is not installed on the client’s computer2. The version of the Plot Pack ActiveX installed on the client’s computer is less than the

version specified after the # symbol. Notice that the version number separator is “,”and not “.”.

To obtain a digitally signed, pre-prepared CAB file for the Plot Pack or any of our ActiveXcomponents, navigate to our downloads web page at http://www.iocomp.com/download

To obtain the version number of the ActiveX component contained in our pre-prepared CAB file,open the file in a Zip utility (such as WinZip) and view the contained INF file. That file willcontain the full version of the contained ActiveX component

Don’t uncompress or modify the CAB file’s supplied by Iocomp Software.

Simply copy the CAB file to your server, and reference it in the codebaseparameter of the object tag. If you need to place our ActiveX in your own

Iocomp Components – Plot Pack Manual

self-created CAB file, then you will need to obtain a digital certificate from aCert provider such as Versign or Thawte. By using our digitally signed CABfiles or using your own digitally signed CAB file, your clients can leave theirInternet Security Settings set on High.

Page 191: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 31 - Internet Explorer (Client Side)

Iocomp C

Licensing the Plot Pack ActiveX ControlAll ActiveX controls that require licensing must have an LPK file specified in each web page thatuses that control. Since only one LPK file can be specified in any one web page, it is recommendedthat you generate an LPK file for all ActiveX controls (no matter which vendor) that you may beusing in your web pages.

To integrate the LPK file into your web page, you will need to associate the LPK file with theMicrosoft License Manager control that is built into the Internet Explorer browser as follows…

<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT><param name="LPKPath" value="pathname/LPKFile.lpk"></object>

To gedown

AccessinIf youfind thfollowconsu

AddX<scri<!--Sub P

DDD

F

Nend s--></

nerate an LPK file, you will need to obtain the LPK Tool program from Microsoft. You canload this tool from Microsoft’s Website and from their Internet Explorer Toolkit.

g the Plot Pack ActiveX Control from VBScript are familiar with Microsoft Visual Basic or VBA from Microsoft Office products, you shoulde VBScript language to be almost identical. Accessing the chart from your VBScript codes the same rules as Visual Basic. Consult documentation or books on how to use VBScript, or

lt our example below and in the Examples Section of our Support Website.

Y Examplept LANGUAGE="VBScript">

lotButton_OnClick()im xim XDataim YData

or x = 1 To 100'Increment X CounterXData = XData + 1'Generate Random DataYData = Rnd(1) * 100

'Plot XY Data PairiPlotX1.Channel(0).AddXY XData, YData

extubscript>

! The CLASSID used is for the Microsoft License Manager control and notthe other ActiveX controls used in your web page!

omponents – Plot Pack Manual 177

VBScript does not support variable types. When you dimension your variables, donot give a type. All variable types in VBScript are Variants.

Page 192: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Chapter 31 - Internet Explorer (Client Side)

Iocomp Components – Plot Pack Manual178

Full Source Example

<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Internet Explorer Plot Pack Example</title></head><body bgcolor="#FFFFFF"><object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1"width="500" height="200"></object><input type="button" value="Plot" name="PlotButton"><script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick()

Dim xDim XDataDim YData

For x = 1 To 100'Increment X CounterXData = XData + 1'Generate Random DataYData = Rnd(1) * 100'Plot XY Data PairiPlotX1.Channel(0).AddXY XData, YData

Nextend sub--></script></body></html>

Page 193: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 179

Appendix A - Plot Pack Property Editors

Control General

• User Can Edit Objects: Use to specify whether your application user can open theruntime property editor by right-clicking on a plot object and select a popup “Edit” menuitem. Only the “Edit” popup items are disabled when this option is unchecked.

• Auto Frame Rate: Use AutoFrameRate to specify whether the control automaticallyactivates the repaint frame rate control. When the AutoFrameRate is set to true, thecontrol automatically calls BeginUpdate when the control is performing its next repaint.From then on, the control repaint frame rate is equal to the UpdateFrameRate no matterhow many changes are maid to the control every second.

• Update Frame Rate: Use UpdateFrameRate to get or set the frame rate at which thecontrol repaints.

The frame rate is used to improve performance by controlling the number of times thecontrol repaints itself per second. To activate automatic frame rate control, theUpdateFrameRate property must be non zero and the BeginUpdate method must becalled. To deactivate automatic frame rate control, call the EndUpdate method.

Each time a change occurs to the control that requires a repaint, the control will

Page 194: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual180

determine if a new frame needs to be displayed. The FrameTime is one second divided bythe UpdateFrameRate. If a change occurs to the control before the FrameTime haselapsed, the control is not repainted. If a change occurs to the control after theFrameTime has elapsed, the control is repainted and the next frame is started.

There must be a steady stream of changes to the control that require repainting for theautomatic frame rate control to function correctly. The rate of change per second must begreater than the UpdateFrameRate for the desired frame rate to be achieved. Oncechanges to the control that require repainting have been stopped, call the EndUpdatemethod to force the control to repaint the last changes that may be cached.

When the frame rate control is inactive, the control will attempt to repaint when a changeis made to the control that requires a repaint. The actual number of repaints per second isdependent of the system hardware, system activity, and the number of request beingmade to repaint the control.

The frame rate can be manually controlled by using the BeginUpdate and EndUpdatemethods. Make sure that the UpdateFrameRate property is set to 0 to disable automaticframe rate control. Your code will need to keep track of the last update before beginninga new frame. To begin a new frame, call the EndUpdate method and then theBeginUpdate method to start the next frame.

• Background Color: Use BackgroundColor to read or change the background color of thecontrol.

• Border Style:Use BorderStyle to provide the control with a three-dimensional beveledlook.

Value MeaningibsNone No border.ibsRaised The outer border is raised.ibsLowered The outer border is lowered.

• Outer Margin: Use OuterMarginLeft, OuterMarginRight, OuterMarginTop, orOuterMarginBottom to set the margin between the left, right, top, or bottom side edge ofthe control and the internal drawn elements. The values are specified in pixels.

Page 195: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Co

Control Title

• Title Visible: Use to show or hide the main chart title displayed above the DataViewarea.

• Title Text: Use to set the Title Text of the main chart title.

• Title Margin: Use to set the margin between the bottom of the title and the DataViewarea.

• Title Font: Use to se the font of the title.

These properties have been depreciated in favor of our multiple label

mponents – Plot Pack Manual 181

! support. Please use the Labels tab to set properties for the Title Label andother labels in the Plot Component.

Page 196: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual182

Control Print

• Show Dialog: Use PrinterShowDialog to specify whether the printer setup dialog isshown to the user when the PrintChart method is called. If Enabled, the user can select alocal or network printer, specify the orientation, number of copies, and etc before actuallyprinting the chart.

• Orientation: Use PrinterOrientation to set the orientation of the chart on the printedpage.

Value MeaningpoPortrait PortraitpoLandscape Landscape

• Margin: The left, right, top, and bottom margins on the printed page.

Page 197: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 183

Control Hints

• Hints Show: Use HintsShow to specify whether Help Hints are shown for the entirecontrol.

• Hints Pause: Use HintsPause to get or set the time interval that passes before thecontrol's Help Hint appears when the user places the mouse pointer on a object. TheHintsPause value is in milliseconds.

• Hints Hide Pause: Use HintsHidePause to get or set the time interval to wait beforehiding the Help Hint if the mouse has not moved from the object. The HintsHidePausevalue is in milliseconds.

Page 198: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual184

Control File I/O

• Log File Name: Use LogFileName to get or set the filename (including path) for the logfile. This is the log file for all axes.

Warning! All channels must be synchronized. You must use the AddDataArray methodwhen adding data to the plot component when using the main plot interface’s loggingfeature. If you wish to use asynchronous channels, then you must use the LogFileNamelogging feature off of each channel.

• Log Buffer Size: Use LogBufferSize to get or set the size of the log buffer. Whenlogging is active, data will flow into the log buffer if the LogBufferSize is greater than 0.When the buffer is filled, then data will be written to the log file and the buffer cleared.This is useful if you want to regulate how often data is written to the log file. If thisvalue is 0, then data is written to the log file after every new data point is added to thechart.

The value is in number of data points per channel. If you have 5 channels and set thisvalue to 10, then the log will be written to and the buffer cleared after 50 data points havebeen accumulated.

Warning! All channels must be synchronous. You must use the AddDataArray methodwhen adding data to the plot component when using the main plot interface’s loggingfeature. If you wish to use asynchronous channels, then you must use the LogBufferSizelogging feature off of each individual channel.

Page 199: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 185

Note: if the log is deactivated, the buffer will automatically be flushed to the log file andcleared.

• Properties Save: Call SavePropertiesToFile to stream out all of the properties of the plotcomponent to a file.

• Properties Load: Call LoadPropertiesFromFile to stream in all of the properties of theplot component from a file.

Translation

• Add: Adds a translation string pair to the list of translations.

• Remove: Removes the selected translation from the list of translations.

• ClearAll: Removes all translations from the list of translations.

• Save: Exports a tab delimited text file of translation string pairs.

• Load: Loads a tab delimited text file of translation string pairs.

• Original String: The English string in the original component to be translated. Case-sensitive. Leading and trailing spaces are NOT ignored.

• Replacement String: The translated string, which replaces the Original String.

Page 200: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual186

Annotation Defaults

• Font: Specifies the default font attributes used when creating annotation objects.

• Pen Color: Specifies the pen color used when drawing the annotation object.

• Pen Style: . Use MarkersPenStyle to get or set the pen style used when drawing datamarkers.

Value MeaningpsSolid A solid linepsDash A line made up of a series of dashespsDot A line made up of a series of dotspsDashDot A line made up of alternating dashes and dotspsDashDotDot A line made up of a serious of dash-dot-dot combinations

psClear No line is drawn (used to omit the line around shapes thatdraw an outline using the current pen)

psInsideFrame A solid line, but one that may use a dithered color ifWidth is greater than 1

• Pen Width: . Use MarkersPenWidth to get or set the pen width used when drawing datamarkers.

• Brush Color: Use MarkersBrushColor to get or set the brush color used to draw datamarkers.

Page 201: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 187

• Brush Style: Use MarkersBrushStyle to get or set the brush style used when drawingdata markers.

Value MeaningbsSolid SolidbsClear ClearbsHorizontal Horizontal LinesbsVertical Vertical Lines

bsFDiagonal Diagonal Bottom-Leftto Top-Right

bsBDiagonal Diagonal Top-Left toBottom-Right

bsCrossCombination ofbsHorizontal andbsVertical

bsDiagCrossCombination ofbsFDiagonal andbsBDiagonal

Visual Layout Manager

Page 202: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual188

• How To Use: The Layout Manager is a visual, graphical representation of the individualplot component objects as they are drawn on the component. You can drag-and-dropindividual items to reposition them within the control. You can also change the width andheight of objects by placing your mouse cursor over one of the ends of the objects (lookfor the cursor to change to a double arrow) and dragging them to the desired size. If youdrop one axes object on another, and they do not overlap, then the axes will stack on topof one another. To flip the X and Y-Axes, right click anywhere in the Layout Managerfor a menu item to rotate the X and Y-Axes.

• Toolbar: The Toolbar object. This item cannot be moved at this time. A feature toreposition this item will be added in future versions.

• Label: The Label Object. In this example, the only label in the component is named“Title”. There must always be at least one label in the component for backwardcompatibility with older versions, though it can be hidden.

• Data View: The object which contains the plotted data. All objects move in relation tothis object, so it is fixed.

• X-Axis: An individual X-Axis. If you have added multiple X-Axes, there would bemultiple X-Axis objects which you could reorder or stack.

• Y-Axis: An individual Y-Axis. If you have added multiple Y-Axes, there would bemultiple Y-Axis objects which you could reorder or stack.

• Legend: The Legend Object. This object cannot be flipped at this time, only moved.Only one Legend object is supported at this time.

Page 203: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 189

Channels General

• Channel List: A listing of the channels that have been added to the Chart.

• Add Button: Adds a channel to the list

• Remove Button: Removes the selected channel from the list

• Name: Use Name to set the Plot Object’s name. This name can then be used to referencethe object. There is no restrictions on the length of the name or the characters used.

• Title: Use TitleText to get or set the title text for the channel. This is the title that isdisplayed in the legend for this channel.

• Ring Buffer Size: Use RingBufferSize to get or set the size of the data buffer used forstoring channel data. By setting this property to a non-zero value, the ring buffer featureis enable. To disable the ring buffer feature, set this property to 0. The ring buffer willremain a constant size no matter how many data points are added to the channel and willact like a FIFO (First In First Out).

• Visible: Use the Visible property to show or hide a specific Plot Object.

• Visible In Legend: Use VisibleInLegend to specify whether the channel is shown in thelegend.

Page 204: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual190

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

• Fast Draw: Enables or disables the Fast Draw feature. This feature dramatically speedsup redraws to the screen if you are displaying large data sets (>100000 data points).

• Color: Use Color to get or set the color of the channel. The Color property is used by theTrace drawing routine and is used by default for the Markers and Fill drawing routines.

• X-Axis Name: Use XAxisName to get or set the name of the x-axis used for plotting thechannel x data against. If the XAxisName is not a valid x-axis name, the channel datawill not be drawn.

• Y-Axis Name: Use YAxisName to get or set the name of the Y-Axis used for plotting thechannel y data against. If the YAxisName is not a valid Y-Axis name, the channel datawill not be drawn.

• X-Axis Tracking Enabled: Use XAxisTrackingEnabled to specify whether the channelsends tracking data to its assigned x-axis.

• Y-Axis Tracking Enabled: Use YAxisTrackingEnabled to specify whether the channelsends tracking data to its assigned Y-Axis.

Page 205: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 191

Channel Trace

• Visible: Use TraceVisible to specify whether the channel trace line is visible. Typicallythe trace line is hidden for a scatter type plot.

• Line Style: Use TraceLineStyle to get or set the line style of the channel trace line.

Value MeaningiplsSolid A solid lineiplsDash A line made up of a series of dashesiplsDot A line made up of a series of dotsiplsDashDot A line made up of alternating dashes and dotsiplsDashDotDot A line made up of a serious of dash-dot-dot combinations

• Line Width: Use TraceLineWidth to get or set the pen width used when drawing thechannel trace line.

Page 206: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual192

Interpolation

• Style: .

Page 207: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 193

Channels Markers

• Show: Use MarkersVisible to specify whether the data markers are visible.

• Allow Individual: Use MarkersAllowIndividual to specify whether the DataMarkerShowand DataMarkerStyle properties are used to draw individual data point data markers.When this property is set to True, then the data markers are initially drawn using theMarkersStyle property but can be modified individually with the DataMarkerShow andDataMarkerStyle properties. When this property is set to False, then all of the datamarkers are drawn using the MarkersStyle property of the channel.

• Style: Use MarkersStyle to get or set the style of the data markers.

Value MeaningipmsCircle CircleipmsSquare SquareipmsDiamond DiamondipmsCross CrossipmsPlus PlusipmsTriangleUp Triangle Pointing UpipmsTriangleDown Triangle Pointing DownipmsTriangleLeft Triangle Pointing LeftipmsTriangleRight Triangle Pointing Right

Page 208: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual194

• Size: Use MarkersSize to get or set the size of data markers. The MarkersSize value is inpixels.

• Pen Use Channel Color: Use MarkersPenUseChannelColor to specify whether markersuse the channel color for the pen color. When MarkersPenUseChannelColor is set toTrue, the pen uses the color of the Color property. When MarkersPenUseChannelColor isset to False, the pen uses the color of the MarkersPenColor property.

• Pen Style: Use MarkersPenStyle to get or set the pen style used when drawing datamarkers.

Value MeaningpsSolid A solid linepsDash A line made up of a series of dashespsDot A line made up of a series of dotspsDashDot A line made up of alternating dashes and dotspsDashDotDot A line made up of a serious of dash-dot-dot combinations

psClear No line is drawn (used to omit the line around shapes thatdraw an outline using the current pen)

psInsideFrame A solid line, but one that may use a dithered color ifWidth is greater than 1

• Pen Color: Use MarkersPenColor to get or set the pen color used to draw data markers.

• Pen Width: Use MarkersPenWidth to get or set the pen width used when drawing datamarkers.

• Brush Use Channel Color: Use MarkersBrushUseChannelColor to specify whethermarkers use the channel color for the brush color. When MarkersBrushUseChannelColoris set to True, the brush uses the color of the Color property. WhenMarkersBrushUseChannelColor is set to False, the brush uses the color of theMarkersBrushColor property.

Page 209: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 195

• Brush Style: Use MarkersBrushStyle to get or set the brush style used when drawingdata markers.

Value MeaningbsSolid SolidbsClear ClearbsHorizontal Horizontal LinesbsVertical Vertical Lines

bsFDiagonal Diagonal Bottom-Leftto Top-Right

bsBDiagonal Diagonal Top-Left toBottom-Right

bsCrossCombination ofbsHorizontal andbsVertical

bsDiagCrossCombination ofbsFDiagonal andbsBDiagonal

• Brush Color: Use MarkersBrushColor to get or set the brush color used to draw datamarkers.

Channels Fill

Page 210: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual196

• Enabled: Use FillEnabled to specify whether a fill is drawn underneath the channel data.

• Use Channel Color: Use FillUseChannelColor to specify whether the fill uses thechannel color when drawing the fill underneath the channel data. WhenFillUseChannelColor is set to True, the fill color used is the Color property value. WhenFillUseChannelColor is set to False, the fill color used is the FillColor property value.

• Reference: Use FillReference to get or set the reference line that the fill is drawn to onthe Y-Axis.

• Color: FillColor to get or set the brush color used to paint the fill under the data.

• Style: Use FillStyle to get or set the brush style used when drawing the fill underneath thechannel data.

Value MeaningbsSolid SolidbsClear ClearbsHorizontal Horizontal LinesbsVertical Vertical LinesbsFDiagonal Diagonal Bottom-Left to Top-RightbsBDiagonal Diagonal Top-Left to Bottom-RightbsCross Combination of bsHorizontal and bsVerticalbsDiagCross Combination of bsFDiagonal and bsBDiagonal

Page 211: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 197

Channels Digital

• Enabled: Use DigitalEnabled to specify whether the data in the channel is interpreted asdigital or analog data.. If DigitalEnabled is TRUE, then values of 0 and 1 are plottedagainst DigitalReferenceLow and DigitalReferenceHigh respectively.

Y coordinate values that are equal to 0 (i.e. Value = 0) are plotted on the scale at the Ycoordinate specified by DigitalReference Low.

X coordinates that are not equal to 0 (i.e. 0 < Value > 0) are plotted on the scale at the Ycoordinate specified by DigitalReference High.

• Reference High: Use DigitalReferenceHigh to get or set the Y coordinate for digital highvalues or Logic = TRUE used for plotting data points while in Digital Mode when thevalue is not equal to 0 (i.e. 0 < Value > 0).

• Reference Low: Use DigitalReferenceLow to get or set the Y coordinate for digital lowvalues or Logic = FALSE used in Digital Mode while in Digital Mode when the value isequal to 0 (i.e. Value = 0).

Page 212: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual198

• Reference Style: Use DigitalReferenceStyle to get or set the formatting style of a digitalchannel.

Value Meaning

ipdrScaleDigitalReferenceLow and DigitalReferenceHighproperties are interpreted as actual values on theassociated Y-Axis Scale

ipdrPercent

DigitalReferenceLow and DigitalReferenceHighproperties are interpreted as a percentage of the distancefrom the bottom of the DataView (0%) and the top of theDataView (100%) [Note: Acceptable values are between0 and 100]

Channel File I/O

• Log File Name: Use LogFileName to get or set the filename (including path) for the logfile. This is the log file only for the associated channel.

Note: Channels may be synchronous or asynchronous. If you are only using synchronousdata, you can use the LogFileName logging feature off of the main component interfaceto save all channel data to a single log file.

Page 213: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 199

• Buffer Size: Use LogBufferSize to get or set the size of the log buffer. When logging isactive, data will flow into the log buffer if the LogBufferSize is greater than 0. When thebuffer is filled, then data will be written to the log file and the buffer cleared. This isuseful if you want to regulate how often data is written to the log file. If this value is 0,then data is written to the log file after every new data point is added to the chart.

Note: Channels may be synchronous or asynchronous. If you are only using synchronousdata, you can use the LogBufferSize logging feature off of the main component interfaceto save all channel data to a single log file.

Note: if the log is deactivated, the buffer will automatically be flushed to the log file andcleared.

• Properties Save: Call SavePropertiesToFile to stream out all of the properties of theassociated channel to a file.

• Properties Load: Call LoadPropertiesFromFile to stream in all of the properties of theassociated channel from a file.

Cursors General

• Cursor Name: Use Name to set the Plot Object’s name. This name can then be used toreference the object. There is no restrictions on the length of the name or the charactersused.

Page 214: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual200

• Cursor Style: Use Style to get or set the style of the data cursor object. The styledetermines the type and behavior of the cursor.

Note: data points are interpolated when used with the iPlot component.

These are the possible values:

Value Meaning

ipcsValueXY

Displays Data Point’s ValueX and ValueY with asingle pointer line for the iPlot component and across-hair (two pointer lines) for the iXYPlotcomponent.

ipcsValueX Displays Data Point’s ValueX with a single pointerline

ipcsValueY Displays Data Point’s ValueY with a single pointerline

ipcsDeltaXDisplays Data Points’ X Span between to pointerlines.Use ValueX to retrieve the X Span.

ipcsDeltaYDisplays Data Points’ Y Span between to pointerlines.Use ValueY to retrieve the Y Span.

ipcsInverseDeltaX

Displays Frequency between two pointer lines.Uses scale values and CursorScaler property ofthe associated channel’s X-Axis. Use ValueX toretrieve the calculated value.

• Cursor Channel Name: Use ChannelName to get or set the name of the channel used forreferencing. This property associates a particular channel’s data with the cursor. Datafrom the channel is then used by the cursor to display individual data points, ranges, andother cursor calculated values.

• Pointer 1 Position: Use Pointer1Position to get or set the position of the first cursorpointer. The units of the Pointer1Position are in reference to the DataView area inpercent. Therefore the only valid values are between 0 and 100.

If the data cursor is horizontal, the position is in reference to the Y-Axis side of theDataView area with 0 being the bottom of the DataView and 100 being the top of thedata view.

If the data cursor is vertical, the position is in reference to the X-Axis side of theDataView area with 0 being the left side of the DataView and 100 being the right side ofthe data view.

Page 215: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 201

For data cursors of style ValueXY (iPlot Component Only), ValueX, and ValueY, thisproperty sets the position of the single cursor line used with these data cursor styles.

• Pointer 2 Position: Use Pointer2Position to get or set the position of the second cursorpointer. The units of the Pointer2Position are in reference to the DataView area inpercent. Therefore the only valid values are between 0 and 100.

For data cursors of style ValueXY (iPlot Component Only), ValueX, and ValueY, thisproperty is ignored since they don’t have a second cursor line..

• Pointer Color: Use Color to get or set the color of the data cursor line or lines. Thisproperty is overridden if the UseChannelColor property is set to True.

• Use Channel Color: Use UseChannelColor to specify whether the data cursor line usethe channel color for the line color. When UseChannelColor is set to True, the data cursorline is drawn using the associated Channel’s Color property. When UseChannelColor isset to False, the data cursor line is drawn using the Data Cursor’s Color property.

• Cursor Font: Use Font to change the font attributes of the data cursor hint.

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

Page 216: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual202

Cursors Hint

• Show: Use HintShow to specify whether the hint is shown next to the data cursor in theDataView area. You will generally want to leave this value set to TRUE so that the Xand/or Y values of the cursor are displayed next to the cursor.

When this property is set to false, you will need to use the OnCursorChange event to benotified when the cursor moves so that you can externally display or react to the X and Yvalues of the cursor..

• Hide On Release: Use HintHideOnRelease to specify whether the hint is automaticallyhidden when the user releases the mouse button. The hint will be shown when the userselects, clicks down, and while moving the cursor in the DataView area. If this propertyis set to True, then the hint will immediately be hidden when the mouse is released.

• Position: Use HintPosition to get or set the position of a hint object next to a data cursor.The value is specified in percent of the horizontal or vertical range of the DataView Area.

If HintPosition = 25 and the cursor is horizontal, then the left-side of the hint will be 25%of the distance from the left side of the DataView area.. If HintPosition = 60 and thecursor is vertical, then the top side of the hint will be 60% of the distance from the topside of the DataView area.

Page 217: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 203

• Orientation Side: Use HintOrientationSide to get or set the orientation of the hintdisplayed next to the cursor.

Note: the orientation will automatically be flipped if a cursor is moved in such a way asto move the hint window outside of the DataView area (i.e. there is no room between thecursor and the edge of the DataView boundaries).

These are the possible values:

Value Meaning

iosBottomRight Displays the hint to the right of a vertical cursor andbelow a horizontal cursor.

iosTopLeft Displays the hint to the left of a vertical cursor andabove a horizontal cursor.

Cursors Menu Items

• Value XY Visible: Use MenuItemVisibleValueXY to specify whether right-click,context-sensitive menu for the data cursor object displays the “ValueXY” entry. Thismenu item allows the user to change the cursor to display both X and Y values.

• Value X Visible: Use MenuItemVisibleValueX to specify whether right-click, context-sensitive menu for the data cursor object displays the “ValueX” entry. This menu itemallows the user to change the cursor to display only X values.

Page 218: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual204

• Value Y Visible: Use MenuItemVisibleValueY to specify whether right-click, context-sensitive menu for the data cursor object displays the “ValueY” entry. This menu itemallows the user to change the cursor to display only Y values.

• Delta X Visible: Use MenuItemVisibleInverseDeltaX to specify whether right-click,context-sensitive menu for the data cursor object displays the “

• InverseDeltaX” entry. This menu item allows the user to change the cursor to display theinverse of the range of X values between two cursor lines (value = 1/range). This istypically used in conjunction with the Axis CursorScaler property to display calculatedfrequency values.

• Delta Y Visible: Use MenuItemVisibleDeltaY to specify whether right-click, context-sensitive menu for the data cursor object displays the “DeltaY” entry. This menu itemallows the user to change the cursor to display the range of Y values between two cursorlines.

• Inverse Delta X Visible: Use MenuItemVisibleInverseDeltaX to specify whether right-click, context-sensitive menu for the data cursor object displays the “InverseDeltaX”entry. This menu item allows the user to change the cursor to display the inverse of therange of X values between two cursor lines (value = 1/range). This is typically used inconjunction with the Axis CursorScaler property to display calculated frequency values..

• Value XY Caption: Use MenuItemCaptionValueXY to specify the caption of the“ValueXY” right-click, run-time popup menu for the data cursor object. This is useful forcustomizing the menu for application specific descriptions. The menu item allows theuser to change the cursor to display both X and Y values.

• Value X Caption: Use CaptionValueX to specify the caption of the “ValueX” right-click, run-time popup menu for the data cursor object. This is useful for customizing themenu for application specific descriptions. The menu item allows the user to change thecursor to display only X values.

• Value Y Caption: Use MenuItemCaptionValueY to specify the caption of the “ValueY”right-click, run-time popup menu for the data cursor object. This is useful forcustomizing the menu for application specific descriptions. The menu item allows theuser to change the cursor to display only Y values.

• Delta X Caption: Use MenuItemCaptionDeltaX to specify the caption of the “DeltaX”right-click, run-time popup menu for the data cursor object. This is useful forcustomizing the menu for application specific descriptions. The menu item allows theuser to change the cursor to display the range of X values between two cursor lines.

• Delta Y Caption: Use MenuItemCaptionDeltaY to specify the caption of the “DeltaY”right-click, run-time popup menu for the data cursor object. This is useful forcustomizing the menu for application specific descriptions. The menu item allows theuser to change the cursor to display the range of Y values between two cursor lines.

Page 219: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 205

• Inverse Delta X Caption: Use MenuItemCaptionDeltaX to specify the caption of the“InverseDeltaX” right-click, run-time popup menu for the data cursor object. This isuseful for customizing the menu for application specific descriptions. The menu itemallows the user to change the cursor to display the inverse of the range of X valuesbetween two cursor lines (value = 1/range). This is typically used in conjunction withthe Axis CursorScaler property to display calculated frequency values..

Limits General

• Name: Use Name to set the Plot Object’s name. This name can then be used to referencethe object. There is no restrictions on the length of the name or the characters used.

Page 220: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual206

• Style: Use Style to get or set the style of the limit object. The style determines the typeof the limit and how it is drawn on the screen and manipulated.

These are the possible values:

Value Meaning

iplsLineX Displays a single line perpendicular to the X-Axis ata position specified by Line1Position.

iplsLineY Displays a single line perpendicular to the Y-Axis ata position specified by Line1Position.

iplsBandX Displays a filled or two line band perpendicular to theX-Axis specified by the Line1Position and .

iplsBandYDisplays a filled or two line band perpendicular to theY-Axis specified by the Line1Position andLine2Position properties.

iplsPolyBandX

Displays a filled or two line band using elements(upper and lower limit values specified for aparticular Y-Axis positions) added by theAddBandElement method.

iplsPolyBandY

Displays a filled or two line band using bandelements (upper and lower limit values specified for aparticular Y-Axis positions) added by theAddBandElement method.

• Line 1 Position: Use Line1Position to get or set the position of the first limit line. Theunits of the Line1Position are in reference to the values on the referenced axis of interest.This property is used for all limit line styles.

For limit lines of style LineX and LineY, this property sets the position of the single limitline used with these limit styles.

CursorStyle Position Value Meaning

iplsLineX References the X-Axis scale referenced in theXAxisName property.

iplsLineY References the Y-Axis scale referenced in theYAxisName property.

For limit lines of style BandX and BandY, this property sets the position of the firstcursor line with these fill-region or dual-line data limit line styles. For limit lines of stylePolyBandX or PloyBandY, this property is ingored.

Page 221: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 207

CursorStyle Position Value Meaning

iplsBandX References the X-Axis scale referenced in theXAxisName property.

iplsBandY References the Y-Axis scale referenced in theYAxisName property.

iplsPolyBandX Property Ignored. Use AddBandElement.iplsPolyBandY Property Ignored. Use AddBandElement.

• Line 2 Position: Use Line2Position to get or set the position of the second limit line. Theunits of the Line2Position are in reference to the values on the referenced axis of interest.

For limit lines of style LineX and LineY, this property is ignored.

CursorStyle Position Value MeaningiplsLineX Property Ignored. Use Line1Position instead.iplsLineY Property Ignored. Use Line1Position instead.

For limit lines of style BandX and BandY, this property sets the position of the secondcursor line with these fill-region or dual-line data limit line styles. For limit lines of stylePolyBandX or PloyBandY, this property is ingored.

CursorStyle Position Value Meaning

iplsBandX References the X-Axis scale referenced in theXAxisName property.

iplsBandY References the Y-Axis scale referenced in theYAxisName property.

iplsPolyBandX Property Ignored. Use AddBandElement.iplsPolyBandY Property Ignored. Use AddBandElement.

Page 222: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual208

• Fill Style: Use FillStyle to get or set the fill style used when drawing the fill betweenlimit lines. This property has no effect if the Limit Style property is set to iplsLineX oriplsLineY.

These are the possible values:

Value MeaningbsSolid Solid.

bsClear

Clear. No fill will be created, but two solid lines ofline width 1 using the Limit’s Color property will bedrawn at the Line1Position and Line2Positionpositions.

bsHorizontal Horizontal Lines.bsVertical Vertical Lines.bsFDiagonal Diagonal Bottom-Left to Top-Right.bsBDiagonal Diagonal Top-Left to Bottom-Right.bsCross Combination of bsHorizontal and bsVertical.bsDiagCross Combination of bsFDiagonal and bsBDiagonal.

• Line Style: Use LineStyle to get or set the line style of the limit line or lines. Thisproperty is ignored if the Limit’s Style property is set to iplsBandX, iplsBandY,iplsPolyBandX, or iplsPolyBandY.

These are the possible values:

Value MeaningpsSolid A solid line.psDash A line made up of a series of dashes.psDot A line made up of a series of dots.psDashDot A line made up of alternating dashes and dots.

psDashDotDot A line made up of a series of dash-dot-dotcombinations.

psClear No line is drawn.

psInsideFrame A solid line, but one that may use a dithered color ifWidth is greater than 1.

Note: Only the psInsideFrame style will produce a dithered color to match a Colorproperty that is not in the color table. All others choose the closest color from theWindows color table.

Note: Dotted or dashed pen styles are not available when the Width property is not 1or 0.

Page 223: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 209

• Line Width: Use LineWidth to get or set the pen width used when drawing the limit lineor lines. This property is ignored if the Limit’s Style property is set to iplsBandX,iplsBandY, iplsPolyBandX, or iplsPolyBandY.

• Color: Use Color to get or set the color of the limit line or lines…

Value Meaning

iplsLineX Displays a single line perpendicular to the X-Axis ata position specified by Line1Position.

iplsLineY Displays a single line perpendicular to the Y-Axis ata position specified by Line1Position.

iplsBandXDisplays a filled or two line perpendicular to the X-Axis specified by the Line1Position andLine2Position properties.

iplsBandYDisplays a filled or two line band perpendicular to theY-Axis specified by the Line1Position andLine2Position properties.

iplsPolyBandX

Displays a filled or two line band using elements(upper and lower limit values specified for aparticular Y-Axis positions) added by theAddBandElement method.

iplsPolyBandY

Displays a filled or two line band using bandelements (upper and lower limit values specified for aparticular Y-Axis positions) added by theAddBandElement method.

• X-Axis Name: Use XAxisName to get or set the name of the X-Axis used forreferencing. This property is used by the Line1Position, Line2Position, andAddBandElement properties and methods for positioning the limit line or lines againstthe specified X-Axis.

• Y-Axis Name: Use YAxisName to get or set the name of the Y-Axis used forreferencing. This property is used by the Line1Position, Line2Position, andAddBandElement properties and methods for positioning the limit line or lines againstthe specified Y-Axis.

Page 224: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual210

Axes General

• Name: Use Name to set the Plot Object’s name. This name can then be used to referencethe object. There is no restrictions on the length of the name or the characters used.

• Min: Use Min to get or set the minimum value that will be display on the axis.

• Span: Use Span to get or set the range displayed on the axis.

• Desired Start: Use DesiredStart to get or set the desired start for the axis scale. Thisproperty will affect what value will be on the first major tick of the axis.

Let’s say the Axis starts at 0, but you want it to start at 9. Setting this value to 9 willinstruct the Axis to start the first major tick on 9 and then follow the DesiredIncrementproperty for all further major ticks.

Note: due to performance issues, this property only has effect if the value exists in thevisible axis (i.e. the value must be equal to or between the axis’ min and max values).This feature is only intended to be used with static scales (scales that do not scroll).

Set this property to 0 to disable this feature and use the default 1-2-5 rules.

Page 225: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 211

• Desired Increment: Use DesiredIncrement to get or set the desired increment for theaxis scale.

If this property is set to 0, then the AutoScale feature of the axis scale will automaticallyadjust the scale to follow a 1-2-5 rule, which ensures that the scale major ticks and labelsfall along “human-readable” whole numbers such as “0,25,50,75,100”,“0,10,20,30,40,50,60,70,80,90,100”, etc. depending on your min and span propertysettings.

If this property is greater than zero, the AutoScale feature will attempt to create a scaleusing your increment values depending on your min and span property settings, addingmajor ticks and labels that will fit in the area used by the scale. If the AutoScale findsthat not all of the labels will fit in the scale area (depends on your font properties), then itwill attempt to fit as many labels as possible using this setting.

For example, if you want the scale to increment by values of “2.5”, and your min andspan properties are 0 and 50, then the AutoScale code will attempt to create a scale with“0, 2.5, 5.0, 7.5, 10, 12.5, …, 40, 42.5, 45, 47.5, 50”. If not all of the labels can fit in thespace allocated to the scale, it will attempt to fit as many labels as possible using the 1-2-5 rule..

• Scale Type: Use ScaleType to get or set the type of scale. When the scale type is set toipstLog10, the Min and Span properties are restricted to being greater than 0.

Value MeaningipstLinear LinearipstLog10 Logarithmic Base 10

• Visible: Use the Visible property to show or hide a specific Plot Object.

• Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a PlotObject.

When this property is set to TRUE, then the UI functionality (ability to move a scale,scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting thisproperty to TRUE will not override other properties that affect the UI of this Plot Object.

When this property is set to FALSE, then the UI functionality of the Plot Object isdisabled. Note that this will override all other properties that affect the UI of this PlotObject.

Note: when a Plot Object is disabled, the Plot Object will not “look disabled” likestandard textboxes or labels. Only the UI will be disabled.

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Page 226: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual212

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

• Reverse Scale: Use ReverseScale to specify whether the scale is reversed. IfReverseScale is False, the axis goes from left to right for horizontal orientation or bottomto top for vertical orientation. If ReverseScale is True, the axis goes from right to left forhorizontal orientation, or top to bottom for vertical orientation.

• Restore Values On Resume: Use RestoreValuesOnResume to set whether or not theaxis restores the original axis parameters and values that were in effect when the PauseAll Tracking Button is clicked. All parameters (such as axis min and span) are restoredwhen the Resume All Tracking Button is clicked and this property is set to TRUE.

• Master UI Input: Use MasterUIInput to set this axis to be the Master User Interface forall axes of this type.

For example, let’s say you have three (3) YAxes. If you set this property to TRUE onthe first Y-Axis, then all UI (User Input, such as mouse or keyboard input) on that axiswill be applied to all other Y-Axes. The X-Axes will not be affected as they are not Y-Axes (i.e. they are not the same type).

This is useful if you want the scrolling action of one axis to be synchronized with allother axes of the same type. If you want all Axes of the same type to be synchronized,set this property to TRUE on all of them. If you want all Axes to be independent, set thisproperty to FALSE on all of them.

Page 227: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 213

Axes Title

• Axes Title Show: Use TitleShow to specify whether the axis title is shown.

• Axes Title Text: Use Title to get or set the title text for the axis. To hide the title, use theTitleShow property.

• Axes Title Margin: Use TitleMargin to get or set margin between the axis title and axisscale labels. TitleMargin represents the percentage of a character size and is based on theTitleFont used for the axis. A value of 0.5 is equal to half the size of a character.

• Axes Title Font: The Font for the Title.

Page 228: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual214

Axes Labels

• Min Length: Use LabelsMinLength to get or set the minimum label length used incalculating the number of scale labels (Major Ticks) during AutoScale. This property hasno effect if the axis is not horizontal.

AutoScale automatically calculates the number of scale labels based on the LabelsFont,LabelSeparation, and LabelsMinLength to ensure labels that are in a human readableformat (1-2-5 Rule).

• Precision: Use LabelsPrecision to get or set the precision of the axis labels. The actualnumber of digits shown to the right of the decimal place depends on the setting of theLabelsPrecisionStyle property.

For example, if LabelsPrecision is 1, LabelsPrecisionStyle is set toipsFixedDecimalPoints, and the value is 40.56 then the label text will be formatted todisplay “40.6”. To show integers only, set LabelsPrecision to 0.

• Margin: Use LabelsMargin to get or set the spacing between the major tick and majortick labels. LabelsMargin represents the percentage of a character size and is based on theLabelsFont used for the axis. A value of 0.5 is equal to half the size of a character.

• Label Separation: Use LabelSeparation to get or set the minimum separation betweenscale labels. LabelSeparation represents the percentage of a character size and is based onthe LabelsFont used for the axis. A value of 0.5 is equal to half the size of a character.

Page 229: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 215

The actual separation maybe greater due to the AutoScale reducing the number of majorticks to keep the scale labels in a human readable format (1-2-5 Rule).

• Min Length Auto Adjust: Use LabelsMinLengthAutoAdjust to specify whether theLabelsMinLength property is automatically adjusted as the minimum required labellength increases.

While plotting, or user scrolling/zooming, the actual minimum label length may becomegreater than the LabelsMinLength property value. This will result it the axis growing insize to accommodate the wider label. If the plotting data or user changes the displayeddata causing the label width to vary, it may cause an annoying oscillation of the displayplot objects sizes. To prevent this oscillation, set this property to true.

The LabelsMinLength property is stored when the TrackingEnabled property is set toFalse. The LabelsMinLength property will be restored to the previous value whenTrackingEnabled property is set back to True.

• Precision Style: Use PrecisionStyle to specify how the LabelsPrecision property isinterpreted when formatting scale labels.

When PrecisionStyle is set to ipsSignificantDigits, the number of digits to the right of thedecimal point is automatically calculated to ensure that the span of the values will showenough significant digits.

For Example :

LabelsPrecision = 3LabelsPrecisionStyle = ipsSignificantDigitsSpan = 50

Number of digits shown to the right of the decimal point = 1

Value Meaning

ipsSignificantDigits Precision property specifies the number ofsignificant digits

ipsFixedDecimalPoints

Precision property specifies the number of digits tothe right of the decimal point

Page 230: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual216

• Format Style: Use LabelsFormatStyle to get or set the formatting style of scale labels.

Value MeaningiptfValue Simple Value (ex. 198678.567)iptfExponent Exponential (ex. 2.35E+002)iptfPrefix Prefix (ex. 2.2K)iptfDateTime Date/Time (ex. 3 Jan 01 5:23:44)

iptfPrice32nds

ex. 100.231This format is used in the Bond andSecurities Market. Displayed where 23 is in 32nds and1 is in 256ths. So in decimal the price above is: 100+23/32 + 1/256. Pass the actual double value of100.72265625 to display it as Price32nds format as100.231.

• Date Time Format: Use DateTimeFormat to get or set the Date/Time formatting stringfor the labels. See FormatDateTime for specific values.

Axes Tracking

• Enabled: Use TrackingEnabled to specify whether the axis will adjust itself to newtracking data from the channels. Depending on the TrackingStyle, When the

Page 231: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 217

TrackingEnabled property is set to True, the axis will scroll or compress based on thenew tracking data.

• Style: Use TrackingStyle to specify how the axis adjusts itself in response to newtracking data if off scale.

Value MeaningiptsScaleMinMax

Will adjust the Min or Span property to keep the newtracking data in view

iptsScaleMax Will adjust the Max property if necessary to keep thenew tracking data in view

iptsScaleMin Will adjust the Min property if necessary to keep thenew tracking data in view

iptsScrollSmooth

If the data is off axis, the scale will be adjusted to showthe data at the end of the scale

iptsScrollPage If the data is off axis, the scale will be adjusted to showthe data at the beginning of the scale

• Align First Style: Use TrackingAlignFirstStyle to specify how the axis aligns itself whenit receives it first piece of tracking data. If there is more than one channel sendingtracking data, only the data from the first channel is used to set the first alignment. Toforce the axis to realign to the next piece of tracking data, call the ResetFirstAlignmethod.

Value Meaning

ipafsMin Axis is adjusted to show first data point on thebeginning of the scale

ipafsMax Axis is adjusted to show first data point on the end ofthe scale

ipafsAutoAxis is unchanged if first data point is in view. If out ofview then the axis is adjusted to show first data pointon the beginning of the scale

ipafsNone Axis is not adjusted on the first data point

• Scroll Compress Max: Use TrackingScrollCompressMax to get or set the maximumspan value when compressing the scale. When new tracking data is received and theTrackingEnabled is set to True, the Span property will be increased (Compressed) toinclude the tracking data if the current Span property is less than theTrackingScrollCompressMax. To disable this feature, set TrackingScrollCompressMax to0.

Page 232: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual218

Axes Cursor

• Cursor Precision: Use CursorPrecision to get or set the precision of the cursor ToolTips.The actual number of digits shown to the right of the decimal place depends on thesetting of the LabelsPrecisionStyle property.

For example, if CursorPrecision is 1, LabelsPrecisionStyle is set toipsFixedDecimalPoints, and the value at the current cursor position is 40.56 then thecursor ToolTip text will be formatted to display “40.6” (actual display of one data point,two data points, or a calculated value depends on the cursor’s property settings). To showintegers only, set LabelsPrecision to 0.

Note: this is a property of the Axis and not of the cursor object since the scale will bedetermining the precision of the data displayed in the cursor if the cursor is setup to usethis axis for obtaining scale data. To modify properties of the cursor object or toassociate a cursor with this axis object, refer to iPlotDataCursorX .

• Cursor Scaler: Use CursorScaler to get or set the desired scalar for the cursor associatedwith this axis scale.

CursorScaler is only used with cursors that have their Style property set toInverseDeltaX, typically used for frequency calculations. The Scalar is a multiplier usedto convert this axis’ units to seconds format so that the cursor can property display thefrequency calculation.

Page 233: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 219

For example, if the axis units are ms (milliseconds or 1/1,000th of a second), then youwould need to set the Scalar to 1,000 to convert from ms to seconds. If the units are µs(microseconds or 1/1,000,000th of a second), then the Scalar should be set to 1,000,000to convert from µs to seconds. If your units are already in seconds on this axis, then youwould set the Scalar to 1.

Axes Scroll

• Min/Max Enabled: Use ScrollMinMaxEnabled to specify whether scrolling of the axisis fixed to a range of values specified by ScrollMax and ScrollMin. If this property is setto True, then the axis will stop scrolling when ScrollMax and/or ScrollMin are reachedon the scale.

• Min: Use ScrollMin to set a fixed maximum limit on scrolling of the axis. If the userattempts to scroll the axis past this point on the axis and ScrollMinMaxEnabled is set toTrue, the axis will not scroll past the specified maximum point.

• Max: Use ScrollMax to set a fixed maximum limit on scrolling of the axis. If the userattempts to scroll the axis past this point on the axis and ScrollMinMaxEnabled is set toTrue, the axis will not scroll past the specified maximum point.

Page 234: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual220

Axes Scale

• Major Length: Use MajorLength to get or set the axis major ticks length.

• Minor Length: Use MinorLength to get or set the axis minor ticks length.

• Minor Count: Use MinorCount to get or set the number of axis minor ticks shown.MinorCount should be set to one less than the desires number of minor sections. Forexample, if you want 5 minor sections, set MinorCount to 4.

• Scale Lines Color: The color of the lines used to draw the scale.

• Inner Margin: Use InnerMargin to get or set the margin between the axis line and theside towards the data view. The InnerMargin value is in pixels.

• Outer Margin: Use OuterMargin to get or set margin between the axis labels or the axistitle if shown and the side away form the data view. The OuterMargin value is in pixels.

• Stacking Ends Margin: Use StackingEndsMargin to get or set the margin at the end ofthe axis when stacked. StackingEndsMargin represents the percentage of a character sizeand is based on the LabelFont used for the axis. A value of 0.5 is equal to half the size ofa character.

• Start Percent: Use StartPercent to get or set the starting position within the plot layoutdrawing area where the layout object is drawn.

Page 235: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 221

The reference for 0% is the bottom or left of the data view and depends on the orientationof the layout object. The reference for 100% is the top or right of the data view anddepends on the orientation of the layout object

Currently, only the axes support the StartPercent and StopPercent properties. The legend,and toolbar ignore the StartPercent and StopPercent properties.

• Stop Percent: Use StopPercent to get or set the stopping position within the plot layoutdrawing area where the layout object is drawn.

The reference for 0% is the bottom or left of the data view and depends on the orientationof the layout object. The reference for 100% is the top or right of the data view anddepends on the orientation of the layout object

Currently, only the axes support the StartPercent and StopPercent properties. The legend,and toolbar ignore the StartPercent and StopPercent properties.

Legend

• Visible: Use the Visible property to show or hide a specific Plot Object.

• Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a PlotObject.

Page 236: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual222

When this property is set to TRUE, then the UI functionality (ability to move a scale,scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting thisproperty to TRUE will not override other properties that affect the UI of this Plot Object.

When this property is set to FALSE, then the UI functionality of the Plot Object isdisabled. Note that this will override all other properties that affect the UI of this PlotObject.

Note: when a Plot Object is disabled, the Plot Object will not “look disabled” likestandard textboxes or labels. Only the UI will be disabled.

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

• Column Spacing: Use ColumnSpacing to get or set the spacing between columns in thelegend. ColumnSpacing represents the percentage of a character size and is based on theFont used in the Legend. A value of 0.5 is equal to half the width of a character.

• Channel Name Max Width: Use ChannelNameMaxWidth to specify the maximumchannel name width allowed in the Legend before word wrapping occurs.

This property allows you to set a maximum width of the Channel Name column, allowingthose channel names that exceed this width to word-wrap to the next line..

• Row Spacing: Use RowSpacing to get or set the spacing between rows in the legend.RowSpacing represents the percentage of a character size and is based on the Font usedin the Legend. A value of 0.5 is equal to half the height of a character.

• Font: The font used in the Legend.

• Margin: Use OuterMarginLeft, OuterMarginRight, OuterMarginTop, orOuterMarginBottom to set the margin between the left, right, top, or bottom side edge ofthe control and the internal drawn elements. The values are specified in pixels.

• Column Titles Visible: Use ColumnTitlesVisible to specify whether the column titlesare visible in the legend.

• Column Titles Font: Use ColumnTitlesFont to change the attributes of the column titlesfont. To change to a new font, specify a new IFontDisp object.

• Background Transparent: Use the BackGroundTransparent property to specify whetherthe background behind the legend shows through.

Page 237: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp

• Background Color: Use BackGroundColor to get or set the background color of thelegend.

• Selected Item Background Color: Use SelectedItemBackGroundColor to get or set thebackground color of selected items in the legend.

• Selected Item Font: The font of the selected item.

• Show Column Line: Use ShowColumnLine to specify whether the line column is shownin the legend.

• Show Column Marker: Use ShowColumnMarker to specify whether the marker columnis shown in the legend.

• Show Column X-Axis Title: Use ShowColumnXAxisTitle to specify whether the X-Axis title column is shown in the legend.

• Show Column Y-Axis Title: Use ShowColumnYAxisTitle to specify whether the Y-Axis title column is shown in the legend.

• Show Column X-Value: Use ShowColumnXValue to specify whether the x valuecolumn is shown in the legend. The value displayed is the last x value added to thechannel. The formatting of the text is control by the formatting of the X-Axis that thechannel is using.

• Show Column Y-Value: Use ShowColumnYValue to specify whether the y valuecolumn is shown in the legend. The value displayed is the last y value added to thechannel. The formatting of the text is control by the formatting of the Y-Axis that thechannel is using.

• Show Column Y-Max: Use ShowColumnYMax to specify whether the Y-MaximumValue for each channel is shown in the legend.

• Show Column Y-Min: Use ShowColumnYMin to specify whether the Y MinimumValue for each channel is shown in the legend.

• Show Column Y-Mean: Use ShowColumnYMean to specify whether the Y Mean Valuefor each channel is shown in the legend.

If you change previous data points, the YMax, YMin, and YMean values will

Components – Plot Pack Manual 223

! no longer be valid. To refresh these values if you change previous data points,call GetYMax, GetYMin, and/or GetYMean to force a recalculation of thesevalues after making your chages.

Page 238: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual224

ToolBar

• Visible: Show or hide entire toolbar.

• Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a PlotObject.

When this property is set to TRUE, then the UI functionality (ability to move a scale,scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting thisproperty to TRUE will not override other properties that affect the UI of this Plot Object.

When this property is set to FALSE, then the UI functionality of the Plot Object isdisabled. Note that this will override all other properties that affect the UI of this PlotObject.

Note: when a Plot Object is disabled, the Plot Object will not “look disabled” likestandard textboxes or labels. Only the UI will be disabled.

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Page 239: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 225

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

• Zoom In/Out Factor: Use ZoomInOutFactor to get or set the Toolbar Zoom buttonzoom factor. When your application user clicks on either the Zoom In or Zoom Outbuttons, or you use the toolbar methods DoButtonClickZoomIn orDoButtonClickZoomOut, the chart axes will be zoomed according to this factor.

When the ScaleType is set to Linear...

To zoom in our out by 100% set the value to 2To zoom in our out by 50% set the value to 1.5A setting of 1 will have no effect, and the zoom in and out capability will be disabled.(Zoom Value must always be greater or equal to 1)

When the ScaleType is set to Logarithmic...

This property has no effect. Log based scales always zoom in our out by 100%, or by afactor of 2 .

Page 240: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual226

• Show: Determines whether a button is shown on the toolbar or not.

Button Meaning

Resume Button: Resumes tracking on ALL axes

Pause Button: Pauses tracking for ALL axes

Axes Mode Buttons: Changes the mode that the axes are inwhen using the mouse. The first icon puts the axes in scrollmode. The second icon puts the axes in zoom mode.

Zoom In/Out Buttons: Zooms ALL axes in our out.

Select Button: Used for selecting items in the data viewarea. Generates events that can be used by the programmerto react to selection of items such as data points,annotations, areas of the data view, etc.Zoom Box Button: Allows the user to draw a "Zoom Box"on the DataView area to zoom ALL axes.Cursor Button: Show or hide all data cursors. Values foreach channel are displayed in a hint window next to thecursor(s).Edit Button: Brings up the Run-Time property editor forthe user to change most control properties.Copy Button: Copies the current component image to theWindows' clipboard.Save Button: Brings up a dialog to allow the user to savechart data to currently supported file types.Print Button: Allows user to print image of chart toprinter. See Print properties for more information.

Page 241: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 227

Data View

• Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a PlotObject.

When this property is set to TRUE, then the UI functionality (ability to move a scale,scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting thisproperty to TRUE will not override other properties that affect the UI of this Plot Object.

When this property is set to FALSE, then the UI functionality of the Plot Object isdisabled. Note that this will override all other properties that affect the UI of this PlotObject.

Note: when a Plot Object is disabled, the Plot Object will not “look disabled” likestandard textboxes or labels. Only the UI will be disabled.

• Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu ofa Plot Object. The Popup Menu is shown when a user right-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionalityof this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effectand the Popup will be disabled.

Page 242: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual228

• Background Transparent: Use BackGroundTransparent to specify whether thebackground behind the data view shows through.

• Background Color: Use BackGroundColor to get or set the background color of the dataview.

• Grid Show: Use GridXAxisName to get or the name of the X-Axis used for displayingX-Axis major and minor lines in the grid. Use GridLineShowXMajors andGridLineShowXMinors to specify which ticks are used to draw grid lines.

Stacked Axes Note: If you are using stacked axes, you will probably want to set thisproperty to “<All>”. This string value will instruct the grid to draw to the major ticklines for each individual X-Axis.

• Grid X-Axis Name: Use GridXAxisName to get or the name of the X-Axis used fordisplaying X-Axis major and minor lines in the grid. Use GridLineShowXMajors andGridLineShowXMinors to specify which ticks are used to draw grid lines.

If you are using stacked axes, it is recommended that you use an additional invisible axisto ensure that the grid lines extend over the entire Plot Data View area. If not, then thegrid lines will only be drawn to the X-Axis specified, and will not be drawn to areaswhere the X-Axis has been restricted by the StartPercent and StopPercent properties ofthat Axis.

• Grid Y-Axis Name: Use GridXAxisName to get or the name of the Y-Axis used fordisplaying Y-Axis major and minor lines in the grid. Use GridLineShowYMajors andGridLineShowYMinors to specify which ticks are used to draw grid lines.

Stacked Axes Note: If you are using stacked axes, you will probably want to set thisproperty to “<All>”. This string value will instruct the grid to draw to the major ticklines for each individual X-Axis.Line Color: Use GridLineColor to get or set the color ofthe grid lines drawn in the data view.

• Line Major Style: Use the GridLineMajorStyle property to get or set the line style ofgrid lines drawn from major ticks (major ticks from axes specified by theGridXAxisName and GridYAxisName properties)

Value MeaningipglsSolid A solid lineipglsDash A line made up of a series of dashesipglsDot A line made up of a series of dots

Page 243: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual 229

• Line Minor Style: Use the GridLineMinorStyle property to get or set the line style ofgrid lines drawn from minor ticks (minor ticks from axes specified by theGridXAxisName and GridYAxisName properties)

Value MeaningipglsSolid A solid lineipglsDash A line made up of a series of dashesipglsDot A line made up of a series of dots

• Show: Sets which lines are shown in the grid.

• Show X-Major's: Use GridLineShowXMajors to specify whether the X-Axis major tickslines are shown in the grid.

• Show Y-Major's: Use GridLineShowYMajors to specify whether the Y-Axis major tickslines are shown in the grid.

• Show X-Minor's: Use GridLineShowYMinors to specify whether the Y-Axis minor tickslines are shown in the grid.

• Show Y-Minors: Use GridLineShowYMinors to specify whether the Y-Axis minor tickslines are shown in the grid.

Labels

Page 244: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix A - Plot Pack Property Editors

Iocomp Components – Plot Pack Manual230

• Name: Use Name to set the Plot Object’s name. This name can then be used to referencethe object. There is no restrictions on the length of the name or the characters used.

• Visible: Use the Visible property to show or hide a specific Plot Object.

• Font: Use Font to change the font attributes of the Label Object text.

• Caption: Use Caption to get or set the Label Object display text. To hide the caption, seethe Visible property of the Label Object .

Note: for backward compatibility, the TitleText property will always modify the Captionproperty of Label Index 0.

• Alignment: Set Alignment to specify how the text is aligned within the ClientRect of thelabel object.

These are the possible values:

Value MeaningiahCenter Text is centered in the control.iahLeft Text is left-justified: Begins at the left edge of the control.iahRight Text is right-justified: Ends at the right edge of the control.

• Margin: Use Margin to get or set the margin between the Caption and the top, bottom,left, and right of the Label Object. The Margin values is in percent of the title font heightor width.

Page 245: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 231

Appendix B - ActiveX HTML Properties and Events

HTML Page Important Notes

Boolean Values:

TRUE = -1FALSE = 0

Double Values:

Double values cannot be of greater precision than 4 decimal places. This is a limitation of thestreaming mechanism of Internet Explorer. This is generally a problem with Date/Time valuesused in the axes properties. It is recommended that you calculate and set Date/Time Min andSpan values for axes (and any other property that you need greater than 4 decimal placeprecision) in your HTML page loading code as a work-around.

Properties

Below, you will find all of the currently supported properties that can be streamed in from an HTMLpage into the iPlotX component. Default values are provided. If you only need the defaultproperties, then you do not need these lines in your HTML Object tag code since the control will setthese default properties all by itself. You only need to include param tags for properties that differfrom the default. (Note: some HTML editors will automatically insert all of these streamedproperties for you. If you don’t need the default properties, simply delete the param lines. If youused the built-in property editors in your HTML editor to set properties at design time, then leave inthe param lines if you are not sure which ones to remove or leave)

Array Properties Note: “Channel0” refers to the first channel and “Channel1” refers to the secondchannel, and so on. All array properties (sub object properties) are coded with the number after thearray name, and are zero based. Please note that only the Axes and Channels support multiple itemsat this time.

The following list shows the available param tags for our iPlot and iXYPlot components along withtheir default values…

Page 246: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual232

<param name="DataViewZHorz" value="1"><param name="DataViewZVert" value="1"><param name="XYAxesReverse" value="0"><param name="OuterMarginLeft" value="5"><param name="OuterMarginTop" value="5"><param name="OuterMarginRight" value="5"><param name="OuterMarginBottom" value="5"><param name="PrintOrientation" value="1"><param name="PrintMarginLeft" value="1"><param name="PrintMarginTop" value="1"><param name="PrintMarginRight" value="1"><param name="PrintMarginBottom" value="1"><param name="PrintShowDialog" value="-1"><param name="UpdateFrameRate" value="60"><param name="BackGroundColor" value="0"><param name="BorderStyle" value="2"><param name="AutoFrameRate" value="-1"><param name="HintsShow" value="-1"><param name="HintsPause" value="500"><param name="HintsHidePause" value="2500"><param name="TitleVisible" value="-1"><param name="TitleText" value="Untitled"><param name="TitleMargin" value="0.25"><param name="TitleFont" value="Arial"><param name="TitleFontColor" value="16777215"><param name="UserCanEditObjects" value="-1"><param name="LogFileName" value><param name="LogBufferSize" value="0"><param name="OptionSaveAllProperties" value="0"><param name="HintsFont" value="MS Sans Serif"><param name="HintsFontColor" value="2147483656"><param name="AnnotationDefaultFont" value="MS Sans Serif"><param name="AnnotationDefaultFontColor" value="16777215"><param name="AnnotationDefaultBrushStlye" value="0"><param name="AnnotationDefaultBrushColor" value="16777215"><param name="AnnotationDefaultPenStlye" value="0"><param name="AnnotationDefaultPenColor" value="16777215"><param name="AnnotationDefaultPenWidth" value="1"><param name="DataViewZHorz" value="1"><param name="DataViewZVert" value="1"><param name="ChannelCount" value="1"><param name="XAxisCount" value="1"><param name="YAxisCount" value="1"><param name="ToolBarCount" value="1"><param name="LegendCount" value="1"><param name="DataViewCount" value="1"><param name="DataCursorCount" value="1"><param name="LimitCount" value="1"><param name="LabelCount" value="1"><param name="TranslationCount" value="0"><param name="ToolBar0.Name" value="Toolbar 1"><param name="ToolBar0.Visible" value="1"><param name="ToolBar0.Enabled" value="1"><param name="ToolBar0.PopupEnabled" value="1"><param name="ToolBar0.Horizontal" value="1"><param name="ToolBar0.ZOrder" value="3"><param name="ToolBar0.StartPercent" value="0"><param name="ToolBar0.StopPercent" value="100"><param name="ToolBar0.ShowResumeButton" value="1"><param name="ToolBar0.ShowPauseButton" value="1"><param name="ToolBar0.ShowAxesModeButtons" value="1"><param name="ToolBar0.ShowZoomInOutButtons" value="1"><param name="ToolBar0.ShowSelectButton" value="0">

Page 247: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 233

<param name="ToolBar0.ShowZoomBoxButton" value="1"><param name="ToolBar0.ShowCursorButton" value="1"><param name="ToolBar0.ShowEditButton" value="1"><param name="ToolBar0.ShowCopyButton" value="1"><param name="ToolBar0.ShowSaveButton" value="1"><param name="ToolBar0.ShowPrintButton" value="1"><param name="ToolBar0.ZoomInOutFactor" value="2"><param name="Legend0.Name" value="Legend 1"><param name="Legend0.Visible" value="1"><param name="Legend0.Enabled" value="1"><param name="Legend0.PopupEnabled" value="1"><param name="Legend0.Horizontal" value="0"><param name="Legend0.ZOrder" value="2"><param name="Legend0.StartPercent" value="0"><param name="Legend0.StopPercent" value="100"><param name="Legend0.MarginLeft" value="1"><param name="Legend0.MarginTop" value="1"><param name="Legend0.MarginRight" value="1"><param name="Legend0.MarginBottom" value="1"><param name="Legend0.BackGroundColor" value="8421504"><param name="Legend0.BackGroundTransparent" value="1"><param name="Legend0.SelectedItemBackGroundColor" value="65535"><param name="Legend0.SelectedItemFont.Charset" value="1"><param name="Legend0.SelectedItemFont.Color" value="0"><param name="Legend0.SelectedItemFont.Height" value="-11"><param name="Legend0.SelectedItemFont.Name" value="MS Sans Serif"><param name="Legend0.SelectedItemFont.Pitch" value="0"><param name="Legend0.SelectedItemFont.Style" value="0"><param name="Legend0.SelectedItemFont" value="65535"><param name="Legend0.ShowColumnLine" value="1"><param name="Legend0.ShowColumnMarker" value="0"><param name="Legend0.ShowColumnXAxisTitle" value="0"><param name="Legend0.ShowColumnYAxisTitle" value="0"><param name="Legend0.ShowColumnXValue" value="0"><param name="Legend0.ShowColumnYValue" value="0"><param name="Legend0.ShowColumnYMax" value="0"><param name="Legend0.ShowColumnYMin" value="0"><param name="Legend0.ShowColumnYMean" value="0"><param name="Legend0.Font.Charset" value="1"><param name="Legend0.Font.Color" value="16777215"><param name="Legend0.Font.Height" value="-11"><param name="Legend0.Font.Name" value="MS Sans Serif"><param name="Legend0.Font.Pitch" value="0"><param name="Legend0.Font.Style" value="0"><param name="Legend0.Font" value="0"><param name="Legend0.ColumnSpacing" value="0.5"><param name="Legend0.RowSpacing" value="0.25"><param name="Legend0.ColumnTitlesVisible" value="0"><param name="Legend0.ColumnTitlesFont.Charset" value="1"><param name="Legend0.ColumnTitlesFont.Color" value="16776960"><param name="Legend0.ColumnTitlesFont.Height" value="-11"><param name="Legend0.ColumnTitlesFont.Name" value="MS Sans Serif"><param name="Legend0.ColumnTitlesFont.Pitch" value="0"><param name="Legend0.ColumnTitlesFont.Style" value="1"><param name="Legend0.ColumnTitlesFont" value="0"><param name="Legend0.ChannelNameMaxWidth" value="0"><param name="XAxis0.Name" value="X-Axis 1"><param name="XAxis0.Visible" value="1"><param name="XAxis0.Enabled" value="1"><param name="XAxis0.PopupEnabled" value="1"><param name="XAxis0.Horizontal" value="1"><param name="XAxis0.ZOrder" value="0"><param name="XAxis0.StartPercent" value="0">

Page 248: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual234

<param name="XAxis0.StopPercent" value="100"><param name="XAxis0.Min" value="0"><param name="XAxis0.Span" value="100"><param name="XAxis0.DesiredStart" value="0"><param name="XAxis0.DesiredIncrement" value="0"><param name="XAxis0.ReverseScale" value="0"><param name="XAxis0.InnerMargin" value="5"><param name="XAxis0.OuterMargin" value="5"><param name="XAxis0.Title" value="X-Axis 1"><param name="XAxis0.TitleMargin" value="0.25"><param name="XAxis0.TitleFont.Charset" value="1"><param name="XAxis0.TitleFont.Color" value="16777215"><param name="XAxis0.TitleFont.Height" value="-13"><param name="XAxis0.TitleFont.Name" value="Arial"><param name="XAxis0.TitleFont.Pitch" value="0"><param name="XAxis0.TitleFont.Style" value="1"><param name="XAxis0.TitleFont" value="0.25"><param name="XAxis0.TitleShow" value="0"><param name="XAxis0.MajorLength" value="7"><param name="XAxis0.MinorLength" value="3"><param name="XAxis0.MinorCount" value="1"><param name="XAxis0.LabelsMargin" value="0.25"><param name="XAxis0.LabelsFont.Charset" value="1"><param name="XAxis0.LabelsFont.Color" value="16777215"><param name="XAxis0.LabelsFont.Height" value="-11"><param name="XAxis0.LabelsFont.Name" value="MS Sans Serif"><param name="XAxis0.LabelsFont.Pitch" value="0"><param name="XAxis0.LabelsFont.Style" value="0"><param name="XAxis0.LabelsFont" value="0.25"><param name="XAxis0.LabelsPrecisionStyle" value="0"><param name="XAxis0.LabelsPrecision" value="3"><param name="XAxis0.LabelsMinLength" value="5"><param name="XAxis0.LabelsMinLengthAutoAdjust" value="0"><param name="XAxis0.LabelSeparation" value="2"><param name="XAxis0.LabelsFormatStyle" value="0"><param name="XAxis0.DateTimeFormat" value="hh:nn:ss"><param name="XAxis0.ScaleLineShow" value="0"><param name="XAxis0.ScaleLinesColor" value="16777215"><param name="XAxis0.StackingEndsMargin" value="0.5"><param name="XAxis0.ScaleType" value="0"><param name="XAxis0.TrackingEnabled" value="1"><param name="XAxis0.TrackingStyle" value="3"><param name="XAxis0.TrackingAlignFirstStyle" value="2"><param name="XAxis0.TrackingScrollCompressMax" value="0"><param name="XAxis0.CursorPrecision" value="3"><param name="XAxis0.CursorScaler" value="1"><param name="XAxis0.ScrollMinMaxEnabled" value="0"><param name="XAxis0.ScrollMax" value="100"><param name="XAxis0.ScrollMin" value="0"><param name="XAxis0.RestoreValuesOnResume" value="1"><param name="XAxis0.MasterUIInput" value="0"><param name="YAxis0.Name" value="Y-Axis 1"><param name="YAxis0.Visible" value="1"><param name="YAxis0.Enabled" value="1"><param name="YAxis0.PopupEnabled" value="1"><param name="YAxis0.Horizontal" value="0"><param name="YAxis0.ZOrder" value="0"><param name="YAxis0.StartPercent" value="0"><param name="YAxis0.StopPercent" value="100"><param name="YAxis0.Min" value="0"><param name="YAxis0.Span" value="100"><param name="YAxis0.DesiredStart" value="0"><param name="YAxis0.DesiredIncrement" value="0">

Page 249: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 235

<param name="YAxis0.ReverseScale" value="0"><param name="YAxis0.InnerMargin" value="5"><param name="YAxis0.OuterMargin" value="5"><param name="YAxis0.Title" value="Y-Axis 1"><param name="YAxis0.TitleMargin" value="0.25"><param name="YAxis0.TitleFont.Charset" value="1"><param name="YAxis0.TitleFont.Color" value="16777215"><param name="YAxis0.TitleFont.Height" value="-13"><param name="YAxis0.TitleFont.Name" value="Arial"><param name="YAxis0.TitleFont.Pitch" value="0"><param name="YAxis0.TitleFont.Style" value="1"><param name="YAxis0.TitleFont" value="0.25"><param name="YAxis0.TitleShow" value="0"><param name="YAxis0.MajorLength" value="7"><param name="YAxis0.MinorLength" value="3"><param name="YAxis0.MinorCount" value="1"><param name="YAxis0.LabelsMargin" value="0.25"><param name="YAxis0.LabelsFont.Charset" value="1"><param name="YAxis0.LabelsFont.Color" value="16777215"><param name="YAxis0.LabelsFont.Height" value="-11"><param name="YAxis0.LabelsFont.Name" value="MS Sans Serif"><param name="YAxis0.LabelsFont.Pitch" value="0"><param name="YAxis0.LabelsFont.Style" value="0"><param name="YAxis0.LabelsFont" value="0.25"><param name="YAxis0.LabelsPrecisionStyle" value="0"><param name="YAxis0.LabelsPrecision" value="3"><param name="YAxis0.LabelsMinLength" value="5"><param name="YAxis0.LabelsMinLengthAutoAdjust" value="0"><param name="YAxis0.LabelSeparation" value="2"><param name="YAxis0.LabelsFormatStyle" value="0"><param name="YAxis0.DateTimeFormat" value="hh:nn:ss"><param name="YAxis0.ScaleLineShow" value="0"><param name="YAxis0.ScaleLinesColor" value="16777215"><param name="YAxis0.StackingEndsMargin" value="0.5"><param name="YAxis0.ScaleType" value="0"><param name="YAxis0.TrackingEnabled" value="1"><param name="YAxis0.TrackingStyle" value="0"><param name="YAxis0.TrackingAlignFirstStyle" value="3"><param name="YAxis0.TrackingScrollCompressMax" value="0"><param name="YAxis0.CursorPrecision" value="3"><param name="YAxis0.CursorScaler" value="1"><param name="YAxis0.ScrollMinMaxEnabled" value="0"><param name="YAxis0.ScrollMax" value="100"><param name="YAxis0.ScrollMin" value="0"><param name="YAxis0.RestoreValuesOnResume" value="1"><param name="YAxis0.MasterUIInput" value="0"><param name="DataView0.Name" value="Data View 1"><param name="DataView0.Visible" value="1"><param name="DataView0.Enabled" value="1"><param name="DataView0.PopupEnabled" value="1"><param name="DataView0.Horizontal" value="0"><param name="DataView0.ZOrder" value="0"><param name="DataView0.StartPercent" value="0"><param name="DataView0.StopPercent" value="100"><param name="DataView0.Title" value><param name="DataView0.GridXAxisName" value="X-Axis 1"><param name="DataView0.GridYAxisName" value="Y-Axis 1"><param name="DataView0.GridShow" value="1"><param name="DataView0.GridLineColor" value="32768"><param name="DataView0.GridLineShowLeft" value="1"><param name="DataView0.GridLineShowRight" value="1"><param name="DataView0.GridLineShowTop" value="1"><param name="DataView0.GridLineShowBottom" value="1">

Page 250: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual236

<param name="DataView0.GridLineShowXMajors" value="1"><param name="DataView0.GridLineShowXMinors" value="0"><param name="DataView0.GridLineShowYMajors" value="1"><param name="DataView0.GridLineShowYMinors" value="0"><param name="DataView0.GridLineMajorStyle" value="0"><param name="DataView0.GridLineMinorStyle" value="0"><param name="DataView0.BackgroundTransparent" value="1"><param name="DataView0.BackgroundColor" value="8421376"><param name="Channel0.Name" value="Channel 1"><param name="Channel0.Visible" value="1"><param name="Channel0.Enabled" value="1"><param name="Channel0.PopupEnabled" value="1"><param name="Channel0.TitleText" value="Channel 1"><param name="Channel0.Color" value="255"><param name="Channel0.VisibleInLegend" value="1"><param name="Channel0.RingBufferSize" value="0"><param name="Channel0.TraceVisible" value="1"><param name="Channel0.TraceLineStyle" value="0"><param name="Channel0.TraceLineWidth" value="1"><param name="Channel0.MarkersVisible" value="0"><param name="Channel0.MarkersSize" value="3"><param name="Channel0.MarkersStyle" value="0"><param name="Channel0.MarkersAllowIndividual" value="0"><param name="Channel0.MarkersPenColor" value="255"><param name="Channel0.MarkersPenUseChannelColor" value="1"><param name="Channel0.MarkersPenStyle" value="0"><param name="Channel0.MarkersPenWidth" value="0"><param name="Channel0.MarkersBrushColor" value="255"><param name="Channel0.MarkersBrushUseChannelColor" value="1"><param name="Channel0.MarkersBrushStyle" value="0"><param name="Channel0.XAxisName" value="X-Axis 1"><param name="Channel0.YAxisName" value="Y-Axis 1"><param name="Channel0.XAxisTrackingEnabled" value="1"><param name="Channel0.YAxisTrackingEnabled" value="1"><param name="Channel0.LogFileName" value><param name="Channel0.LogBufferSize" value="0"><param name="Channel0.Tag" value="0"><param name="Channel0.Limits" value="0"><param name="Channel0.FillEnabled" value="0"><param name="Channel0.FillReference" value="0"><param name="Channel0.FillStyle" value="0"><param name="Channel0.FillColor" value="0"><param name="Channel0.FillUseChannelColor" value="1"><param name="Channel0.DigitalEnabled" value="0"><param name="Channel0.DigitalReferenceStyle" value="0"><param name="Channel0.DigitalReferenceLow" value="10"><param name="Channel0.DigitalReferenceHigh" value="90"><param name="Channel0.FastDrawEnabled" value="1"><param name="Channel0.InterpolationStyle" value="0"><param name="DataCursor0.Name" value="Cursor 1"><param name="DataCursor0.Visible" value="0"><param name="DataCursor0.Enabled" value="1"><param name="DataCursor0.PopupEnabled" value="1"><param name="DataCursor0.ChannelName" value="Channel 1"><param name="DataCursor0.Style" value="0"><param name="DataCursor0.Font.Charset" value="1"><param name="DataCursor0.Font.Color" value="-2147483640"><param name="DataCursor0.Font.Height" value="-11"><param name="DataCursor0.Font.Name" value="MS Sans Serif"><param name="DataCursor0.Font.Pitch" value="0"><param name="DataCursor0.Font.Style" value="0"><param name="DataCursor0.Font" value="0"><param name="DataCursor0.Color" value="65535">

Page 251: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 237

<param name="DataCursor0.UseChannelColor" value="1"><param name="DataCursor0.HintShow" value="1"><param name="DataCursor0.HintHideOnRelease" value="0"><param name="DataCursor0.HintOrientationSide" value="0"><param name="DataCursor0.HintPosition" value="50"><param name="DataCursor0.Pointer1Position" value="50"><param name="DataCursor0.Pointer2Position" value="60"><param name="DataCursor0.MenuItemVisibleValueXY" value="1"><param name="DataCursor0.MenuItemVisibleValueX" value="1"><param name="DataCursor0.MenuItemVisibleValueY" value="1"><param name="DataCursor0.MenuItemVisibleDeltaX" value="1"><param name="DataCursor0.MenuItemVisibleDeltaY" value="1"><param name="DataCursor0.MenuItemVisibleInverseDeltaX" value="1"><param name="DataCursor0.MenuItemCaptionValueXY" value="Value X-Y"><param name="DataCursor0.MenuItemCaptionValueX" value="Value X"><param name="DataCursor0.MenuItemCaptionValueY" value="Value Y"><param name="DataCursor0.MenuItemCaptionDeltaX" value="Period"><param name="DataCursor0.MenuItemCaptionDeltaY" value="Peak-Peak"><param name="DataCursor0.MenuItemCaptionInverseDeltaX" value="Frequency"><param name="Limit0.Name" value="Limit 1"><param name="Limit0.Visible" value="1"><param name="Limit0.Enabled" value="1"><param name="Limit0.PopupEnabled" value="1"><param name="Limit0.Color" value="255"><param name="Limit0.LineStyle" value="0"><param name="Limit0.LineWidth" value="0"><param name="Limit0.FillStyle" value="0"><param name="Limit0.XAxisName" value="X-Axis 1"><param name="Limit0.YAxisName" value="Y-Axis 1"><param name="Limit0.Style" value="1"><param name="Limit0.Line1Position" value="50"><param name="Limit0.Line2Position" value="50"><param name="Label0.Name" value="Title"><param name="Label0.Visible" value="1"><param name="Label0.Enabled" value="1"><param name="Label0.PopupEnabled" value="1"><param name="Label0.Horizontal" value="1"><param name="Label0.ZOrder" value="2"><param name="Label0.StartPercent" value="0"><param name="Label0.StopPercent" value="100"><param name="Label0.MarginLeft" value="0"><param name="Label0.MarginTop" value="0"><param name="Label0.MarginRight" value="0"><param name="Label0.MarginBottom" value="0.25"><param name="Label0.Caption" value="Untitled"><param name="Label0.Alignment" value="0"><param name="Label0.Font.Charset" value="1"><param name="Label0.Font.Color" value="16777215"><param name="Label0.Font.Height" value="-19"><param name="Label0.Font.Name" value="Arial"><param name="Label0.Font.Pitch" value="0"><param name="Label0.Font.Style" value="1"><param name="Label0.Font" value="0">

Page 252: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual238

VBScript Events

Events in VBScript under Internet Explorer are identical to their counterparts in Visual Basic or VBAexcept that VBScript does not support variable types and some events (such as drag and focus events).Internet Explorer VBA does not support variable types. All variables are assumed to be Variants, so youwill not find any “as” operators in the event declarations.

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript><!--

Sub iPlotX1_OnAfterPrint()

End Sub

Sub iPlotX1_OnBeforePrint()

End Sub

Sub iPlotX1_OnClick()

End Sub

Sub iPlotX1_OnClickAnnotation(ByVal Index)

End Sub

Sub iPlotX1_OnClickDataPoint(ByVal ChannelIndex, ByVal DataIndex)

End Sub

Sub iPlotX1_OnDataCursorChange(ByVal Index)

End Sub

Sub iPlotX1_OnDblClick()

End Sub

Sub iPlotX1_OnMouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y)

End Sub

Sub iPlotX1_OnMouseMove(ByVal Shift, ByVal X, ByVal Y)

End Sub

Sub iPlotX1_OnMouseUp(ByVal Button, ByVal Shift, ByVal X, ByVal Y)

End Sub

Sub iPlotX1_OnXAxisCustomizeLabel(ByVal Index, ByVal Value, ALabel)

End Sub

Sub iPlotX1_OnXAxisMinChange(ByVal Index, ByVal OldValue, ByVal NewValue)

End Sub

Sub iPlotX1_OnXAxisSpanChange(ByVal Index, ByVal OldValue, ByVal NewValue)

Page 253: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 239

End Sub

Sub iPlotX1_OnYAxisCustomizeLabel(ByVal Index, ByVal Value, ALabel)

End Sub

Sub iPlotX1_OnYAxisMinChange(ByVal Index, ByVal OldValue, ByVal NewValue)

End Sub

Sub iPlotX1_OnYAxisSpanChange(ByVal Index, ByVal OldValue, ByVal NewValue)

End Sub

--></SCRIPT>

JavaScript Events

If you prefer to use JavaScript in your HTML code, then you will need to first “map” the event you wishto use with the iPlotX component to a particular event handler as follows. Note that this is a hack inInternet Explorer to allow JavaScript to be used with the ActiveX component. Netscape Navigator andother browsers do not support ActiveX controls as this time.

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnAfterPrint"><!--iPlotX1_OnAfterPrint();

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnBeforePrint"><!--iPlotX1_OnBeforePrint();

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnClick"><!--iPlotX1_OnClick();

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnClickAnnotation(Index)"><!--iPlotX1_OnClickAnnotation(Index);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnClickDataPoint(ChannelIndex, DataIndex)"><!--iPlotX1_OnClickDataPoint(ChannelIndex, DataIndex);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnDataCursorChange(Index)"><!--iPlotX1_OnDataCursorChange(Index);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnDblClick"><!--iPlotX1_OnDblClick();

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnMouseDown(Button, Shift, X, Y)">

Page 254: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

240

<!--iPlotX1_OnMouseDown(Button, Shift, X, Y);

//--></SCRIPT><SCRIPT LANGUAGE=Jscript FOR=iPlotX1 EVENT="OnMouseMove(Shift, X, Y)"><!--iPlotX1_OnMouseMove(Shift, X, Y);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnMouseUp(Button, Shift, X, Y)"><!--iPlotX1_OnMouseUp(Button, Shift, X, Y);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnXAxisCustomizeLabel(Index, Value, ALabel)"><!--iPlotX1_OnXAxisCustomizeLabel(Index, Value, ALabel);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnXAxisMinChange(Index, OldValue, NewValue)"><!--iPlotX1_OnXAxisMinChange(Index, OldValue, NewValue);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnXAxisSpanChange(Index, OldValue, NewValue)"><!--iPlotX1_OnXAxisSpanChange(Index, OldValue, NewValue);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnYAxisCustomizeLabel(Index, Value, ALabel)"><!--iPlotX1_OnYAxisCustomizeLabel(Index, Value, ALabel);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnYAxisMinChange(Index, OldValue, NewValue)"><!--iPlotX1_OnYAxisMinChange(Index, OldValue, NewValue);

//--></SCRIPT><SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnYAxisSpanChange(Index, OldValue, NewValue)"><!--iPlotX1_OnYAxisSpanChange(Index, OldValue, NewValue);

//--></SCRIPT>

Iocomp Components – Plot Pack Manual

Events that have parameters must be enclosed within quotation marks.

Page 255: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 241

Now include a separate script tag to include the event handlers, and the code you wish to run when thatevent is fired…

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript><!--

function iPlotX1_OnAfterPrint(){//Add your code here};

function iPlotX1_OnBeforePrint(){//Add your code here};

function iPlotX1_OnClick(){//Add your code here};

function iPlotX1_OnClickAnnotation(Index){//Add your code here};

function iPlotX1_OnClickDataPoint(ChannelIndex, DataIndex){//Add your code here};

function iPlotX1_OnDataCursorChange(Index){//Add your code here};

function iPlotX1_OnDblClick(){//Add your code here};

function iPlotX1_OnMouseDown(Button, Shift, X, Y){//Add your code here};

function iPlotX1_OnMouseMove(Shift, X, Y){//Add your code here};

function iPlotX1_OnMouseUp(Button, Shift, X, Y){//Add your code here};

Page 256: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual242

function iPlotX1_OnXAxisCustomizeLabel(Index, Value, ALabel){//Add your code here};

function iPlotX1_OnXAxisMinChange(Index, OldValue, NewValue){//Add your code here};

function iPlotX1_OnXAxisSpanChange(Index, OldValue, NewValue){//Add your code here};

function iPlotX1_OnYAxisCustomizeLabel(Index, Value, ALabel){//Add your code here};

function iPlotX1_OnYAxisMinChange(Index, OldValue, NewValue){//Add your code here};

function iPlotX1_OnYAxisSpanChange(Index, OldValue, NewValue){//Add your code here};

//--></SCRIPT>

LPK File Tutorial

Web Page ActiveX Licensing: What is an LPK File?

An LPK file is a file that licenses our ActiveX controls when running on a Microsoft InternetExplorer Web Browser. This file must be created for all ActiveX components that requirelicensing, regardless of manufacturer.

Page 257: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual 243

Steps to create an LPK File...

1. Make sure you have installed our ActiveX components using our Product Installer (either fromthe CD-ROM or downloaded version). If you have any reason to believe that our components aremissing license information on your system, simply open our installer from the WindowsAdd/Remove Control Panel and select the REPAIR option to fix our ActiveX licensing.

2. Obtain the Microsoft LPK File Generation Tool either from your Visual Studio Installation, fromthe Microsoft Internet Explorer API Pack, or from Microsoft's Download File Section of theirwebsite (Download: Microsoft LPK Tool [74.5 KB]). This program is the only program that cangenerate LPK files and is provided by Microsoft.

Page 258: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Components – Plot Pack Manual244

3. Open the LPK Tool and select the Iocomp Components you will be using on the web page. Alsoselect other ActiveX controls that you will be using on the same web page that require licensing.You can only have one LPK file per web page, so you will need to select all ActiveX controlsthat will be used. We recommend that you create a single LPK file for all web pages on your sitefor simplicity. Click on the "ADD ->" button when you are done.

4. Click the "Save & Exit" button to generate the LPK file.

Page 259: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

Iocomp Compo

5. You can name the LPK file anything you wish. We recommend that you don't include spaces ornon-standard characters in the name as to avoid issues with different server operating systems(remember that our ActiveX components can be placed on any web server OS, they just have torun on a Windows Web Browser client).

6. Copy the LPK file to a location on your web server. If you are just creating a single web page,we recommend that you place the LPK file in the same folder as the web page. If you arecreating multiple web pages, we recommend that you place the LPK file in a common folder offof the root of your web server, such as /download.

The LPK file must be located on the same server as where the HTML

! page is stored/generated.

You can only have one LPK file per web page. Therefore, you will needto include all licenses for all ActiveX components (whether they are from

nents – Plot Pack Manual 245

Iocomp or some other Third Party ActiveX company) in the single LPKfile. We recommend that you make one single LPK file for use on yourwebsite to make things easier.

Page 260: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Appendix B - ActiveX HTML Properties and Events

246

Steps to integrate the LPK File into your web page...

1. Place the following block of code, substituting the name of your LPK file, at the top the bodysection of your web page...

<html>

<head><title>LPK File Example Page</title></head>

<body>

<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT><param name="LPKPath" value="/download/MyLPKfile.lpk"></object>

...include all ActiveX component object tags only after this line...

</body>

</html>

Note:

2. That's it! Check out our other Internet Explorer Examples for information about integratingActiveX components into the web page.

The CLASSID must always be the value specified above. This is the

Iocomp Components – Plot Pack Manual

! CLASSID of the Microsoft License Manager component, whichprovides licensing services to ActiveX components that requirelicensing. This CLASSID is the same for all versions of MicrosoftInternet Explorer You can only have one LPK file entry per web page!

Page 261: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Iocomp Components – Plot Pack Manual

Appendix C -- What is DateTime Format?

Date/Time format is commonly used in Microsoft products such as Microsoft Excel and isbased on a floating-point value to represent a date or time value...

Date/Time Calculations1 day = 11 hour = 1/241 minute = 1/(24*60)1 second = 1/(24*60*60) 1 millisecond = 1/(24*60*60*1000)

To repr

Visual Basic: the following formula should be used when using

Visual Basic: (1/(24#*60#*60#)). The # symbols force Visual Basicto treat the numbers as floating point values, otherwise you will

! generate a compiler error since VB is trying to use Integer math.You may find it helpful to setup a constant in your program for thiscalculation to represent one second...

Const OneSecond As Double = 1 / (24# * 60# * 60#)

C++ Compiler: the following formula should be used when using

! C++ Compilers such as Visual C++ or Borland C++ Builder andothers: (1.0/(24.0*60.0*60.0)). Specifying the numerical values asfloating point numbers forces the C++ compiler to use floating-pointmath, and not integer math, which would result in incorrect results.

Visual Layout Manager: if you use the built-in property editor, noticethe button next to values which can accept date-time values. If you

247

specify a particular date such as March 12, 2000, you need to specify a decimal value thatesents how much time has elapsed since December 30, 1899 at 12:00am...

December 30, 1899 12:00am = 0January 1, 1900 = 1March 12, 2000 = 36597December 31, 9999 = 2958525March 12, 2000 12:00pm = 36597.5

click on the button, you will be able to access a calculator that will dothe above calculations for you when entering values.

Page 262: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Iocomp Components – Plot Pack Manual

248

March 12, 2000 6:00pm = 36597.75

By default, the axes span in our charting components is set to a value of 10. If you enable thedate/time format…

iComponent.Xaxis(0).LabelsFormatStyle = iptfDateTimeiComponent.Yaxis(0).LabelsFormatStyle = iptfDateTime

in a particular axis, then the axis scale would correspond to a range of 10 days. If you areplotting data to the chart component with such a large scale, it would appear that the chart wasnot working as it would take 10 days to plot from one side of the axis to the other!

For Example:

Let's say you want to specify an X-Axis scale between 0-10 seconds. You would use the formula(1/(24*60*60)) *10 to obtain the time/date value for ten seconds. You would set the X-Axis min valueto 0 and the X-Axis max value to the calculated formula value.

Don’t forget to set the AxisLabelFormatStyle and DateTimeFormat string properties for DateTimemode.

iComponent.Xaxis(0).LabelsFormatStyle = iptfDateTimeiComponent.Xaxis(0).DateTimeFormat = "nn:ss:zzz"

Here are some sample DateTimeFormat strings that can be used to format your date and time values inthe axis. You can make other combinations for this string if you need. Refer to the table on the nextpage for custom formats.

Format String Exampled mmm hh:nn:ssam/pm 1 May 12:01:32amd mmm hh:nn:ss 1 May 22:01:32m/d hh:nn:ssam/pm 2/28 12:01:32amm/d hh:nn:ss 2/28 22:01:32d mmm hh:nnam/pm 1 May 12:01 amd mmm hh:nn 1 May 22:01hh:nn:ss.zzzz 22:01:32.254

Month (M)The letter "M" must be uppercase to distinguish months from minutes.

Picture item Displays the month asM A number without a leading 0 (zero) for single-digit months. For

example, July is "7".MM A number with a leading 0 (zero) for single-digit months. For example,

July is "07".

Page 263: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Iocomp Components – Plot Pack Manual

249

MMM A three-letter abbreviation. For example, July is "Jul".MMMM The full name of the month.

Day (d)Displays the day of the month or the day of the week. The letter "d" can be either uppercase orlowercase.

Picture item Displays the day of the month or week asd A number without a leading 0 (zero) for single-digit days. For

example, the sixth day of the month is displayed as "6".dd A number with a leading 0 (zero) for single-digit days. For example,

the sixth day of the month is displayed as "06".ddd A three-letter abbreviation. For example, Tuesday is displayed as

"Tue".dddd The full name of the day of the week.

Year (y)Displays the year as two or four digits. The letter "y" can be either uppercase or lowercase.

Picture item Displays the year asyy Two digits with a leading 0 (zero) for years 01 through 09. For

example, 1995 is displayed as "95", and 2006 is displayed as "06".yyyy Four digits.

SpecialThese are special characters used in the format string that are supported by the labels.

Picture item Displays the year aszzz Milliseconds

Page 264: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Iocomp Components – Plot Pack Manual

250

Appendix E -- Frequently Asked Questions

Below, you will find some frequently asked questions and specific, real-world situations that ourcustomers have been asking about our Plot Components…

Q:A:

Q:A:

For more information, examples, and FAQs, check out our examples and FAQ sections of our supportwebsite…

Support: http://www.iocomp.com/supportFAQ: http://www.iocomp.com/support/faqExamples: http://www.iocomp.com/support/examples

Page 265: Iocomp Plot Pack Manual - Software Toolbox...Table of Contents Iocomp Components – Plot Pack Manual ix Internet Explorer -----104 CHAPTER 16 - USER INTERFACE

Iocomp Components – Plot Pack Manual

251

Index