348
The Standard in Industrial Automation and Scientific Components for Real-Time Applications Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003]

Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

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

Plot Pack ManualVersion 3.0.4

Version 3.0.4 [August 28, 2003]

Page 2: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Authors Patrick Carroll, Joe CastoroTechnical Reviewers Todd OsterProofreader Cyrus Edson

Copyright

Copyright © 1998-2003 Iocomp Software Incorporated. All rights reserved.

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

No part of this publication may be reproduced, stored in a retrieval system or transmitted by any means, electronic, mechanical, photocopying, recording, orotherwise, without written permission from the publisher. Except for the limited warranty as described in the End User License Agreement, the informationand material contained in this book are provided “As Is” without warranty of any kind, express or implied, including without limitation any warrantyconcerning the accuracy, adequacy, or completeness of such information or material or the results to be obtained from using such information or materialcontained within this manual or documentation. Neither Iocomp Software nor the author shall be responsible for any claims attributable to errors, omissions,or other inaccuracies in the information or material contained in this book, and in no event shall Iocomp Software or the author be liable for direct, indirect,special, incidental, or consequential damages arising out of the use of such information or material. Some states do not allow limitations of duration of anyimplied warranty, so the above limitations may not apply to you.

Trademarks

Iocomp and the Iocomp Logo are registered trademarks of Iocomp Software Incorporated. Microsoft, Visual Basic, Visual C++, DotNet, Visual FoxPro,Windows, Microsoft Office, and ActiveX are trademarks or registered trademarks of Microsoft Corporation. Borland, Delphi, Kylix, C++ Builder, VCL, andCLX are trademarks or registered trademarks of the Borland Corporation. Linux is a registered trademark of Linus Torvalds. All other names, products, ormarks are trademarks or registered trademarks of their respective companies.

Initial Printing 03/2001Second Printing 08/2002Third Printing 09/2002Fourth Printing 12/2002Fifth Printing 08/2003

Manufactured in the United States of America

Page 3: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

Contents At A GlanceChapter 1 - Introduction...................................................................................................................................................................................................................1Chapter 2 - Deciding Which Component To Use............................................................................................................................................................................3Chapter 3 - Overall Theory..............................................................................................................................................................................................................5Chapter 4 - Main Interface...............................................................................................................................................................................................................8Chapter 5 - Channels......................................................................................................................................................................................................................14Chapter 6 - Data View...................................................................................................................................................................................................................29Chapter 7 - Axes............................................................................................................................................................................................................................32Chapter 8 - Legend.........................................................................................................................................................................................................................42Chapter 9 - ToolBar.......................................................................................................................................................................................................................45Chapter 10 - Labels........................................................................................................................................................................................................................48Chapter 11 - Tables........................................................................................................................................................................................................................50Chapter 12 - Data Cursors..............................................................................................................................................................................................................53Chapter 13 - Annotations...............................................................................................................................................................................................................60Chapter 14 - Limits........................................................................................................................................................................................................................71Chapter 15 - Visual Layout Manager.............................................................................................................................................................................................75Chapter 16 - Adding Data..............................................................................................................................................................................................................79Chapter 17 - Null Data and Empty Data Handling........................................................................................................................................................................87Chapter 18 - AutoScale and AutoLabel.........................................................................................................................................................................................91Chapter 19 - Tracking....................................................................................................................................................................................................................94Chapter 20 - Cartesian Axes..........................................................................................................................................................................................................98Chapter 21 - Translation................................................................................................................................................................................................................99Chapter 22 - Interpolation............................................................................................................................................................................................................101Chapter 23 - User Interface Control.............................................................................................................................................................................................104Chapter 24 - Loading and Saving Data........................................................................................................................................................................................107Chapter 25 - Graphical Export.....................................................................................................................................................................................................110Chapter 26 - Printing....................................................................................................................................................................................................................112Chapter 27 - Plot Pack Events.....................................................................................................................................................................................................114Chapter 28 - Layout Control Through Code................................................................................................................................................................................147Chapter 29 - Layer Control..........................................................................................................................................................................................................154Chapter 30 - Pixel, Percent, and Position....................................................................................................................................................................................156Chapter 31 - Implementing ToolBar Externally..........................................................................................................................................................................157Chapter 32 - Implementing Legend Externally............................................................................................................................................................................158Chapter 33 - Performance Tuning................................................................................................................................................................................................160Chapter 34 - Memory Utilization.................................................................................................................................................................................................164Chapter 35 - Using With Databases.............................................................................................................................................................................................167Chapter 36 - Visual C++ Disp vs. iDispatch Interface................................................................................................................................................................168Chapter 37 - ASP (Active Server Pages).....................................................................................................................................................................................170Chapter 38 - Internet Explorer (Client Side)................................................................................................................................................................................171Chapter 39 - OPC (OLE For Process Control)............................................................................................................................................................................174Chapter 40 - Scope Component...................................................................................................................................................................................................177Appendix A - Plot Pack Property Editors....................................................................................................................................................................................185Appendix B - Getting Started with Microsoft Visual Basic 6.0..................................................................................................................................................218Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)..........................................................................................................................224Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch).................................................................................................................................235Appendix E - Getting Started with Microsoft .NET (VB.NET)..................................................................................................................................................245Appendix F - Getting Started with Microsoft .NET (C#.NET)...................................................................................................................................................251Appendix G - Getting Started with Delphi (Windows/Linux).....................................................................................................................................................257Appendix H - Getting Started with CBuilder (Windows/Linux).................................................................................................................................................263Appendix I - ActiveX HTML Properties and Events..................................................................................................................................................................269Appendix J - Color Codes and Constants....................................................................................................................................................................................278Appendix K - Interfaces...............................................................................................................................................................................................................279Appendix L - What is DateTime Format?....................................................................................................................................................................................287Appendix M - Working with Variant Arrays...............................................................................................................................................................................289Appendix N - Frequently Asked Questions.................................................................................................................................................................................297Index............................................................................................................................................................................................................................................314

Iocomp Components – Plot Pack Manual Page iii

Page 4: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

Table of ContentsChapter 1 - Introduction...............................................................................................................................................................................................................1

Sample Code Conventions........................................................................................................................................................................................................1Visual C++ Special Compiler Notes.........................................................................................................................................................................................1Delphi (Windows/Linux), Special Compiler Notes..................................................................................................................................................................2C++Builder (Windows/Linux) Special Compiler Notes...........................................................................................................................................................2Component Naming Conventions.............................................................................................................................................................................................2Source Code Unit Naming Conventions (Borland Development Environments Only)...........................................................................................................2

Chapter 2 - Deciding Which Component To Use........................................................................................................................................................................3iPlot...........................................................................................................................................................................................................................................3iXYPlot.....................................................................................................................................................................................................................................4iScope........................................................................................................................................................................................................................................4

Chapter 3 - Overall Theory...........................................................................................................................................................................................................5Generic Example:......................................................................................................................................................................................................................5Specific Examples:....................................................................................................................................................................................................................5Plot Objects...............................................................................................................................................................................................................................6

Plot Object Index...............................................................................................................................................................................................................6Plot Object Name...............................................................................................................................................................................................................6Get Plot Object Index By Name .......................................................................................................................................................................................7Get Plot Object Name by Index.........................................................................................................................................................................................7

Chapter 4 - Main Interface...........................................................................................................................................................................................................8General......................................................................................................................................................................................................................................8

User Can Edit Objects........................................................................................................................................................................................................8User Can Add/Remove Channels......................................................................................................................................................................................8Clip Annotations to Axes...................................................................................................................................................................................................8Editor Form Style...............................................................................................................................................................................................................8Copy to Clip Board Format...............................................................................................................................................................................................8Data File Column Separator...............................................................................................................................................................................................8Border Style.......................................................................................................................................................................................................................9Outer Margin......................................................................................................................................................................................................................9Update Frame Rate & Auto Frame Rate............................................................................................................................................................................9

Title...........................................................................................................................................................................................................................................9Title Visible.......................................................................................................................................................................................................................9Title Text............................................................................................................................................................................................................................9Title Margin.......................................................................................................................................................................................................................9Title Font.........................................................................................................................................................................................................................10

Background.............................................................................................................................................................................................................................10Background Color............................................................................................................................................................................................................10Background Gradient Enabled.........................................................................................................................................................................................10Background Gradient Direction.......................................................................................................................................................................................10Background Gradient Start Color....................................................................................................................................................................................10Background Gradient Stop Color....................................................................................................................................................................................11

Print.........................................................................................................................................................................................................................................11Print Show Dialog............................................................................................................................................................................................................11Print Orientation..............................................................................................................................................................................................................11Print Margin.....................................................................................................................................................................................................................11Print Document Name......................................................................................................................................................................................................11

Hint.........................................................................................................................................................................................................................................12Images.....................................................................................................................................................................................................................................12File I/O....................................................................................................................................................................................................................................12Translation..............................................................................................................................................................................................................................13Annotation Defaults................................................................................................................................................................................................................13

Chapter 5 - Channels...................................................................................................................................................................................................................14Visible.....................................................................................................................................................................................................................................14Visible In Legend....................................................................................................................................................................................................................14Trace Lines.............................................................................................................................................................................................................................14Fast Draw................................................................................................................................................................................................................................15Tracking..................................................................................................................................................................................................................................15Ring Buffer.............................................................................................................................................................................................................................15Asynchronous and Synchronous Data....................................................................................................................................................................................15Channel Data Logging............................................................................................................................................................................................................15Adding Data ...........................................................................................................................................................................................................................15Data Markers...........................................................................................................................................................................................................................16Individual Data Markers.........................................................................................................................................................................................................16Channel Fill.............................................................................................................................................................................................................................16Bar Support.............................................................................................................................................................................................................................17Digital Channel Option...........................................................................................................................................................................................................17OPC.........................................................................................................................................................................................................................................19

Channel Stats...................................................................................................................................................................................................................20

Page iv Iocomp Components – Plot Pack Manual

Page 5: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

File I/O ...................................................................................................................................................................................................................................20Data Styles..............................................................................................................................................................................................................................21Data Storage Issues.................................................................................................................................................................................................................22

Precision: How Channel Data is Stored...........................................................................................................................................................................22Full Feature Options...............................................................................................................................................................................................................22High/Low ...............................................................................................................................................................................................................................23High/Low Only.......................................................................................................................................................................................................................23High/Low Open-Close............................................................................................................................................................................................................23High/Low Close......................................................................................................................................................................................................................24High/Low Open-Close with Trace Line.................................................................................................................................................................................24Candlestick..............................................................................................................................................................................................................................25

Multi-Colored TraceLine.................................................................................................................................................................................................25Multi-Width TraceLine....................................................................................................................................................................................................25Multi-TraceLineStyles ....................................................................................................................................................................................................26Multi-Colored Markers....................................................................................................................................................................................................26Multi-Shaped Markers.....................................................................................................................................................................................................27Multi-Character Markers.................................................................................................................................................................................................27Multi-Colored Bars..........................................................................................................................................................................................................27Multi-Reference Bars.......................................................................................................................................................................................................28Multi-Width Bars.............................................................................................................................................................................................................28

Chapter 6 - Data View.................................................................................................................................................................................................................29Enabled Property.....................................................................................................................................................................................................................29PopupEnabled Property..........................................................................................................................................................................................................29AxesControl Feature ..............................................................................................................................................................................................................29Background Feature................................................................................................................................................................................................................29Layer Property........................................................................................................................................................................................................................29Grid Feature............................................................................................................................................................................................................................30

Chapter 7 - Axes...........................................................................................................................................................................................................................32Span........................................................................................................................................................................................................................................32Min and Max...........................................................................................................................................................................................................................32Rotated Axes...........................................................................................................................................................................................................................32Desired Start...........................................................................................................................................................................................................................33Desired Increment...................................................................................................................................................................................................................33Label Formats.........................................................................................................................................................................................................................33Reverse Scales........................................................................................................................................................................................................................33Master UI Input.......................................................................................................................................................................................................................33Axes Enabled..........................................................................................................................................................................................................................34Labels Default /Cursor/Legend Tabs......................................................................................................................................................................................34Scale Types.............................................................................................................................................................................................................................34

Linear...............................................................................................................................................................................................................................34Logarithmic Base 10........................................................................................................................................................................................................34

LabelSeparation......................................................................................................................................................................................................................35LabelsMargin..........................................................................................................................................................................................................................35LabelsMinLength....................................................................................................................................................................................................................36LabelsMinLengthAutoAdjust.................................................................................................................................................................................................36StackingEndsMargin...............................................................................................................................................................................................................37Force Stacking........................................................................................................................................................................................................................37Tracking..................................................................................................................................................................................................................................37User Interface..........................................................................................................................................................................................................................37

Axis GridLinesVisible.....................................................................................................................................................................................................38Axis Visible.....................................................................................................................................................................................................................38AlignRefAxisName.........................................................................................................................................................................................................38

Scale Factor.............................................................................................................................................................................................................................39Customizing Tick Labels........................................................................................................................................................................................................40Cartesian Master.....................................................................................................................................................................................................................41Cartesian Child.......................................................................................................................................................................................................................41

Chapter 8 - Legend......................................................................................................................................................................................................................42Predefined Columns................................................................................................................................................................................................................42Turning On and Off Column Titles........................................................................................................................................................................................44

Chapter 9 - ToolBar.....................................................................................................................................................................................................................45Buttons....................................................................................................................................................................................................................................45Hiding and Showing Buttons..................................................................................................................................................................................................46Code Control...........................................................................................................................................................................................................................46Configuration..........................................................................................................................................................................................................................46

Chapter 10 - Labels......................................................................................................................................................................................................................48Properties................................................................................................................................................................................................................................48

Caption.............................................................................................................................................................................................................................48Alignment........................................................................................................................................................................................................................48Font..................................................................................................................................................................................................................................48Margin Left......................................................................................................................................................................................................................48Margin Right....................................................................................................................................................................................................................48Margin Top......................................................................................................................................................................................................................48Margin Bottom.................................................................................................................................................................................................................48

Iocomp Components – Plot Pack Manual Page v

Page 6: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

How to Add Labels through Code..........................................................................................................................................................................................49Setting Up through Code Example.........................................................................................................................................................................................49How to Remove Labels...........................................................................................................................................................................................................49

Chapter 11 - Tables......................................................................................................................................................................................................................50Adding Tables.........................................................................................................................................................................................................................50Adding and Removing Columns.............................................................................................................................................................................................50Adding and Removing Rows..................................................................................................................................................................................................50Adding Data to a Table...........................................................................................................................................................................................................50Modifying Table Column Properties......................................................................................................................................................................................51Visual Basic Creating Tables..................................................................................................................................................................................................51Visual C++ Creating Tables...................................................................................................................................................................................................52Borland Delphi Creating Tables.............................................................................................................................................................................................52Borland C++ Builder Creating Tables....................................................................................................................................................................................52

Chapter 12 - Data Cursors..........................................................................................................................................................................................................53Cursor Types...........................................................................................................................................................................................................................53

Value X-Y Cursor [ValueXY].........................................................................................................................................................................................53Value X Cursor [ValueX]................................................................................................................................................................................................53Value Y Cursor [ValueY]................................................................................................................................................................................................54Period Cursor [DeltaX]....................................................................................................................................................................................................54Peak-Peak Cursor [DeltaY].............................................................................................................................................................................................54Frequency Cursor [InverseDeltaX]..................................................................................................................................................................................55

Scale Factor.............................................................................................................................................................................................................................55Adding and Removing Cursors...............................................................................................................................................................................................55Data Cursor Example..............................................................................................................................................................................................................56Accessing Individual Cursor Properties.................................................................................................................................................................................56

Popup Menu.....................................................................................................................................................................................................................56Hints.................................................................................................................................................................................................................................56Cursor Pointers................................................................................................................................................................................................................57Obtaining X-Values, Y-Values, and Status.....................................................................................................................................................................57Pointer Width...................................................................................................................................................................................................................58Precision and Label Formatting.......................................................................................................................................................................................58

iPlot Component Specific Notes.............................................................................................................................................................................................58iXYPlot Component Specific Notes.......................................................................................................................................................................................58Cursor Events..........................................................................................................................................................................................................................59

OnCursorChange.............................................................................................................................................................................................................59OnDataCursorCustomizeHint..........................................................................................................................................................................................59UI Events.........................................................................................................................................................................................................................59

Chapter 13 - Annotations............................................................................................................................................................................................................60How to Add Annotations........................................................................................................................................................................................................60How to Remove Annotations..................................................................................................................................................................................................60Annotations Styles..................................................................................................................................................................................................................60Annotations Properties............................................................................................................................................................................................................61Annotation Reference Relationships......................................................................................................................................................................................61

DataView Reference........................................................................................................................................................................................................61Channel Reference...........................................................................................................................................................................................................61XDataViewYChannel Reference.....................................................................................................................................................................................61XChannelYDataView Reference.....................................................................................................................................................................................62

Annotation Methods ..............................................................................................................................................................................................................62Movable Annotations..............................................................................................................................................................................................................62Sizable Annotations................................................................................................................................................................................................................62Image List...............................................................................................................................................................................................................................63How to Add Image Annotations.............................................................................................................................................................................................63

Adding an image through Property Editor. ....................................................................................................................................................................63Visual Basic Adding an Image through Code. ......................................................................................................................................................................64Visual C++ Adding an Image through Code. .......................................................................................................................................................................64Borland Delphi Adding an Image through Code. .................................................................................................................................................................65Borland C++Builder Adding an Image through Code. .........................................................................................................................................................66Annotation Click Event..........................................................................................................................................................................................................66Clip Annotation to an Axis.....................................................................................................................................................................................................66Annotation Examples..............................................................................................................................................................................................................67

Text:.................................................................................................................................................................................................................................67Line:.................................................................................................................................................................................................................................67Rectangle:........................................................................................................................................................................................................................67LineX:..............................................................................................................................................................................................................................68LineY:..............................................................................................................................................................................................................................68Text Rectangle:................................................................................................................................................................................................................68Ellipse:.............................................................................................................................................................................................................................69Image:..............................................................................................................................................................................................................................70

Chapter 14 - Limits......................................................................................................................................................................................................................71LineX......................................................................................................................................................................................................................................71LineY......................................................................................................................................................................................................................................71BandX.....................................................................................................................................................................................................................................72BandY.....................................................................................................................................................................................................................................72

Page vi Iocomp Components – Plot Pack Manual

Page 7: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

PolyBandX..............................................................................................................................................................................................................................73PolyBandY..............................................................................................................................................................................................................................73Adding and Removing Limits.................................................................................................................................................................................................74User Interactivity....................................................................................................................................................................................................................74

Chapter 15 - Visual Layout Manager........................................................................................................................................................................................75Tutorial....................................................................................................................................................................................................................................75

How to Move Objects......................................................................................................................................................................................................75Adding Plot Objects.........................................................................................................................................................................................................76How to Stack Axes..........................................................................................................................................................................................................76Rotating X and Y-Axes...................................................................................................................................................................................................77Deleting an Object...........................................................................................................................................................................................................77Moving the Legend..........................................................................................................................................................................................................78Resizing Objects .............................................................................................................................................................................................................78

Chapter 16 - Adding Data...........................................................................................................................................................................................................79AddXY....................................................................................................................................................................................................................................79

Complete AddXY Example.............................................................................................................................................................................................79High/Low Example..........................................................................................................................................................................................................81Special ActiveX Example:...............................................................................................................................................................................................82

Other Data Adding Methods...................................................................................................................................................................................................83AddYElapsedSeconds......................................................................................................................................................................................................83AddYElapsedTime...........................................................................................................................................................................................................84AddYNow........................................................................................................................................................................................................................84AddYArray......................................................................................................................................................................................................................84AddXYArray...................................................................................................................................................................................................................84AddXYArrays..................................................................................................................................................................................................................84AddEmpty........................................................................................................................................................................................................................85AddXNull [iPlot component only]..................................................................................................................................................................................85AddNull [iXYPlot component only]................................................................................................................................................................................85

Modifying/Reading Data........................................................................................................................................................................................................85Running Y-Value Min, Max, and Mean.................................................................................................................................................................................86Empty and Null Data Points...................................................................................................................................................................................................86

Chapter 17 - Null Data and Empty Data Handling..................................................................................................................................................................87Adding a Null Y Data Point at a Specific X Data Point (iPlot Only).....................................................................................................................................87Adding a Null X & Y Data (iXYPlot Only)...........................................................................................................................................................................87Setting a Null Y Data Point at a Specific X Data Point..........................................................................................................................................................87Add Empty..............................................................................................................................................................................................................................87Language Specific Examples..................................................................................................................................................................................................88

Chapter 18 - AutoScale and AutoLabel.....................................................................................................................................................................................911-2-5 Rule...............................................................................................................................................................................................................................91Linear Scale............................................................................................................................................................................................................................91Date/Time Scale......................................................................................................................................................................................................................91Price32nds Scale.....................................................................................................................................................................................................................92Log10 Scale............................................................................................................................................................................................................................92Modifying the 1-2-5 Rule.......................................................................................................................................................................................................92

DesiredIncrement.............................................................................................................................................................................................................92Desired Start...........................................................................................................................................................................................................................93Tracking..................................................................................................................................................................................................................................93

Chapter 19 - Tracking.................................................................................................................................................................................................................94Tracking Styles.......................................................................................................................................................................................................................94Tracking Align First Styles.....................................................................................................................................................................................................95

Min...................................................................................................................................................................................................................................95Max..................................................................................................................................................................................................................................96Auto.................................................................................................................................................................................................................................96None [All Axis Default]..................................................................................................................................................................................................96

Tracking Scroll Compress Max..............................................................................................................................................................................................96Enabling and Disabling Tracking...........................................................................................................................................................................................96

Channel Tracking Properties...........................................................................................................................................................................................96Axis Tracking Properties.................................................................................................................................................................................................96User Interaction................................................................................................................................................................................................................97

Manual Tracking.....................................................................................................................................................................................................................97Chapter 20 - Cartesian Axes.......................................................................................................................................................................................................98

Master Cartesian Axes............................................................................................................................................................................................................98Child Cartesian Axes..............................................................................................................................................................................................................98

Chapter 21 - Translation.............................................................................................................................................................................................................99Chapter 22 - Interpolation........................................................................................................................................................................................................101

None......................................................................................................................................................................................................................................101Straight Line.........................................................................................................................................................................................................................101Cubic Spline..........................................................................................................................................................................................................................102Polynomial............................................................................................................................................................................................................................102Rational.................................................................................................................................................................................................................................102Differential............................................................................................................................................................................................................................103Differential Terminated........................................................................................................................................................................................................103

Chapter 23 - User Interface Control........................................................................................................................................................................................104

Iocomp Components – Plot Pack Manual Page vii

Page 8: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

The Built-in Tool Bar...........................................................................................................................................................................................................104Scrollable and Zoom-able Axes............................................................................................................................................................................................104Zooming Tools......................................................................................................................................................................................................................104Select Tool............................................................................................................................................................................................................................104Cursor Tool...........................................................................................................................................................................................................................104Context Sensitive Right-Click Menus (Pop up Menus)........................................................................................................................................................105

Axis Object....................................................................................................................................................................................................................105DataView Object............................................................................................................................................................................................................105ToolBar Object..............................................................................................................................................................................................................105Legend Object................................................................................................................................................................................................................105DataCursor Object.........................................................................................................................................................................................................105

Scrolling Axes by using the Keyboard ................................................................................................................................................................................105Scrolling and Zooming through the DataView.....................................................................................................................................................................105Runtime Property Editor.......................................................................................................................................................................................................105

Right-Click on Plot Object............................................................................................................................................................................................106ToolBar Runtime Property Editor Button .....................................................................................................................................................................106Preventing or Disabling UI Interaction .........................................................................................................................................................................106

Chapter 24 - Loading and Saving Data....................................................................................................................................................................................107Data Formats.........................................................................................................................................................................................................................107

SaveDataToFile.............................................................................................................................................................................................................107LoadDataFromFile.........................................................................................................................................................................................................107SavePropertiesToFile.....................................................................................................................................................................................................107LoadPropertiesFromFile................................................................................................................................................................................................108SaveAnnotationsToFile.................................................................................................................................................................................................108LoadAnnotationsFromFile.............................................................................................................................................................................................108

Data Logging [Channel Interface]........................................................................................................................................................................................108LogFileName.................................................................................................................................................................................................................108LogBufferSize................................................................................................................................................................................................................108LogActivate...................................................................................................................................................................................................................108LogDeactivate................................................................................................................................................................................................................108Loading Data From Log File.........................................................................................................................................................................................108

Data Logging [Main Interface].............................................................................................................................................................................................109LogFileName.................................................................................................................................................................................................................109LogBufferSize................................................................................................................................................................................................................109LogActivate...................................................................................................................................................................................................................109LogDeactivate................................................................................................................................................................................................................109Loading Data From Log File.........................................................................................................................................................................................109AddDataArray Example.................................................................................................................................................................................................109

Image Formats.......................................................................................................................................................................................................................109Chapter 25 - Graphical Export.................................................................................................................................................................................................110

Enhanced Meta File Format..................................................................................................................................................................................................110Bitmap...................................................................................................................................................................................................................................110JPEG.....................................................................................................................................................................................................................................110PNG......................................................................................................................................................................................................................................110Clipboard Transfer Method..................................................................................................................................................................................................110GetBytesJPEG Method.........................................................................................................................................................................................................111

Chapter 26 - Printing.................................................................................................................................................................................................................112Printing Options....................................................................................................................................................................................................................112

Page Orientation............................................................................................................................................................................................................112Printer Dialog.................................................................................................................................................................................................................112Printer Document Name................................................................................................................................................................................................112Margins..........................................................................................................................................................................................................................112

Simple Chart Print.................................................................................................................................................................................................................112Using with External Reporting Packages or Custom Code..................................................................................................................................................112

Clipboard Transfer.........................................................................................................................................................................................................113IPictureDisp Object Transfer.........................................................................................................................................................................................113Save to Enhanced Metafile............................................................................................................................................................................................113

Printing Tips.........................................................................................................................................................................................................................113Chapter 27 - Plot Pack Events..................................................................................................................................................................................................114

Standard Events....................................................................................................................................................................................................................114OnClick ................................................................................................................................................................................................................................114OnDblClick ..........................................................................................................................................................................................................................115OnMouseDown ....................................................................................................................................................................................................................115OnMouseMove ....................................................................................................................................................................................................................116OnMouseUp .........................................................................................................................................................................................................................117OnKeyDown ........................................................................................................................................................................................................................118OnKeyPress .........................................................................................................................................................................................................................118OnKeyUp .............................................................................................................................................................................................................................119Sub-Object Click Events.......................................................................................................................................................................................................119OnClickAnnotation ..............................................................................................................................................................................................................119OnClickChannel ...................................................................................................................................................................................................................120OnClickDataCursor .............................................................................................................................................................................................................120OnClickDataPoint ................................................................................................................................................................................................................120

Page viii Iocomp Components – Plot Pack Manual

Page 9: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

OnClickDataView ................................................................................................................................................................................................................121OnClickLegend ....................................................................................................................................................................................................................121OnClickLimit .......................................................................................................................................................................................................................121OnClickXAxis .....................................................................................................................................................................................................................122OnClickYAxis .....................................................................................................................................................................................................................122OnDblClickAnnotation ........................................................................................................................................................................................................122OnDblClickChannel .............................................................................................................................................................................................................123OnDblClickDataCursor .......................................................................................................................................................................................................123OnDblClickDataPoint ..........................................................................................................................................................................................................123OnDblClickDataView ..........................................................................................................................................................................................................124OnDblClickLegend ..............................................................................................................................................................................................................124OnDblClickLimit .................................................................................................................................................................................................................124OnDblClickXAxis ...............................................................................................................................................................................................................125OnDblClickYAxis ...............................................................................................................................................................................................................125Axis Object Events...............................................................................................................................................................................................................126OnXAxisCustomizeLabel ....................................................................................................................................................................................................126OnXAxisMinChange ...........................................................................................................................................................................................................126OnXAxisMinSpanChange ...................................................................................................................................................................................................127OnXAxisSpanChange ..........................................................................................................................................................................................................127OnYAxisCustomizeLabel ....................................................................................................................................................................................................128OnYAxisMinChange ...........................................................................................................................................................................................................128OnYAxisMinSpanChange ...................................................................................................................................................................................................129OnYAxisSpanChange ..........................................................................................................................................................................................................129Data Cursor Object Events...................................................................................................................................................................................................130OnDataCursorChange ..........................................................................................................................................................................................................130OnDataCursorCustomizeHint ..............................................................................................................................................................................................130Limit Object Events..............................................................................................................................................................................................................131OnLimitLine1PositionChange .............................................................................................................................................................................................131OnLimitLine2PositionChange .............................................................................................................................................................................................131Plot Object Focus Events......................................................................................................................................................................................................132OnGotFocusAnnotation .......................................................................................................................................................................................................132OnGotFocusChannel ............................................................................................................................................................................................................132OnGotFocusDataCursor .......................................................................................................................................................................................................133OnGotFocusDataView .........................................................................................................................................................................................................133OnGotFocusLegend .............................................................................................................................................................................................................133OnGotFocusXAxis ...............................................................................................................................................................................................................134OnGotFocusYAxis ...............................................................................................................................................................................................................134OnLostFocusAnnotation ......................................................................................................................................................................................................134OnLostFocusChannel ...........................................................................................................................................................................................................135OnLostFocusDataCursor .....................................................................................................................................................................................................135OnLostFocusDataView ........................................................................................................................................................................................................135OnLostFocusLegend ............................................................................................................................................................................................................136OnLostFocusXAxis .............................................................................................................................................................................................................136OnLostFocusYAxis .............................................................................................................................................................................................................136OnPopUpMenuAnnotation ..................................................................................................................................................................................................137OnPopUpMenuChannel .......................................................................................................................................................................................................137OnPopUpMenuDataCursor ..................................................................................................................................................................................................138OnPopUpMenuDataView ....................................................................................................................................................................................................138OnPopUpMenuLegend.........................................................................................................................................................................................................139OnPopUpMenuLimit............................................................................................................................................................................................................139OnPopUpMenuXAxis...........................................................................................................................................................................................................140OnPopUpMenuYAxis...........................................................................................................................................................................................................140Printing Events......................................................................................................................................................................................................................141OnBeforePrint ......................................................................................................................................................................................................................141OnAfterPrint ........................................................................................................................................................................................................................142Misc Events...........................................................................................................................................................................................................................143OnAnnotationCoordinatesChange .......................................................................................................................................................................................143OnAnnotationCoordinatesChangeFinished .........................................................................................................................................................................143OnAfterLoadProperties ........................................................................................................................................................................................................144OnBeforeLoadProperties .....................................................................................................................................................................................................144OnBeforeZoomBox .............................................................................................................................................................................................................145OnBeforeNewOPCData .......................................................................................................................................................................................................145OnNewOPCData ..................................................................................................................................................................................................................146

Chapter 28 - Layout Control Through Code..........................................................................................................................................................................147Layout Manager....................................................................................................................................................................................................................147Layout Object ZOrder...........................................................................................................................................................................................................147Layout Object StartPercent and StopPercent........................................................................................................................................................................147

Horizontal Layout Object..............................................................................................................................................................................................147Vertical Layout Object...................................................................................................................................................................................................148

DataViewZVert and DataViewZHorz..................................................................................................................................................................................148DataViewZVert..............................................................................................................................................................................................................148DataViewZHorz.............................................................................................................................................................................................................148

ToolBar Location..................................................................................................................................................................................................................148

Iocomp Components – Plot Pack Manual Page ix

Page 10: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

X and Y-Axes ......................................................................................................................................................................................................................149StackingEndsMargin......................................................................................................................................................................................................149Layout Object Horizontal..............................................................................................................................................................................................149

Plot Component Outer Margin..............................................................................................................................................................................................150Full Layout Through Code Example....................................................................................................................................................................................150

Chapter 29 - Layer Control......................................................................................................................................................................................................154Chapter 30 - Pixel, Percent, and Position................................................................................................................................................................................156Chapter 31 - Implementing ToolBar Externally.....................................................................................................................................................................157Chapter 32 - Implementing Legend Externally......................................................................................................................................................................158

Channel Name Listing..........................................................................................................................................................................................................158Channel Trace Line Style and Color Listing........................................................................................................................................................................158Channel Marker Style and Color Listing..............................................................................................................................................................................159Channel Associated X-Axis..................................................................................................................................................................................................159Channel Associated Y-Axis..................................................................................................................................................................................................159Channel Current X/Y Coordinate.........................................................................................................................................................................................159

Chapter 33 - Performance Tuning...........................................................................................................................................................................................160Component Size....................................................................................................................................................................................................................160Frame Rate............................................................................................................................................................................................................................160

AutoFrameRate..............................................................................................................................................................................................................160UpdateFrameRate..........................................................................................................................................................................................................160BeginUpdate..................................................................................................................................................................................................................161EndUpdate.....................................................................................................................................................................................................................161

System Hardware..................................................................................................................................................................................................................161Processor........................................................................................................................................................................................................................161Memory..........................................................................................................................................................................................................................161Video Card.....................................................................................................................................................................................................................161

Special ActiveX Example:....................................................................................................................................................................................................161Chapter 34 - Memory Utilization.............................................................................................................................................................................................164

Data Storage..........................................................................................................................................................................................................................164Memory Usage Calculations [Standard Data Set Style].......................................................................................................................................................1642GB Application RAM Barrier.............................................................................................................................................................................................164Channel Memory Statistics...................................................................................................................................................................................................164

DataPointSize................................................................................................................................................................................................................164MaxDataPoints..............................................................................................................................................................................................................164Capacity.........................................................................................................................................................................................................................165MemoryUsed.................................................................................................................................................................................................................165

Resource Memory vs. RAM Memory...................................................................................................................................................................................165RAM Memory................................................................................................................................................................................................................165Resource Memory..........................................................................................................................................................................................................165

Ring Buffer...........................................................................................................................................................................................................................165Example Calculating Memory Utilization............................................................................................................................................................................166

Chapter 35 - Using With Databases.........................................................................................................................................................................................167Integrated Text File Saving and Loading.............................................................................................................................................................................167Simple X and Y Data............................................................................................................................................................................................................167Time/Date X and Y Data......................................................................................................................................................................................................167

Chapter 36 - Visual C++ Disp vs. iDispatch Interface............................................................................................................................................................168Disp Interface [Late Binding, Class Wizard Default]...........................................................................................................................................................168

Disp Coding Example....................................................................................................................................................................................................168iDispatch Interface [Early Binding, High-Speed]..........................................................................................................................................................168

Chapter 37 - ASP (Active Server Pages)..................................................................................................................................................................................170Chapter 38 - Internet Explorer (Client Side)..........................................................................................................................................................................171

Creating the Plot Pack ActiveX Object in Your Web Page..................................................................................................................................................171Installing the Plot Pack ActiveX Control on the Client........................................................................................................................................................171Licensing the Plot Pack ActiveX Control.............................................................................................................................................................................172Accessing the Plot Pack ActiveX Control from VBScript...................................................................................................................................................172Full Source Example.............................................................................................................................................................................................................172

Chapter 39 - OPC (OLE For Process Control).......................................................................................................................................................................174Iocomp Component OPC Add-On Features.........................................................................................................................................................................174Developer Benefits...............................................................................................................................................................................................................174OPC Tutorial.........................................................................................................................................................................................................................174

Chapter 40 - Scope Component................................................................................................................................................................................................177Generic Code Example ........................................................................................................................................................................................................177Hiding the Control Panel .....................................................................................................................................................................................................178Control Properties.................................................................................................................................................................................................................178Print Properties.....................................................................................................................................................................................................................179Channel Properties................................................................................................................................................................................................................179Display Properties.................................................................................................................................................................................................................180Time Base.............................................................................................................................................................................................................................180Trigger..................................................................................................................................................................................................................................181Cursor Channels Display......................................................................................................................................................................................................182Cursor Style Value X............................................................................................................................................................................................................182Cursor Style Value Y............................................................................................................................................................................................................183

Page x Iocomp Components – Plot Pack Manual

Page 11: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

Cursor Period........................................................................................................................................................................................................................183Cursor Peak-Peak..................................................................................................................................................................................................................183Cursor Frequency..................................................................................................................................................................................................................183Flip Alignment......................................................................................................................................................................................................................184

Appendix A - Plot Pack Property Editors...............................................................................................................................................................................185Control General.....................................................................................................................................................................................................................185Control Title..........................................................................................................................................................................................................................186Control Background..............................................................................................................................................................................................................187Control Print.........................................................................................................................................................................................................................187Control Hints.........................................................................................................................................................................................................................188Control Images......................................................................................................................................................................................................................188Control File I/O.....................................................................................................................................................................................................................189Control Translation...............................................................................................................................................................................................................189Control Annotation Defaults.................................................................................................................................................................................................190Visual Layout Manager........................................................................................................................................................................................................190Channels General..................................................................................................................................................................................................................191Channels Trace.....................................................................................................................................................................................................................192Channels Marker...................................................................................................................................................................................................................193Channels Bar.........................................................................................................................................................................................................................194Channels High/Low Open/Close..........................................................................................................................................................................................195Channels High/Low Candlestick..........................................................................................................................................................................................195Channels Fill.........................................................................................................................................................................................................................196Channels Digital...................................................................................................................................................................................................................196Channels File I/O..................................................................................................................................................................................................................197Channels OPC.......................................................................................................................................................................................................................197Cursors General....................................................................................................................................................................................................................198Cursors Channel....................................................................................................................................................................................................................199Cursors Hint..........................................................................................................................................................................................................................199Cursors Menu Items..............................................................................................................................................................................................................200Limits General......................................................................................................................................................................................................................201Labels General......................................................................................................................................................................................................................203Axes General.........................................................................................................................................................................................................................203Axes Title..............................................................................................................................................................................................................................205Axes Labels Default..............................................................................................................................................................................................................205Axes Labels Cursor...............................................................................................................................................................................................................206Axes Labels Legend..............................................................................................................................................................................................................207Axes Tracking.......................................................................................................................................................................................................................207Axes Cursor..........................................................................................................................................................................................................................208Axes Scroll............................................................................................................................................................................................................................208Axes Scale.............................................................................................................................................................................................................................209Axes Cartesian......................................................................................................................................................................................................................209Legend General.....................................................................................................................................................................................................................210Legend Columns...................................................................................................................................................................................................................211Legend Wrap.........................................................................................................................................................................................................................211Table General........................................................................................................................................................................................................................212Table Grid.............................................................................................................................................................................................................................213Table Layout.........................................................................................................................................................................................................................213ToolBar.................................................................................................................................................................................................................................213Data View General................................................................................................................................................................................................................214Data View Grid Lines X-Major............................................................................................................................................................................................215Data View Grid Lines X-Minor............................................................................................................................................................................................216Data View Grid Lines Y-Major............................................................................................................................................................................................217Data View Grid Lines Y-Minor ...........................................................................................................................................................................................217

Appendix B - Getting Started with Microsoft Visual Basic 6.0.............................................................................................................................................218Tutorial..................................................................................................................................................................................................................................218Accessing Help.....................................................................................................................................................................................................................223

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)...................................................................................................................224Tutorial..................................................................................................................................................................................................................................224Accessing Help.....................................................................................................................................................................................................................234

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)...........................................................................................................................235Tutorial..................................................................................................................................................................................................................................235Accessing Help.....................................................................................................................................................................................................................244

Appendix E - Getting Started with Microsoft .NET (VB.NET).............................................................................................................................................245Tutorial..................................................................................................................................................................................................................................245Accessing Help.....................................................................................................................................................................................................................250

Appendix F - Getting Started with Microsoft .NET (C#.NET)..............................................................................................................................................251Tutorial..................................................................................................................................................................................................................................251Accessing Help.....................................................................................................................................................................................................................256

Appendix G - Getting Started with Delphi (Windows/Linux)...............................................................................................................................................257Tutorial..................................................................................................................................................................................................................................257Accessing Help.....................................................................................................................................................................................................................262

Appendix H - Getting Started with CBuilder (Windows/Linux)...........................................................................................................................................263Tutorial..................................................................................................................................................................................................................................263

Iocomp Components – Plot Pack Manual Page xi

Page 12: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Table of Contents

Accessing Help.....................................................................................................................................................................................................................268Appendix I - ActiveX HTML Properties and Events.............................................................................................................................................................269

HTML Page Important Notes...............................................................................................................................................................................................269Boolean Values: ............................................................................................................................................................................................................269Double Values: .............................................................................................................................................................................................................269

Properties..............................................................................................................................................................................................................................269VBScript Events...................................................................................................................................................................................................................272JavaScript Events..................................................................................................................................................................................................................272LPK File Tutorial..................................................................................................................................................................................................................275

Web Page ActiveX Licensing: What is an LPK File? ..................................................................................................................................................275Steps to create an LPK File............................................................................................................................................................................................275

Steps to integrate the LPK File into your web page.............................................................................................................................................................277Appendix J - Color Codes and Constants................................................................................................................................................................................278Appendix K - Interfaces............................................................................................................................................................................................................279

iPlot & iXYPlot Common Objects........................................................................................................................................................................................279Properties.......................................................................................................................................................................................................................279Deprecated Properties....................................................................................................................................................................................................279Methods.........................................................................................................................................................................................................................279Deprecated Methods .....................................................................................................................................................................................................280Events............................................................................................................................................................................................................................280iPlotDataView & iXYPlotDataView.............................................................................................................................................................................280iPlotAxis & iXYPlotAxis..............................................................................................................................................................................................281iPlotToolBar & iXYPlotToolBar...................................................................................................................................................................................281iPlotLegend & iXYPlotLegend.....................................................................................................................................................................................282iPlotAnnotation & iXYPlotAnnotation.........................................................................................................................................................................282iPlotDataCursor & iXYPlotDataCursor.........................................................................................................................................................................282iPlotTable & iXYPlotTable...........................................................................................................................................................................................283iPlotTableColumn & iXYPlotTableColumn..................................................................................................................................................................283iPlotLabel & iXYPlotLabel...........................................................................................................................................................................................283iPlotLimit & iXYPlotLimit............................................................................................................................................................................................283iPlotTranslation & iXYPlotTranslation.........................................................................................................................................................................283

iPlotChannel Object..............................................................................................................................................................................................................284iXYPlotChannel Object........................................................................................................................................................................................................284iScope Objects......................................................................................................................................................................................................................285

Properties.......................................................................................................................................................................................................................285Methods.........................................................................................................................................................................................................................285Events............................................................................................................................................................................................................................285iScopeChannel ..............................................................................................................................................................................................................285iScopeTimeBase ...........................................................................................................................................................................................................285iScopeTrigger ...............................................................................................................................................................................................................285iScopeToolBar ..............................................................................................................................................................................................................286iScopeDisplay ...............................................................................................................................................................................................................286

Appendix L - What is DateTime Format?...............................................................................................................................................................................287Setting Time GetNow ..........................................................................................................................................................................................................287DateTime Format String.......................................................................................................................................................................................................288Format Specifiers..................................................................................................................................................................................................................288

Appendix M - Working with Variant Arrays..........................................................................................................................................................................289VBScript (Internet Explorer, ASP Pages).............................................................................................................................................................................289iPlotX Channel AddXYArray example. .............................................................................................................................................................................289Visual Basic 5-6 and VBA....................................................................................................................................................................................................289Visual Basic iPlotX Channel AddXYArray example. ........................................................................................................................................................290Visual Basic iPlotX Channel AddXYArrays example. ......................................................................................................................................................290Visual Basic iPlotX Channel AddYArray example. ...........................................................................................................................................................290Visual Basic iPlotX Main Interface AddDataArray example. ............................................................................................................................................291Visual C++ 5-6 and Visual C++.NET..................................................................................................................................................................................291iPlotX Channel AddXYArray example. .............................................................................................................................................................................291Visual C++ iPlotX Channel AddXYArray example. .........................................................................................................................................................292Visual C++ iPlotX Channel AddXYArrays example. ........................................................................................................................................................292Visual C++ iPlotX Channel AddYArray example. .............................................................................................................................................................293Visual C++ iPlotX Main Interface AddDataArray example. ..............................................................................................................................................293Delphi/CBuilder (Windows/Linux)......................................................................................................................................................................................294Delphi iPlotX Channel AddXYArray example. .................................................................................................................................................................294CBuilder iPlotX Channel AddXYArray example. ..............................................................................................................................................................294Delphi iPlotX Channel AddXYArrays example. ................................................................................................................................................................294CBuilder iPlotX Channel AddXYArrays example. ............................................................................................................................................................295Delphi iPlotX Channel AddYArray example. ....................................................................................................................................................................295CBuilder iPlotX Channel AddYArray example. .................................................................................................................................................................295Delphi Main Interface AddDataArray example. .................................................................................................................................................................296CBuilder Main Interface AddDataArray example. .............................................................................................................................................................296

Appendix N - Frequently Asked Questions.............................................................................................................................................................................297Index............................................................................................................................................................................................................................................314

Page xii Iocomp Components – Plot Pack Manual

Page 13: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 1 - Introduction

Chapter 1 - Introduction

Welcome to the Iocomp Plot Pack Manual. This manual, in addition to our help files and example source code projects, provides a full suite ofdocumentation for understanding how our Plot Pack components are constructed, operate, and are used to enhance the applications you develop.

The Plot Pack includes three components...

• iPlot• iXYPlot• iScope

The iPlot component is our main charting component. The iPlot has the most features and greatest speed and can be used in most charting applications. Theonly restriction when using the iPlot component is that data points always have an ever increasing or ever decreasing X-Value (y = f(x)).

The iXYPlot component is a subset of the iPlot component and should only be used when the X-Value for each data point is not always ever increasing orever decreasing (y≠f(x)). You will give up some of the features and speed when using the iXYPlot component.

The iScope component is a direct replacement for a true hardware based Analog or Digital scope. All you need to have is a data acquisition card and totransfer the data to the scope component and it will take care of the rest. See Chapter 40 - Scope Component page 177 for more information.

This manual is divided into many chapters covering different aspects of the Plot Components. The components have been designed entirely on an objectoriented approach, making them well suited for both simple and complex charting applications while leaving themselves open to the addition of manyfeatures enhancements. The following icons are used throughout the manual for emphasis…

Important Note: Useful Tip: Reminder:

Sample Code ConventionsAll simple examples are formatted using a Visual Basic-like syntax. Depending upon your compiler, the syntax of accessing plot objects andproperties may differ. Some specific examples for each major development environment are provided, formatted for that specific compiler. As anexample, to access the Title property for the first X-Axis you would use the following syntax for these major development environments…

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

Microsoft VB.NETAxiPlotX1.get_XAxis(0).Title = "Sample Title 1"

Microsoft C#.NETaxiPlotX1.get_XAxis(0).Title = "Sample Title 1";

Microsoft Visual C++ (Disp Interface/Late Binding Slow Speed)m_iPlotX1.GetXAxis(0).SetTitle("Sample Title 1");

Microsoft Visual C++ (iDispatch Interface/Early Binding High Speed)m_iPlotX1->XAxis[0]->Title = "Sample Title 1";

Borland Delphi (Windows/Linux)iPlot1.XAxis[0].Title := 'Sample Title 1';

Borland C++ Builder (Windows/Linux)iPlot1->XAxis[0]->Title = "Sample Title 1";

Visual C++ Special Compiler NotesIf you are using the MFC wrappers (Disp Interface/Late Binding Slow Speed) for the Plot components, you will need add include statements foreach specific sub plot object that you refer to in code...

//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 both the 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 for our ActiveX controls are only supported by Visual C++ if you are using the high-speed iDispatch interface to an ActiveXcontrol. Refer to the chapter on Visual C++ Disp vs. iDispatch Interface for more information on using the high-speed iDispatch interface. Referto the help file for integer constants associated with enumerated properties if you are using the Disp Interface.

Iocomp Components – Plot Pack Manual Page 1 of 336

Page 14: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 1 - Introduction

Delphi (Windows/Linux), Special Compiler NotesYou may need to add the following files to your uses statement when accessing enumerated types of specific Plot Pack sub-objects…

VCL CLX iPlotAnnotation QiPlotAnnotationiPlotAxis QiPlotAxisiPlotDataCursor QiPlotDataCursoriPlotDataView QiPlotDataViewiPlotLabel QiPlotLabeliPlotLegend QiPlotLegendiPlotLimit QiPlotLimitiPlotTable QiPlotTableiPlotToolBar QiPlotToolBariTypes QiTypesTable 1.1

C++Builder (Windows/Linux) Special Compiler NotesYou may need to add the following files to your include statements when accessing enumerated types of specific Plot Pack sub-objects…

VCL CLX #include "iPlotAnnotation.hpp" #include "QiPlotAnnotation.hpp"#include "iPlotAxis.hpp" #include "QiPlotAxis.hpp"#include "iPlotDataCursor.hpp" #include "QiPlotDataCursor.hpp"#include "iPlotDataView.hpp" #include "QiPlotDataView.hpp"#include "iPlotLabel.hpp" #include "QiPlotLabel.hpp"#include "iPlotLegend.hpp" #include "QiPlotLegend.hpp"#include "iPlotLimit.hpp" #include "QiPlotLimit.hpp"#include "iPlotTable.hpp" #include "QiPlotTable.hpp"#include "iPlotToolBar.hpp" #include "QiPlotToolBar.hpp"#include "iTypes.hpp" #include "QiTypes.hpp"Table 1.2

Component Naming ConventionsThis manual covers the ActiveX and VCL/CLX component versions of our components. Since these two component architectures differ in manyways, the actual class names of these components differ slightly.

If we are talking generically about a component, we will refer to the Plot Components as iPlot, iXYPlot, and iScope. In the ActiveX version of thecomponents, the actual class names are iPlotX, iXYPlotX, and iScopeX. In the VCL and CLX versions, the class names are TiPlot, TiXYPlot, andTiScope.

You can extrapolate this to all of the components produced by Iocomp Software. All VCL and CLX components add a "T" to the beginning of theclass name. All ActiveX components add a "X" to the end of the class name.

Source Code Unit Naming Conventions (Borland Development Environments Only)The source of our components is written in Borland Delphi for Windows, corresponding to the VCL and CLX versions of our componentsrespectively. The source code is identical between these two component standards, minus some IFDEF differences that you will see in the source.The major difference is in the naming of the Unit files.

All VCL component Unit files start with "i". All CLX component Unit file names are the same with "Q" appended on the front of the 'i”. Theclass names of the components are still the same. Delphi, C++ Builder (Windows/Linux) can decipher the difference between the VCL and CLXversions due to the ifdefs conditionals and includes files.

Page 2 of 336 Iocomp Components – Plot Pack Manual

Page 15: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 2 - Deciding Which Component To Use

Chapter 2 - Deciding Which Component To Use

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

• iPlot• iXYPlot• iScope

Each component has been designed for a particular type of application. Table 2.1 shows an overall list of features and which ones are support on eachcomponent…

Feature iPlot iXYPlotAnnotations (Text, Line, Rectangle, and etc) Automated Data Logging to DiskBuilt in ToolBar and LegendData Ring BuffersData Drill DownData Point MarkersHorizontal or Vertical orientation of AxesIntelligent AutoScale of Axes in human readable format (1-2-5 Rule) Linear and Logarithmic ScalesOPC Channel Support (OLE for Process Control)Printing, Saving, Picture interface, and CopyToClipBoardReversible ScalesStackable Scales (See Visual Layout Manager)Data CursorsUnlimited number of ChannelsUnlimited number of LimitsUnlimited number of X&Y-AxesValue, Prefix, Exponent, and Data/Time Scale Label stylesVisual Layout manager (Design-Time and Run-Time) FillsBarsMarkersTraceInterpolation (Curve-Fitting)Optimized Drawing Routines for Large Data SetsData Set restricted to y = f(x)No X-Value Data restrictionsTable 2.1

The iPlot component is designed to be used with Time-based data on the X-Axis. This means that data points must be added with everincreasing or decreasing X-Values. This assumption by our component allows us to dramatically speed up the drawing of data to the screenand support features like fills and curve fitting. If you must add data in "random" X-Value order or situations where there are multiple Y-Values for a given X-Value then use the iXYPlot component instead.

iPlotThe iPlot component has been designed for y = f(x) based graphs (which comprises the vast majority of charts that are generated). Supports datawith a continuously increasing or decreasing X-Value. Typical uses are for Strip Chart, Chart Recorder, or Scrolling Chart types of plottingapplications. This is the chart that can be used for almost all plotting applications. The iXYPlot component should only be used when the datadoes not follow the y =f(x) function.

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

FIGURE 2.1Example of iPlot

component.

Iocomp Components – Plot Pack Manual Page 3 of 336

Page 16: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 2 - Deciding Which Component To Use

iXYPlotThe iXYPlot component has been designed for graphs that don’t have continuously incrementing or decrementing X-Values (y ≠ f(x)). Since wedon’t restrict that the graph be based on a y = f(x) function, there are some features that are not included or are different between the iXYPlotcomponent and the iPlot component such as…

Drawing Routines: The drawing routines in the iXYPlot component are not as optimized as in the iPlot component since each channel is notbased on y = f(x). For large data sets, performance may 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 not possible to fill below or above a curve that can fit tothese data points.

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

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

FIGURE 2.2Example of the

iXYPlot Component.

iScopeDescription : The iScope is a True, Real-Time Analog and Digital Scope component. Supports Real-Time processing and display of data up to5Mhz signal input rate using continuous data or much higher data rates using discontinuous data. For detail discussion of the iScope component,See Chapter 40 - Scope Component page 177 for more information.

FIGURE 2.3A sample

iScopeComponent

showing three channels.

Page 4 of 336 Iocomp Components – Plot Pack Manual

Page 17: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 3 - Overall Theory

Chapter 3 - Overall Theory

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

The hierarchy of the iPlot and iXYPlot are identical with the exception of the channel objects. This allows programmers to use or Plot Componentsinterchangeably since most of the properties, objects, and methods are common. There are several objects that make up the base for our Plot Components,and the hierarchy is as follows in FIGURE 3.1.

FIGURE 3.1iPlot andiXYPlot

Hierarchy

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

Generic Example:iPlot1.PlotObject(0).Property = Value

Specific Examples:Visual Basic/VBA/VBScript:iPlot1X1.DataView(0).GridShow = TRUEiPlot1X1.XAxis(0).Min = 100iPlot1X1.YAxis(0).Min = 100iPlot1X1.Channel(0).Name = "Channel 1"iPlot1X1.Legend(0).Visible = TRUEiPlot1X1.ToolBar(0).ShowEditButton = FALSEiPlot1X1.Annotation(0).Text = "Sample Annotation"iPlot1X1.DataCursor(0).Style = ipcsDeltaXiPlot1X1.Limit(0).XAxisName = "X-Axis 1"iPlot1X1.Labels(0).Caption = "Chart Y vs. Time"iPlot1X1.Table(0).Data(0, 0) = "First Data in Table"

VB.NET:AxiPlot1X1.get_DataView(0).GridShow = TrueAxiPlot1X1.get_XAxis(0).Min = 100AxiPlot1X1.get_YAxis(0).Min = 100AxiPlot1X1.get_Channel(0).Name = "Channel 1"AxiPlot1X1.get_Legend(0).Visible = TrueAxiPlot1X1.get_ToolBar(0).ShowEditButton = FalseAxiPlot1X1.get_Annotation(0).Text = "Sample Annotation"AxiPlot1X1.get_DataCursor(0).Style = iPlotLibrary.TxiPlotDataCursorStyle.ipcsDeltaXAxiPlot1X1.get_Limit(0).XAxisName = "X-Axis 1"AxiPlot1X1.get_Labels(0).Caption = "Chart Y vs. Time"AxiPlot1X1.getTable(0).SetData(0, 0) = "First Data in Table"

Visual C++ (Disp Interface):m_iPlotX1.GetDataView(0).SetGridShow(TRUE);m_iPlotX1.GetXAxis(0).SetMin(100);m_iPlotX1.GetYAxis(0).SetMin(100);m_iPlotX1.GetChannel(0).SetName("Channel 1");m_iPlotX1.GetLegend(0).SetVisible(TRUE);m_iPlotX1.GetToolBar(0).SetShowEditButton(FALSE);m_iPlotX1.GetAnnotation(0).SetText("Sample Annotation");m_iPlotX1.GetDataCursor(0).SetStyle(3); //ipcsDeltaXm_iPlotX1.GetLimit(0).SetXAxisName("X-Axis 1");m_iPlotX1.GetLabels(0).SetCaption("Chart Y vs. Time");m_iPlotX1.GetTable(0).SetData(0, 0, "First Data in Table");

Iocomp Components – Plot Pack Manual Page 5 of 336

Page 18: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 3 - Overall Theory

Visual C++ (iDispatch Interface):iPlotX1->DataView[0]->GridShow = TRUE;iPlotX1->XAxis[0]->Min = 100;iPlotX1->YAxis[0]->Min = 100;iPlotX1->Channel[0]->Name = "Channel 1";iPlotX1->Legend[0]->Visible = TRUE;iPlotX1->ToolBar[0]->ShowEditButton = FALSE;iPlotX1->Annotation[0]->Text = "Sample Annotation";iPlotX1->DataCursor[0]->Style = ipcsDeltaX;iPlotX1->Limit[0]->XAxisName = "X-Axis 1";iPlotX1->Labels[0]->Caption = "Chart Y vs. Time";iPlotX1->Table[0]->Data = "First Data in Table";

C#.NET:axiPlotX1.get_DataView(0).GridShow = true;axiPlotX1.get_XAxis(0).Min = 100;axiPlotX1.get_YAxis(0).Min = 100;axiPlotX1.get_Channel(0).Name = "Channel 1";axiPlotX1.get_Legend(0).Visible = true;axiPlotX1.get_ToolBar(0).ShowEditButton = false;axiPlotX1.get_Annotation(0).Text = "Sample Annotation";axiPlotX1.get_DataCursor(0).Style = iPlotLibrary.TxiPlotDataCursorStyle.ipcsDeltaX;axiPlotX1.get_Limit(0).XAxisName = "X-Axis 1";axiPlotX1.get_Labels(0).Caption = "Chart Y vs. Time";axiPlotX1.get_Table(0).Data = "First Data in Table";

CBuilder (Windows/Linux)iPlot1->DataView[0]->GridShow = TRUE;iPlot1->XAxis[0]->Min = 100;iPlot1->YAxis[0]->Min = 100;iPlot1->Channel[0]->Name = "Channel 1";iPlot1->Legend[0]->Visible = TRUE;iPlot1->ToolBar[0]->ShowEditButton = FALSE;iPlot1->Annotation[0]->Text = "Sample Annotation";iPlot1->DataCursor[0]->Style = ipcsDeltaX;iPlot1->Limit[0]->XAxisName = "X-Axis 1";iPlot1->Labels[0]->Caption = "Chart Y vs. Time";iPlot1->Labels[0]->Data = "First Data in Table";

Delphi (Windows/Linux):iPlot1.DataView[0].GridShow := TRUE;iPlot1.XAxis[0].Min := 100;iPlot1.YAxis[0].Min := 100;iPlot1.Channel[0].Name := 'Channel 1';iPlot1.Legend[0].Visible := TRUE;iPlot1.ToolBar[0].ShowEditButton := FALSE;iPlot1.Annotation[0].Text := 'Sample Annotation';iPlot1.DataCursor[0].Style := ipcsDeltaX;iPlot1.Limit[0].XAxisName := 'X-Axis 1';iPlot1.Labels[0].Caption := 'Chart Y vs. Time';iPlot1,Table[0].Data := "First Data in Table";

The index values are all zero based, meaning the first object’s index is 0, the second is 1, the third is 2, and so on. Currently only one DataView, one Legend, and one ToolBar object is supported at this time and is left open for future expansion.

Plot ObjectsAs shown above, the plot component is made up of many sub objects, referred to in this manual as plot objects. Plot Objects allow for themultiple axes, multiple channels, multiple limits, multiple labels, multiple tables, and multiple data cursors features of the component by allowingan unlimited number of plot objects. Note that some plot objects currently only support one object of their type, such as the DataView, Legend,and ToolBar, but will be upgraded in the future.

Plot Object IndexTo access a specific plot object, such as the third channel for example, you need to use the index of that plot object. Note that a plot object indicesstart at 0…

iPlot1.Channel(2).Property = ValueiPlot1.Channel(2).Procedure

Plot Object NameAll plot objects have a unique index value that is generated when they are created. You can change the name of a plot object using the Nameproperty of each plot object.

Each plot object is referenced by its index, but you can also use the name of a plot object when referencing. This allows you to use your ownsystem of referencing multiple channels or axes without using the index values. You must always reference the plot object by name only there areno index to the plot object.

iPlot1.Channel(0).ProcedureiPlot1.Channel(iPlot1.GetChannelIndexByName("Channel 1")).ProcedureiPlot1.DataCursor(1).ChannelName = "Channel 1"iPlot1.DataCursor(1).ChannelName = iPlot1.Channel(0).Name

Page 6 of 336 Iocomp Components – Plot Pack Manual

Page 19: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 3 - Overall Theory

Get Plot Object Index By Name You can retrieve the index of a channel or axis by using the following procedure and passing the name of the object…

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

Get Plot Object Name by IndexYou can retrieve the name of any plot object as follows…

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

If you plan on deleting objects during your program execution, keep in mind that all object indexes above the item you deleted will havetheir indexes shifted. We recommend that you access sub-objects by name…e.g.

Index = iPlot1.GetXAxisIndexByName(“Time Axis”)iPlot1.XAxis(Index).Span = 100

Iocomp Components – Plot Pack Manual Page 7 of 336

Page 20: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

Chapter 4 - Main Interface

The Plot components are comprised of several sub-object interfaces like channels, axes, and etc., but many important properties and methods that affect theoverall functionality of the component are on the main interface of the component. For example, setup functions such as Printer preferences, UI preferences,Background preferences, and etc are all found on the Main Interface.

One similarity between the main interface and the channels interface is that there are identical File I/O features on both interfaces. The main interface FileI/O methods and properties work with all channels in the chart, whereas the channel interface File I/O methods only work with that particular channel.

All plot component events are found on the main interface of the component (Includes sub-objects events).See Chapter 27 - Plot Pack Events page 114 for detailed explanations and code samples for all events.

The following is an overview of all properties on the main interface.

General

FIGURE 4.1Control General

Design-Time PropertyEditor Page

User Can Edit ObjectsThe UserCanEditObjects property specifies whether the end-user is allowed to edit plot objects at runtime by right clicking the objectand selecting the “Edit” menu item.

By default, all plot objects support editing at runtime through the runtime property editor by using several different methods. The usercan either click the “Edit” tool bar button on the built-in tool bar or they can right click the object and choose the “Edit” menu item.Set the UserCanEditObjects property to false to remove the edit option from the pop-up menu on all plot objects. If you wish to hidethe entire pop-up menu or prevent the user from right clicking on the plot object, use the PopupEnabled or Enabled properties on thespecific plot object.

User Can Add/Remove ChannelsThe UserCanAddRemoveChannels property specifies if the end-user is allowed to add or remove channels dynamically at runtimethrough the runtime property editor. The default setting is False. When false, the “Add” and “Remove” buttons are hidden on the Channel property page. In most applications, allowing the user to add or remove channels will cause problems unless you data addingcode is written to handle this situation.

Clip Annotations to AxesThe ClipAnnotationsToAxes property specifies whether annotations will be drawn outside of the axes region. This property onlyapplies to annotations that have their reference set to a channel. This property will have no effect on annotations with their referenceset to DataView. Any portion of the annotation outside the axes region will be clipped.

Editor Form StyleThe EditorFormStyle property specifies the window style of the runtime property editor. The style can be set to Modal or Stay-On-Topwith Modal being the default. The Modal style requires the user to supply information or close the dialog box before allowing theapplication to continue. The Stay-On-Top style does not require the user to close the dialog before performing other actions in theapplication. For development environments that block Window's timer messages while Modal dialogs are shown, you will need to setthe style to Stay-On-Top. You may also want to set the style to Stay-On-Top if you want the user to have the ability to jump betweenthe editor and other forms/dialogs without closing the editor.

Copy to Clip Board FormatThe CopyToClipBoardFormat property specifies the graphical format of the plot component image copied to the clip board. The valuecan be Modal, Bitmap, or JPEG.

Data File Column SeparatorThe DataFileColumnSeparator property specifies the separator character used when saving data files. The style can be set to Tab orComma, with Tab being the default setting. The separator is used with generating data files using the SaveToDataFile method or theLog Files on the Main or Channel interfaces. Be careful when using the Comma option, this will not work with some internationalsettings which use the Comma as the decimal separator in floating point numbers.

Page 8 of 336 Iocomp Components – Plot Pack Manual

Page 21: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

Border StyleThe BorderStyle property specifies the outer border style of the plot component. Possible values are None, Raised, and Lowered, withLowered being the default.

Outer MarginThe OuterMarginLeft, OuterMarginRight, OuterMarginTop, and OuterMarginBottom properties allow you to specify the borderbetween the edge of the control and the internal elements. If the ToolBar is shown, the ToolBar is placed on the top edge andOuterMarginTop is the spacing between the bottom of the ToolBar and the internal elements of the plot component. These propertyvalues are in pixels.

Update Frame Rate & Auto Frame RateThe AutoFrameRate property is used to enable the frame rate control and the UpdateFrameRate property is used to set the rate at whichframes are painted. Frame rate control is used to limit the number of times a second the control paints itself to the screen. The humaneye is unable to detect changes typically greater than 60 times a second (16.67ms). Painting the control at a rate greater than 60 times asecond will only result in wasted CPU time spent rendering the control to the display.

The frame rate control does not have a built in timer or thread, but instead relies on code triggering a change in the control to determinewhen it is time to paint the next frame. Any changes to the control generated by the user through the mouse or keyboard will result inthe control being painted immediately.

If you have code that adds new data points every 1 ms and the UpdateFrameRate is set to 60, then you will get a new frame paintedevery 17 ms. For 60 frames a second, the actual frame time is 16.67 ms (1/60). The reason for this difference is that the evaluation isonly done when triggered by the code adding data every 1 ms. At the 16 ms point, not enough time has elapsed and the paint requestwill not be sent out. When the next check is made at 17ms, enough time has elapsed and the paint request will be made which results ina paint request be sent every 17 ms.

If you only add new data points every 500ms with the UpdateFrameRate set to 60, then you will get a new frame painted every 500 ms.In this case, the UpdateFrameRate will have no affect because the trigger is greater than the frame time of 16.67.

Because this feature relies on a constant external trigger, you may end up with the last frame not painting if you stop adding data. Inthis case, call the Invalidate or RepaintAll method on the control to force a repaint when you turn of data collection in your application.

TitleThe Title is actually a Label object. The Title properties are provide for convenience and the properties exposed are a subset of the actualproperties of a Label object. If you need more control over the appearance of the Title, access the first Label object using an index of 0. The firstlabel is permanently reserved for the Title and can not be removed even if the RemoveAllLabels method is called. In Table 4.1 is a list of theproperties for the Title and Label objects and there mappings...

Title LabelTitleText CaptionTitleVisible VisibleTitleFont FontTitleMargin MarginBottom

MarginTopMarginLeftMarginRightAlignment

Table 4.1

FIGURE 4.2Control TitleDesign-Time

Property EditorPage

Title VisibleThe TitleVisible property specifies whether the Title is shown in the plot. If accessing the Label object directly, use the Visibleproperty

Title TextThe TitleText property specifies the text display by the title. If accessing the Label object directly, use the Caption property

Title MarginThe TitleMargin property specifies the spacing between the bottom of the Title and plot objects drawn below it. The TitleMargin value

Iocomp Components – Plot Pack Manual Page 9 of 336

Page 22: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

is specified in pixels. If accessing the Label object directly, use the MarginBottom property

Title FontThe TitleFont property specifies the font attributes used for rendering the title text. You can specify the font Name, Style, Size, andColor attributes. For ActiveX, there is a separate TitleFontColor property for specifying the font color. If accessing the Label objectdirectly, use the Font property (And FontColor if ActiveX).

BackgroundThe background of the plot component can show either a solid color or a gradient. If the background gradient is not enabled, then the backgroundwill be filled with the color specified by the BackGroundColor property.

FIGURE 4.3Example of theProperty Editor

ControlBackground

Tab.

Background ColorThe BackGroundColor property specifies the solid color of the background. This property only has an effect if the background gradient is notenabled.

Background Gradient EnabledThe BackGroundGradientEnabled property specifies if the background is filled with a gradient. If the property is True, then a gradient is filled asspecified by the BackGroundGradientDirection, BackGroundGradientStartColor, and BackGroundGradientStopColor properties. If the propertyis False, then the background is filled with a solid color as specified by the BackGroundColor property.

Background Gradient DirectionThe BackGroundGradientDirection property specifies the direction the gradient is drawn. It will begin with the start color and end with the stopcolor. This property will only have an effect if the background gradient is enabled. Table 4.2 list the possible styles of the background gradientdirection.

Enumeration Const DescriptionifdTopBottom 0 Top to BottomifdBottomTop 1 Bottom to TopifdLeftRight 2 Left to RightifdRightLeft 3 Right to LeftifdTopLeftBottomRight 4 Top-Left to Bottom-RightifdBottomRightTopLeft 5 Bottom-Right to Top-LeftifdBottomLeftTopRight 6 Bottom-Left to Top-RightifdTopRightBottomLeft 7 Top-Right to Bottom-LeftifdRectangleOut 8 Rectangle from Center to EdgeifdRectangleIn 9 Rectangle from Edge to CenterifdCircleOut 10 Ellipse from Center to EdgeifdCircleIn 11 Ellipse from Edge to CenterTable 4.2

Background Gradient Start ColorThe BackGroundGradientStartColor property specifies the color the gradient starts drawing with.. This property will only have an effect if thebackground gradient is enabled.

Page 10 of 336 Iocomp Components – Plot Pack Manual

Page 23: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

Background Gradient Stop ColorThe BackGroundGradientStopColor property specifies the color the gradient stops drawing with.. This property will only have an effect if thebackground gradient is enabled.

The background of the component will only fill the background of the DataView if the DataView BackGroundTransparent property is set to True.In FIGURE 4.4 and FIGURE 4.5 show examples with the DataView background transparent set to True and False.

FIGURE 4.4Example of the DataView with Transparent set to True.

FIGURE 4.5Example of the DataView with Transparent set to False.

PrintThe plot component provides basic printing capability for outputting the display to a black and white or color printer. FIGURE 4.6 shows theproperties for controlling the printing behavior. See Chapter 26 - Printing page 112 for a detailed description and use.

FIGURE 4.6Print PropertyEditor Page.

Print Show DialogThe PrintShowDialog property specifies if the print dialog is show to the user before printing to allow the user to change printing options. Theprint dialog allows the user to change printers, orientation, number of copies and etc. The number of features available depends on the printerdriver.

Print OrientationThe PrintOrientation property is used to specify if the printed output is oriented in Portrait or Landscape mode.

Print MarginThe PrintMarginLeft, PrintMarginRight, PrintMarginTop, and PrintMarginBottom properties specify the outer margin on the printed page. Theproperty values are in inches. To convert centimeters to inches, multiple the centimeters by 2.54 to convert to inches.

Print Document NameThe PrintDocumentName property specifies the title of the document that shows up on the print display and in the printer manager..

Iocomp Components – Plot Pack Manual Page 11 of 336

Page 24: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

HintThe Hints when enabled, will display a text box with a title of the plot object when the user holds the mouse pointer stationary over the object. Toenable the hints, set the HintsShow property to True. The HintsPause property specifies the amount of time the mouse pointer must be stationaryover the object before the hint will show up. The HintsHidePause property specifies the amount of time the hint will be shown before it will turnits self back off. Both the HintsPause and HintsHidePause properties are in milliseconds. See Appendix A - Plot Pack Property Editors page 188 for more information.

FIGURE 4.7Hints PropertyEditor Page.

ImagesThere are 3 built-in Image list that can be used with the annotations objects The first image added to each individual custom list, sets the widthand height for all other images within that custom list. If you need to reset the width and height of the images for a specific custom list, first clearout all images and make sure the first image added has the desired width and height. You can load the images through the design-time propertyeditor or at runtime through code. The user is not allowed by design to change the images through the run-time property editor. See Chapter 13 - Annotations page 70 for more information.

FIGURE 4.8Images Property

Editor Page.

File I/OThe LogFileName Specifies the filename and location for the log file that is used to maintain the buffer information. The Buffer size is chosen bythe user discretion or needs of the operating system. The run time property editor page for the File I/O allows the user to load or save theProperties, Data, and Annotations. See Appendix A - Plot Pack Property Editors page 189 for more information.

FIGURE 4.9Run TimeFile I/O

Property EditorPage.

Page 12 of 336 Iocomp Components – Plot Pack Manual

Page 25: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 4 - Main Interface

TranslationThe translation feature allows for internationalization or customization of the captions used in the Plot component display or run-time propertyeditor. See Chapter 21 - Translation page 99 for more information.

FIGURE 4.10Translation

Property EditorPage.

Annotation DefaultsThe annotation defaults specify the initial appearance of annotations when they are added. In Table 4.3 shows a list of the annotation defaultproperties. The purpose of these defaults is to reduce the amount of code necessary to set up an annotation. For example, if the background of theplot component is black, typically you would want the pen and or brush of the annotation object to be white for good contrast or vice versa if thebackground is white. By setting up these defaults, you do not need to explicitly set the appearance properties for each individual annotationthrough code.

FIGURE 4.11Annotations

Property EditorPage.

Annotation Default PropertiesAnnotationDefaultFont AnnotationDefaultFontColor (ActiveX Only)AnnotationDefaultBrushStlyeAnnotationDefaultBrushColorAnnotationDefaultPenStlyeAnnotationDefaultPenColorAnnotationDefaultPenWidthTable 4.3

Iocomp Components – Plot Pack Manual Page 13 of 336

Page 26: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Chapter 5 - Channels

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

There can be an unlimited number of channels in your chart. Each is addressed independently of all of the other channels in the chart. Each channel isassociated with a particular X and Y-Axis so that it may draw its data in the Data View. Channels can be synchronous or asynchronous relative to each other,depending on your needs. The channels also supports digital data with fixed Digital-Highs and Digital-Lows.

By default, when you add data points to a chart, only trace lines connecting the points is actually drawn on the screen. You can, however, configure eachindividual channel to display one, all, or some of the following for each data point or groups or data points on the screen…

• Data Markers - These mark the position of the actual data point utilizing symbols or characters.See Appendix A - Plot Pack Property Editors page 193 for more information.

• Trace Lines - These draw connecting lines between data points. There are several options for drawing the connecting lines...• Interpolation – Straight Line (Default)• Interpolation – Cubic Spline• Interpolation – Polynomial• Interpolation – Rational • Interpolation – Differential• Interpolation – Differential Terminated• Digital

• Fill - This allows you to fill all the area from a specified “base-line” to the trace-line using your own customized fill color or pattern. • Bars - This allows you draw a bar type of chart with a bar drawn for each data point from a specified “base-line” to the Y-Coordinate of each data

point. • High/Low – Feature allows the user to track data as a specialized bar. • Candlestick – Feature allows the user to track data as a specialized bar.

FIGURE 5.1Example showing theChannels Plot Object.

VisibleThe Visible property determines whether the channel is shown in the DataView. This property will have no effect on the Channel showing up inthe Legend, see the VisibleInLegend property.

Visible In LegendThe VisibleInLegend property determines whether the channel will show up in the Legend. This property will have no effect on the Channel databeing displayed in the DataView. Typically this property is used when using additional channels to overlay data over existing channels but youwish to hide the fact from the user in the Legend.

Trace LinesTrace Lines are the lines drawn between data points on the graph. You can specify the line’s color, width, and style to help differentiate it fromother trace lines in your chart. For graphs that don’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 to straight trace lines. See Chapter 22 - Interpolation page 101 for more information.

Since we use the Windows API for line drawing routines, trace line styles such as dashed, dot, and dot dash styles do not work with linewidths greater than 1 (i.e. with line widths greater than 1, the trace line will always be solid.). Adding the ability to draw line widths greaterthan 1 using non-solid lines would seriously affect the speed of the component, so it is recommended that the data point markers and channelcolors be used to differentiate between channels instead of using the line width.

Page 14 of 336 Iocomp Components – Plot Pack Manual

Page 27: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Fast DrawThe Fast-Draw feature can dramatically speed up the drawing on the Channel Trace-Line when a large number of segments are shown in theDataView. To enable, set the FastDraw property to True. This option is only available on the iPlot component and is not supported by the iXYPlotcomponent because the data is not continuous increasing or decreasing. Do not turn on this feature if you will be customizing the properties ofeach individual line segment. With Fast-Draw enabled, the actual line segments drawn are aggregates of multiple line segments and anyindividual property settings per line segment are ignored.

TrackingTracking refers to the AutoScale and AutoScrolling features of the axes. When new data is added to the channel, the X-Value is sent to theassociated X-Axis and the Y-Value is sent to the associated Y-Axis by default. The data is used by the axis for scaling and scrolling.

More than one channel can send tracking data to the same axis. If you wish for a particular channel to not participate in sending track data to anaxis, set XAxisTrackingEnabled or YAxisTrackingEnabled properties of the channel to False. If you wish to disable all tracking on an axis,instead set the TrackingEnabled property on the axis to False as opposed to setting it on each individual channel.

Ring BufferBy default, the chart will buffer all of the data points added to all channels into RAM. This buffered data makes it possible to scroll back to olderdata (history).

Asynchronous and Synchronous DataThe Plot Components are able to handle Asynchronous Data (Channels that don’t have X-Axis or Time data values that are the same for eachsuccessive data point) or Synchronous Data (Channels that have X-Axis or Time data values that are the same for each successive data point).

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

Using the Main Component AddDataArray Method: This method allows you to add data to multiple channels by passing a single array to thecomponent’s main interface. The method insures that all data is synchronous since you pass a X-Value for all channel data points.

Using the Main Interface Data Logging: You must use the AddDataArray method which therefore requires that your data be synchronous.

Channel Data LoggingThis feature is useful if you need an automated way of saving chart data to disk as it is being added in real-time. The saved data can be used by anexternal program or can be used to reload the data back into the chart at a later time.

Channel Data Logging can be setup for each individual channel or you can perform logging through the many interface but with the restrictionthat data for all channels is synchronized. See Chapter 24 - Loading and Saving Data page 107 for a detailed description and examples.

The directory specified when using the channel data logging feature must exist on the target system and the application’s user must havepermissions to write to that directory or file. Otherwise, an exception error will be generated.

Adding Data For adding data to the plot components, see the following chapters for a detail discussion with examples.

See Chapter 16 - Adding Data page 79 for a detailed description and examples.See Chapter 17 - Null Data and Empty Data Handling page 87 for a detailed description and examples.

Iocomp Components – Plot Pack Manual Page 15 of 336

Page 28: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Data MarkersBy default, no markers are shown. With this option enabled, you can show markers for all points, some points, and you can also customize thestyle of each individual marker. Markers are useful for differentiating between channel data points and for highlighting true data points. Thefollowing types of markers are available as shown in Table 5.1.

Style Description Sample Data StyleipmsCircle Circle AllipmsSquare Square AllipmsDiamond Diamond AllipmsCross Cross AllipmsPlus Plus AllipmsTriangleUp Triangle Pointing Up AllipmsTriangleDown Triangle Pointing Down AllipmsTriangleLeft Triangle Pointing Left AllipmsTriangleRight Triangle Pointing Right AllipmsVerticalLine Vertical Line AllipmsHorizontalLine Horizontal Line AllipmsCharacter Character See Font Set Full Feature OnlyTable 5.1

If you will be showing a large number of data points (100,000+) in the visible portion of the DataView, you may want to utilize theMarkersTurnOffLimit property to limit the number of visible data point markers. When this limit is reached, all data point markers for that channel will be hidden to prevent the overhead of drawing large numbers of overlapping data point markers.

Individual Data MarkersBy default, when data markers are drawn, the same data marker is used for all data points. You can specify different Data Markers for individualpoints. First, set the MarkersAllowIndividual property to True to allow individual control of each data marker. You can then later use thefollowing methods to modify a data marker. (Note: Individual Data Markers are only supported in the Standard and Full Feature DataStyle Mode)

iPlot1.Channel(0).MarkersVisible = True iPlot1.Channel(0).MarkersStyle = ipmsDiamond 'The default style for all data markers iPlot1.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

Channel FillThe iPlot component supports the ability to fill an area between the trace line and a specified base line (either above or below the trace line). TheFill feature is not available with the iXYPlot component since its datasets are not based on y = f(x) .

To specify a baseline for the fill, use the FillReference property.

FIGURE 5.2Example showing

three channels withvarying Channel Fill

Reference Points.

Remember that the RingBuffer properties are assigned to individual channels, and are independent of other channels. Also, Remember thatthe RingBuffer is specified as the number of data points that will be stored in the buffer.

The RingBuffer property allows you to control how much data is stored in available memory. If you set the RingBuffer property to 10,000, thenmemory will be allocated for 10,000 data points. After you add 10,000 data points, the oldest data will begin to disappear. The Ring Buffer is aFIFO (First In First Out) type buffer. You can find more information on using the Ring Buffer feature in the Chapter 34 - Memory Utilization on page 164.

Page 16 of 336 Iocomp Components – Plot Pack Manual

Page 29: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Bar SupportAnother option of the channels is to draw a bar from a base reference point to the Y-Value of each data point in the channel. To set the referencefor the bars, set the BarReference property. The top of each bar is specified by the Y-Value of each data point.

FIGURE 5.3 Shows a single channel displaying a bar chart with the reference set to zero. The height of the bar is specified by the Y-Value foreach data point.

FIGURE 5.3Example showing asimple Bar Chart.

FIGURE 5.4 shows two channels displaying a bar chart with the reference for Channel 1 set to zero and the reference for Channel 2 set to 60..

FIGURE 5.4Example with

Channel 1 referenceat 0 and Channel 2

reference at 60.

Digital Channel OptionThe digital channel option allows for display of digital data that contains 1's (Highs) and 0's (Lows). The Y-Position of digital highs is specifiedby the DigitalReferenceHigh property and the Y-Position of the digital lows is specified by the DigitalReferenceLow property. To enable thismode, set the DigitalEnabled property to True.

The other main benefit of this option is to show vertical lines at the transitions from 0's to 1's or 1's to 0's as opposed to having a sloped line.FIGURE 5.5 shows an example where Channel 1 is not configured as a digital channel and Channel 2 is. You will notice that Channel 1 showssloped lines were the transitions occur and slopes start before the actual transition occurs.

iPlot1.Channel(0).DigitalEnabled = FalseiPlot1.Channel(0).AddXY 0, 90iPlot1.Channel(0).AddXY 20, 90iPlot1.Channel(0).AddXY 40, 60iPlot1.Channel(0).AddXY 60, 60iPlot1.Channel(0).AddXY 80, 90iPlot1.Channel(0).AddXY 100, 90 iPlot1.Channel(1).DigitalEnabled = TrueiPlot1.Channel(1).DigitalReferenceHigh = 45iPlot1.Channel(1).DigitalReferenceLow = 10 iPlot1.Channel(1).AddXY 0, 1iPlot1.Channel(1).AddXY 20, 1iPlot1.Channel(1).AddXY 40, 0iPlot1.Channel(1).AddXY 60, 0iPlot1.Channel(1).AddXY 80, 1iPlot1.Channel(1).AddXY 100, 1

FIGURE 5.5Example comparing

a non-digital Channel 1 and digital

Channel 2.

Iocomp Components – Plot Pack Manual Page 17 of 336

Page 30: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

You can reference the Y-Values for the digital Highs and Lows to either Scale or Percent. When referenced to Scale, the Y-Values are relative tothe Y-Axis scale. When referenced to Percent, the Y-Values are relative to the DataView and the values range from 0-100%.

FIGURE 5.6 shows the difference between scale and percent reference styles. Channel 1's ReferenceStyle is set to Scale (Default) and Channel2's ReferenceStyle is set to Percent. When the Y-Axis is moved up and down, Channel 1 will move with it because it is reference to the Y-Axisvalues. Channel 2 will not move because it is referenced to the DataView which does not move.

iPlot1.Channel(0).DigitalReferenceStyle = ipdrScaleiPlot1.Channel(1).DigitalReferenceStyle = ipdrPercent

FIGURE 5.6Example showing a

ReferenceStyle Scalevs Percent.

If you need support for data that has more than two states and you need the vertical line transitions, see the Chapter 22 - Interpolation on theDifferential mode page 103.

Some compilers treat True as –1 or 1, so any value that is not zero (0) is treated as a Digital High or Logic = True .

Page 18 of 336 Iocomp Components – Plot Pack Manual

Page 31: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

OPCFIGURE 5.7 shows an example of the design-time property editor were the OPC options can be configured for each channel. FIGURE 5.8 Showsan example of data plotted from a Triangle-Wave OPC signal as shown configured in FIGURE 5.7. Set the OPCComputerName property to thename of the computer on the network were the OPC Server resides. Set the OPCServerName property to the name of the OPC Server. Set theOPCItemName property to the name of the item on the specific OPC Server. Set the OPCUpdateRate property to the number of millisecondsbetween desired updates. You can also setup the OPC configuration at runtime as shown below and then call the OPCActivate method toestablish the connection..

iPlot1.Channel(0).OPCComputerName = "\\DEV3"iPlot1.Channel(0).OPCServerName = "Matrikon.OPC.Simulation.1"iPlot1.Channel(0).OPCItemName = "Triangle Waves.Int1"iPlot1.Channel(0).OPCUpdateRate = 100iPlot1.Channel(0).OPCXValueSource = iopcxvsElapsedSecondsiPlot1.Channel(0).OPCActivate

FIGURE 5.7Example showing the property editor Channels OPC Tab.

FIGURE 5.8Example showing an OPC data using Elapsed Seconds.

The OPCXValueSource property allows you to specify the X-Value source. Table Table 5.2 shows the possible settings and their meanings.

X-Value Description

OPC Server Time StampWhen ever data is received, the X-Coordinate will be obtained from the OPC Server's Time Stamp. This is aDate Time Format using as the first X-Value day numerical representation of today. (example 37740)

System Time StampWhen ever data is received, the X-Coordinate will be obtained from the System Time Stamp. This is a DateTime Format using as the first X-Value day numerical representation of today. (example 37740)

Elapsed Time

When ever data is received, the X-Coordinate will be obtained from the time (In Date/Time Format, be sureto setup the X-Axis for Date/Time values)elapsed since the ResetElapsedStartTime procedure has beencalled. This is a Date Time Format using as the first X-Value day numerical representation of today.(example 0 days)

Elapsed Seconds

When ever data is received, the X-Coordinate will be obtained from the time elapsed (In Seconds, not inDate/Time format) since the ResetElapsedStartTime procedure has been called. The X-Value will start atzero seconds.

Table 5.2

Iocomp Components – Plot Pack Manual Page 19 of 336

Page 32: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Channel StatsIn FIGURE 5.9 shows the channel stats of the property editor. This is a Run-Time property editor page that give you the ability to view the statusof each channel. The view another channel you must select another channel the select the Refresh Button.

FIGURE 5.9Example showing theRun-Time Propertyeditor Channel Stats

Page.

For Table 5.3 the reference will be taken from the example before and from this operating system.

Title DescriptionPoint Count The number of data points already added to the channel.

Point CapacityThe number of data point space reserved in memory. Once the number of points exceed this amount the memory amount will increaseby 25 percent.

Memory Used This is the number of bytes of memory that is used to store channel data. X-Min Indicates the minimum X-Value of all data points stored in the channel.X-Max Indicates the maximum X-Value of all data points stored in the channel.X-Mean The average X-Value of all data points stored in the channel. Null and empty data points are not included in this calculation.Y-Min Indicates the minimum Y-Value of all data points stored in the channel.Y-Max Indicates the maximum Y-Value of all data points stored in the channel.Y-Mean The average Y-Value of all data points stored in the channel. Null and empty data points are not included in this calculation.Data Point Size Specifies the number of bytes used by each data point.

Max Data Points

Indicates the maximum number of data points that can be stored in the channel assuming the application/process has 2 GB of memoryavailable to it.You can find more information see Chapter 34 - Memory Utilization on page 164.

Table 5.3

If you open the run-time property editor and navigate to the channel’s tab, you will be able to access the Stats page which gives you currentPoint Count, Memory, and other important statistics about the selected channel.

File I/O FIGURE 5.10 shows the run-time property editor and FIGURE 5.11 shows the design-time property editor page for Channel File I/O. You willnotice that you can only Activate or Deactivate the logging at run-time. Also you can only Load or Save data at run-time. The saving of propertiesor setting the Log File parameters is available for both design-time and run-time. The data is saved to text format to achieve the maximumcompression and will be Tab or Comma deliminated as specified by the DataFileColumnSeparator property on the main interface. For theCompact Interval data style, there is a binary format available for greater compression and can be enable by setting the DataFileFormat propertyto ipdffCompactInterval. For all other data styles, the text format always achieves the greatest compression and speed.

FIGURE 5.10Example showing File I/O Run-Time Property Editor.

FIGURE 5.11Example showing File I/O Design-Time Property Editor.

LogBufferSize: The Log Buffer size should never be greater than the Ring Buffer size when the Ring buffer is enabled. If the Ring Buffer issmaller than the LogBufferSize, then data points will begin dropping off before they can be saved..

For more information see Chapter 24 - Loading and Saving Data on Page 107

Page 20 of 336 Iocomp Components – Plot Pack Manual

Page 33: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Data StylesBy default, the component is setup to utilize our Standard dataset type. This style of data allows for the storage of double-precision data, witheach data point having it’s own unique X,Y coordinate pair. This Standard Data set style also allows for the utilization of our extended featuressuch as Null Data Point Support, Empty Data Point Support, Individual Marker Hiding, and Individual Marker Styles.

There are also three other data styles to choose from based on your feature-memory requirements. In Table 5.4 is a chart showing each data stylewith their features and memory requirements...

FeaturesFull

FeatureStandard(Default)

Compact CompactInterval

Bytes Per Data Point 136 24 8 4Data Point Precision Double Double Single SingleMaximum # of Data Points (1.4GB Limit) 11 Meg 62 Meg 187 Meg 375 Meg

Unique Y (Per Data Point)Unique X (Per Data Point) Interval Spaced XTrace LineMarkersBarsFillDigitalInterpolationHigh/LowCandleStickNullsEmptiesIndividual Data Points ControlMarker Style (Only)Marker Show (Only)Marker Properties (All)Trace Line Properties (All)Bar Properties (All)Table 5.4

• Unique X: Each data point X-Value can be unique.• Interval Spaced X: Each data point X-Value is a multiple of an interval. The interval is automatically calculated when the first two data

points are added and is the difference in the X-Values. The first data points X-Value sets the reference start time and each subsequent X-Value is a multiple of the interval added to the reference start time.

• Unique Y: Each data point Y-Value can be unique.• Nulls: Each data point can be set to null to break the drawing.• Empties: Each data point can be set to an empty to ignore the data point.• Trace Line: Draws a line between each successive data point. • Markers: Draws a symbol, or character at each data point location.• Bars: Draws a rectangular bar from a reference to the Y-Value for the data point. • High/Low: Draws a High and Low bar and optional Open and Close bar.• Fill: Draws a filled area between a reference and the trace line (Trace line does not need to be visible). • Digital: Similar to a Trace line but only supports two discreet steps (Zero = Low and Not Zero = High). When there is a transition form

Low-High or High-Low, there is a vertical line drawn at the transition time as opposed to drawing a sloped line between the two differenttimes.

• Marker Style: Use DataMarkerStyle to set or get the marker style used to draw the marker for an individual data point(MarkersAllowIndividual must be True for the feature to work).

• Marker Show: Use DataMarkerShow specify whether a data marker is shown at a specified data point (MarkersAllowIndividual must beTrue for the feature to work).

• Marker Properties: Allows individual control of all Marker properties for each individual data point. Below is a list of all properties…• MarkerShow • MarkerSize • MarkerStyle • MarkerPenColor • MarkerPenWidth

• MarkerPenStyle • MarkerBrushColor• MarkerBrushStyle• MarkerCharacter

• Trace Line Properties: Allows individual control of all Trace Line properties for each individual data point. Below is a list of allproperties…

• TraceLineColor• TraceLineWidth

• TraceLineStyle

• Bar Properties: Allows individual control of all Bar properties for each individual data point. Below is a list of all properties…• BarVisible • BarReference • BarWidth • BarPenColor

• BarPenWidth • BarPenStyle • BarBrushColor• BarBrushStyle

Iocomp Components – Plot Pack Manual Page 21 of 336

Page 34: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Data Storage IssuesAttention needs to be paid to the precision when picking the appropriate DataStyle for your application. For Doubles, the precision capability is15 digits, and for Singles, the precision is 7 digits. If the range of numbers stored requires greater than 7-Digits, you will need to use the Standardor Full Feature data style which uses doubles for storing the actual values.

Precision: How Channel Data is Stored• Floating Point Types: Lets say you want to store the number 27982.6754372098421. A double would store it as

2.798267543720984 * 10 E4 with the last two digits “21” being dropped. A Single would store the number as 2.798267 * 10 E4with the last nine digits “543720984” being dropped. This may or may not be a problem depending on your applicationrequirements. The most likely case where it would be an issue is when using DateTime values on the X-Axis. Table 5.5 showshow various DateTime values would be stored in the Double and Single data type. When using the single data type, anythingbelow an hour interval would be truncated.

Absolute Date/TimesIncrement DateTime

(24-Hour)Actual

18-DigitDouble 15-Digit

Single 7-Digit

Start 4/26/03 10:11:53 37737.4249189814814 37737.4249189815 37737.421 Day 4/27/03 10:11:53 37738.4249189814814 37738.4249189815 37738.421 Hour 4/27/03 11:11:53 37738.4665856481481 37738.4665856482 37738.471 Minute 4/27/03 11:12:53 37738.4672800925925 37738.4672800926 37738.471 Second 4/27/03 11:12:54 37738.4672916666666 37738.4672916667 37738.47Table 5.5

• Extreme Numbers: Adding extreme numbers differences under doubles can lead to problems. Lets say you want to add2.345789 * 10 E 15 with 1.44356 * E-15. The resulting value would basically be the first number only.

Virtual Memory: If you will be using extremely large numbers of data points, you will need to investigate the total memory usage neededby your application and adjust your virtual memory settings in your operating system accordingly.

The Maximum # of Data Points quoted is a theoretical maximum assumes that your application uses 0KB of memory. Since this is not thecase, your actual maximum storage of data points will depend on the operating system limitations. In our research, the actual maximummemory that any component can utilize in a Windows 32-bit application is 1.3GB even though it is commonly stated as 2GB. Again,memory used by other parts of your application will affect this maximum value. Future versions of Windows may change this limitation.

Full Feature OptionsWhen the DataStyle is set to Full-Feature, many options become available for the types of charts you can display and the number of propertiesyou can modify per data point. Table 5.6 shows a listing of all properties that can be individually modified for each data point when the fullfeature mode is on. The examples in the remainder of this chapter shows examples of the various types of charts that can be generated using theFull-Feature DataStyle option.

Title DescriptionDataTraceLineColor Specifies the color of a specific trace line between two data points. DataTraceLineWidth Specifies the pen width used when drawing a specific channel trace line between two points.DataTraceLineStyle Specifies the line style of a specific channel trace line between two points.DataMarkerShow Sets whether a data marker is to be shown or not.DataMarkerShowing Sets whether a data marker is to be shown or not. also if the data marker is not on the DataView a false will be givenDataMarkerSize Specifies the size of a specific data point’s data marker.DataMarkerStyle Sets the style of a specific data marker shown in the channel.DataMarkerPenColor Specifies the pen color used to draw the data marker for a specific data point.DataMarkerPenWidth Specifies the pen width used when drawing the data marker of a specific data point.DataMarkerPenStyle Specifies the pen style used when drawing the data marker for a specific data point.DataMarkerBrushColor Specifies the brush color used to draw the data marker for a particular data point.DataMarkerBrushStyle Specifies the brush style used when drawing the data marker for a particular data point.DataMarkerCharacter Specifies the character displayed for a specific Data Marker.DataBarVisible Specifies whether the bar indicator for a specific data point in the channel is visible.DataBarReference Specifies reference on the Y-Axis for the specified Data Point Bar.DataBarWidth Specifies the bar width for the specified Data Point Bar.DataBarPenColor Specifies the pen color used when drawing the specified Data Point Bar.DataBarPenWidth Specifies the pen width used when drawing the specified Data Point Bar.DataBarPenStyle Specifies the pen style used when drawing the specified Data Point Bar.DataBarBrushColor Specifies the brush color used when drawing the specified Data Point Bar.DataBarBrushStyle Specifies the brush style used when drawing the specified Data Point Bar.Table 5.6

Page 22 of 336 Iocomp Components – Plot Pack Manual

Page 35: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

High/Low The High/Low Feature allows creating High/Low Charts which are typically used in financial applications. You also have the option ofdisplaying a Candle-Stick Chart by changing the HighLowStyle from OpenClose to CandleStick.

At a minimum, you must specify the High and Low values. Optionally, you can specify and show the Open and Close price. Use the AddHighLow method when adding data points. The AddHighLow method takes the following 5 parameters...

• X-Value• High• Low• Open (Optional – Set HighLowOpenShow to True to display)• Close (Optional – Set HighLowCloseShow to True to display)

High/Low OnlyFIGURE 5.12 shows an example of a High/Low Chart with the Open and Close not shown. For the High/Low feature to work, you must set theDataStyle of the Channel to Full-Feature.

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.YAxis(0).Span = 50

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "m/d"iPlot1.XAxis(0).Min = CDate("03/02/2003")iPlot1.XAxis(0).Span = 7

iPlot1.Channel(0).TraceVisible = False

iPlot1.Channel(0).HighLowEnabled = TrueiPlot1.Channel(0).HighLowBarColor = vbCyaniPlot1.Channel(0).HighLowBarWidth = 0.2iPlot1.Channel(0).HighLowCloseShow = FalseiPlot1.Channel(0).HighLowOpenShow = False

iPlot1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22iPlot1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32iPlot1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35iPlot1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31iPlot1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30

FIGURE 5.12Example showing High

and Low.

High/Low Open-CloseFIGURE 5.13 shows an example of a High/Low Chart with the Open and Close shown .

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.YAxis(0).Span = 50

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "m/d"iPlot1.XAxis(0).Min = CDate("03/02/2003")iPlot1.XAxis(0).Span = 7

iPlot1.Channel(0).TraceVisible = False

iPlot1.Channel(0).HighLowEnabled = TrueiPlot1.Channel(0).HighLowBarColor = vbCyaniPlot1.Channel(0).HighLowBarWidth = 0.2iPlot1.Channel(0).HighLowCloseShow = TrueiPlot1.Channel(0).HighLowOpenShow = True

iPlot1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22iPlot1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32iPlot1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35iPlot1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31iPlot1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30

FIGURE 5.13Example showing High,Low, Open and Close.

Iocomp Components – Plot Pack Manual Page 23 of 336

Page 36: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

High/Low CloseFIGURE 5.14 shows an example of a High/Low Chart with only the Close shown .

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.YAxis(0).Span = 50

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "m/d"iPlot1.XAxis(0).Min = CDate("03/02/2003")iPlot1.XAxis(0).Span = 7

iPlot1.Channel(0).TraceVisible = False

iPlot1.Channel(0).HighLowEnabled = TrueiPlot1.Channel(0).HighLowBarColor = vbCyaniPlot1.Channel(0).HighLowBarWidth = 0.2iPlot1.Channel(0).HighLowOpenShow = FalseiPlot1.Channel(0).HighLowCloseWidth = 0.25iPlot1.Channel(0).HighLowCloseHeight = 2

iPlot1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22iPlot1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32iPlot1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35iPlot1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31iPlot1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30

FIGURE 5.14Example showingHigh/Low Close.

High/Low Open-Close with Trace LineWhile showing the High/Low, you can also show a Trace-Line at the same time if you desire. You will need to separately set the Y-Value foreach data point. FIGURE 5.15 shows an example of a High/Low chart with a Trace-Line

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.YAxis(0).Span = 50

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "m/d"iPlot1.XAxis(0).Min = CDate("03/02/2003")iPlot1.XAxis(0).Span = 7

iPlot1.Channel(0).TraceVisible = True

iPlot1.Channel(0).HighLowEnabled = TrueiPlot1.Channel(0).HighLowBarColor = vbCyaniPlot1.Channel(0).HighLowBarWidth = 0.2iPlot1.Channel(0).HighLowOpenShow = FalseiPlot1.Channel(0).HighLowCloseWidth = 0.25iPlot1.Channel(0).HighLowCloseHeight = 2

iPlot1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22iPlot1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32iPlot1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35iPlot1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31iPlot1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30

iPlot1.Channel(0).DataY(0) = 22iPlot1.Channel(0).DataY(1) = 32iPlot1.Channel(0).DataY(1) = 35iPlot1.Channel(0).DataY(1) = 31iPlot1.Channel(0).DataY(1) = 30

FIGURE 5.15Example showing High,Low, Open and Close

Trace Line tracking eachclose.

Page 24 of 336 Iocomp Components – Plot Pack Manual

Page 37: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

CandlestickFIGURE 5.16 shows the Candle-Stick style for the High/Low Chart. The Candle-Stick Chart is typically used for financial or commodity tradingand each data point represents a single day of trading. The thin line represents the High and Low price for the day and the Bar represents the Openand Close price for the day. If the Close is greater than the Open, then the bar will be filled with the Bullish color which is green for this example.If the Close price is lower than the Open price, then the bar will be filled with the Bearish color which is red in this example.

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.YAxis(0).Span = 50

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "m/d"iPlot1.XAxis(0).Min = CDate("03/02/2003")iPlot1.XAxis(0).Span = 7

iPlot1.Channel(0).TraceVisible = FalseiPlot1.Channel(0).HighLowStyle = iphlsCandleStickiPlot1.Channel(0).HighLowEnabled = TrueiPlot1.Channel(0).HighLowBarColor = vbCyaniPlot1.Channel(0).HighLowBarWidth = 0.2iPlot1.Channel(0).HighLowBullishColor = vbGreeniPlot1.Channel(0).HighLowBearishColor = vbRediPlot1.Channel(0).HighLowShadowColor = vbYellow

iPlot1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22iPlot1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32iPlot1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35iPlot1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31iPlot1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30

FIGURE 5.16Example showing

Candlestick.

Multi-Colored TraceLineFIGURE 5.17 shows an example of how to change the color of each line segment. For the option to work, you must set the DataStyle to Full-Feature and turn off the FastDraw option. Use the DataTraceLineColor property to modify each segment. Each line segment is made of twopoints and you must specify the Index of the last point to modify the segment.

MyColors (0) = vbRedMyColors (1) = vbBlueMyColors (2) = vbYellowMyColors (3) = vbMagentaMyColors (4) = vbGreenMyColors (5) = vbWhiteMyColors (6) = vbRedMyColors (7) = vbBlueMyColors (8) = vbYellowMyColors (9) = vbMagentaMyColors(10) = vbGreen

iPlot1.Channel(0).DataStyle = ipdsFullFeature iPlot1.Channel(0).FastDrawEnabled = FalseiPlot1.Channel(0).TraceLineWidth = 3

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataTraceLineColor(X) = MyColors(X)Next X

FIGURE 5.17Example showing

Multi-Colored TraceLine.

Multi-Width TraceLineFIGURE 5.18 shows an example of how to change the width of each line segment. For the option to work, you must set the DataStyle to Full-Feature and turn off the FastDraw option. Use the DataTraceLineWidth property to modify each segment. Each line segment is made of twopoints and you must specify the Index of the last point to modify the segment.

MyWidths (0) = 1MyWidths (1) = 1MyWidths (2) = 1MyWidths (3) = 1MyWidths (4) = 7MyWidths (5) = 7MyWidths (6) = 7MyWidths (7) = 1MyWidths (8) = 1MyWidths (9) = 1MyWidths(10) = 1 iPlot1.Channel(0).DataStyle = ipdsFullFeature iPlot1.Channel(0).FastDrawEnabled = False For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataTraceLineWidth(X) = MyWidths(X)Next X

FIGURE 5.18Example showingMulti-Width Trace

Line.

Iocomp Components – Plot Pack Manual Page 25 of 336

Page 38: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Multi-TraceLineStyles FIGURE 5.19 shows an example of how to change the line style of each line segment. For the option to work, you must set the DataStyle to Full-Feature and turn off the FastDraw option. Use the DataTraceLineStyle property to modify each segment. Each line segment is made of two pointsand you must specify the Index of the last point to modify the segment.

MyTrace (0) = iplsSolidMyTrace (1) = iplsDashMyTrace (2) = iplsDotMyTrace (3) = iplsDashDotMyTrace (4) = iplsDashDotDotMyTrace (5) = iplsSolidMyTrace (6) = iplsDashMyTrace (7) = iplsDotMyTrace (8) = iplsDashDotMyTrace (9) = iplsDashDotDotMyTrace(10) = iplsSolid

iPlot1.Channel(0).DataStyle = ipdsFullFeature iPlot1.Channel(0).FastDrawEnabled = False

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataTraceLineStyle(X) = MyTrace(X)Next X

FIGURE 5.19Example showing

Multi-TraceLineStyles.

Multi-Colored MarkersFIGURE 5.20 shows an example of how to change the color of each individual data pointer marker. For the option to work, you must set theDataStyle to Full-Feature, MarkersAllowIndividual to True, MarkersBrushUseChannelColor to False, and the MarkersPenUseChannelColor toFalse. Use the DataMarkerBrushColor and DataMarkerPenColor properties to specify the colors used by each individual marker passing the Indexof the Marker you wish to modify.

MyColors (0) = vbRedMyColors (1) = vbBlueMyColors (2) = vbYellowMyColors (3) = vbMagentaMyColors (4) = vbGreenMyColors (5) = vbWhiteMyColors (6) = vbRedMyColors (7) = vbBlueMyColors (8) = vbYellowMyColors (9) = vbMagentaMyColors(10) = vbGreen iPlot1.Channel(0).DataStyle = ipdsFullFeature iPlot1.Channel(0).MarkersSize = 5iPlot1.Channel(0).MarkersBrushUseChannelColor = FalseiPlot1.Channel(0).MarkersPenUseChannelColor = FalseiPlot1.Channel(0).MarkersVisible = TrueiPlot1.Channel(0).MarkersAllowIndividual = True For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataMarkerBrushColor(X) = MyColors(X) iPlot1.Channel(0).DataMarkerPenColor(X) = MyColors(X)Next X

FIGURE 5.20Example showing Multi-

Colored Markers.

Page 26 of 336 Iocomp Components – Plot Pack Manual

Page 39: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Multi-Shaped MarkersFIGURE 5.21 shows an example of how to change the shape of each individual data pointer marker. For the option to work, you must set theDataStyle to Full-Feature and MarkersAllowIndividual to True. Use the DataMarkerStyle property to specify the style used by each individualmarker passing the Index of the Marker you wish to modify.

MyShapes (0) = ipmsCircleMyShapes (1) = ipmsSquareMyShapes (2) = ipmsDiamondMyShapes (3) = ipmsCrossMyShapes (4) = ipmsPlusMyShapes (5) = ipmsTriangleUpMyShapes (6) = ipmsTriangleDownMyShapes (7) = ipmsTriangleLeftMyShapes (8) = ipmsTriangleRightMyShapes (9) = ipmsCharacterMyShapes(10) = ipmsCircle iPlot1.Channel(0).DataStyle = ipdsFullFeature iPlot1.Channel(0).MarkersPenWidth = 2iPlot1.Channel(0).MarkersSize = 5iPlot1.Channel(0).MarkersBrushUseChannelColor = FalseiPlot1.Channel(0).MarkersPenUseChannelColor = FalseiPlot1.Channel(0).MarkersBrushColor = vbWhiteiPlot1.Channel(0).MarkersPenColor = vbWhiteiPlot1.Channel(0).MarkersAllowIndividual = TrueiPlot1.Channel(0).MarkersVisible = True

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataMarkerStyle(X) = MyShapes(X)Next X

FIGURE 5.21Example showing Multi-

Shaped Markers.

Multi-Character MarkersFIGURE 5.22 shows an example of how to change the character used for each individual data pointer marker. For the option to work, you mustset the DataStyle to Full-Feature. Use the DataMarkerCharacter property to specify the character code used by each individual marker passing theIndex of the Marker you wish to modify.

iPlot1.XAxis(0).Span = 10iPlot1.Channel(0).DataStyle = ipdsFullFeatureiPlot1.Channel(0).MarkersVisible = TrueiPlot1.Channel(0).MarkersStyle = ipmsCharacteriPlot1.Channel(0).MarkersFont.Name = "Wingdings"iPlot1.Channel(0).MarkersFont.Size = 14

iPlot1.Channel(0).AddXY 1, 20iPlot1.Channel(0).AddXY 3, 50iPlot1.Channel(0).AddXY 5, 40iPlot1.Channel(0).AddXY 7, 60iPlot1.Channel(0).AddXY 9, 10

iPlot1.Channel(0).DataMarkerCharacter(0) = Chr(129)iPlot1.Channel(0).DataMarkerCharacter(1) = Chr(130)iPlot1.Channel(0).DataMarkerCharacter(2) = Chr(131)iPlot1.Channel(0).DataMarkerCharacter(3) = Chr(132)iPlot1.Channel(0).DataMarkerCharacter(4) = Chr(133)

FIGURE 5.22Example showing Multi-

Character Markers.

Multi-Colored BarsFIGURE 5.23 shows an example of how to change the color of an individual bar. For the option to work, you must set the DataStyle to Full-Feature. Use the DataBarBrushColor and DataBarPenColor property to specify the color of each individual bar by passing the Index of the baryou wish to modify.

MyColors (0) = vbRedMyColors (1) = vbBlueMyColors (2) = vbYellowMyColors (3) = vbMagentaMyColors (4) = vbGreenMyColors (5) = vbWhiteMyColors (6) = vbRedMyColors (7) = vbBlueMyColors (8) = vbYellowMyColors (9) = vbMagentaMyColors(10) = vbGreen

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.Channel(0).TraceVisible = FalseiPlot1.Channel(0).BarEnabled = TrueiPlot1.Channel(0).BarWidth = 0.5iPlot1.Channel(0).BarBrushUseChannelColor = FalseiPlot1.Channel(0).BarPenUseChannelColor = False

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 45 iPlot1.Channel(0).DataBarBrushColor(X) = MyColors(X) iPlot1.Channel(0).DataBarPenColor(X) = MyColors(X)Next X

FIGURE 5.23Example showing Multi-

Colored Bars.

Iocomp Components – Plot Pack Manual Page 27 of 336

Page 40: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 5 - Channels

Multi-Reference BarsFIGURE 5.24 shows an example of how to change the reference for each individual bar. For the option to work, you must set the DataStyle toFull-Feature. Use the DataBarReference property to specify the reference for each individual bar by passing the Index of the bar you wish tomodify.

MyReference (0) = Rnd(1) * 25 + 10MyReference (1) = Rnd(1) * 25 + 10MyReference (2) = Rnd(1) * 25 + 10MyReference (3) = Rnd(1) * 25 + 10MyReference (4) = Rnd(1) * 25 + 10MyReference (5) = Rnd(1) * 25 + 10MyReference (6) = Rnd(1) * 25 + 10MyReference (7) = Rnd(1) * 25 + 10MyReference (8) = Rnd(1) * 25 + 10MyReference (9) = Rnd(1) * 25 + 10MyReference(10) = Rnd(1) * 25 + 10

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.Channel(0).TraceVisible = FalseiPlot1.Channel(0).BarEnabled = TrueiPlot1.Channel(0).BarWidth = 0.5

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 40 iPlot1.Channel(0).DataBarReference(X) = MyReference(X)Next X

FIGURE 5.24Example showing

Multi-Reference Bars.

Multi-Width BarsFIGURE 5.25 shows an example of how to change the width for each individual bar. For the option to work, you must set the DataStyle to Full-Feature. Use the DataBarWidth property to specify the width for each individual bar by passing the Index of the bar you wish to modify.

MyWidth (0) = 0.2MyWidth (1) = 0.6MyWidth (2) = 0.3MyWidth (3) = 0.7MyWidth (4) = 0.1MyWidth (5) = 0.4MyWidth (6) = 0.5MyWidth (7) = 0.8MyWidth (8) = 0.4MyWidth (9) = 0.9MyWidth(10) = 0.2

iPlot1.Channel(0).DataStyle = ipdsFullFeature

iPlot1.Channel(0).TraceVisible = FalseiPlot1.Channel(0).BarEnabled = True

For X = 0 To 10 iPlot1.Channel(0).AddXY X, Rnd(1) * 50 + 25 iPlot1.Channel(0).DataBarWidth(X) = MyWidth(X)Next X

FIGURE 5.25Example showingMulti-Width Bars.

Page 28 of 336 Iocomp Components – Plot Pack Manual

Page 41: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 6 - Data View

Chapter 6 - Data View

The Data View located in the center of the plot and is the area were all data is displayed. The Data View can display data points, trend lines, data cursors,limits, annotations, grid lines, and etc. The Data View does not actual contain any of the data, it just provides the area where it is drawn.

The Data Views only purpose other than providing an area for the data to be drawn is to control how the grid lines are appear. The majority of the propertiesfor the grid lines are found on the Data View. The remainder of the properties that affect the grid lines can be found on the Axis object.

Currently, only one Data View is available even though the main interface supports adding additional ones. When referring to the Data View through code,use an index of zero to specify the first Data View (ex iPlot1.DataView(0).xxx).

FIGURE 6.1The DataView

object where all channels, limits,annotations, and

Cartesian axes aredrawn.

Enabled PropertyThe Enabled property specifies if the Data View will accept keyboard and mouse events. When the Data View is Enabled, the user is able to selectthe Data View by left-clicking it, activate the pop up menu by right-clicking it, or to scroll or zoom the view using the mouse or keyboard whenthe Axes Control feature is enabled.

PopupEnabled PropertyThe PopupEnabled property specifies if the user is allowed to right-click on the Data View to activate the pop up menu. If the Enabled property ofthe Data View is set to FALSE, the pop up menu will be disabled and this property will have no affect. Currently, the Data View pop up menuonly provides a single menu item call “Edit” which allows the user to edit the Data View through the runtime property editor.

AxesControl Feature The Axes Control feature allows the user to scroll or zoom the view using the mouse or wheel. To enabled the Axes Control feature, set theAxesControlEnabled property to TRUE. There are separate properties for specifying which axes the mouse and wheel have an effect on. TheAxesControlMouseStyle and AxesControlWheelStyle can be set to X-Axis, Y-Axis or both. By default, the Mouse style is set to Both and theWheel style is set to X-Axis. See Chapter 23 - User Interface Control page 104 for more information regarding Shift and CTRL key modifiers.

Background FeatureThe background properties control whether the background is filled in and if so, what color is used. Set the BackgroundTransparent property to false to fill in the background and use the BackgroundColor property to specify which color is used.

Layer PropertyThe Layer property controls the drawing order of the grid in relation to all other plot objects. The layer property will not have an effect on theBackground of the grid which is always drawn behind all other plot objects. See Chapter 29 - Layer Control page 154 for more details on layering control.

Iocomp Components – Plot Pack Manual Page 29 of 336

Page 42: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 6 - Data View

Grid FeatureThere are numerous properties to control the look of the grid. By default, the grid is shown with outer border lines and X&Y Axis major lines.The X&Y axis minor lines are hidden by default.

To hide or show the outer border lines, use the the GridLineShowLeft, GridLineShowRight, GridLineShowTop, and GridLineShowBottomproperties. The color of the outer grid lines is controlled by the GridLineColor property.

To hide or show the X&Y axis major lines, use the GridLineShowXMajors and GridLineShowYMajors properties.

To hide or show the X&Y axis minor lines, use the GridLineShowXMinors and GridLineShowYMinors properties. To control the number ofminor lines, set the MinorCount property on the corresponding X-Axis.

To hide the entire grid, set the GridShow property to FALSE. To hide all X-Axis or Y-Axis lines, set the GridXAxisName or GridYAxisNameproperty to “<NONE>”.

Use the GridLineColor, GridLineMajorStyle, and GridLineMinorStyle properties to change the overall appearance of the grid lines. If you needfiner control of the X&Y Axis grid line properties, use the properties listed in Table 6.1. The custom property for each group must be set to TRUEfor the corresponding properties to have an affect. If the custom is set to FALSE, then the overall properties mentioned above will control theappearance.

X-Major X-Minor Y-Major Y-MinorGridLineXMajorCustom GridLineXMinorCustom GridLineYMajorCustom GridLineYMinorCustomGridLineXMajorColor GridLineXMinorColor GridLineYMajorColor GridLineYMinorColorGridLineXMajorWidth GridLineXMinorWidth GridLineYMajorWidth GridLineYMinorWidthGridLineXMajorStyle GridLineXMinorStyle GridLineYMajorStyle GridLineYMinorStyleTable 6.1

By default, the Y-Axis grid lines will only be drawn for a single Y-Axis even if you have more than one Y-Axis. To show Y-Axis grid lines forall Y-Axes, set the GridYAxisName property to “<All>”. The same applies for the X-Axes and use the GridXAxisName property to achieve thesame affect. By default, if an Axis is setup to draw its grid lines in the Data View and the Axis is not visible, the grid lines for the axis will still be drawn. Ifyou do not want the grid lines drawn when the Axis is not visible, set the GridLinesVisible property to FALSE on the corresponding Axis object.

If you need to draw grid lines that match up with all Axes or that scroll independently with their associated Axes, utilize the special “<All>”axis which will instruct the grid lines to be drawn for all visible Axes of that type. For example, if you are stacking three Y-Axes, you willprobably want the horizontal grid lines to match up with the major ticks of each axis. To do this, simply set the GridYAxisName property ofthe DataView object to “<All>”.

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

The next section below shows many different views the developer can design for the DataView. In FIGURE 6.2 shows the DataViewwith no grid lines and in FIGURE 6.3 shows the DataView with outer grid lines. In FIGURE 6.4 Shows the default DataView option,and in FIGURE 6.5 shows the DataView solid major and dotted minor grid lines.

FIGURE 6.2The DataView object with no grid Lines.

FIGURE 6.3The DataView object with only outer grid lines.

FIGURE 6.4The DataView object default grid lines.

FIGURE 6.5The DataView object with Major and Minor grid lines.

Page 30 of 336 Iocomp Components – Plot Pack Manual

Page 43: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 6 - Data View

In FIGURE 6.6 the DataView grid lines are set to dashed, and in FIGURE 6.7 the major grid lines are yellow and solid and the minorgrid are dotted.

FIGURE 6.6The DataView object with dotted Major grid lines.

FIGURE 6.7The DataView object with yellow solid Major and yellow dotted

Minor grid lines.

In FIGURE 6.8 the DataView major grid lines are red/solid and the minor grid lines are green/dashed, and in FIGURE 6.9 theDataView has no grid lines and the background is set to teal.

FIGURE 6.8The DataView object with Red solid Major and green dotted

Minor grid lines..

FIGURE 6.9The DataView object with no grid lines and the background is set

to teal.

In FIGURE 6.10 the DataView major and minor grid lines are lime and solid and the background is set to transparent, and in FIGURE6.11 the DataView has only Y-Axis Major grid lines that are set to solid and lime and the background is set to transparent.

FIGURE 6.10The DataView object with the background set to transparent and

solid Major and Minor grid lines.

FIGURE 6.11The DataView object with the background set to transparent and

Y-Axis Majors set to solid.

Iocomp Components – Plot Pack Manual Page 31 of 336

Page 44: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

Chapter 7 - Axes

The Axes Plot Object refers to both the X-Axis and Y-Axis Plot Objects. You need to have at least one X-Axis and one Y-Axis to be able to display data inthe chart. Every channel that contains data will need 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 a visual display of the X-Axis and Y-Axis scales, but aredynamic in that they allow the user to scroll the plot data that is displayed, zoom in and out, and otherwise have complete control over the data displayed inthe chart even while you are adding data in real-time! The Axes also have built-in scrolling and scaling capabilities that make implementing a veryprofessional chart very easy. This automated scrolling 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.

FIGURE 7.1Plot Pack Layout

Manager Showing Xand Y-Axis Objects

To move, resize, and stack axes and other plot objects show above, refer to the chapter entitled “Visual Layout Manager” for moreinformation about using the Visual Layout Manager. If you need to dynamically modify the chart layout at runtime or through your programcode, refer to the chapter entitled “Layout Control Through Code”

The Plot components support an unlimited number of X-Axes and Y-Axes. Each channel, however, can only be associated with one X-Axis and one Y-Axisat any one time.

Below you will find explanations of some of the features supported by Axis object…

SpanTo set the breadth or range of values that are displayed on the axis, set the Span property. The Span property specifies the value displayedbetween the min and maximum values of the axis. For example, if you wish the axis to display 1000 units of data, set the Span property to 1000.If the user scrolls the axis, they are modifying the Min property of the scale, but the span will always be constant. If the user zooms the axis, thenthe Span value will change,

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

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

iPlot1.YAxis(0).Min = 10

MaxValue = iPlot1.YAxis(0).Max 'Max is a read-only value

...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...Maximum Value: +1x10300 or +1E300Minimum Value: -1x10300 or -1E300Data Precision: 15 digits

Rotated AxesThe X and Y-Axes can be rotated so that you can plot both horizontally and vertically based upon your application needs. Refer to the VisualLayout Manager chapter for more information or use the XYAxesReverse property from the main plot component interface.

iPlot1.XYAxesReverse = True

Page 32 of 336 Iocomp Components – Plot Pack Manual

Page 45: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

You can easily rotate the X and Y-Axes without using code in your application by using the Visual Layout Manager inside of our customproperty editor. See Chapter 15 - Visual Layout Manager page 75 for more information.

Desired StartUse DesiredStart to get or set the desired start for the axis scale. This property 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 the first label to start at 9. Setting this value to 9 will instruct the Axis to start the first major tick on 9and then follow the DesiredIncrement property for all further major ticks if specified or it will use the 1-2-5 Rule for all remaining labels.

Desired IncrementUse DesiredIncrement to get or set the desired increment for the axis scale. If this property is set to 0, then the AutoScale feature of the axis scalewill automatically adjust the scale to follow a 1-2-5 rule, which ensures that the scale major ticks and labels fall along "human-readable" wholenumbers 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 property settings.

If this property is greater than zero, the AutoScale feature will attempt to create a scale using your increment values depending on your spanproperty settings, adding major ticks and labels that will fit in the area used by the scale. If the AutoScale finds that not all of the labels will fit inthe scale area (depends on your font properties), then it will default back to the 1-2-5 Rule.

For example, if you want the scale to increment by values of "2.5", and your min and span properties are 0 and 50, then the AutoScale code willattempt 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 the space allocated to thescale, it will attempt to fit as many labels as possible using the 1-2-5 rule.

Label FormatsAll 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

Price32nds 100.231

Price32nds is for use in the Bond and Securities Market. The value is displayed where 23 is in 32nds and 1 is in 256ths. Therefore, indecimal the price above is: 100 +23/32 + 1/256 = 100.72265625. Pass the actual double value of 100.72265625 to display it as Price32nds format as 100.231 to your application end-user..

Reverse ScalesAll Axes can be reversed. By default, the axes increase in value from left to right or bottom to top. This can be reversed by setting theReverseScale property to True.

iPlot1.XAxis(0).ReverseScale = True

Master UI InputUse MasterUIInput property to set this axis to be the Master User Interface for all axes of this type.

For example, let’s say you have three Y-Axes, if you set this property to TRUE on the first Y Axis, then all UI (User Input, such as mouse orkeyboard input) on that axis will 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 thesame type).

This is useful if you want the scrolling action of one axis to be synchronized with all other axes of the same type. If you want all Axes of thesame type to be synchronized, set this property to TRUE on all of them. If you want all Axes to be independent, set this property to FALSE on allof them.

Iocomp Components – Plot Pack Manual Page 33 of 336

Page 46: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

Axes EnabledThe Axis Enabled is used to enable or disable the User Interface of an Axis Plot Object. FIGURE 7.2 below shows the user sliding the DataViewalong the X-Axis and in FIGURE 7.3 the Enabled was set to False and the user can not interface with the X-Axis.

FIGURE 7.2Example of scrolling X-Axis Enabled

FIGURE 7.3Example non Scrolling X-Axis not Enabled.

Labels Default /Cursor/Legend TabsThe Default Tab of the property editor helps the user to set the label setting for the Axis. The Cursor and Legend label tabs are settings that can beset individually or both can be set the same default setting of the Axis by choosing the Use Default Format or copied by using the copy button. See Chapter 12 - Data Cursors page 53 and Chapter 8 - Legend page 42 for more information.

FIGURE 7.4Example of Log

base 10 andReversed Scales.

Scale TypesAll Axes support the following scale types…

LinearThis is the standard type of scale that most programmers will use in their charts. Scales can range from values between ±1x10-300 to ±1x10300

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

You can use the ZoomToFit method or the right-click, context-sensitive menu on the axis to zoom all the channel data on that axis to fit theviewable area of the component.

Page 34 of 336 Iocomp Components – Plot Pack Manual

Page 47: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

LabelSeparationUse LabelSeparation to get or set the minimum separation between scale labels. LabelSeparation represents the percentage of a character size andis based on the LabelsFont used for the axis. A value 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).

Below in FIGURE 7.5 shows the LabelSeparation property set to 2 for both axes, and in FIGURE 7.6 shows the LabelSeparation property set to10. The difference between the two figures is the spacing of the LabelSeparation property and how it effects the layout

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

FIGURE 7.5Example showing the how the LabelSeparation property = 2.

FIGURE 7.6Example showing the how the LabelSeparation property = 10.

LabelsMarginUse LabelsMargin to get or set the spacing between the major tick and major tick labels. LabelsMargin represents the percentage of a charactersize and is based on the LabelsFont used for the axis. A value of 0.5 is equal to half the size of a character. In FIGURE 7.7 the LabelsMarginproperty is set to 0.5, and in FIGURE 7.8 the LabelsMargin property is set to 10. The difference between the two figures is the spacing of theLabelsMargin property and how it effects the layout

iPlot1.XAxis(0).LabelsMargin = 0.5 iPlot1.XAxis(0).LabelsMargin = 2.0 iPlot1.YAxis(0).LabelsMargin = 0.5 iPlot1.YAxis(0).LabelsMargin = 2.0

FIGURE 7.7Example showing the LabelsMargin property = 0.5.

FIGURE 7.8Example showing the LabelsMargin property = 2.0.

Iocomp Components – Plot Pack Manual Page 35 of 336

Page 48: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

LabelsMinLengthUse LabelsMinLength to get or set the minimum label length used in calculating the number of scale labels (Major Ticks) during AutoScale forhorizontal layout objects.

For vertical layout objects, this is used in calculating the minimum width of the layout object. Set this value larger to ensure that the verticallayout object is of a minimum width to accommodate larger 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 min length to 4 so that when the top of the scale goes down to three digits, the width is kept at fourdigits.

AutoScale automatically calculates the number of scale labels based on the LabelsFont, LabelSeparation, and LabelsMinLength properties toensure labels that are in a human readable format (1-2-5 Rule). In FIGURE 7.9 the LabelsMinLength property is set to 5 for both Axes, and inFIGURE 7.10 the LabelsMinLength property is set to 10. The difference between the two figures is the spacing of the LabelsMinLength propertyand how it effects the layout.

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

FIGURE 7.9Example showing how the LabelsMinLength property = 5.

FIGURE 7.10Example showing how the LabelsMinLength property = 10.

All margins use units of characters. This allows the component to dynamically adjust the scales based upon the font used instead of usingrigid pixel specifications. A value of 0.25 would be equivalent to ¼ the size (width or height, depending on if the margin relates to ahorizontal or vertical margin) of a single character from the font being used in the layout object.

LabelsMinLengthAutoAdjustUse LabelsMinLengthAutoAdjust to specify whether the LabelsMinLength property is automatically adjusted as the minimum required labellength increases.

While plotting, or user scrolling/zooming, the actual minimum label length may become greater than the LabelsMinLength property value. Thiswill result it the axis growing in size to accommodate the wider label. If the plotting data or user changes the displayed data causing the labelwidth to vary, it may cause an annoying oscillation of the display plot objects sizes. To prevent this oscillation, set this property to TRUE.

iPlot1.XAxis(0).LabelsMinLengthAutoAdjust = True

Page 36 of 336 Iocomp Components – Plot Pack Manual

Page 49: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

StackingEndsMarginUse StackingEndsMargin to get or set the margin at the end of the axis when stacked. StackingEndsMargin represents the percentage of acharacter size and is based on the LabelFont used for the axis. A value of 0.5 is equal to half the size of a character. The total spacing is 0.5characters in this example, with the StackingEndsMargin values being cumulative. The StackingEndsMargin will have no effect on the ends ofthe axes unless they touch another axis. The Stacking Ends Margin allocates additional space to separate the two stacked axes.

Note : That this feature currently only supports the Axes layout objects. Also note that the stacking margin only applies to layout objects thattouch each other and only affects the ends that touch.

In FIGURE 7.11 the StackingEndsMargin property is set to 0.5 for X and Y Axes, and in FIGURE 7.12 the StackingEndsMargin property is setto 5.0. The difference between the two figures is the spacing of the StackingEndsMargin property and how it effects the layout.

iPlot1.XAxis(0).StackingEndsMargin = 0.5 iPlot1.XAxis(0).StackingEndsMargin = 5.0iPlot1.XAxis(1).StackingEndsMargin = 0.5 iPlot1.XAxis(1).StackingEndsMargin = 5.0iPlot1.YAxis(0).StackingEndsMargin = 0.5 iPlot1.YAxis(0).StackingEndsMargin = 5.0iPlot1.YAxis(1).StackingEndsMargin = 0.5 iPlot1.YAxis(1).StackingEndsMargin = 5.0

FIGURE 7.11Example showing how the StackingEndsMargin property = 0.5.

FIGURE 7.12Example showing how the StackingEndsMargin property = 5.0.

Force StackingNormally, with stacked axes, the axes on the outer edges (Top and Bottom Y-Axes as shown below) of the stack behave differently than the axeson the inner part of the stack. The StackingEndsMargin property, for example, doesn't affect the ends of these "outer" axes. Setting this propertyto TRUE forces the ends of these axes to respond to such properties and other factors that affect stacked axes.

In FIGURE 7.13 3 Y-Axes are stacked, and in FIGURE 7.14 3 Y-Axes are stacked using the ForceStacking property. The difference between thetwo figures is the equal spacing of the Y-Axes in the DataView when using the ForceStacking property and how it effects the layout.

iPlot1.XAxis(0).ForceStacking = False iPlot1.XAxis(0).ForceStacking = TrueiPlot1.XAxis(1).ForceStacking = False iPlot1.XAxis(1).ForceStacking = TrueiPlot1.XAxis(2).ForceStacking = False iPlot1.XAxis(2).ForceStacking = True

FIGURE 7.13Example showing Stacking Y-Axes.

FIGURE 7.14Example showing the Stacking Y-Axes (ForceStacking).

TrackingTracking refers to the Auto-Scale and Auto-Scroll features of the axes. The axes have the capability to adjust their scales and scroll dynamicallyat runtime according to several properties that you setup. This makes it easy to implement a chart that looks and functions the way that you wouldlike without complex coding on your part. See Chapter 19 - Tracking page 94 for more information.

User InterfaceBy default, the component is setup to allow scrolling and zooming of the axes by your application user. The application user is also able to editthe axis properties either through a pop up menu or through the run-time menu button on the ToolBar. You can control the user interface by usingthe Enabled and PopupEnabled properties of the axes to control whether the user can scroll/zoom or be able to bring up the pop up menu for theaxis to edit properties of that axis.

Iocomp Components – Plot Pack Manual Page 37 of 336

Page 50: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

If you are using stacked axes, you may notice that the grid appears to be drawn funny in the DataView area. To fix this, assign the grid to thespecial value “<All>” so that major ticks for all axes are used to draw the grid lines.e.g.

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

Axis GridLinesVisibleThe GridLinesVisible property allows you to specify if the grid lines are visible for a specific axes.

iPlot1.XAxis(0).GridLinesVisible = False

FIGURE 7.15Example X-Axis

GridLinesVisible =False.

Axis VisibleThe Axis Visible option give the designer the choice on viewing one of the axis, all, or none at all.

iPlot1.XAxis(0).Visible = False

FIGURE 7.16Example of No

X-Axis

AlignRefAxisNameThe section deals with the Axis Alignment to another Axis. As shown in FIGURE 7.17 below Y-Axis 3 is aligned to the same size as Y-Axis 2 inthe Layout Manager of the property Editor. At Run-Time as in FIGURE 7.18 below Y-Axis-3 is not the same size as Y-Axis-2.

FIGURE 7.17Example of moving Axes on the Layout Manager Tab.

FIGURE 7.18Example of Y-Axis 3 is not Aligned to Y-Axis 2

Page 38 of 336 Iocomp Components – Plot Pack Manual

Page 51: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

To set the Y-Axis-3 to the same size as Y-Axis-2 got to the Y-Axis Scale Tab and select Y-Axis-3 then set Align Ref Axis Name Y-Axis-2 as inthe FIGURE 7.19 , or set through code .Specifies the axis name to which this axis will align it's tick marks and scale to. In FIGURE 7.20 is anexample of the Y-Axis-3 aligned to Y-Axis-2.

iPlot1.YAxis(3).AlignRefAxisName = iPlot1.YAxis(2).Name

FIGURE 7.19Example of Property Editor for Align Ref Axis Name.

FIGURE 7.20Example of Reference Axis Name.

Scale FactorUse CursorScaler to get or set the desired scaler for the cursor associated with this axis scale. CursorScaler is only used with cursors that havetheir Style property set to InverseDeltaX, typically used for frequency calculations. The Scaler is a multiplier used to convert this axis' units toseconds format so that the cursor can properly display the frequency calculation.

For example, if the axis units are ms (milliseconds or 1/1,000th of a second), then you would need to set the Scaler to 1,000 to convert from ms toseconds. If the units are µs (microseconds or 1/1,000,000th of a second), then the Scaler should be set to 1,000,000 to convert from µs toseconds. If your units are already in seconds on this axis, then you should set the Scaler to 1.

FIGURE 7.21Example of Scale

Factor.

Iocomp Components – Plot Pack Manual Page 39 of 336

Page 52: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

Customizing Tick LabelsThe X and Y Axis scales are automatically configured for you using the AutoScale and AutoLabel (1-2-5 Rule) features of the Plot Components.However, you may wish to customize all 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 the OnXAxisCustomizeLabel event. This event willfire each time a label above is painted on the X-Axis, 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 Label variable which will then be displayed in place of theoriginal value.

FIGURE 7.22Example of

Customizing TickLabels.

Const SmallAmount = 0.000000000001

If (Value < ( 0 + SmallAmount)) And (Value > ( 0 - SmallAmount)) Then ALabel = "Zero"If (Value < ( 2 + SmallAmount)) And (Value > ( 2 - SmallAmount)) Then ALabel = "Two"If (Value < ( 4 + SmallAmount)) And (Value > ( 4 - SmallAmount)) Then ALabel = "Four"If (Value < ( 6 + SmallAmount)) And (Value > ( 6 - SmallAmount)) Then ALabel = "Six"If (Value < ( 8 + SmallAmount)) And (Value > ( 8 - SmallAmount)) Then ALabel = "Eight"If (Value < (10 + SmallAmount)) And (Value > (10 - SmallAmount)) Then ALabel = "Ten"

Notice that the value passed in this event is a Double, or floating point value. Since floating point values are not stored as exact numbers inthe computer, you cannot simply check to see if a floating point value is equal to a particular number. You have to see if it is "near" thenumber you desire. This is why the above if statements + and – 1E-13, which represents the amount of fluctuation that we would be requiredfor the number not to equal the value we are checking.

The next type of customizing Labels deal with the specifying of each label for the Axis. When using this type of custom labels, you will probablywant to disable user scrolling of the axis because the labels are only defined for a certain range and the user would be able to scroll beyond thelabels (Set the Enabled to False to prevent scrolling) . To enable this feature, set the TickListCustom property to True and use the TickListAddmethod to add each label. If you need to clear the items from the custom Tick-List, call the TickListClear method. FIGURE 7.23 shows anexample on how to modify the X-Axis labels using the Tick-List-Custom feature.

FIGURE 7.23Example of

Customizing X-Axiswith Characters.

Page 40 of 336 Iocomp Components – Plot Pack Manual

Page 53: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 7 - Axes

iPlot1.XAxis(0).LabelsFont.Name = "Wingdings"iPlot1.XAxis(0).LabelsFont.Size = 16iPlot1.XAxis(0).TickListCustom = TrueiPlot1.XAxis(0).Enabled = False

iPlot1.XAxis(0).TickListAdd 0, Chr(128), ipttMajoriPlot1.XAxis(0).TickListAdd 1, Chr(129), ipttMajoriPlot1.XAxis(0).TickListAdd 2, Chr(130), ipttMajoriPlot1.XAxis(0).TickListAdd 3, Chr(131), ipttMajoriPlot1.XAxis(0).TickListAdd 4, Chr(132), ipttMajoriPlot1.XAxis(0).TickListAdd 5, Chr(133), ipttMajoriPlot1.XAxis(0).TickListAdd 6, Chr(134), ipttMajoriPlot1.XAxis(0).TickListAdd 7, Chr(135), ipttMajoriPlot1.XAxis(0).TickListAdd 8, Chr(136), ipttMajoriPlot1.XAxis(0).TickListAdd 9, Chr(137), ipttMajoriPlot1.XAxis(0).TickListAdd 10, Chr(138), ipttMajor

Cartesian MasterThere are two Cartesian styles supported, Master and Child. The Master style looks like the traditional Cartesian graph were both the X&Y axesare in the center of the graph see FIGURE 7.24.

FIGURE 7.24Example of Master

Cartesian.

iPlot1.XAxis(0).CartesianStyle = ipcsMasteriPlot1.YAxis(0).CartesianStyle = ipcsMasteriPlot1.XAxis(0).Min = -50iPlot1.YAxis(0).Min = -50For X = -9 To 9 iPlot1.Channel(0).AddXY X, X*X ' Y=X2 (Parabola)Next X

Cartesian ChildThe Child style place the axis in the graph but is positioned relative to the perpendicular reference axis which is specified by theChildRefAxisName property and the position is specified by the ChildRefValue property see . The perpendicular axis for any X-Axes would beany of the Y-Axes and vice-versa. In the example below the Y-Axis will scroll with the X-Axis. To prevent scrolling, set the X-Axis Enabledproperty to False. The data shown in the example below, gives the user look at the incoming data before the start of the of the zero referencepoint.

FIGURE 7.25Example of Child

Cartesian.

For X = -10 To 80 iPlot1.Channel(0).AddXY X, Rnd(1) * 20 + 40 Next X

Iocomp Components – Plot Pack Manual Page 41 of 336

Page 54: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 8 - Legend

Chapter 8 - Legend

The Legend by default is configured to display the Channel Name and Color indicator for all channels. You can configure the legend to display many otherfields that provide useful information about the channel. You can also configure the legend display Cursor data for all Channels. The legend can be placedanywhere around the DataView area and the columns can be configured to be wrap to utilize the space efficiently or for the desired look you applicationrequires.

FIGURE 8.1Example showing adigital channel and

points out the position ofactual data points.

Predefined ColumnsBy default, only the “Line” column is shown in the legend as well as the Channel Title. You can choose to show or hide the following columns inthe 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.

In FIGURE 8.2, the Legend has been moved to be on top of the DataView by using the Layout manger. FIGURE 8.3 Shows the result of the codeshown below configuring the Legend to show wrapped columns.

FIGURE 8.2The Property Editor Layout Manager Moving Legend object On Top of the DataView.

FIGURE 8.3the Legend object On Top of the DataView and the WrapColumns Count set to Three.

iPlot1.Legend(0).WrapColAutoCountEnabled = TrueiPlot1.Legend(0).WrapColDesiredCount = 3iPlot1.Legend(0).WrapRowDesiredCount = 6

Page 42 of 336 Iocomp Components – Plot Pack Manual

Page 55: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 8 - Legend

In FIGURE 8.4, the Legend is moved to the bottom of the DataView below the X-Axis by using the Layout manger and FIGURE 8.5 shows theresult on the Plot component.

FIGURE 8.4The Property Editor Layout Manager Moving Legend object On Bottom of the DataView.

FIGURE 8.5The Legend object to the Bottom of the DataView and the WrapColumns Count set to Three.

In FIGURE 8.6, the Legend is moved to the Left of the Y-Axis by using the Layout manger and FIGURE 8.7 shows the result on the Plotcomponent.

FIGURE 8.6The Property Editor Layout Manager Moving Legend object to The Left of the Y-Axis-1

FIGURE 8.7Example showing the Legend object On The Left of the Y-Axis-1

FIGURE 8.8 Shows an example where the number of channels exceeds the number of items that can be shown. In this case, scroll buttons willappear in the legend allowing the user to scroll the view. FIGURE 8.9 shows an example of displaying the X-Axis and Y_Axis title for the channels in the legend.

FIGURE 8.8Example Showing the Legend Scroll Buttons for multiple Channels.

FIGURE 8.9Example showing the Legend object with the Line, Marker, X-Axis Title, and Y-

Axis Title columns.

Only the Channel Title is shown in the “Title” Column. The Channel Title is set by using the ChannelTitle property of the channel. TheName property of each channel is the name that is used programmatically and is not the title seen by end user of the chart unless the Titleproperty is blank, only then will the Name property be used for display in the Legend

Iocomp Components – Plot Pack Manual Page 43 of 336

Page 56: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 8 - Legend

If you are using long Titles for your channels, you can utilize the ChannelNameMaxWidth property. This property specifies the maximumwidth, in characters, of Titles displayed in the legend. If the Title exceeds the number of characters specified, it will word-wrap to the nextline.

The Channel Color is the first column of the Legend in the picture above and this represent each channels individual color. The Channel Markersis the second column in the picture above. The Channel Markers are shape given to each specific channel. These Channel Markers use the givenshape and color for each data point on the given Channel of the Plot Object.

Turning On and Off Column TitlesFIGURE 8.10 Shows an example of the Column Titles. By default they are not shown and you need to set the ColumnTitlesVisible property toTrue to show them.

FIGURE 8.10Example showing

Legend Wrap, MultiColumns in the

Legend.

Page 44 of 336 Iocomp Components – Plot Pack Manual

Page 57: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 9 - ToolBar

Chapter 9 - ToolBar

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

FIGURE 9.1Example showingthe ToolBar in the

Layout.

The built-in tool bar makes it easy to use our component without needing a separate, external component or additional program code to implement a tool bar.Of course, if you need additional features that our tool bar doesn’t provide or if you need to include functions in a unified application tool bar, you candispense with this tool bar and implement a tool bar externally. See Chapter 31 - Implementing ToolBar Externally page 157 for more detailedinformation.

Currently, the tool bar only supports being aligned to the top of the component. Moving and sizing the tool bar as well as support for multiple tool bars is leftopen for future expansion.

ButtonsThere are currently 13 buttons available for display and use in the ToolBar. See Table 9.1 for descriptions on the purpose of each button.

Button Description

Resume Button

The resume button enables tracking on all axes. When tracking is enabled, the axes will adjust their min and span values basedon the tracking style. In addition to enabling tracking, all cursors will be hidden, and the axes min & span will be restored totheir previous values when the axes tracking was initially disabled. If you wish to have the Axes use the current Min and Spanvalues when the tracking is enabled, call the UpdateResumeValues method on each Axes or right-click on each axes and selectthe "Update Resume Values" option.

Pause Button The pause button turns off tracking on all axes. When tracking is off, the axes will remain stationary while data is being added.

Axes Scroll Mode ButtonWhen the Axes Scroll Mode button is active, the user can drag the axis and scroll the view. When this button is selected, theAxes Zoom Mode button is unselected.

Axes Zoom Mode ButtonWhen the Axes Zoom Mode button is active, the user can drag the axis and zoom the view. When this button is selected, theAxes Scroll Mode button is unselected.

Zoom In ButtonWhen this button is clicked, all axes are zoomed in by a factor 2x (Default is 2, use the ZoomInOutFactor property to change).When this button is clicked, tracking on all axes will be disabled to pause the view.

Zoom Out ButtonWhen this button is clicked, all axes are zoomed out by a factor 2x (Default is 2, use the ZoomInOutFactor property to change).When this button is clicked, tracking on all axes will be disabled to pause the view.

Select Button

Used for selecting items in the data view area. Generates events that can be used by the programmer to react to selection ofitems such as data points, annotations, areas of the data view, and etc. When this button is clicked, tracking on all axes will bedisabled to pause the view.

Zoom Box Button

This button allows the user to rubber band a region in the DataView for zooming into. The box can start at any point, but mustbe dragged to the lower right to actually cause a zoom. The zoom action will affect all axes. You can also use this button for asecond purpose by handling the OnBeforeZoomBox event and setting the Cancel parameter to TRUE. By setting the Cancel toTrue, the zoom will not occur and you can substitute your own code for the behavior you desire such as zooming only the X-Axis or possibly adding annotations. When this button is clicked, Tracking is not initially disabled, only after the user rubber-bands a proper area and then releases the mouse button will the Tracking on all axes be disabled..

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 ButtonThis button copies an image of the plot component to the clipboard. The format is Bitmap, Metafile, or JPEG as specified bythe CopyToClipBoardFormat property on the main interface.

Save ButtonThis button brings up a save dialog to save the image of the plot component to a file. The user can select Bitmap, Metafile, orJPEG as the file type.

Print ButtonThis button will print the screen display of the plot component. If the PrintShowDialog property is set to True, the user willfirst see a dialog for selecting the printer and setting specific options. The user will also have the option of canceling the printjob when the print dialog is shown. See Chapter 26 - Printing page 112 for additional printing options

Table 9.1

Iocomp Components – Plot Pack Manual Page 45 of 336

Page 58: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 9 - ToolBar

Hiding and Showing ButtonsUse the following properties to hide or show individual ToolBar buttons...

• ShowResumeButton • ShowCursorButton• ShowPauseButton • ShowEditButton• ShowAxesModeButtons • ShowCopyButton• ShowZoomInOutButtons • ShowSaveButton• ShowSelectButton • ShowPrintButton• ShowZoomBoxButton •

Code ControlIf you need to simulated the ToolBar button being clicked through code or you are externally implementing the ToolBar, use the followingmethods to simulate a button click through code...

• DoButtonClickResume • DoButtonClickZoomIn• DoButtonClickPause • DoButtonClickCursor• DoButtonClickScrollAxesMode • DoButtonClickEdit• DoButtonClickZoomAxesMode • DoButtonClickCopy• DoButtonClickSelect • DoButtonClickSave• DoButtonClickZoomBox • DoButtonClickPrint• DoButtonClickZoomOut

If you need to check if a button is in the down/active state, use the following properties...

• ZoomBoxActive • CursorActive • SelectActive

If you need to hide all Cursors through code, use the ToolBar method TurnOffCursor to hide all of the Cursors with a single call. If you needcontrol over Hiding individual Cursors, then access it Cursor individually settings its Visible property to False.

ConfigurationUse the ZoomInOutFactor property to specify the multiply/division factor used when the user clicks the ZoomIn or ZoomOut button. The defaultvalue of this property is set to 2 which results in a 100% increase when zooming out and a 50% reduction when zooming in.

Use the following 3 properties to control the appearance of the ToolBar...

• FlatBorder• FlatButtons• SmallButtons

Below are several examples of how to customize the look of the ToolBar using the Flat Borders, Flat Buttons and Small Buttons properties..

FIGURE 9.2Example showing the Default ToolBar configuration.

FIGURE 9.3Example showing a Flat ToolBar

Page 46 of 336 Iocomp Components – Plot Pack Manual

Page 59: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 9 - ToolBar

FIGURE 9.4Example showing a Flat ToolBar and Flat Buttons.

FIGURE 9.5Example Showing a Flat ToolBar, Small Buttons, and Flat Buttons.

Iocomp Components – Plot Pack Manual Page 47 of 336

Page 60: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 10 - Labels

Chapter 10 - Labels

By default, the Plot component has one Label object already added and it is used for the title of the plot. You can add as many additional Labels as yourapplication requires. You can use Labels as headers, footers, summaries of testing information or any other use you might think of. The Labels can belocated anywhere outside of the DataView. If you need Labels inside of the DataView, use the Annotation objects. You can add Labels through code but it ismuch easier to add them at design-time through the property editor where you can size and move their position through the Layout Manager. If you need toadd Labels through code, See Chapter 28 - Layout Control Through Code page 147 for instructions on how to manipulated their position through code.

FIGURE 10.1Example of 3 Labels

FIGURE 10.2Example of a 3 Labels in the Layout Manager.

For backward compatibility with older versions of our Plot Components, the first label cannot be removed. This is due to the fact that thefirst label is mapped to the title properties of the component. All Title properties such as TitleText, TitleFont, and TitleMargin are mapped tothe first label object.

Properties

CaptionThe Caption property specifies the text displayed in the Label.

AlignmentThe Alignment property specifies the horizontal justification of the text displayed in the Label. Can be set to Left, Center, or Right with theCenter being the default.

FontThe Font property specifies the Font attributes of the text render to the Label. For VCL, the Font object supports the Color attribute. For ActiveX,use the FontColor property to specify the Color attribute of the text render to the Label.

Margin LeftThe MarginLeft property is used to set the left side margin of the label when the Alignment property is set to Left. Then property will have noaffect when the Alignment is set to Center or Right. The MarginLeft property is a double and represents the number of characters using the Fontassociated with the Label.

Margin RightThe MarginRight property is used to set the right side margin of the label when the Alignment property is set to Right. Then property will have noaffect when the Alignment is set to Center or Left. The MarginRight property is a double and represents the number of characters using the Fontassociated with the Label.

Margin TopThe MarginTop property is used to set the margin between the top of the label and the object above it or the top of the component if no object isabove it. The property is a double and represents the number of characters using the Font associated with the Label.

Margin BottomThe MarginBottom property is used to set the margin between the bottom of the label and the object below it or the bottom of the component if noobject is below it. The property is a double and represents the number of characters using the Font associated with the Label.

Page 48 of 336 Iocomp Components – Plot Pack Manual

Page 61: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 10 - Labels

How to Add Labels through CodeTo add a Label to the chart through code, simply execute the following method…

Index = iPlot1.AddLabel

The return value is a unique index for use in manipulating the object. After adding the Label object, you can set the font, margins, alignment, andcaption properties. All Labels by default will be added to the bottom of the chart. To manipulate the position of the Label through code, See Chapter28 - Layout Control Through Code page 147 for examples on how to move plot objects through code.

Setting Up through Code ExampleiPlot1.Labels(Index).Caption = "Sample Chart X vs Y"iPlot1.Labels(Index).Font.Name = "Times New Roman"iPlot1.Labels(Index).Alignment = iahCenteriPlot1.Labels(Index).Horizontal = TrueiPlot1.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 label to delete. To delete all labels, execute theRemoveAllLabels method. Note, both of these methods are on the main interface.

Iocomp Components – Plot Pack Manual Page 49 of 336

Page 62: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 11 - Tables

Chapter 11 - Tables

Tables provide a location for displaying “tabular data” or text-based data in a spreadsheet type format. You can add Tables at design-time or run-time, butthe rows, columns, and data can only be added at run-time. The Table supports a filled or transparent background, cell grid lines, and column titles.

You can add an unlimited number of rows and columns, but there is a practical limit to the number of columns based on the maximum width of the table.This limitation does not exist for the rows. Once the number of rows exceed the maximum height of the table, scroll buttons will appear allowing the user toscroll the rows up and down. If you wish the number of rows to be limited to a certain number even though there is physically enough space to fit more rows,set the RowsMax property to the maximum number of rows you want.

The columns are implemented as sub-objects of the table object. The Table Columns objects support independent titles, title alignment, data alignment, titlefont color, data font color, and can automatically adjust their width based on the data in their column. The font used for the column titles is implemented onthe Table object and is shared by all of the column objects.

Adding TablesTo add a Table at design-time, use the design-time property editor and go to the Tables Tab and click the Add button.

FIGURE 11.1Example

showing TableGeneral Tab onadding a Table

To add a Table through code, add the follow line of code...

iPlot1.AddTable

Adding and Removing ColumnsTo add a Column, call the AddColumn method on the Table object, passing it the title of the Column...

iPlot1.Table(0).AddColumn("Open")

To remove a single Column, call the DeleteColumn method on the Table object, passing it the index of the Column...

iPlot1.Table(0).DeleteColumn(0)

To remove all Columns, call the RemoveAllColumns method on the Table object...

iPlot1.Table(0).RemoveAllColumns

Adding and Removing RowsTo add a Row, call the AddRow method on the Table object...

iPlot1.Table(0).AddRow

To remove a single Row, call the DeleteRow method on the Table object, passing it the index of the Row...

iPlot1.Table(0).DeleteRow(0)

To remove all Rows, call the RemoveAllRows method on the Table object...

iPlot1.Table(0).RemoveAllRows

Adding Data to a TableAdding Data to a table is done by using the Data property. The Data property accepts a Column and Row index parameter. The Data property is astring data type and you must format the data in the form you desire for display. Below is a example setting the cell data for the first row and firstcolumn...

iPlotX1.Table(0).Data(0, 0) = “10.0”

Page 50 of 336 Iocomp Components – Plot Pack Manual

Page 63: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 11 - Tables

Modifying Table Column PropertiesBelow is an example showing how to set each of the properties on a Column object...

iPlotX1.Table(0).Column(0).AutoSize = TrueiPlotX1.Table(0).Column(0).DataAlignment = iahRightiPlotX1.Table(0).Column(0).DataAlignmentMargin = 0.5iPlotX1.Table(0).Column(0).DataFontColor = vbBlueiPlotX1.Table(0).Column(0).Title = "Temp"iPlotX1.Table(0).Column(0).TitleAlignment = iahLeftiPlotX1.Table(0).Column(0).TitleAlignmentMargin = 0.5iPlotX1.Table(0).Column(0).TitleFontColor = vbRediPlotX1.Table(0).Column(0).Visible = TrueiPlotX1.Table(0).Column(0).Width = 5

FIGURE 11.2 shows an example of a chart with four tables with various style settings.

FIGURE 11.2Example of

Adding Data totables through

Code

Visual Basic Creating TablesThis is a basic program showing how to setup and modify a table through code. The Table has been added at design time and position on the leftside of the chart.

Visual Basic/VBA:Private Sub Form_Load() Dim X As Integer

iPlotX1.Channel(0).AddXY 20, 30 iPlotX1.Channel(0).AddXY 40, 70 iPlotX1.Channel(0).AddXY 60, 20 iPlotX1.Channel(0).AddXY 80, 50

iPlotX1.AddTable iPlotX1.Table(0).AddColumn "X" iPlotX1.Table(0).AddColumn "Y" For X = 0 To iPlotX1.Channel(0).Count - 1 iPlotX1.Table(0).AddRow iPlotX1.Table(0).Data(0, X) = iPlotX1.Channel(0).DataX(X) iPlotX1.Table(0).Data(1, X) = iPlotX1.Channel(0).DataY(X) Next XEnd Sub

Iocomp Components – Plot Pack Manual Page 51 of 336

Page 64: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 11 - Tables

Visual C++ Creating TablesThis is a basic program showing how to setup and modify a table through code. The Table has been added at design time and position on the leftside of the chart.

Visual C++:void CTestingView::OnButton1() { CString str;

m_iPlotX1.GetChannel(0).AddXY(20, 30); m_iPlotX1.GetChannel(0).AddXY(40, 70); m_iPlotX1.GetChannel(0).AddXY(60, 20); m_iPlotX1.GetChannel(0).AddXY(80, 50);

m_iPlotX1.AddTable(); m_iPlotX1.GetTable(0).AddColumn("X"); m_iPlotX1.GetTable(0).AddColumn("Y");

for (int X=0; X < m_iPlotX1.GetChannel(0).GetCount() ; X++) { m_iPlotX1.GetTable(0).AddRow(); str.Format("%lf",m_iPlotX1.GetChannel(0).GetDataX(X)); m_iPlotX1.GetTable(0).SetData(0, X, str); str.Format("%lf",m_iPlotX1.GetChannel(0).GetDataY(X)); m_iPlotX1.GetTable(0).SetData(1, X, str); }}

Borland Delphi Creating TablesThis is a basic program showing how to setup and modify a table through code. The Table has been added at design time and position on the leftside of the chart.

Delphi (Windows/Linux):procedure TForm1.FormCreate(Sender: TObject);var X : Integer;begin iPlot1.Channel[0].AddXY(20, 30); iPlot1.Channel[0].AddXY(40, 70); iPlot1.Channel[0].AddXY(60, 20); iPlot1.Channel[0].AddXY(80, 50);

iPlot1.AddTable; iPlot1.Table[0].AddColumn('X'); iPlot1.Table[0].AddColumn('Y');

for X := 0 to iPlot1.Channel[0].Count - 1 do begin iPlot1.Table[0].AddRow; iPlot1.Table[0].Data[0, X] := FloatToStr(iPlot1.Channel[0].DataX[X]); iPlot1.Table[0].Data[1, X] := FloatToStr(iPlot1.Channel[0].DataY[X]); end;end;

Borland C++ Builder Creating TablesThis is a basic program showing how to setup and modify a table through code. The Table has been added at design time and position on the leftside of the chart.

CBuilder (Windows/Linux):void __fastcall TForm1::FormCreate(TObject *Sender){ iPlot1->Channel[0]->AddXY(20, 30); iPlot1->Channel[0]->AddXY(40, 70); iPlot1->Channel[0]->AddXY(60, 20); iPlot1->Channel[0]->AddXY(80, 50);

iPlot1->AddTable(); iPlot1->Table[0]->AddColumn("X"); iPlot1->Table[0]->AddColumn("Y");

for(int X=0; X < iPlot1->Channel[0]->Count; X++) { iPlot1->Table[0]->AddRow(); iPlot1->Table[0]->Data[0][X] = FloatToStr(iPlot1->Channel[0]->DataX[X]); iPlot1->Table[0]->Data[1][X] = FloatToStr(iPlot1->Channel[0]->DataY[X]); }}

Page 52 of 336 Iocomp Components – Plot Pack Manual

Page 65: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Chapter 12 - Data Cursors

The Data Cursor is a tool included with the Plot Pack components which allows the user to measure data values on the screen. Data values can be displayedin the legend or in a hint window. This tool is available for use from the integrated tool bar, and can also be used by your program code through the built-inevents and interfaces that support the cursor.

The Data Cursor tool works differently depending on the type of component being used. All of the cursors display their data in a hint window next to thecursor by default. If you wish to display the cursor data in your own window 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 addedfor easy use by the cursor tool bar button.

Cursor TypesBy default, the cursors are initially set as “Value X-Y” cursors, which in the iPlot component draws a line perpendicular to the X-Axis anddisplays the X and Y values for the trace line of a particular channel. If the cursor is on top of a data point, the Data Cursor displays the X and Yvalues for that Data Point. If the Data Cursor is between data points and the InterpolationStyle property of the channel is set toipistStraightLine, then the Data Cursor will display the linearly-interpolated value between the data points. The Data Cursor will displayinterpolated values based on the current InterpolationStyle property setting.

You can change the type of cursor either by right-clicking on the cursor at run-time or through code by accessing the Cursor Object. You can alsochange the labels in the pop up 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 the trace line in a particular channel. In FIGURE 12.1 shows a measuredvalue on Channel #2 at X = 27.0 and Y = 69.0.

FIGURE 12.1Value X-Y

Cursor Style

Value X Cursor [ValueX]This cursor style displays the current X-Axis value for the trace line in a particular channel. In FIGURE 12.2 shows the X-Value of theData Cursor for Channel #2 at X = 27.0.

FIGURE 12.2Value X Cursor

Style

Iocomp Components – Plot Pack Manual Page 53 of 336

Page 66: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Value Y Cursor [ValueY]This cursor style displays the currently interpolated Y-Axis value for a trace line in a particular channel. In FIGURE 12.3 shows anInterpolated value on Channel #2 Y = 69.0.

FIGURE 12.3Value Y Cursor

Style

Period Cursor [DeltaX]This cursor style displays the value of the distance between the two displayed cursors when measuring along the X-Axis. In FIGURE12.4 shows a Period = 33.0.

FIGURE 12.4Period Cursor

Style

Peak-Peak Cursor [DeltaY]This cursor style displays the value of the distance between the two displayed cursors when measuring two data points along the Y-Axis. In FIGURE 12.5 shows a peak-to-peak distance value of 37.

FIGURE 12.5Peak-Peak

Cursor Style

Page 54 of 336 Iocomp Components – Plot Pack Manual

Page 67: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Frequency Cursor [InverseDeltaX]This cursor style displays the inverse of the distance along the X-Axis, or the Frequency. In FIGURE 12.6 shows a Frequency = 0.034

FIGURE 12.6Frequency

Cursor Style

Scale FactorUse the CursorScaler property on the Axis object to get or set the desired scaler for the cursor associated with this axis scale. CursorScaler isonly used with cursors that have their Style property set to InverseDeltaX, typically used for frequency calculations. The Scaler is a multiplierused to convert this axis' units to seconds format so that the cursor can properly display the frequency calculation.

iPlot1.XAxis(0).CursorScaler= 1000

For example, if the axis units are ms (milliseconds or 1/1,000th of a second), then you would need to set the Scaler to 1,000 to convert from ms toseconds. If the units are µs (microseconds or 1/1,000,000th of a second), then the Scaler should be set to 1,000,000 to convert from µs toseconds. If your units are already in seconds on this axis, then you should set the Scaler to 1.

FIGURE 12.7Example outputfrom the Visual

Basic CustomizingTick LabelsExample.

Note: the X-Axis that affects the Data Cursor formatting is the X-Axis assigned to the Channel that is currently being used by the Data Cursor.For example, if the Data Cursor is currently attached to “Channel 2”, and “Channel 2” is using “X-Axis 3”, then the Cursor Formatting settings of“X-Axis 3” will be applied to the Data Cursor.

Adding and Removing CursorsTo add a data cursor to the chart, execute the following method…

Index = iPlot1.AddDataCursor

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

iPlot1.DeleteDataCursor(Index)

To remove all data cursors from the chart, 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, suchchanging the cursor style, the hint window font, hint orientation, etc.

Note: Font properties in the example below will differ depending on your compiler

Iocomp Components – Plot Pack Manual Page 55 of 336

Page 68: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Data Cursor ExampleiPlot1.DataCursor(0).Style = ipcsValueXYiPlot1.DataCursor(0).MenuItemCaptionValueXY = "XY Coordinates"iPlot1.DataCursor(0).MenuItemVisibleValueX = FalseiPlot1.DataCursor(0).MenuItemVisibleValueY = FalseiPlot1.DataCursor(0).ChannelName = iPlot1.Channel(0).NameiPlot1.DataCursor(0).FontColor = vbCyan

CursorXValue = iPlot1.DataCursor(0).ValueXCursorYValue = iPlot1.DataCursor(0).ValueYCaption = "Data Point x=" & CursorXValue & " y=" & CursorYValue

If iPlot1.DataCursor(0).Status = ipdpsValid Then Caption = Caption & " is Valid"If iPlot1.DataCursor(0).Status = ipdpsNull Then Caption = Caption & " is Null"If iPlot1.DataCursor(0).Status = ipdpsEmpty Then Caption = Caption & " is Empty"

Accessing Individual Cursor PropertiesThere are many properties that can be used to customize the look and feel as well as the operation of the cursor in your application as well asprovide information about the measured x and y-values of the cursor.

Popup MenuBy default, the pop up menu allows users to change the style of the cursor. You can control the user selections that are available byusing the “MenuItemCaption” and “MenuItemVisible” properties of the cursor object. The “MenuItemCaption” properties allow youto customize the label used to describe the type of cursor style available to the user. The “MenuItemVisible” properties allow you tocustomize whether a particular cursor style is available to the user.

The following caption customization properties are the available.• MenuItemCaptionDeltaX• MenuItemCaptionDeltaY• MenuItemCaptionInverseDeltaX• MenuItemCaptionValueX• MenuItemCaptionValueXY• MenuItemCaptionValueY

The following properties are also available to hide or show menu items.• MenuItemVisibleDeltaX• MenuItemVisibleDeltaY• MenuItemVisibleInverseDeltaX• MenuItemVisibleValueX• MenuItemVisibleValueXY• MenuItemVisibleValueY

To completely disable the pop up menu for a particular Data Cursor, set the PopupEnabled property of the Data Cursor to FALSE...

iPlot1.DataCursor(Index).PopupEnabled = False

To to disable the “Edit...” menu item for all objects in the entire Plot Component, set the UserCanEditObjects property on the maininterface to FALSE...

iPlot1.UserCanEditObjects = False

HintsYou can control the behavior of the cursor by using the available hint properties of the cursor object. The HintHideOnReleaseproperty is useful if you only want the hint window to be visible when the user has clicked, and holds down the mouse button on aparticular cursor. The HintOrientationSide property allows you to specify or determine whether the hint is on one side of the cursoror the other (left/right or top/bottom, depending on orientation). You can also choose to hide the hint permanently using theHintShow property so that you can show cursor data outside the component.

You can also “customize” hints on the fly before they are displayed to the user by utilizing the OnDataCursorCustomizeHint event

Page 56 of 336 Iocomp Components – Plot Pack Manual

Page 69: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Cursor PointersYou can programmatically move the cursor positions by using the Pointer1Position and Pointer2Position properties. ThePointer2Position property is only valid for those cursors that use two pointers. The units of the Pointer1Position are in reference tothe Data View area in percent. 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 the Data View area with 0 being the bottom of theData View and 100 being the top of the Data View.

If the data cursor is vertical, the position is in reference to the X-Axis side of the Data View area with 0 being the left side of the DataView and 100 being the right side of the Data View.

For data cursors of style ipcsValueXY (iPlot Component Only), ipcsValueX, and ipcsValueY, this property sets the position of thesingle cursor line used with these data cursor styles.CursorStyle Position Value MeaningipcsValueXY (iPlot Only) References the X-Axis size of the Data View.ipcsValueX References the X-Axis size of the Data View.ipcsValueY References the X-Axis size of the Data View.Table 12.1

For data cursors of style ipcsValueXY (iXYPlot Component Only), ipcsDeltaX, ipcsDeltaY, and ipcsInverseDeltaX, this property setsthe position of the first cursor line with these dual-line data cursor styles.

CursorStyle Position Value MeaningipcsValueXY (iXYPlot Only) References the X-Axis size of the Data View.ipcsDeltaX References the X-Axis size of the Data View.ipcsDeltaY References the Y-Axis size of the Data View.ipcsInverseDeltaX References the X-Axis size of the Data View.Table 12.2

XValue = iPlot1.DataCursor(Index).Pointer1Position = FalseYValue = iPlot1.Channel(Index).DataCursorYValue = False

By default, the color of the Data Cursor mirrors the color of the associated channel. You can specify an independent color for the DataCursor by setting the UseChannelColor property to FALSE and then specifying the appropriate Color property...

iPlot1.DataCursor(Index).UseChannelColor = FalseiPlot1.DataCursor(Index).Color = vbCyan

Obtaining X-Values, Y-Values, and StatusSince the pointer position properties reference the Data View, they are not useful for determining the measured x and y-values. Toobtain this information, use the XValue, YValue, and Status properties...

if iPlot1.DataCursor(index).Status = ipdpsValid then XValue = iPlot1.DataCursor(Index).XValue YValue = iPlot1.DataCursor(Index).YValueend if

The Status property will reveal whether the data points are valid, empty, or null: ipdpsValid, ipdpsNull (for the iXYPlot componentboth values are null, for the iPlot component only the YValue property is null), ipdpsEmpty.

The Channel object associated with the Data Cursor also has redundant properties that can be used to obtain the current x-value and y-value for the Data Cursor...

if iPlot1.Channel(Index).DataCursorStatus = ipdsValid then XValue = iPlot1.Channel(Index).DataCursorXValue YValue = iPlot1.Channel(Index).DataCursorYValueend if

Note: These properties are read-only. To move the pointers, use the Pointer1Position and Pointer2Position properties.

The XValue and YValue properties are not always valid, depending on the CursorStyle property setting...

XValueCursorStyle Value MeaningipcsValueXY (iPlot Only) Value is the X-Value of the pointer line.ipcsValueXY (iXYPlot Only) Value is the X-Value of the first pointer line(X-Axis Cursor).ipcsValueX Value is the X-Value of the pointer line.ipcsValueY Property Invalid. Value is always 0.ipcsDeltaX Value is the X-Axis range between the first and second pointer line.ipcsDeltaY Property Invalid. Value is always 0.

ipcsInverseDeltaXValue is the inverse of the x axis range between the first and second pointerline multiplied by the CursorScaler property of the associated channel’s x-axis.

Table 12.3

Iocomp Components – Plot Pack Manual Page 57 of 336

Page 70: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

YValueCursorStyle Value MeaningipcsValueXY (iPlot Only) Value is the Y-Value of the pointer line.ipcsValueXY (iXYPlot Only) Value is the Y-Value of the second pointer line(Y-Axis pointer line).ipcsValueX Property Invalid. Value is always 0.ipcsValueY Value is the Y-Value of the pointer line.ipcsDeltaX Property Invalid. Value is always 0.ipcsDeltaY Value is the Y-Axis range between the first and second pointer line.ipcsInverseDeltaX Property Invalid. Value is always 0.Table 12.4

Pointer WidthYou can modify the width of the Data Cursor line(s) by specifying the PointerPenWidth property in number of pixels wide. Thissetting will affect the width of the Data Cursor when it is stationary. When the cursor is actively being moved by the user, forperformance reasons the width of the Data Cursor will temporarily revert to width of 1 pixel.

iPlot1.DataCursor(Index).PointerPenWidth = 7

Note: it is recommended that you use odd numbers of pixels for this property. This will ensure that you will avoid aliasing effects.

Precision and Label FormattingBy default, the Cursor uses the precision and format style of the X-Axis associated with the Channel currently used by the DataCursor. You can however have custom Data Cursor formatting that is independent of the currently displayed Axis labels bymodifying the following properties on the X-Axis object. For example, the Axis labels could have one a fixed precision style with 3digits after the decimal point, but the Cursor could be configured with 5 digits by setting CursorUseDefaultFormat to FALSE andthen configuring CursorPrecision to 5.

• CursorDateTimeFormat• CursorFormatStyle• CursorMinLengthAutoAdjust• CursorMinLength• CursorPrecision• CursorPrecisionStyle• CursorScaler• CursorUseDefaultFormat

See Chapter 7 - Axes page 32 for more detailed information.

iPlot Component Specific NotesIf the cursor is in-between data points in a particular channel, then the cursor will display interpolated values, depending on the type ofinterpolation set on the Channel.

iXYPlot Component Specific NotesThe iXYPlot Component’s cursor, if in ipcsValueXY mode, will display a cross-hair cursor instead of a single line. This is due to the fact thatthere can be many different y-value solutions from any particular x-value.

FIGURE 12.8iXYPlot Cursor

Page 58 of 336 Iocomp Components – Plot Pack Manual

Page 71: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 12 - Data Cursors

Cursor Events

OnCursorChangeIf you need to know when the user is moving the cursor tool on the Data View area, you can use the OnCursorChange event to detect this. Youcan then query the Data Cursor object for the current Pointer1Position and Pointer2Position properties (depending on the Cursor Style) todetermine the X and Y values for that channel under the cursor or to determine the calculated values from specialized cursor styles.

OnCursorChange(CursorIndex as Integer)iPlot1.DataCursor(CursorIndex).Pointer1PositioniPlot1.DataCursor(CursorIndex).Pointer2Position

OnDataCursorCustomizeHintThe Cursor Style .

OnDataCursorCustomizeHint(Index as Integer, AText as String)AText = FloatToStr(iPlot1.DataCursor(Index).XValue) & " mg"

UI EventsThe following events are also available for the Data Cursor regarding user iteration.

OnClickDataCursor – Fires when the Data Cursor is clicked.OnDblClickDataCursor – Fires when the Data Cursor is double-clicked.OnGotFocusDataCursor – Fires when the Data Cursor gains focus.OnLostFocusDataCursor – Fires when the Data Cursor loses focus.OnPopupMenuDataCursor – Fires when the right-click, context sensitive menu is opened by the user.

Iocomp Components – Plot Pack Manual Page 59 of 336

Page 72: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Chapter 13 - Annotations

The Annotation Objects are the text and shapes that can be displayed in the DataView, overlaid over your channel data. Annotations can be positioned inrelation to a particular channel or to the DataView area, depending on whether you want the annotations to scroll or track with the channel data or be fixed inplace within the DataView.

Annotations can be in the form of text strings, lines, rectangles, ellipses or bitmaps. Additional annotation types will be added and is open for futureexpansion.

FIGURE 13.1Example

showing severalannotation

types available.

How to Add AnnotationsTo 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, suchas setting the object as a text annotation and its associated font properties or setting the object as a line annotation and its associated lineproperties.

Remember that only "True Type" fonts can be rotated when using the ActiveX and/or VCL versions of the Plot Pack Components. Non-True-Type fonts will not rotate. This does not apply to the CLX versions of the components as the QT API uses a different rotationmechanism.

How to Remove AnnotationsTo remove an annotation, call the DeleteAnnotation method, passing the unique index value of the annotation to the method. To delete allannotations, call the RemoveAllAnnotations method. Note that these methods are on the main component interface.

Annotations StylesThere are eight different annotation styles that can be used by the Plot Component.

Styles DefineipasEllipse Uses the X, Y, X2, and Y2 points to specify the starting point and ending point of the Ellipse.

ipasImage

Displays a bitmap centered on the X and Y coordinate properties. Use the runtime property editor to addimages to the built-in image list. Use the ImageListIndex and ImageIndex properties to specify whichbitmap to display.

ipasLine Use the X, Y, X2, and Y2 points to specify the starting point and ending point of the line.

ipasLineXLine perpendicular to the X-Axis, specified by the X property of the Annotation Object, from positiveinfinity to negative infinity on the Y-Axis.

ipasLineYLine perpendicular to the Y-Axis, specified by the Y property of the Annotation Object, from positiveinfinity to negative infinity on the X-Axis.

ipasRectangle Rectangle. Use the Width and Height properties to adjust the size of the Rectangle.ipasText Text Label. Use the X and Y properties to specify the coordinates of the center of the text.

ipasTextRectangle

Displays a text string inside of a sizable rectangle. Use TextHorzAlignment, TextVertAlignment,TextHorzMargin, and TextVertMargin properties to position the text within the rectangle. Use the X andY properties to position the rectangle. Use Width and Height to specify the dimensions of the Rectangle.

Table 13.1

Page 60 of 336 Iocomp Components – Plot Pack Manual

Page 73: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Annotations PropertiesThere are eight different annotation styles and below is a listing of properties for each annotation style.

Properties Ellipse Image Line LineX LineY Rectangle Text TextRectangleStyleReferenceXYX2Y2WidthHeightPenColorPenStylePenWidthBrushColorBrushStyleTextTextRotationTextHorzAlignmentTextVertAlignmentTextHorzMarginTextVertMarginFontImageListIndexImageIndexChannelNameUserCanMoveUserCanSizeClipToAxesShowFocusRectTable 13.2

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

DataView ReferenceTo have the annotation be referenced to the DataView area, set the Reference property to iprtDataView. The coordinates will nowrefer to the DataView and will in effect be static in relation to the axes and channels in the chart. The range of values possible for theX and Y coordinates are from 0 – 100. A value of 0 would correspond to the left (X coordinate) or bottom (Y coordinate) of theDataView area. A value of 100 would correspond to the right (X coordinate) or top (Y coordinate) of the DataView area. A value of50 would be halfway in-between.

Channel ReferenceTo have the annotation be referenced to a particular channel, set the ChannelName Property to the name of the channel and set theReference property to iprtChannel. The coordinates specified will now be in reference to the X and Y-Axes associated with that channel. In effect, the annotation will move with the channel as the channel and associated axes are scrolled.

FIGURE 13.2AnnotationReferences

XDataViewYChannel ReferenceTo have the X-Coordinate of the annotation be referenced to the DataView area and the Y-Coordinate of the annotation be referencedto the vertical axis of a Channel (Y-Axis unless axes have been flipped), set the Reference property to iprtXDataViewYChannel. TheX-Coordinates will now refer to the DataView and will in effect be static in relation to the axes and channels in the chart. The Y-Coordinates specified will now be in reference to the Y-Axes associated with that channel. The range of values possible for the Xcoordinates are from 0 – 100. A value of 0 would correspond to the left (X coordinate) of the DataView area. A value of 100 wouldcorrespond to the right (X coordinate) of the DataView area. A value of 50 would be halfway in-between.

Iocomp Components – Plot Pack Manual Page 61 of 336

Page 74: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

XChannelYDataView ReferenceTo have the X-Coordinate of the annotation be referenced to the vertical axis of a Channel (Y-Axis unless axes have been flipped) andthe Y-Coordinate of the annotation be referenced to the DataView area, set the Reference property to iprtXChannelYDataView. TheX-Coordinates specified will now be in reference to the X-Axes associated with that channel. The Y-Coordinates will now refer to theDataView and will in effect be static in relation to the axes and channels in the chart. The range of values possible for the Ycoordinates are from 0 – 100. A value of 0 would correspond to the bottom (Y coordinate) of the DataView area. A value of 100would correspond to the top (Y coordinate) of the DataView area. A value of 50 would be halfway in-between.

Annotation Methods There are four annotation methods for converting from position to pixels and vice-versa. The pixel values are in control coordinates that are inreference to the upper left corner of the control and has a value of (0,0). Position values are either in Percent if the reference is set to DataView orin Axes units if the Reference is set to Channel. You can also split the reference such that X-Values reference the DataView and the Y-Valuesreference the Axes or vice-versa.

When the reference is set to Channel, the X-Values and Y-Values will always be converted using the X-Axis and Y-Axis respectively even if theplot is rotated.

When the reference is set to DataView, the X-Values are converted based on the left and right of the DataView with the left being 0% and theright being 100% regardless if the plot is rotated. The same applies for Y-Value conversions.

Typical this functions are used for converting position values to pixels values for use with the mouse or vice-versa.

Methods Definition

PositionXToPixelsConverts an X-Value from position units to pixels units. The position value is in axes units if the reference for X-Values is set to Channel. The position value is in percent if the reference for X-Values is set to DataView.

PositionYToPixelsConverts an Y-Value from position units to pixels units. The position value is in axes units if the reference for Y-Values is set to Channel. The position value is in percent if the reference for Y-Values is set to DataView.

PixelsXToPositonConverts an X-Value from pixels units to position units. The pixel values are in control coordinates that are inreference to the X-Value of left corner of the control.

PixelsYToPositionConverts an Y-Value from pixels units to position units. The pixel values are in control coordinates that are inreference to the Y-Value of upper left corner of the control.

Table 13.3

Movable AnnotationsAnnotations can be movable by your application end user by setting the UserCanMove property of each annotation object. The User needs tochoose the Select button from the ToolBar in order for the user to move the annotation. The select button can be selected at run time or designtime made active at design time in the property editor.

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 hold of and drag annotations within the DataView area.Note: the line annotation style does not currently support this feature.

Type of Annotation User Can MoveTextLine

RectangleLineXLineYImage

TextRectangleEllipse

Table 13.4

Sizable AnnotationsCertain annotations can also be resized by your application end user by setting the UserCanSize property of each annotation object. The Userneeds to choose the Select button from the ToolBar in order for the user to size the annotation. The select button can be selected at run time ordesign time made active at design time in the property editor.

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

When this property is set to true, the application end-user at runtime will be able to grab a hold of anchors located around the annotation andresize the annotation within the DataView area.

Type of Annotation User Can SizeTextLine

RectangleLineXLineYImage

TextRectangleEllipse

Table 13.5

Page 62 of 336 Iocomp Components – Plot Pack Manual

Page 75: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Image ListThe Plot component has several built-in image lists for use with the Plot Pack Annotation feature (other parts of the Plot Pack Components willutilize these image lists as well in future updates).

To add or remove bitmap images from the image lists, you must use the design-time property editor of the components to load these images intothe component. This will allow the images to be streamed into the form and your compiled application.

These images were provided since not all development environments support image lists, and image list controls can vary from developmentenvironment to development environment as well as differing platforms (Windows vs. Linux).

The first image you add to a particular image list will dictate the size of the other images in that image list. If you add subsequent images that arelarger than the first, they will be centered and cropped to fit.

Note: If you add subsequent images that are smaller than the first, their canvases will be expanded in size (not stretched), centered, and filled withthe transparent background color of the image (the transparent color is always the pixel in the lower left-hand color of the image).

Remember that only "True Type" fonts can be rotated when using the ActiveX and/or VCL versions of the Plot Pack Components. Non-True-Type fonts will not rotate. This does not apply to the CLX versions of the components as the QT API uses a different rotationmechanism.

FIGURE 13.3Design-Time

Property EditorShowing Built-In

Image Lists

How to Add Image Annotations

Adding an image through Property Editor. Open the property editor at design-time and click on the control-images tab then click the add button to add an image.

FIGURE 13.4Example showing a

Control ImagesTab.

Iocomp Components – Plot Pack Manual Page 63 of 336

Page 76: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

FIGURE 13.5 Shows an example of the the open dialog that allows you to add an image. FIGURE 13.6 Shows the image being displayed afterbeing added..

FIGURE 13.5Example selecting the Bitmap image.

FIGURE 13.6Example showing a Image has been loaded.

Visual Basic Adding an Image through Code. The following examples assumes you have an ImageList component added to your VB form and you are transferring the images from theImageList to the Plot component. This example demonstrates adding three annotations with three different images.

Visual Basic: (For Visual basic only and ImageList was added to Load the images at run-time.) Private Sub LoadImageAnnotations_Click() iPlotX1.ImageListClear 0 iPlotX1.ImageListAdd 0, ImageList1.ListImages(1).Picture iPlotX1.ImageListAdd 0, ImageList1.ListImages(2).Picture iPlotX1.ImageListAdd 0, ImageList1.ListImages(3).PictureEnd Sub

Private Sub DisplayImages_Click() iPlotX1.AddAnnotation iPlotX1.Annotation(0).X = 25 iPlotX1.Annotation(0).Y = 75 iPlotX1.Annotation(0).Style = 5 iPlotX1.Annotation(0).ImageListIndex = 0 iPlotX1.Annotation(0).ImageIndex = 0

iPlotX1.AddAnnotation iPlotX1.Annotation(1).X = 50 iPlotX1.Annotation(1).Y = 50 iPlotX1.Annotation(1).Style = 5 iPlotX1.Annotation(1).ImageListIndex = 0 iPlotX1.Annotation(1).ImageIndex = 1

iPlotX1.AddAnnotation iPlotX1.Annotation(2).X = 75 iPlotX1.Annotation(2).Y = 25 iPlotX1.Annotation(2).Style = 5 iPlotX1.Annotation(2).ImageListIndex = 0 iPlotX1.Annotation(2).ImageIndex = 2End Sub

Visual C++ Adding an Image through Code. The following examples assumes you have added three bitmaps to your project using the Visual C++ resource editor and the names of the three bitmaps areBITMAP000, BITMAP00 1, BITMAP00 2. This example demonstrates adding three annotations using the three different bitmaps.

Page 64 of 336 Iocomp Components – Plot Pack Manual

Page 77: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Visual C++:void::OnLoadimagesbutton() { m_iPlotX1.ImageListClear(0); for (int i=0; i<3; i++) m_iPlotX1.ImageListLoadFromResourceID(0, (unsignedlong)AfxGetInstanceHandle(), IDB_BITMAP00 + i);}

void::OnAnnotbutton() { m_iPlotX1.AddAnnotation(); m_iPlotX1.GetAnnotation(0).SetX(25); m_iPlotX1.GetAnnotation(0).SetY(75); m_iPlotX1.GetAnnotation(0).SetStyle(5); m_iPlotX1.GetAnnotation(0).SetImageListIndex(0); m_iPlotX1.GetAnnotation(0).SetImageIndex(0);

m_iPlotX1.AddAnnotation(); m_iPlotX1.GetAnnotation(1).SetX(50); m_iPlotX1.GetAnnotation(1).SetY(50); m_iPlotX1.GetAnnotation(1).SetStyle(5); m_iPlotX1.GetAnnotation(1).SetImageListIndex(0); m_iPlotX1.GetAnnotation(1).SetImageIndex(1);

m_iPlotX1.AddAnnotation(); m_iPlotX1.GetAnnotation(2).SetX(75); m_iPlotX1.GetAnnotation(2).SetY(25); m_iPlotX1.GetAnnotation(2).SetStyle(5); m_iPlotX1.GetAnnotation(2).SetImageListIndex(0); m_iPlotX1.GetAnnotation(2).SetImageIndex(2);}

Borland Delphi Adding an Image through Code. The following examples assumes you have added three bitmaps to a resource file using the Borland Image Editor and added the resource file toyour project. The names of the three bitmaps are BITMAPS00, BITMAPS01 1, BITMAPS02. To add the resource file to your project, add {$RImageDisplayGraphics.res} right under the {$R *.dfm} or {$R *.xfm} in the form code file.

This example demonstrates adding three annotations using the three different bitmaps.

Delphi (Windows/Linux):procedure TForm1.LoadImagesClick(Sender: TObject);var x : Integer; NumStr : String;begin iPlot1.ImageListClear(0); for x := 0 to 2 do begin NumStr := IntToStr(x);

while Length(NumStr) < 2 do //Add Leading Zeros NumStr := '0' + NumStr;

iPlot1.ImageListLoadFromResourceName(0, HInstance,'BITMAPS' + NumStr); end;end;procedure TForm1.DisplayAnnotationClick(Sender: TObject);begin iPlot1.AddAnnotation; iPlot1.Annotation[0].X := 25; iPlot1.Annotation[0].Y := 75; iPlot1.Annotation[0].Style := ipasImage; iPlot1.Annotation[0].ImageListIndex := 0; iPlot1.Annotation[0].ImageIndex := 0; iPlot1.AddAnnotation; iPlot1.Annotation[1].X := 50; iPlot1.Annotation[1].Y := 50; iPlot1.Annotation[1].Style := ipasImage; iPlot1.Annotation[1].ImageListIndex := 0; iPlot1.Annotation[1].ImageIndex := 1; iPlot1.AddAnnotation; iPlot1.Annotation[2].X := 75; iPlot1.Annotation[2].Y := 25; iPlot1.Annotation[2].Style := ipasImage; iPlot1.Annotation[2].ImageListIndex := 0; iPlot1.Annotation[2].ImageIndex := 2;end;

Iocomp Components – Plot Pack Manual Page 65 of 336

Page 78: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Borland C++Builder Adding an Image through Code. The following examples assumes you have added three bitmaps to a resource file using the Borland Image Editor and added the resource file toyour project. The names of the three bitmaps are BITMAPS00, BITMAPS01 1, BITMAPS02. To add the resource file to your project, add#pragma resource "ImageDisplayGraphics.res" right under the #pragma resource "*.dfm" or #pragma resource "*.xfm" in the from file.This example demonstrates adding three annotations using the three different bitmaps.

CBuilder (Windows/Linux):void __fastcall TForm1::LoadImagesClick(TObject *Sender){ String NumStr;

iPlot1->ImageListClear(0); for (int i=0; i<3; i++) { NumStr = IntToStr(i);

while (NumStr.Length() < 2) NumStr = "0" + NumStr; // Add Leading Zeros iPlot1->ImageListLoadFromResourceName(0,(int)HInstance,"BITMAPS" + NumStr); }}void __fastcall TForm1::DisplayAnnotationsClick(TObject *Sender){ iPlot1->AddAnnotation(); iPlot1->Annotation[0]->X = 25; iPlot1->Annotation[0]->Y = 75; iPlot1->Annotation[0]->Style = ipasImage; iPlot1->Annotation[0]->ImageListIndex = 0; iPlot1->Annotation[0]->ImageIndex = 0; iPlot1->AddAnnotation(); iPlot1->Annotation[1]->X = 50; iPlot1->Annotation[1]->Y = 50; iPlot1->Annotation[1]->Style = ipasImage; iPlot1->Annotation[1]->ImageListIndex = 0; iPlot1->Annotation[1]->ImageIndex = 1; iPlot1->AddAnnotation(); iPlot1->Annotation[2]->X = 75; iPlot1->Annotation[2]->Y = 25; iPlot1->Annotation[2]->Style = ipasImage; iPlot1->Annotation[2]->ImageListIndex = 0; iPlot1->Annotation[2]->ImageIndex = 2;}

Annotation Click EventThis event, actually an event on the main component interface, is fired every time a user clicks on an annotation when the Select Button is active.The event passes back the Index of the Annotation that is clicked.

Type of Annotation On Click AnnotationTextLine

RectangleLineXLineYImage

TextRectangleEllipse

Table 13.6

‘Visual BasicOnClickAnnotation(ByVal Index As Long)

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

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

You can also allow the user to resize and/or move annotations (except for line annotations) by utilizing the UserCanSize and UserCanMoveproperties of each individual annotation. Events such as OnAnnotationCoordinatesChangeFinished, OnAnnotationCoordinatesChange,and OnClickAnnotation can be used to perform actions when a user changes an annotation position or resizes the annotation.

Clip Annotation to an AxisThe ClipToAxes property is used to specify whether the Annotation clips to the Axes it is assigned to through it's associated channel. Thisproperty is generally only used with charts that utilize Stacked Axes and where you want the Annotations to be clipped or to disappear whenscrolled outside of the bounds of the Axes. This is the expected behavior as the channel data is clipped when it scrolls outside of the bounds ofthe Axes assigned to the channel.

Page 66 of 336 Iocomp Components – Plot Pack Manual

Page 79: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Annotation Examples

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

FIGURE 13.7Example of a

TextAnnotation.

Text Annotation ExampleiPlot1.AddAnnotationiPlot1.Annotation(Index).Style = ipasText 'Text AnnotationiPlot1.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).FontColor = vbWhite iPlot1.Annotation(Index).Text = "Sample Annotation"

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

FIGURE 13.8Example of a

Line Annotation.

Line Annotation ExampleiPlot1.AddAnnotationiPlot1.Annotation(Index).Style = ipasLine 'Line AnnotationiPlot1.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 Coordinate

Rectangle:Rectangle annotations. Width, length, line color, fill style, and fill color properties can be set 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’s width and height. Use the PenColor, PenWidth,and PenStyle properties to set the border line properties. Use the BrushColor and BrushStyle properties to set the fill properties.

FIGURE 13.9Example of a

RectangleAnnotation.

Rectangle Annotation ExampleiPlot1.AddAnnotationiPlot1.Annotation(Index).Style = ipasRectangle iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = "Channel 1"iPlot1.Annotation(Index).X = 55.25 iPlot1.Annotation(Index).Y = 75.25 iPlot1.Annotation(Index).Width = 20 iPlot1.Annotation(Index).Height = 20

Iocomp Components – Plot Pack Manual Page 67 of 336

Page 80: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

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

FIGURE 13.10Example of a Line

X Annotation.Showing PenColor,PenStyle PenWidth

LineX ExampleiPlot1.AddAnnotationiPlot1.Annotation(Index).Style = ipasLineX iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(Index).X = 18.33

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

FIGURE 13.11Example of a Line YAnnotation. ShowingPenColor, PenStyle

PenWidth

LineY ExampleiPlot1.AddAnnotationiPlot1.Annotation(Index).Style = ipasLineY iPlot1.Annotation(Index).Reference = iprtChanneliPlot1.Annotation(Index).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(Index).Y = 59.85

Text Rectangle:Text annotations with a surrounding rectangle. Font size, style, name, color properties, and text rotation can be set for each individualText Rectangle annotation. Use the X and Y properties to set the center-point of the Text Rectangle Object. Width, length, line color,fill style, and fill color properties can also be. The text will be centered both horizontally and vertically within the rectangle.

FIGURE 13.12Example of a

Text RectangleAnnotation.

Text Rectangle Annotation ExampleiPlot1.AddAnnotationiPlot1.Annotation(6).Style = ipasTextRectangleiPlot1.Annotation(6).X = 30iPlot1.Annotation(6).Y = 30iPlot1.Annotation(6).Width = 20 'Width in % of DataView WidthiPlot1.Annotation(6).Height = 10 'Height in % of DataView HeightiPlot1.Annotation(6).Text = "Sample"

Page 68 of 336 Iocomp Components – Plot Pack Manual

Page 81: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Ellipse:Ellipse Annotations. Use the X, Y, X2, and Y2 properties to set the position and size of the Ellipse Object. The Ellipse upper-leftpoint is specified by the X and Y property and the lower-right point is specified by the X2 and Y2 properties. The color of the ellipseis specified by using the BrushColor and the PenColor. To make the ellipse transparent, set the BrushStyle to Clear.

FIGURE 13.13Example of an

EllipseAnnotation.

Ellipse Annotation ExampleiPlot1.AddAnnotationiPlot1.Annotation(0).Reference = iprtChanneliPlot1.Annotation(0).ChannelName = iPlot1.Channel(0).NameiPlot1.Annotation(0).Style = ipasEllipseiPlot1.Annotation(0).X = 40iPlot1.Annotation(0).Y = 60iPlot1.Annotation(0).X2 = 60iPlot1.Annotation(0).Y2 = 40

Iocomp Components – Plot Pack Manual Page 69 of 336

Page 82: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 13 - Annotations

Image:Bitmap Annotations: Use the X and Y properties to set the center-point of the Image annotation. The image will be centered aroundthis point. Images are obtained from the built-in image lists of the component. You can add images at design-time by using our built-inproperty editors. There are three image lists available, supporting an unlimited number of images…

FIGURE 13.14Example of a

ImageAnnotation.

Image ExampleiPlotX1.AddAnnotationiPlotX1.Annotation(0).Reference = iprtChanneliPlotX1.Annotation(0).ChannelName = iPlotX1.Channel(0).NameiPlot1.Annotation(5).X = 50iPlot1.Annotation(5).Y = 50iPlot1.Annotation(5).Style = ipasImageiPlot1.Annotation(5).ImageListIndex = 0iPlot1.Annotation(5).ImageIndex = 2

Page 70 of 336 Iocomp Components – Plot Pack Manual

Page 83: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 14 - Limits

Chapter 14 - Limits

Limits are objects that you can define and place on the chart DataView area. They are useful for showing a set of Limits or “Process Windows” where datashould 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 filled band, a single line, or double lines. The line type limits have the option of allowing the user to move them.You can create an unlimited number of limits per chart.

To modify the layering of the limit within the DataView area, change the Layer property. See Chapter 29 - Layer Control page 154 for more detailedinformation.

LineXThis 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, andwidth as shown in FIGURE 14.1. Do not use the line width to simulate a band limit as the line width is in pixels (not accurate for limit use), andthe band limits use the actual axis values.

FIGURE 14.1LineX Limit

Style

LineX Limit ExamplesIndex = iPlot1.AddLimitiPlot1.Limit(Index).LineWidth = 3iPlot1.Limit(Index).Style = iplsLineXiPlot1.Limit(Index0).Color = vbRediPlot1.Limit(Index).LineStyle = psSolid

iPlot1.Limit(Index).Line1Position = 50 'Position on X-Axis

LineYThis type of limit is a horizontal line positioned at a specific Y-Axis value, perpendicular to the Y-Axis. You can modify the line style, color, andwidth as shown in FIGURE 14.2. Do not use the line width to simulate a band limit as the line width is in pixels (not accurate for limit use), andthe band limits use the actual axis values.

FIGURE 14.2LineY Limit

Style

LineY Limit ExamplesIndex = iPlot1.AddLimitiPlot1.Limit(Index).LineWidth = 3iPlot1.Limit(Index).Style = iplsLineYiPlot1.Limit(Index).Color = vbRediPlot1.Limit(Index).LineStyle = psSolid

iPlot1.Limit(Index).Line1Position = 50 'Position on Y-Axis

Iocomp Components – Plot Pack Manual Page 71 of 336

Page 84: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 14 - Limits

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

FIGURE 14.3BandX Limit Style

BandX Limit ExamplesIndex = iPlotX1.AddLimitiPlotX1.Limit(Index).Style = iplsBandXiPlotX1.Limit(Index).Color = vbYellowiPlotX1.Limit(Index).FillStyle = bsFDiagonal

iPlotX1.Limit(Index).Line1Position = 25 'Position on X-AxisiPlotX1.Limit(Index).Line2Position = 45 'Position on X-Axis

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 thestarting Y Value and ending Y Value to create the band. You can also modify fill properties such as fill style and fill color as shown in FIGURE14.4. If you specify a fill style of clear, then the band will be comprised of two parallel lines.

FIGURE 14.4BandY Limit

Style.

BandY Limit ExamplesIndex = iPlotX1.AddLimitiPlot1.Limit(Index).Style = iplsBandYiPlot1.Limit(Index).Color = vbRediPlot1.Limit(Index).FillStyle = bsDiagCross

iPlot1.Limit(Index).Line1Position = 60 'Position on Y-AxisiPlot1.Limit(Index).Line2Position = 80 'Position on Y-Axis

Page 72 of 336 Iocomp Components – Plot Pack Manual

Page 85: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 14 - Limits

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 semi-perpendicular to the X-Axis. Use AddBandElement to add individual band elements to make up the entire band. Each band element will beconnected to the previous and next band element to make up the band as shown in FIGURE 14.5.

FIGURE 14.5PolyBandX Limit

Style.

PolyBandX Limit ExamplesIndex = iPlot1.AddLimitiPlot1.Limit(Index).Style = iplsPolyBandXiPlot1.Limit(Index).Color = vbRediPlot1.Limit(Index).FillStyle = bsSolid

iPlot1.Limit(Index).AddBandElement( 0, 85, 65) ' 0 : Position on Y-Axis, 85 : Upper limit X-Axis, 65 : Lower limit X-AxisiPlot1.Limit(Index).AddBandElement( 25, 75, 55) ' 25 : Position on Y-Axis, 75 : Upper limit X-Axis, 55 : Lower limit X-AxisiPlot1.Limit(Index).AddBandElement( 45, 85, 65) ' 45 : Position on Y-Axis, 85 : Upper limit X-Axis, 65 : Lower limit X-AxisiPlot1.Limit(Index).AddBandElement( 70, 75, 55) ' 70 : Position on Y-Axis, 75 : Upper limit X-Axis, 55 : Lower limit X-AxisiPlot1.Limit(Index).AddBandElement(100, 85, 65) '100 : Position on Y-Axis, 85 : Upper limit X-Axis, 65 : Lower limit X-Axis

PolyBandYThis 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 semi-perpendicular to the Y-Axis. Use AddBandElement to add individual band elements to make up the entire band. Each band element will beconnected to the previous and next band element to make up the band as shown in FIGURE 14.6.

FIGURE 14.6PolyBandY Limit

Style.

Poly Band Limit ExamplesIndex = iPlot1.AddLimitiPlot1.Limit(Index).Style = iplsPolyBandYiPlot1.Limit(Index).Color = vbRediPlot1.Limit(Index).FillStyle = bsSolid

iPlot1.Limit(Index).AddBandElement( 0, 65, 35) ' 0 : Position on X-Axis, 65 : Upper limit Y-Axis, 35 : Lower limit Y-AxisiPlot1.Limit(Index).AddBandElement( 25, 55, 25) ' 25 : Position on X-Axis, 55 : Upper limit Y-Axis, 25 : Lower limit Y-AxisiPlot1.Limit(Index).AddBandElement( 45, 65, 35) ' 45 : Position on X-Axis, 65 : Upper limit Y-Axis, 35 : Lower limit Y-AxisiPlot1.Limit(Index).AddBandElement( 65, 55, 25) ' 65 : Position on X-Axis, 55 : Upper limit Y-Axis, 25 : Lower limit Y-AxisiPlot1.Limit(Index).AddBandElement(100, 75, 45) '100 : Position on X-Axis, 75 : Upper limit Y-Axis, 45 : Lower limit Y-Axis

Iocomp Components – Plot Pack Manual Page 73 of 336

Page 86: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 14 - Limits

Adding and Removing LimitsTo 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 aschanging the limit style, the limit fill (if applicable), 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()

To remove all band elements, use the ClearAllElements method…

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

User InteractivityThe limits are by default fixed to the DataView area. However, you can allow your application end-user to modify the position of the limit linesby enabling the UserCanMove property...

iPlot1.Limit(Index).UserCanMove = True

Setting this property to true will allow the user to modify the Line1Position and Line2Position properties of a limit (for PolyBand limits, the

individually added elements will be modified) when the user clicks-on and drags a limit around the DataView. The ToolBar Select Buttonmust be depressed before the user can modify the limit lines. If this property is FALSE, then the user will be prevented from modifying theposition of the limit lines.

To be notified when the Line1Position or Line1Position properties have changed (either from the user moving the limit lines or your own codemodifying these properties), use the OnLimitLine1PositionChange and OnLimitLine2PositionChange events. These events will pass theindex of the limit that was modified, the old position, and the new position.

Note: these events will not fire for Poly-band limits.

See Chapter 27 - Plot Pack Events page 114 for more detailed information about events.

Page 74 of 336 Iocomp Components – Plot Pack Manual

Page 87: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 15 - Visual Layout Manager

Chapter 15 - Visual Layout Manager

The Visual Layout Manger included in iPlot and iXYPlot component enables the programmer easy layout of the chart plot objects with very little effort. TheLayout Manager is available at design-time through our custom 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 code and without using complicated properties. You canof course use your own programming code to make changes to the chart layout at runtime, but the Layout Manger makes it simple and easy to do visually.

FIGURE 15.1Visual Layout

Manager

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

The rectangles within the layout viewer represent individual X-Axes, Y-Axes, Labels, Data View, Legend, and ToolBar Objects. The Data View Object isfixed in the center and its size is adjusts based on the objects placed around it.

Tutorial

How to Move ObjectsIn FIGURE 15.2, the mouse is being held down over the Y-Axis. Notice that the Y-Axis object turns from a gray background to ayellow background on your screen to indicate that it is being selected. In FIGURE 15.3, the mouse is being used to drag the Y-Axis onto the other side of the DataView just before the Legend. Notice that a rectangle will move along with your cursor. This indicates thatyou are moving the object over valid positions that are available.

FIGURE 15.2Moving Y-Axis Object

FIGURE 15.3Moving Y-Axis Object

Iocomp Components – Plot Pack Manual Page 75 of 336

Page 88: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 15 - Visual Layout Manager

Release the mouse button to complete the move of the Y-Axis object. In FIGURE 15.4 notice that the Y-Axis object has moved to theposition specified and all of the other objects have been repositioned to maximize the size of the Data View area. In FIGURE 15.5 theY-Axis is on the right hand side of the DataView.

FIGURE 15.4Y-Axis Object Moved in-between DataView and Legend

FIGURE 15.5Y-Axis Object Moved in-between DataView and Legend

Adding Plot ObjectsTo add a Plot Object, such as an axis, right-click anywhere in the Layout manager window of the property editor to bring up the pop-up menu. Click the “Add Y-Axis” menu item as shown in FIGURE 15.6. The Layout Manager window has now added a Y-Axis to thePlot Component as shown in FIGURE 15.7.

FIGURE 15.6Adding Y-Axis #2

FIGURE 15.7Y-Axis #2 is added

How to Stack AxesThe Visual Layout Manger make it easy to stack multiple axes on top of one another. Simple drag one axis on top of another axis andthey will automatically stack. FIGURE 15.8 Shows an example with two Y-Axes and Y-Axis 1 is being dropped on Y-Axis 2.FIGURE 15.9 Shows the result after the mouse is released when completing the drag and drop.

FIGURE 15.8Stacking Y-Axis #1 and Y-Axis #2

FIGURE 15.9Shows Y-Axis #1 and Y-Axis #2 Stacked

Page 76 of 336 Iocomp Components – Plot Pack Manual

Page 89: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 15 - Visual Layout Manager

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”menu item as shownin FIGURE 15.10 . This will reverse the positions of all X and Y-Axes objects as shown in FIGURE 15.11.

FIGURE 15.10Swapping X and Y-Axes

FIGURE 15.11Swapped X and Y-Axes

Reversing or Rotating Axes has no effect on DataView aligned Annotations. The reference values specified are always left to right (0-100)and bottom to top in relation to the Data View.

Deleting an ObjectTo Delete an object, right click over the object you wish to delete and click the Delete menu item. FIGURE 15.12 Shows an examplewhere Y-Axis 2 is being deleted and FIGURE 15.13 shows the result after the delete is completed.

FIGURE 15.12Deleting Y-Axis Y-Axis #2

FIGURE 15.13Shows Title Not visible in Layout

Iocomp Components – Plot Pack Manual Page 77 of 336

Page 90: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 15 - Visual Layout Manager

Moving the LegendTo move the Legend field to the top of the Data View, left-click the legend and drag to above the Title as shown in FIGURE 15.14.Then release the mouse and the move will be completed as shown in FIGURE 15.15. The Legend can be moved to any location aroundthe DataView with the exception that it can not be above the ToolBar.

FIGURE 15.14Shows Legend being moved to the Top of the Data View with no Title

FIGURE 15.15Shows the Legend on top of the Data View with no Title.

The Plot Component Legend Field is now on top of the Data View as in FIGURE 15.16.

FIGURE 15.16Shows the

Legend on top ofthe Data Viewwith no Title.

Resizing Objects On the Axes and Labels support sizing. To size either object, move the mouse to one of the ends of the option until the mouse cursorchanges to a sizing symbol. Hold the mouse down and drag the object to the desired size and then release the mouse button to completethe sizing operation. FIGURE 15.17 And FIGURE 15.18 show an example of sizing two Y-Axes.

FIGURE 15.17Sizing Y-Axis 1 from the Layout Manager.

FIGURE 15.18Sizing Y-Axis 2 from the Layout Manager.

Page 78 of 336 Iocomp Components – Plot Pack Manual

Page 91: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

Chapter 16 - Adding Data

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

If you will be adding data from unsynchronized events (such as from data acquisition hardware) and run into a problem where some data willcause other data to scroll off the screen, take a look at the multiple X and Y-Axis support. You can have each channel assigned to its ownaxes, independent of other channels. You can then add data in a synchronous or asynchronous manner as needed.

AddXYThis method allows you to add data to the plot component in x and y data value pairs. This is the simplest method to use when adding data to thePlot Components. This method is provided on both the iPlot and iXYPlot components. Complete AddXY Example

The following example in FIGURE 16.1 assumes that you have placed a single iPlot component on your form along with a standardpush button named “PlotButton”. When you initially create the plot object, 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.

FIGURE 16.1Example of AddXY.

Visual BasicPrivate Sub PlotButton_Click() Dim x As Long Dim XData As Double Dim YData As Double For x = 1 To 100 XData = XData + 1 'Increment X Data

YData = Rnd(1) * 100 'Generate Random Y Data

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

Next xEnd Sub

Visual C++ [Disp Interface]void CFormDlg::OnPlotButton() { double XData; double YData;

XData = 0; YData = 0;

for(int i=0; i<100; i++) { XData = XData + 1; //Increment X Data

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

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

}}

Iocomp Components – Plot Pack Manual Page 79 of 336

Page 92: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

Visual C++ [High-Speed iDispatch Interface]void CFormDlg::OnPlotButton() { double XData; double YData; CWnd* m_Wnd; IUnknown* m_iUnknown; CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

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

XData = 0; YData = 0; for(int i=0; i<100; i++) { XData = XData + 1; //Increment X Data

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

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

CBuilder (Windows/Linux):void __fastcall TForm1::PlotButtonClick(TObject *Sender){ double XData; double YData;

XData = 0;

for(int i=0; i<100; i++) { XData = XData + 1; //Increment X Data YData = (random(100)); //Generate Random Y Data iPlot1->Channel[0]->AddXY(XData, YData); //Plot XY Data Pair };}

Delphi (Windows/Linux):procedure TForm1.PlotButtonClick(Sender: TObject);var x : Integer; XData : Double; YData : Double;begin for x := 1 To 100 do begin XData := XData + 1; //Increment X Counter YData := Random(100); //Generate Random Data iPlot1.Channel[0].AddXY(XData, YData); //Plot XY Data Pair 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 x Dim XData Dim YData For x = 1 To 100 XData = XData + 1 'Increment X Counter YData = Rnd(1) * 100 'Generate Random Data iPlotX1.Channel(0).AddXY XData, YData 'Plot XY Data Pair Nextend sub--></script></body></html>

Page 80 of 336 Iocomp Components – Plot Pack Manual

Page 93: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

High/Low ExampleUsing the High/Low properties help the user to track data as a stock chart. The user need to set the channel to Full Feature to Accessthe High/Low and Channel Trace Properties. The x-Axis Labels Format must be set to Date/Time and then the user chooses thespecific format. The X-Axis min does not have to be set but the first data will be partially cut-off. If the user chooses to set the min theuser must use the CDate("03/03/2003") for the X-Axis . The 0..5 is cut off half the day before the first data.

The HighLowEnabled must be set to true to activate the High/Low Properties. The HighLowBarWidth, HighLowCloseHeight,HighLowCloseWidth, HighLowOpenHeight and HighLowOpenWidth are set to the user selection.

Entering the HighLow Data is done by AddHighLow method. The first parameter is the X-Value (CDate("03/03/2003")), followed bythe High, Low, Open and Close parameters. This make is simple if the user chooses to draw a trace line. The Y-Value is the only pieceof data needed to draw a trace line. In FIGURE 16.2 the closed is used for the Y-Value of the trace line.

FIGURE 16.2Example of the

High/LowProperties

Visual Basic:Private Sub Form_Load()

iPlotX1.Channel(0).DataStyle = ipdsFullFeature iPlotX1.YAxis(0).Span = 50 iPlotX1.XAxis(0).LabelsFormatStyle = iptfDateTime iPlotX1.XAxis(0).DateTimeFormat = "d mmm" iPlotX1.XAxis(0).Min = CDate("03/03/2003") - 0.5 iPlotX1.XAxis(0).Span = 5 iPlotX1.Channel(0).HighLowEnabled = True iPlotX1.Channel(0).HighLowBarWidth = 0.07 iPlotX1.Channel(0).HighLowCloseHeight = 1.5 iPlotX1.Channel(0).HighLowCloseWidth = 0.15 iPlotX1.Channel(0).HighLowOpenHeight = 1.5 iPlotX1.Channel(0).HighLowOpenWidth = 0.15 iPlotX1.Channel(0).AddHighLow CDate("03/03/2003"), 30, 10, 15, 22 iPlotX1.Channel(0).AddHighLow CDate("03/04/2003"), 35, 20, 24, 32 iPlotX1.Channel(0).AddHighLow CDate("03/05/2003"), 40, 31, 33, 35 iPlotX1.Channel(0).AddHighLow CDate("03/06/2003"), 42, 28, 34, 31 iPlotX1.Channel(0).AddHighLow CDate("03/07/2003"), 38, 27, 31, 30 iPlotX1.Channel(0).DataY(0) = iPlotX1.Channel(0).DataClose(0) iPlotX1.Channel(0).DataY(1) = iPlotX1.Channel(0).DataClose(1) iPlotX1.Channel(0).DataY(2) = iPlotX1.Channel(0).DataClose(2) iPlotX1.Channel(0).DataY(3) = iPlotX1.Channel(0).DataClose(3) iPlotX1.Channel(0).DataY(4) = iPlotX1.Channel(0).DataClose(4)End Sub

Iocomp Components – Plot Pack Manual Page 81 of 336

Page 94: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

Special ActiveX Example:When iterating through a large loop and access sub objects of the ActiveX plot component, it is more efficient to create a temporaryvariable to keep track of the sub object in memory instead of having 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 100 times for each AddXY method. There isa very small performance penalty when accessing the channel, which is magnified when looping, and can be noticeable with very largeloops. To rectify this, we can sacrifice a small amount of memory to greatly speed up large loops. We will set a local variable toreference the channel sub-object only once, and then reuse the local variable in the loop.

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

FIGURE 16.3Sample Output .

Visual BasicPrivate Sub PlotButton_Click() Dim x As Long Dim XData As Double Dim YData As Double Dim TempChannel as iPlotChannelX

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000 XData = XData + 1 'Increment X Data YData = Rnd(1) * 100 'Generate Random Y Data TempChannel.AddXY XData, YData 'Plot XY Data Pair Next xEnd Sub

Visual C++ [Disp Interface]//Place at top of cpp file#include "iplotx.h"#include "iplotchannelx.h"

void CFormDlg::OnPlotButton() { double XData; double YData; CiPlotChannelX TempChannel;

XData = 0; TempChannel = m_iPlotX1.GetChannel(0);

for(int i=0; i<1000000; i++) { XData = XData + 1; //Increment X Data YData = (rand()/(double)RAND_MAX)*100; //Generate Random Y Data TempChannel.AddXY(XData, YData); //Plot XY Data Pair }}

Page 82 of 336 Iocomp Components – Plot Pack Manual

Page 95: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

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;

m_Wnd = GetDlgItem(IDC_IPLOTX1); m_iUnknown = m_Wnd->GetControlUnknown(); m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \(LPVOID*)&iPlotX1); tempChannel = iPlotX1->Channel[0]; XData = 0; for(int i=0; i<1000000; i++) { XData = XData + 1; //Increment X Data YData = (rand()/(double)RAND_MAX)*100; //Generate Random Y Data tempChannel->AddXY(XData, YData); //Plot XY Data Pair };}

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 x Dim XData Dim YData Dim TempChannel Set TempChannel = iPlotX1.Channel(0) For x = 1 To 1000000 XData = XData + 1 'Increment X Counter YData = Rnd(1) * 100 'Generate Random Data TempChannel.AddXY XData, YData 'Plot XY Data Pair Nextend sub--></script></body></html>

Other Data Adding MethodsThe iPlot component has several other methods for adding data that are specific only to the iPlot component. These methods make it very easy toadd data in real-time using the component’s built-in timer or the computer’s internal system clock, or by allowing you to pass various variantarrays directly to the channel object for easy addition.

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

iPlot1.Channel(0).AddYElapsedSeconds(YData)

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

Iocomp Components – Plot Pack Manual Page 83 of 336

Page 96: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

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

iPlot1.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, 1 minute = 1/(24*60)]. See Appendix L - What is DateTime Format? page 287 for more detailed information on using Date/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 isuseful if you are acquiring data in real-time and wish to use current system time and you do not have access to independent time datafrom your data source.

iPlot1.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)]. See Appendix L - What is DateTime Format? page 287 for more detailed information on using Date/Time values.

If you have a service or program that automatically runs on your computer to synchronize your time with the NIST (National Institute ofScience and Technology) time computers via the Internet, with your corporate network servers, or any other program that may modify yoursystem clock, you may run into problems using this method. This is because the chart (and your actual data) expects time to incrementproperly. It is recommended that you do not use this method with such utilities, as there can be unpredictable results.

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 theAdd Arrays methods due to the use of Variants. These procedures have been added as a convenient way of passing variant arrays to the channel to add data, but is slower than simply looping through 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 any of the Add Array methods.

AddYArrayThis method adds data points from a single variant array, containing just y values. You will then specify a fixed X-Interval betweendata points.

iPlot1.Channel(0).AddYArray(XInterval, YDataArray)

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

AddXYArrayThis method adds data points from a single variant array, containing both x and y values. The array must be two-dimensional with thefirst dimension containing X-coordinate data and the second dimension containing Y-coordinate data. Both dimensions must have thesame number of elements (i.e. if the first dimension contains 100 elements, the second dimension must contain 100 elements),otherwise an exception will be generated.

iPlot1.Channel(0).AddXYArray(DataArray)

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

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

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

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

Page 84 of 336 Iocomp Components – Plot Pack Manual

Page 97: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

AddEmptyThis method sets a data point as an empty data point. 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, no Data Marker is shown and the trace line will notbe drawn to this data point. This is useful for adding data point “placeholders” so that you can set the X and Y value of the data pointat 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 17 - Null Data and Empty Data Handling page 87 for more information.

AddXNull [iPlot component only]This method adds a data point at a specified X data point. The Y value will be set to Null.

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

See Chapter 17 - Null Data and Empty Data Handling page 87 for more information.

AddNull [iXYPlot component only]This method adds a data point as a null data point (both X and Y coordinates). You must first add a data point using AddXY usingdummy 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 17 - Null Data and Empty Data Handling page 87 for more information.

Modifying/Reading DataIf you need to modify or read a data point after adding it to a channel, you can use the following property and/or methods to change the X or Yvalue of a data point. You will need to know the index of the data point to make this modification(the index was passed back by the AddXY andother add data functions when you were adding data points)…

Visual BasicIndex = iPlot1.Channel(0).AddXY(10.5, 20.5) 'Add a data point and get the data point's Index iPlot1.Channel(0).DataX(Index) = 11 'Change the data point's X and Y ValueiPlot1.Channel(0).DataY(Index) = 21 DataPointXValue = iPlot1.Channel(0).DataX(Index) 'Read the data point's X and Y ValueDataPointYValue = iPlot1.Channel(0).DataY(Index)

Visual C++Index = m_iPlot1.GetChannel(0).AddXY(10.5, 20.5); //Add a data point and get the data point's Index

m_iPlot1.GetChannel(0).SetDataX(Index, 11); //Change the data point's X and Y Valuem_iPlot1.GetChannel(0).SetDataY(Index, 21); DataPointXValue = m_iPlot1.GetChannel(0).GetDataX(Index); //Read the data point's X and Y ValueDataPointYValue = m_iPlot1.GetChannel(0).GetDataY(Index);

Delphi (Windows/Linux):Index := iPlot1.Channel[0].AddXY(10.5, 20.5); //Add a data point and get the data point's Index iPlot1.Channel[0].DataX[Index] := 11; //Change the data point's X and Y ValueiPlot1.Channel[0].DataY[Index] := 21; DataPointXValue := iPlot1.Channel[0].DataX[Index]; //Read the data point's X and Y ValueDataPointYValue := iPlot1.Channel[0].DataY[Index];

CBuilder (Windows/Linux):Index = iPlot1->Channel[0]->AddXY(10.5, 20.5); //Add a data point and get the data point's Index

iPlot1->Channel[0]->DataX[Index] = 11; //Change the data point's X and Y ValueiPlot1->Channel[0]->DataY[Index] = 21; DataPointXValue = iPlot1->Channel[0]->DataX[Index]; //Read the data point's X and Y ValueDataPointYValue = iPlot1->Channel[0]->DataY[Index];

If you are using the iPlot component, you can also use a special method on the channel called GetYInterpolated. If you know a X value, then youcan query the component for the corresponding Y value of a data point at the X value. Since double values are not precise, the Y value returnedwill be interpolated using the trace line drawn between a data point before and after the given X value.

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

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

Iocomp Components – Plot Pack Manual Page 85 of 336

Page 98: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 16 - Adding Data

Running Y-Value Min, Max, and MeanThe Channel objects have three specialized properties that provide the following information about the channel without requiring extensivecalculations by the component…

• RunningYMax• RunningYMin• RunningYMean

These values represent the Maximum Y, Minimum Y, and Mean Y values in the specified channel. Since these values are calculated as you adddata, accessing these values is very quick since 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 checked

YMaxValue = iPlot1.Channel(Index).RunningYMaxYMinValue = iPlot1.Channel(Index).RunningYMinYMeanValue = iPlot1.Channel(Index).RunningYMean

The drawback to using these values is that if you change previous data points, these values will no longer be valid. To refresh these values if youchange 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, but you will see a performance decrease due to theoverhead.

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

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

Empty and Null Data PointsIn some situations, you may want to add a data point but not specify its X and/or Y Value. When a data point is missing it’s X and/or Y value, thedata point is ignored by the Plot component when drawing the trace line. This results in a trace line between two valid data points and ignoringthe empty data point.

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

To add an empty data point, use the AddXEmpty method. For the iPlot component, you must specify the X-Value. For the iXYPlot component,you do not specify the X or Y-Value. You can then use the DataX and/or DataY properties to specify the data point X and/or Y values at a latertime and you can use the DataEmpty property to clear the empty status.

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

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

See Chapter 17 - Null Data and Empty Data Handling page 87 for more information.

Page 86 of 336 Iocomp Components – Plot Pack Manual

Page 99: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 17 - Null Data and Empty Data Handling

Chapter 17 - Null Data and Empty Data Handling

By default, the Plot Pack components are setup to draw a trace line between every point on the chart in the order that they are added to the channel. The NullData handling features allows you to specify certain Y data values as null data points, causing a break in the trace.

This feature is typically used in data acquisition hardware applications where you lose connection with the hardware, but want to show on the chart that nodata was collected at a particular time.

FIGURE 17.1 Shows an example of a channel with a null inserted causing a break in the Trace-Line, notice the break in the trend line between the 4th and6th data points. The 5th data point was plotted with a null Y value so it does not show up in the chart and no line is drawn through that data point.

FIGURE 17.1Example Diagram of a Null

Data Point

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 data point being null (i.e. undefined). Simply pass the Xvalue (e.g. 2.56)

iPlot1.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.

iPlot1.Channel(0).AddNull()

Setting a Null Y Data Point at a Specific X Data PointThe DataNull() method is used to change a Y data point to a null value for an X/Y data point pair that has already been plotted on the chart.Simply pass the X value (e.g. 2.56)

iPlot1.Channel(0).DataNull(2.56)

Add EmptyBy default, the Plot Pack components are setup to draw a trace line between every point on the chart in the order that they are added to the channel. The AddEmpty method allows you to add data values as empty data points, causing the trace line drawn to skip the point as if it does notexist.

iPlot1.Channel(0).AddXEmpty(2.56)

This feature is typically used in data acquisition hardware applications where the empty data point is added when no data is collected by thehardware. The data point is not shown on the chart to indicate that no data was collected at a particular X (usually Time Axis value) and you havean undefined Y value (a.k.a. Empty Data Point).

Iocomp Components – Plot Pack Manual Page 87 of 336

Page 100: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 17 - Null Data and Empty Data Handling

Language Specific ExamplesThe following examples assume you have placed an iPlot Component on your form/dialog and have placed a simple pushbutton named“PlotButton” on your form/dialog. The example will plot 50 random data points with some random Null Data points for illustrative purposes asshown in FIGURE 17.2.

FIGURE 17.2Example ofNull Data.

Visual Basic:Private Sub PlotButton_Click() Dim x As Long Dim XData As Long Dim YData As Long For x = 1 To 50 XData = XData + 2 YData = Rnd(1) * 100 If Rnd(1) < 0.85 Then '85% of the X and Y Values as Data 15% of the X and Y Values as Null iPlotX1.Channel(0).AddXY XData, YData 'Plot X and Y Data Pair Else iPlotX1.Channel(0).AddXNull XData 'Plot X Data and Y Null Data End If Next xEnd Sub

Visual C++ [Disp Interface]:void CFormDlg::OnPlotButton() { double XData; double YData;

XData = 0;

for(int i=0; i<50; i++) { XData = XData + 2; YData = (rand()/(double)RAND_MAX)*100; if ((rand()/(double)RAND_MAX) < 0.85) //85% of the X and Y Values as Data 15% of the X and Y Values as Null { m_iPlotX1.GetChannel(0).AddXY(XData, YData); //Plot X and Y Data Pair } else { m_iPlotX1.GetChannel(0).AddXNull(XData); //Plot X Data and Y Null Data } }}

Page 88 of 336 Iocomp Components – Plot Pack Manual

Page 101: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 17 - Null Data and Empty Data Handling

Visual C++ [High-Speed iDispatch Interface]#import "iPlotLibrary.tlb" named_guids //Place at top of cpp file#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 example m_Wnd = GetDlgItem(IDC_IPLOTX1); m_iUnknown = m_Wnd->GetControlUnknown(); m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \(LPVOID*)&iPlotX1);

XData = 0;

for(int i=0; i<50; i++) { XData = XData + 2; YData = (rand()/(double)RAND_MAX)*100; if ((rand()/(double)RAND_MAX) < 0.85) //85% of the X and Y Values as Data 15% of the X and Y Values as Null { iPlotX1->Channel[0]->AddXY(XData, YData); //Plot X and Y Data Pair } else { iPlotX1->Channel[0]->AddXNull(XData); //Plot X Data and Y Null Data } }}

Delphi (Windows/Linux):procedure TForm1.PlotButtonClick(Sender: TObject);var x : Integer; XData : Double; YData : Double;begin for x := 1 To 50 do begin XData := XData + 2; YData := Random(100); If Random(11) < 8.5 then //85% of the X and Y Values as Data 15% of the X and Y Values as Null iPlot1.Channel[0].AddXY(XData, YData) //Plot XY Data Pair else iPlot1.Channel[0].AddXNull(XData); //Plot X Data and Y Null Data end;end;

CBuilder (Windows/Linux):#include <stdlib.h> //Place at top of cpp file

void __fastcall TForm1::PlotButtonClick(TObject *Sender){ double XData; double YData;

XData = 0;

for(int i=0; i<50; i++) { XData = XData + 2; YData = (random(100)); if (random(11) < 8.5) //85% of the X and Y Values as Data 15% of the X and Y Values as Null { iPlot1->Channel[0]->AddXY(XData, YData); //Plot X and Y Data Pair } else { iPlot1->Channel[0]->AddXNull(XData); //Plot X Data and Y Null Data } }}

Iocomp Components – Plot Pack Manual Page 89 of 336

Page 102: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 17 - Null Data and Empty Data Handling

VB.NetPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x As Long Dim XData As Long Dim YData As Long Dim TempRandom As Random

TempRandom = New Random() For x = 1 To 50 XData = XData + 2 YData = TempRandom.NextDouble() * 100

If TempRandom.NextDouble() < 0.85 Then '85% of the X and Y Values as Data 15% of the X and Y Values as Null AxiPlotX1.get_Channel(0).AddXY(XData, YData) 'Plot X and Y Data Pair Else AxiPlotX1.get_Channel(0).AddXNull(XData) 'Plot X Data and Y Null Data End If Next xEnd Sub

C#.NETprivate void button1_Click(object sender, System.EventArgs e){ double XData; double YData; Random TempRandom = new Random(); XData = 0; For(int i=0; i<50; i++) { XData = XData + 2; YData = TempRandom.NextDouble() * 100;

if (TempRandom.NextDouble()< 0.85) //85% of the X and Y Values as Data 15% of the X and Y Values as Null { axiPlotX1.get_Channel(0).AddXY(XData, YData); //Plot X and Y Data Pair } else { axiPlotX1.get_Channel(0).AddXNull(XData); //Plot X Data and Y Null Data } }}

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 x Dim XData Dim YData For x = 1 To 50 XData = XData + 2 YData = Rnd(1) * 100

If Rnd(1) < 0.85 Then '85% of the X and Y Values as Data 15% of the X and Y Values as Null iPlotX1.Channel(0).AddXY XData, YData 'Plot X and Y Data Pair Else iPlotX1.Channel(0).AddXNull XData 'Plot X Data and Y Null Data End If Nextend sub--></script></body></html>

Page 90 of 336 Iocomp Components – Plot Pack Manual

Page 103: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 18 - AutoScale and AutoLabel

Chapter 18 - 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 ofthe axis with respect to newly added data and is related to the axis’ tracking feature. The AutoLabel feature refers to the 1-2-5 rules that ensure the scaleslook “human readable”, that is to say fall on major ticks and values that look good to a human.

1-2-5 RuleThis rule refers to how the scales label positions and features are automatically calculated by the component. This means that the componentattempts to ensure that the scale contains major tick labels increment by 1, 2, or 5 (or multiples such as 10, 100, 1000, etc) within the bounds thatyou setup using the Axis’ Min and Max properties. In short, the scale will attempt to fit in as many major tick labels as possible

In FIGURE 18.1 for example, if your scale goes from –500 to +500, the component will attempt to fit as many labels between –500 and + 500that 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 ticksin such as scale that would satisfy the 1-2-5 rule. Another example is –500, -250, 0, 250, 500. An example that wouldn’t fit would be –500, -389,-278, -167, -56, 56, 167, 278, 389, 500. Besides, that kind of scale doesn’t look “human readable”

FIGURE 18.1Sample Chart showingX-Axis formatted with

the human-readable 1-2-5Rule

Which scale is used depends on the font size specified for the Axis’ labels. The scale will attempt to fit in a scale with the maximum number oflabels possible. How many can fit depends several configurable factors.

Below you will find a list of rules used for the AutoScale and AutoLabel features. The component will go thorough the list in order and attempt tofit the maximum number of labels

Linear ScaleThe scale will attempt to fit the maximum number of labels where the major tick labels are divisible by 1, 2, or 5.

Date/Time ScaleThe scale will attempt to fit the maximum number of labels possible by moving through the following order starting from Milliseconds and goingout to Years. For example, if generating labels on human-readable minutes is not possible, the scale will automatically switch to creating labelsusing hours instead. If that is not possible, it will move on to days, etc.

• Milliseconds: 1, 2, 5, 10, 20, 50, 100, 200, or 500• Seconds: 1, 5, 10, 15, or 30• Minutes: 1, 5, 10, 15, or 30• Hours: 1, 2, or 12• Days: 1, 7, or 14• Months: 1, 2, 3, or 6• Years: 1, 2, or 5

FIGURE 18.2Sample Chart showing X-Axis formatted as Date/Time showing the hour,

minute, and second.

FIGURE 18.3Sample Chart showing X-Axis formatted as Date/Time showing the day,

month, hours, and seconds in 12-hour format.

Iocomp Components – Plot Pack Manual Page 91 of 336

Page 104: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 18 - AutoScale and AutoLabel

Price32nds ScaleIn FIGURE 18.4 the scale will attempt to fit the maximum number of labels possible where the major ticks are divisible by...1/256, 2/256, 4/256,1/32, 2/32, 4/32, 8/32, or 16/32

FIGURE 18.4Sample Chart

showing Y-Axisformatted with thebond market Price

32nds Scale.

Log10 ScaleIn FIGURE 18.5 the scale will attempt to fit the maximum number of labels possible where the major ticks are divisible by..2, 5, 10, 20, 50, 100,or 200.

FIGURE 18.5Sample Chart

showing Y-Axisformatted as a Log

base 10- scale.

Modifying the 1-2-5 RuleDesiredIncrementIf the 1-2-5 Rule doesn’t work in your particular situation, you can “tune” the AutoLabel feature by using the DesiredIncrement property of theaxis. This property let’s you override the 1-2-5 rule and specify the increment used in the AutoLabel calculations.

In FIGURE 18.6 the scale from 0 to 10. The Scale automatically creates a scale 0, 2.0, 4.0, 6.0, 8.0, 10.0. In FIGURE 18.7 you want the scale toincrement by values of 2.5. So you would set the DesiredIncrement property to “2.5”, and if the new scale will fit in the space allotted, you wouldsee a scale: 0, 2.5, 5.0, 7.5, 10.0.

FIGURE 18.6Sample Chart showing X-Axis formatted with DesiredIncrement disabled.

FIGURE 18.7Sample Chart showing X-Axis formatted with the DesiredIncrement property set

to “2.5”.

Page 92 of 336 Iocomp Components – Plot Pack Manual

Page 105: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 18 - AutoScale and AutoLabel

Desired StartIn FIGURE 18.8 shows the normal start, you can also force the AutoScale routine to start on a particular major tick value instead of the defaultMin value of the axis. Let’s say, for example you have a scale from 0 to 10. The initial chart starts the scale off at the minimum value of the scalewhich is 0.0. For scales that do not scroll, you can also specify a fixed DesiredStart property to force the scale to start the first major tick at aspecified value. In FIGURE 18.9 shows you want the first major tick to start off at 0.5. So you would set the DesiredStart property to 0.5, forcingthe scale to start at 0.5.

FIGURE 18.8Sample Chart showing X-Axis with DesiredStart disabled.

FIGURE 18.9Sample Chart showing X-Axis using the DesiredStart property set to “0.5”

TrackingTracking refers to how the scale reacts when new data is added to the chart, such as smoothly scrolling to show new data that is added.

See Chapter 19 - Tracking page 94 for more information.

Iocomp Components – Plot Pack Manual Page 93 of 336

Page 106: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 19 - Tracking

Chapter 19 - Tracking

Tracking is a general term for the Auto-Scale and Auto-Scrolling features of the Plot Pack. These features pertain to how the axes react to the addition ofnew data to the chart with respect to the sizing of the span of the axes and the position of the axes with respect to this new data. Tracking Data is informationfrom the channel, regarding newly added data points, that is passed to the axes so that they can adjust according to your needs.

The Plot Pack Channel and Axes objects support a feature called Tracking. Whenever a channel draws data to the DataView window, it sends Tracking Datato its associated X and Y-Axes. This tracking data 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.

FIGURE 19.1Diagram of Transmissionof Tracking Data from

Channel to Axeswherever data is added.

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 is added from left to right), the X-Axis will smoothly scroll tokeep the most recent data in view.

iPlot1.Xaxis(0).TrackingStyle = iptsScrollSmooth

Y-Axis is setup for Scale Min Max Adjust. The axis will scale the Min and Span properties to keep the new tracking data in view.

iPlot1.YAxis(0).TrackingStyle = iptsScaleMinMax

All Channels are set to have their tracking data sent to their associated axes

iPlot1.Channel(0).TrackingStyle = iptsScrollSmooth

All Axes have their Tracking enabled so that they will adjust to new tracking data from the channels.

iPlot1.Xaxis(0).TrackingEnabled = TrueiPlot1.YAxis(0).TrackingEnabled = True

You can independently setup your own scaling and tracking options for each axis and channel if you wish if the default settings do not fit your needs. Thenext few sections will discuss the different AutoScale and Tracking options that are available…

1-2-5 Rule: This is a feature of the AutoScale capability built into the axes of all Plot Pack components. The rule has been designed toprovide major tick labels that are “human readable”. In studies, most people like to see numbers increment by numbers that are multiples of1, 2, or 5. For example, on a scale that is between 0 and 100, people like to see a scale that increments like 0, 10, 20, 30, 40, 50, 60, 70, 80,90, and 100. If there is not enough room on the chart, 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, and wouldn’t look good to a human anyway. The 1-2-5 Rule will ensure that thescales always look professional.See Chapter 18 - AutoScale and AutoLabel page 91 for more information on the 1-2-5 Rule.

Tracking StylesThere are five different styles that can be set on each axis that control how the axes are Auto-Scaled when new tracking data is received from eachchannel. All axes support the 1-2-5 rule which provides “human readable” scales. See Chapter 18 - AutoScale and AutoLabel page 91 for more information on the automatic scaling and label features of the Plot Pack.

Scale Min Max [Y-Axis Default] This tracking mode will adjust the min and span properties on the axis to ensure that new data being added to the channel is kept in thevisible DataView area. This is generally used with the Y-Axis for Strip Chart applications.

iPlot1.XAxis(0).TrackingStyle = iptsScaleMinMaxiPlot1.YAxis(0).TrackingStyle = iptsScaleMinMax

Scale MaxThis tracking mode will adjust only the max properties on the axis to ensure that new data being added to the channel is kept in thevisible DataView area. If tracking data indicates that the data is below the min property of the axis, then the min value will not bechanged.

iPlot1.XAxis(0).TrackingStyle = iptsScaleMaxiPlot1.YAxis(0).TrackingStyle = iptsScaleMax

Page 94 of 336 Iocomp Components – Plot Pack Manual

Page 107: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 19 - Tracking

Scale MinThis tracking mode will adjust only the min properties on the axis to ensure that new data being added to the channel is kept in thevisible DataView area. If tracking data indicates that the data is above the max property of the axis, then the max value will not bechanged.

iPlot1.Xaxis(0).TrackingStyle = iptsScaleMiniPlot1.Yaxis(0).TrackingStyle = iptsScaleMin

Scroll Smooth [X-Axis Default]If the data is off axis, then this tracking mode will adjust the axis to show the new tracking data at the end of the scale. This style isgenerally used with the X-Axis for Strip Chart applications. Smooth Scroll works in one direction only. You can add data in everincreasing or ever increasing x-values, but you cannot change direction.

iPlot1.Xaxis(0).TrackingStyle = iptsScrollSmoothiPlot1.Yaxis(0).TrackingStyle = iptsScrollSmooth

Scroll PageIf the data is off axis, then this tracking mode will adjust the axis in discrete blocks (will show next major tick) to show the newtracking data at the end of the scale. This style is generally used with the X-Axis for Strip Chart applications.

iPlot1.Xaxis(0).TrackingStyle = iptsScrollPageiPlot1.Yaxis(0).TrackingStyle = iptsScrollPage

Expand CollapseThis tracking mode will adjust the min and span properties on the axis to ensure that all data being added to the channel is kept in thevisible DataView area. It will also ensure that the all visible data is expanded to the maximum viewing size within the data view bysizing the span up and down and the data changes in the viewable area.

Warning!: This style is not recommended for all situations because the routines used to achieve this effect can place a large load onthe computer’s processor under certain situations.

iPlot1.Xaxis(0).TrackingStyle = iptsExpandCollapseiPlot1.Yaxis(0).TrackingStyle = iptsExpandCollapse

Expand Collapse FastThe Expand Collapse Fast works the same as the Expand Collapse style with the exception that it uses the RunningYMin andRunningYMax to dramatically speed up the process. The Expand Collapse recalculates the YMin and YMax each time which can bevery time consuming when there are a large number of points. The only draw back to using the fast version is that you can not modifyprevious data points because the RunningYMin and RunningYMax are not updated.

iPlot1.Xaxis(0).TrackingStyle = iptsExpandCollapseFastiPlot1.Yaxis(0).TrackingStyle = iptsExpandCollapseFast

Tracking Align First StylesThere are four styles that can be used to instruct the axes on how to align themselves when the first data point is plotted to the chart. You can havethe data begin plotting on one extreme side of the chart or another depending on this setting.

MinThis style adjusts the axis to show the first data point on the beginning of the scale.iPlot1.Xaxis(0).TrackingAlignFirstStyle = ipafsMiniPlot1.Yaxis(0).TrackingAlignFirstStyle = ipafsMin

FIGURE 19.2Example of theMin Tracking

Align First Style.

Iocomp Components – Plot Pack Manual Page 95 of 336

Page 108: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 19 - Tracking

MaxThis style adjusts the axis to show the first data point on the end of the scale.

iPlot1.Xaxis(0).TrackingAlignFirstStyle = ipafsMaxiPlot1.Yaxis(0).TrackingAlignFirstStyle = ipafsMax

FIGURE 19.3Example of theMax Tracking

Align FirstStyle.

AutoThis style leaves the axis unchanged if the first data point is already in view. If the first data point is out of view, then the axis isadjusted to show the first data point on the beginning of the scale.

iPlot1.Xaxis(0).TrackingAlignFirstStyle = ipafsAutoiPlot1.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 most commonly used Align First Style.

iPlot1.Xaxis(0).TrackingAlignFirstStyle = ipafsNoneiPlot1.Yaxis(0).TrackingAlignFirstStyle = ipafsNone

Tracking Scroll Compress MaxThis feature specifies the maximum span value that is used to compress the axis when it receives tracking data. When the TrackingEnabledproperty is set to TRUE, the Span property will be increased (Compressed) to include the new Tracking Data if the current Span property is lessthan the TrackingScrollCompressMax property value.

FIGURE 19.4Example ofChart for

Tracking ScrollCompress Max

Discussion

Notice that the data in the plot has been plotted up to an X-Axis value of 100. If the TrackingScrollCompressMax property is set to 500, then X-Axis span will begin to increase as new data is being added. When the Span property reaches the same value as the TrackingScrollCompressMaxproperty, a value of 500, then the TrackingStyle will take over from that point on. In a default chart, the X-Axis would begin to Smooth Scrollafter the Span property had reached a value of 500.

iPlot1.Xaxis(0).TrackingScrollCompressMax = 500

Enabling and Disabling TrackingYou can enable or disable the transfer of tracking data from the Channel to the Axes by setting independent properties on either the channel oraxes. This gives you complete control over how tracking is implemented.

Channel Tracking PropertiesYou can disable the transmission of tracking data that comes from a channel to a particular axis by setting that channel’sXAxisTrackingEnabled or YAxisTrackingEnabled properties. This allows you to only send tracking data to one, both, or none of theassociated axes for this channel. The default value is TRUE.

iPlot1.Channel(0).XAxisTrackingEnabled = TrueiPlot1.Channel(0).YAxisTrackingEnabled = True

Axis Tracking PropertiesYou can disable the reception of tracking data for a particular axis by setting the TrackingEnabled property for the axis. The defaultvalue is TRUE.

Page 96 of 336 Iocomp Components – Plot Pack Manual

Page 109: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 19 - Tracking

iPlot1.XAxis(0).TrackingEnabled = TrueiPlot1.YAxis(0).TrackingEnabled = True

User InteractionThe end user of your application can also enable or disable tracking for all channels by using the Pause and Resume buttons on thebuilt-in tool bar. See Chapter 9 - ToolBar page 45 for more information.

Manual TrackingIf you need to manually send tracking information to the axes, use the following procedure, passing the new data…

iPlot1.XAxis(Index).NewTrackingData(XData)iPlot1.YAxis(Index).NewTrackingData(YData)

iPlot1.XAxis(Index).NewTrackingData(10.5)iPlot1.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 theTrackingEnabled property to False for all axes. The effect will be that all of the axes will not respond to tracking data, and will not scroll. If

you want to prevent user’s from scrolling the axes, set the Enabled property of the axis to False to prevent user interaction with the axis.

Iocomp Components – Plot Pack Manual Page 97 of 336

Page 110: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 20 - Cartesian Axes

Chapter 20 - Cartesian Axes

Cartesian Axes are a special option of the axis that allows them to be displayed in the DataView area as opposed to outside the DataView area. You canconfigure an axis to be Cartesian by setting the CartesianStyle property of the Axis to either Cartesian Master or Cartesian Child.

Master Cartesian AxesEach Cartesian Axis is displayed within the Bounds of the DataView area (area where Channels and Grid Lines are drawn). OverlappingCartesian Axes automatically have their tick labels hidden if they overlap another axis. In FIGURE 20.1 the chart was modified as follows…

‘X and Y-Axes configured to be Master Cartesian AxisiPlot1.XAxis(0).CartesianStyle = ipcsMasteriPlot1.YAxis(0).CartesianStyle = ipcsMaster

‘X & Y-Axes Min property set to one half of Span so that 0 origin is in the center of the DataViewiPlot1.XAxis(0).Min = -iPlot1.XAxis(0).Span / 2iPlot1.YAxis(0).Min = -iPlot1.YAxis(0).Span / 2

FIGURE 20.1Master Cartesian

Axes

Child Cartesian AxesThis type of Axis is subordinate to the position of a Master Cartesian Axis. All Master Cartesian Axes are positioned in the center of theDataView (Vertically Centered if an X-Axis, Horizontally Centered if a Y-Axis. Reverse this if you have chosen the XYAxesReverse Option)

Each Child Cartesian Axis is positioned relative to a position on the configured Master Cartesian Axis by using the CartesianChildRefAxisNameand CartesianChildRefValue. Whenever the Master Cartesian Axis is scrolled, the Children Cartesian Axis configured for that Master CartesianAxis will also scroll since they are “tied” to a fixed position on the Master Cartesian Axis.

FIGURE 20.2Example of TwoMaster Cartesian

Axes and oneChild Y-Axis tiedto Position 25 on

the X-Axis

In FIGURE 20.2 the Child Cartesian Y-Axis is configured to have the Axis tied to the Master Cartesian Y-Axis, do the following…

‘X-Axis and First Y-Axis configured to be Master Cartesian AxisiPlot1.XAxis(0).CartesianStyle = ipcsMasteriPlot1.YAxis(0).CartesianStyle = ipcsMaster

‘Second Y-Axis configured to be Child Cartesian Axis of X-AxisiPlot1.YAxis(1).CartesianStyle = ipcsChildiPlot1.YAxis(1).CartesianChildRefAxisName = iPlot1.XAxis(0).Name

‘Fix Second Y-Axis to a position on the X-AxisiPlot1.YAxis(1).CartesianChildRefValue = 25

‘Color Child Axis differently from other AxesiPlot1.YAxis(1).LabelsFontColor = vbRediPlot1.YAxis(1).ScaleLinesColor = vbRed

‘X & Y-Axes Min property set to one half of Span so that 0 origin is in the center of the DataViewiPlot1.XAxis(0).Min = -iPlot1.XAxis(0).Span / 2iPlot1.YAxis(0).Min = -iPlot1.YAxis(0).Span / 2

Page 98 of 336 Iocomp Components – Plot Pack Manual

Page 111: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 21 - Translation

Chapter 21 - Translation

Translation in the Plot Pack is handled by providing a list of English strings and their translations to the Plot Pack either through our design-time propertyeditor or dynamically at runtime through code.

FIGURE 21.1German

Translation ofRun-Time

Property Editor

Whenever a string is drawn on either the component, tool-tips within the component, right-click context-sensitive menus, or in the run-time property editor,the list of translation strings will be reviewed and any appropriate translations will be substituted, as seen above.

Translations can also be used to change fixed strings within the component to whatever you deem necessary for your application.

Translations are performed on entire strings, not sub-strings. This means that we only look at the entire string being drawn on the screen, not the individualwords that make up the string. For example, if you provide a translation of the string ‘Y-Axis” to be “Y-Achse”, the string “Y-Axis 1” will not be translatedsince the two strings, “Y-Axis” and “Y-Axis 1” are not exactly the same.

Also, understand that Plot Objects automatically have names and titles assigned to themselves (such as each channel is named “Channel 1”, “Channel 2”, “Channel 3”, etc.). Translations should not be used to translate these strings as these strings can be manipulated through the channel object properties suchas…

iPlot1.XAxis(0).Title = “X-Achse Titel”

Translations should only be used for fixed strings in the component and the run-time property editor where you do not have the ability to change themthrough properties already in the control.

Several “templates” with lists of English-Strings within a particular version or release of our component are provided on our website athttp://www.iocomp. com . You can also find sample translations provided by other customers like yourself available for download.

FIGURE 21.2Design-Time

Property EditorShowing Loaded

TranslationStrings

Remember that translations are not case sensitive. Also remember that translations are performed on complete strings and not sub-strings.

The following are methods that are used to help the developer in translation..

• TranslationCount• AddTranslation• DeleteTranslation• RemoveAllTranslations

The following are properties that re used to help the developer in translation.

• OriginalString• ReplacementString

Iocomp Components – Plot Pack Manual Page 99 of 336

Page 112: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 21 - Translation

In the example below is one way of entering translation string to the plot component.

iPlot1.RemoveAllTranslations()iPlot1.AddTranslation("Cursor Button" , "Botón Del Cursor")iPlot1.AddTranslation("Update Frame Rate", "Aktualisierungsrate")iPlot1.AddTranslation("Selected Item" , "Ausgewählter Eintrag")

Page 100 of 336 Iocomp Components – Plot Pack Manual

Page 113: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 22 - Interpolation

Chapter 22 - Interpolation

This feature, sometimes referred to as Curve -Fitting though that is not always the case, is supported by our iPlot component. Interpolation is the process bywhich a line or series is drawn according to an estimation 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 Interpolation styles draw curves that intersect existing data points.

NoneThis is not really an Interpolation Style of the component, but is used when you do not want a trace line drawn between data points. You simplywant to show the known data points on the graph without a line interconnecting the data points as in FIGURE 22.1. To draw no line, set theTraceVisible property to FALSE. Don’t forget, that if you turn off the trace and don’t turn on the Data Markers (or you do not enable the other channel features such as bars, fill, etc), then nothing will be drawn to the screen!

iPlot1.Channel(0).TraceVisible = False

FIGURE 22.1Channel with

No TraceVisible.

Straight LineThis type of interpolation simply draws a straight line between each data point as in FIGURE 22.2. This can result in “jagged-looking” curves.This interpolation style takes the least amount of CPU time.

iPlot1.Channel(0).InterpolationStyle = ipistStraightLine

FIGURE 22.2Channel withStraight Line

Trace andMarkersShown.

Iocomp Components – Plot Pack Manual Page 101 of 336

Page 114: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 22 - Interpolation

Cubic SplineThis type of interpolation draws a curve based on Cubic Spline curve fitting interpolation equations as in FIGURE 22.3. This interpolation stylewill take additional CPU time as the data set gets larger.

iPlot1.Channel(0).InterpolationStyle = ipistCubicSpline

FIGURE 22.3Channel withCubic Spline

Interpolated Traceand Marker Show.

PolynomialThis type of interpolation as seen in FIGURE 22.4 draws a curve based on Polynomial Interpolation curve fitting equations and is only good forsmall data sets (~100 data points). This interpolation style will take additional CPU time as the data set gets larger. Polynomial degree is fixed at[n – 1] with n = number of data points.

iPlot1.Channel(0).InterpolationStyle = ipistPolynomial

FIGURE 22.4Channel withPolynomial

Interpolated Traceand Marker Show.

RationalThis type of interpolation as seen in FIGURE 22.5 draws a curve based on Rational Interpolation curve fitting equations. This is an alternative tothe Polynomial Interpolation with functions that have poles. This interpolation is good for small to medium-sized data sets. This interpolationstyle will take additional CPU time as the data set gets larger.

iPlot1.Channel(0).InterpolationStyle = ipistRational

FIGURE 22.5Channel with

RationalInterpolation Traceand Marker Show

Page 102 of 336 Iocomp Components – Plot Pack Manual

Page 115: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 22 - Interpolation

DifferentialThis type of interpolation as seen in FIGURE 22.6 draws a curve based on Differential Interpolation. This style draws horizontal and verticallines between data points. A line is drawn horizontal between one point’s X and Y-Value to the next data point’s X-Value. A vertical line is thendrawn perpendicular from the end point up or down to the Y-Value of the second data point. This interpolation style will take slightly moreadditional CPU time than the straight line interpolation as it requires that twice the number of line segments be drawn on screen.

iPlot1.Channel(0).InterpolationStyle = ipistDifferential

FIGURE 22.6Channel withDifferentialInterpolationTrace with

Marker Show.

Sometimes when using the curve fitting styles, an exception may be generated by the curve-fitting function due to the data being outside ofthe bounds of the function. If the data in your channel causes the function to go outside its bounds (e.g. causes the function to divide by zeroor generate a larger number than can be handled by a double value), then an exception will be generated within the component causing thepainting routine to fail. This will result in partially drawn curves and/or data points.

Differential TerminatedThis type of interpolation as seen in FIGURE 22.7 draws a curve based on Differential Terminated Interpolation. This is the same as theDifferential Style except the trace line is terminated at the last data point.

iPlot1.Channel(0).InterpolationStyle = ipistDifferentialTerminated

FIGURE 22.7Channel withDifferentialTerminated

InterpolationTrace with

Marker Show.

Iocomp Components – Plot Pack Manual Page 103 of 336

Page 116: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 23 - User Interface Control

Chapter 23 - User Interface Control

This chapter covers how to use the plot component from the users perspective using the mouse and keyboard.

The Built-in Tool BarThe tool bar provides quick and easy to use control over the function of the chart by your end user at runtime in your application. All functionsare implemented inside of the chart without the need to implement these in your own application code.

Button MeaningResume Button: Resumes tracking on ALL axes

Pause Button: Pauses tracking for ALL axes

Axes Mode Buttons: Changes the mode that the axes are in when using the mouse. The first icon puts the axes in scroll mode. Thesecond icon puts the axes in zoom mode.

Zoom In/Out Buttons: Zooms ALL axes in our out according to the 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 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 for each channel are displayed in a hint window next to the cursor(s).

Edit Button: Brings up the Run-Time property editor for the user to change most control properties.

Copy Button: Copies the current component image to the clipboard.

Save Button: Brings up a dialog to allow the user to save chart data to currently supported file types.

Print Button: Allows user to print image of chart to printer.Table 23.1

Scrollable and Zoom-able AxesAll X and Y-Axes can be scrolled or zoomed by the user at runtime, even while data is being plotted to the chart.

By default, the chart is setup for “Scroll Mode” . This means that when a user holds down the mouse button on an axes and drags it, that axiswill scroll up or down depending on the direction of movement.

When the user activates the “Zoom Mode” on the tool bar, the user can hold down the mouse button on an axes and drag it to zoom theaxes. Depending on the direction of the drag, the axes will scroll in or out.

Whenever an axis is scrolled or zoomed, tracking on that axis will automatically be disabled to pause the display of the channels tied to the axes.

You can pause or resume tracking on all axes by using the Resume and Pause Buttons. The user can alternately right-clicking on anindividual axis and toggling the “Tracking Enabled” option.

Zooming ToolsThere are three tools available to the user to zoom all axes at the same time…

Button MeaningZoom In Button: This button will zoom in all axes according to the ZoomInOutFactor property.

Zoom Out Button: This button will zoom out all axes according to the ZoomInOutFactor property.Zoom Box Button: this tool will allow a user to click and drag out a box on the DataView area. All axes will be zoomed to displaythis selected area.

Table 23.2

To reset the zoom, click on the Resume Button . To first accept the modified zoom of the axis, right-click on the axis and select “UseNew Values” so that the values will persist when resuming.

Select ToolThe 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. Alsoallows the user to move Annotations or Limit lines if the options is enabled on the objects.

Cursor ToolThe cursor tool hides or shows all available cursors.

Page 104 of 336 Iocomp Components – Plot Pack Manual

Page 117: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 23 - User Interface Control

See Chapter 12 - Data Cursors page 53 for more detailed information.

Context Sensitive Right-Click Menus (Pop up Menus)Each object in the Plot Component has it’s own context sensitive right-click menu. The available options depend on the object being selected.

Axis ObjectYou can resume or pause tracking on an individual axis by right-clicking on the axis and selecting “Tracking Enabled”

If the user has zoomed or scrolled the axis, the option “Use New Values” will be available. This will change the properties of the axisto use the new Min and Span values that correspond to the scrolled or zoomed axis.

The edit menu item will allow the user to bring up the runtime property editor for this object.

DataView ObjectRight-Clicking on the DataView will allow the user to bring up the runtime property editor for this object.

ToolBar ObjectRight-Clicking on the Tool bar will allow the user to bring up the runtime property editor for this object.

Legend ObjectRight-Clicking on the Legend will allow the user to bring up the runtime property editor for the selected channel.

DataCursor ObjectRight-Clicking on a Data Cursor will allow the user modify the properties and functionality of the selected Data Cursor object.

Scrolling Axes by using the Keyboard If an axes has the focus, the user can use the arrows keys or page keys to scroll or zoom the axes. Whether the display scrolls or zooms dependson the Axes-Mode buttons which could be in either the Scroll or Zoom state. The Left or Down key is pressed, the value will be decreased. If theRight or Up key is pressed, the value will be increased. The arrow keys will make a 1% change to the current value. The Page keys will cause a100% change to the current value.

Scrolling and Zooming through the DataViewBy default, the plot components does not allowing zooming or scrolling of the display by dragging the DataView. To enable this option, set theAxesControlEnabled property on the DataView to True. Once this option is enabled, the user can drag the DataView or use the mouse-wheelwhile over the DataView to scroll or zoom all axes. You can independently set which types of axes are affected by mouse drags and mouse-wheelmovements. Use the AxesControlMouseStyle property to control which axes are control by mouse dragging at it can be set to X-Axis, Y-Axis, orBoth. Use the AxesControlWheelStyle property to control which axes are control by the mouse-wheel and it can be set to X-Axis, Y-Axis, orBoth.

Whether the display scrolls or zooms depends on the Axes-Mode buttons which could be in either the Scroll or Zoom state. If the user holds downthe CTRL key while dragging or using the mouse-wheel, then the operation will user the opposite state of the Axes-Mode buttons.

If the user holds down the SHIFT while dragging the view or uses the mouse-wheel and the operation is set up to affect both axes, then the shiftkey will lock the operation to either the X-Axes or Y-Axes depending on would one was affected first. If the AxesControl style is set to only theX-Axes or Y-Axes, then the SHIFT key will cause it to toggle to the opposite group.

Runtime Property EditorThe runtime property editor allows your application user to have complete control over the plot component control at runtime. Some features aredisabled in the runtime property editor, such as adding 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.

You can disable the Pop up Menus on each individual object by using the Enabled and PopupEnabled properties of each plot object. Forexample, to keep the application user from scrolling the X-Axis, you can set the Enabled property of the X-Axis to FALSE (iPlot1.XAxis(0).Enabled = FALSE). This will prevent the user from interacting with the X-Axis with either the mouse or keyboard inputdevices.

The Runtime Property allows the user to make changes to almost all aspects of the control during execution such as modifying axes properties,changing channel properties, using the Visual Layout Manager, etc.

There are two ways that your application user can directly access the Runtime Property Editor at runtime…

Iocomp Components – Plot Pack Manual Page 105 of 336

Page 118: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 23 - User Interface Control

Right-Click on Plot ObjectWhen a user right-clicks on a Plot Object and selects “Edit…”, the runtime property editor will be displayed along with the particularPlot Object that was selected (Such as The X-Axis or the particular channel selected in the Legend).

You can prevent the user from being able to bring up the runtime property editor through right-clicks by setting the UserCanEditObjectsproperty to FALSE.

ToolBar Runtime Property Editor Button

The ToolBar Runtime Property Editor Button brings up the runtime property editor for the entire plot component control.

iPlot1.Toolbar(0).ShowEditButton = False

You can prevent the user from being able to bring up the runtime property editor from the tool bar by setting the ShowEditButton propertyto FALSE

In FIGURE 23.1 you will notice that the Runtime Property Editor is missing the OK, Apply, and Cancel button. When changes aremade by your application’s end-user, the changes are immediately reflected in the Plot Component.

FIGURE 23.1Run-Time

Property EditorShowing

Channel Tabmissing buttons.

Preventing or Disabling UI Interaction You can disable or enable the following on the component as a whole or on a specific plot object as needed.

Disabling All UI Interaction on a Plot ObjectSet the Enabled property on each Plot Object, such as the Axis, to prevent scrolling, the legend to prevent selection, etc. Allplot objects support the Enabled property, but some objects don’t accept user interaction at this time (such as limits) so thisproperty is ignored.

iPlot1.XAxis(0).Enabled = FalseiPlot1.YAxis(0).Enabled = FalseiPlot1.Legend(0).Enabled = False

Disabling Popup Menu on a Plot Object or On Entire ComponentSet the PopupEnabled property on each Plot Object, such as the Axis, to prevent the user from bringing up the PopupMenu. All plot objects support the PopupEnabled property, but some objects don’t accept user interaction at this time (suchas limits) so this property is ignored. The main plot interface supports the UserCanEditObjects which disables all run-timeproperty access by the application user, but does not disable all pop up menus.

iPlot1.UserCanEditObjects = FalseiPlot1.XAxis(0).Enabled = FalseiPlot1.YAxis(0).Enabled = FalseiPlot1.Legend(0).Enabled = False

By default, the ADD and REMOVE buttons on the Channels tab are hidden. This is to prevent your end user from unexpectedly removing channels which could result in exceptions being generated in your code. You can force these buttons to be visible and allow your user to addand remove channels by setting the UserCanAddRemoveChannels property to TRUE. This property is located on the main componentinterface.

Page 106 of 336 Iocomp Components – Plot Pack Manual

Page 119: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 24 - Loading and Saving Data

Chapter 24 - Loading and Saving Data

The Plot Pack components support several different methods for storing and retrieving data and control image snapshots both to and from the local filesystem 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 FormatsThe plot pack components natively support several text formats for saving and loading channel data. The saved data can be used in otherapplications (such as Microsoft Excel) or can be used to reload channel data into another instance of the control at a later date or programexecution. Saving and loading of channel properties, such as channel trace width, line color, and other control properties is also supported.

There are two interfaces that are supported for loading and saving data. One is specific to a particular channel and the other is for all channels. Tosave and load data for a specific channel, use the methods below from a specific channel interface (e.g. iPlot1.Channel(0).SaveDataToFile). Tosave and load data for all channels in the chart, use the methods below from the main plot component interface (e.g. iPlot1.SaveToDataFile).

The supported data formats are as follows…

Value MeaningipdfcsTab The tab character is used to separate columns.ipdfcsComma The comma character is used to separate columns.Table 24.2

SaveDataToFileThis method will save out the data for the specified channel or all channels to a tab delimited text file specified by Filename.

iPlot1.Channel(0).SaveDataToFile(Filename)

Sample File Output:0 01 12 20 01 12 29 9

iPlot1.SaveDataToFile(Filename)

Sample File Output:

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

Table 24.3

LoadDataFromFileThis method will load in the data for the specified channel from a tab delimited text file specified by Filename. The first column mustbe the X channel data and the second column must be the Y channel data.

For loading data from the main plot interface, the first column is for the first channel’s X data, the second column is for the first channel’s Y data, the third column is for the second channel’s X data, the fourth column is for the second channel’s Y data, and so on.The first row is ignored when loading data from the main plot interface.

iPlot1.Channel(0).LoadDataFromFile(Filename)iPlot1.LoadDataFromFile(Filename)

SavePropertiesToFileThis method will save out the properties for the specified channel to a tab delimited text file specified by Filename. Note, the filecontains property information about the specified channel or all channels such as trace line width, line color, marker setup information,etc and does not contain XY data. The properties that are streamed out are generally only used with the LoadPropertiesFromFilemethod and not with external applications. Note the main interface’s SavePropertiesToFile method will stream out all properties of thecontrol, not just the individual properties for each channel.

Iocomp Components – Plot Pack Manual Page 107 of 336

Page 120: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 24 - Loading and Saving Data

iPlot1.Channel(0).SavePropertiesToFile(Filename)iPlot1.SavePropertiesToFile(Filename)

LoadPropertiesFromFileThis method will load in the properties for the specified channel from a text file specified by Filename. Note, the file contains propertyinformation about the specified channel or all channels such as trace line width, line color, marker setup information, etc and does notcontain XY data. The properties that are streamed in are generally only used with the SavePropertiesToFile method and not withexternal applications. Note the main interface’s LoadPropertiesFromFile method will stream in all properties of the control, not just theindividual properties for each channel.

iPlot1.Channel(0).LoadPropertiesFromFile(Filename)iPlot1.LoadPropertiesFromFile(Filename)

SaveAnnotationsToFileThis method will save out all of the annotations objects to a tab delimited text file specified by Filename. The annotation data that isstreamed out is generally only used with the LoadAnnotationsFromFile method and not with external applications

iPlot1.SaveAnnotationsToFile(Filename)

LoadAnnotationsFromFileThis method will load in all of the annotations that were previously saved to a text file by the SaveAnnotationsToFile method. Theproperties that are streamed in are generally only used with the SavePropertiesToFile method and not with external applications.

iPlot1.LoadAnnotationsFromFile(Filename)

Data Logging [Channel Interface]The Plot Pack components also support real-time logging of channel data to a text file on your local hard drive. This differs from the DataFormats above in that data is appended to a text file (Tab Delimited) as data is being added to the chart.

You will need to ensure that the directory specified has already been created on the target data storage area before activating the log.

LogFileNameThis property specifies the path and filename of the log. If you are developing for a cross-platform application, then you will need toensure that the path and filename are appropriate for all OS file systems or for the target OS file systems.

iPlot1.Channel(0).LogFileName = Filename

LogBufferSizeThis property specifies the size of the buffer to use when logging channel data to the file specified by the LogFileName property.When data from the chart has filled the buffer, the buffered data is then written to the log file. This is useful if you want to spread outthe disk write access by the plot component. (i.e. if you don’t use a buffer, then a write to the log is executed after every data point isadded. This may not be desirable in some situations. With the buffer size set, you can have the component only write to the log after aspecified amount of data has filled the buffer, therefore reducing the number of writes to the log file). The value specified is in units of# of data points.

iPlot1.Channel(0).LogBufferSize = 10

If you are using the log from the main interface, you will be writing out a log file that contains data for all channels. You must use theAddDataArray method to add data from the main interface if you are using the main interface logging feature.

LogActivateThis method will start the logging of new data points to the specified file. Note that older data points will not be added to the log file,only new ones that have been added after executing this method.

iPlot1.Channel(0).LogActivate()

LogDeactivateThis property will stop the logging of new data points to the specified log file.

iPlot1.Channel(0).LogDeactivate()

Loading Data From Log FileUse the LoadDataFromFile Method to load data from completed log files. If the channel interface logging was used to generate thelog file, use the LoadDataFromFile method on the channel interface. If the main interface logging was used, use theLoadDataFromFile method on the main interface…

iPlot1.Channel(0).LoadDataFromFile(Filename)

Page 108 of 336 Iocomp Components – Plot Pack Manual

Page 121: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 24 - Loading and Saving Data

Data Logging [Main Interface]The Plot Pack components also support real-time logging of channel data to a text file on your local hard drive. This differs from the DataFormats above in that data is appended to a text file (Tab Delimited) as data is being added to the chart. Note: you must use the AddDataArraymethod to add data to the channels in the Plot Component for Main Interface Data Logging to function correctly.

LogFileNameThis property specifies the path and filename of the log. If you are developing for a cross-platform application, then you will need toensure that the path and filename are appropriate for all OS file systems or for the target OS file systems.

iPlot1.LogFileName = Filename

LogBufferSizeThis property specifies the size of the buffer to use when logging data for all the channels to the file specified by the LogFileNameproperty. When data from the chart has filled the buffer, the buffered data is then written to the log file. This is useful if you want tospread out the disk write access by the plot component. (i.e. if you don’t use a buffer, then a write to the log is executed after everydata point is added. This may not be desirable in some situations. With the buffer size set, you can have the component only write tothe log after a specified amount of data has filled the buffer, therefore reducing the number of writes to the log file). The valuespecified is in units of # of data points.

iPlot1.LogBufferSize = 10

LogActivateThis method will start the logging of new data points to the specified file. Note that older data points will not be added to the log file,only new ones that have been added after executing this method.

iPlot1.LogActivate()

LogDeactivateThis property will stop the logging of new data points to the specified log file.

iPlot1.LogDeactivate()

Loading Data From Log FileUse the LoadDataFromFile Method to load data from completed log files. If the channel interface logging was used to generate thelog file, use the LoadDataFromFile method on the channel interface. If the main interface logging was used, use theLoadDataFromFile method on the main interface…

iPlot1.LoadDataFromFile(Filename)

AddDataArray ExampleIf you are using the logging feature from the main plot interface where you are logging all channels to a single log file, you have to usethe AddDataArray method to add data to the channels. The first parameter refers to the common X Value for all of the channels, andthe array contains one Y Value for each channel. The array type can be double or any variant type that can be converted to a double.The following example shows how to add data to the chart.

dim TempArray(99) as Double 'Random Data

for x = 0 to 99 TempArray(x) = rnd(1)*100next x

iPlot1.AddDataArray XValue, TempArraydim TempArray(99) as Double 'Data From Some Other Source

for x = 0 to 99 TempArray(x) = YValueSourcenext x

iPlot1.AddDataArray XValue, TempArrayiPlot1.AddDataArray XValue, YValuesArray 'Your Data is already in array format

See Chapter 16 - Adding Data page 79 for more information on using AddDataArray, AddDataArray in pseudo-Asynchronousmode, or for handling null or empty value data.

Image FormatsThere are also several image formats that are supported for saving static images of the plot component (except for the ToolBar object). This isuseful for exporting the image for use in an external 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)

See Chapter 25 - Graphical Export page 110 for more information..

Iocomp Components – Plot Pack Manual Page 109 of 336

Page 122: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 25 - Graphical Export

Chapter 25 - 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 forexporting the image for use in an external reporting tool, 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 Meta File FormatThis format is compact, and allows resizing in another application. This file type is only supported on Windows platforms and is not supportedunder Linux. We recommend that you use TrueType fonts (Vector Fonts) in the Plot component when using this file format since TrueType fontsresize better than bitmap-based fonts.

iPlot1.SaveImageToMetaFile(Filename)iPlot1.SaveImageToMetaFile("c:\images\plotimage001.emf")

BitmapThis format is generally used where you need to use a Windows-OS/2 compatible bitmap file. The file is uncompressed, so it is generally notrecommended since other, compressed formats are available.

iPlot1.SaveImageToBitmap(Filename)iPlot1.SaveImageToBitmap("c:\ images \plotimage001.bmp")

JPEGThis format is compact, lossy compressed, and is widely supported. However, we recommend that you use our EMF or PNG file types if possiblesince they produce smaller file sizes and the final graphic output is more suited for these other formats.

iPlot1.SaveImageToJPEG(Filename, Compression, Progressive)iPlot1.SaveImageToJPEG("c:\ images \plotimage001.emf", 100, True)

Note: Compression is a value between 0-100 and reflects the amount of lossy compression applied to the image. A value of 25 will give verygood compression, but the image will be degraded. We recommend that you always use a value of 100. Progressive refers to the interlacingencoding used in some browsers.

PNGThis format is compact, loss-less compressed (same quality as a bitmap, no loss of quality), and is widely supported. This file format is areplacement for the GIF standard (which is encumbered with patent issues, only supports 256 colors, and doesn’t compress as well as PNG), andis supported by all version 4.0 web browsers and above on all platforms. [Note, this format is not yet available…]

Clipboard Transfer MethodiPlot1.CopyToClipBoard()

This method will copy an enhanced meta file version of the chart to the standard clipboard for use elsewhere in your program. You can configurethe data format of the image by using the CopyToClipBoardFormat property of the component to choose between the following supported imageformats: JPEG, BMP, EMF.

Page 110 of 336 Iocomp Components – Plot Pack Manual

Page 123: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 25 - Graphical Export

GetBytesJPEG MethodThis method is useful in ASP web pages where you want to send a JPEG image of the Plot component to a web client. GetBytesJPEG allows youto send a JPEG image directly to the web client without using intermediate files.

Microsoft IIS Server ASP Page (VBScript)<%@ Language=VBScript %><!--METADATA NAME="iPlotLibrary" TYPE="TypeLib" UUID="{DA259054-D93B-498C-8C10-DEBD83EF1357}"--><% 'Setup Response Response.Expires = 0 Response.Buffer = True Response.Clear

'Create ActiveX Control Set iPlotX1 = Server.CreateObject("iPlotLibrary.iPlotX")

'Set Some Properties iPlotX1.Width = 500 iPlotX1.Height = 300 iPlotX1.Labels(0).Caption = "Test Chart 1" iPlotX1.ToolBar(0).Visible = False

'Plot Some Random Data for x = 0 to 100 iPlotX1.Channel(0).AddXY x, sin(x) * 100 next

'Stream JPEG Image Response.ContentType = "image/jpeg" Response.BinaryWrite(iPlotX1.GetBytesJPEG(100, TRUE)) 'Cleanup Set iPlotX1 = Nothing %>

Iocomp Components – Plot Pack Manual Page 111 of 336

Page 124: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 26 - Printing

Chapter 26 - Printing

The Iocomp Plot Pack components have built-in, basic capabilities for printing copies of your chart to a local or network printer. Features include…

• Ability to show or hide standard printer dialog before print• Set Page Orientation• Setup Page Margins

When you print out a copy of your chart, the entire image of the chart will be printed except for the tool bar, and the chart will be expanded to fit the entirepage depending on your page orientation and page margin settings. The printing support in the Plot Pack components is designed to provide a very simpleand easy to use interface for outputting your charts to paper. If you need more complex reporting capabilities, you will need to use a reporting package orcustom code.

Printing OptionsPage Orientation

Used to specify the orientation of the chart to be printed, modify the PrintOrientation property.

iPlot1.PrintOrientation = poPortrait

…or…

iPlot1.PrintOrientation = poLandacape

Printer DialogUsed to specify that the standard print dialog is displayed when the Print method is executed, then set the PrintShowDialog property toTrue.

iPlot1.PrintShowDialog = True

Printer Document NameUsed to specify the title of the document being printed. Generally, this value is displayed on the LCD display on printers that supportdisplaying the printed document’s name as well as print job separator sheets. Some printer drivers require that this property be set to anon-null value.

iPlot1.PrintDocumentName = “Chart of X vs. Y”

MarginsTo set the paper margins, set the following properties to the margins you require. Units are in inches…

iPlot1.PrintMarginRight = 0.5iPlot1.PrintMarginLeft = 0.5iPlot1.PrintMarginTop = 0.5iPlot1.PrintMarginBottom = 0.5

FIGURE 26.1Diagram

showing PrintMargin

settings on asample page in

Landscapeorientation.

Simple Chart PrintTo print out a copy of the currently displayed chart in your program, execute the following method on the control…

iPlot1.Print()

This method will print a copy of the current chart, stretched to the size of the page up to the margin properties that were previously set without thetool bar.

Using with External Reporting Packages or Custom CodeIf you require more complex printing options, then you will need to use an external reporting package or your own customized code. For theseother options, you can access a copy of the chart image for use as follows…

Page 112 of 336 Iocomp Components – Plot Pack Manual

Page 125: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 26 - Printing

Clipboard TransferiPlot1.CopyToClipBoard()

This method will copy an enhanced metafile version of the chart to the standard clipboard for use elsewhere in your program. You canconfigure the data format of the image by using the CopyToClipBoardFormat property of the component to choose between thefollowing supported image formats: JPEG, BMP, EMF.

Use this option carefully. This method will be using your clipboard, and there is a possibility that other applications or even your applicationmay be using the clipboard at the same time.

IPictureDisp Object TransferImage1.Picture = iPlot1.GetSnapShotPicture()

This method will return an IPictureDisp object image formatted as a metafile.

Save to Enhanced MetafileiPlot1.Save()

This method will save a copy of the chart image to an enhanced metafile format file for use elsewhere.

Printing TipsMany programmers like to see dark background charts with light colored channels and channel markers when viewing the Plot Components in aprogram. However, this color scheme doesn’t look 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 before printing, print out the chart, and then reset thecolors back to their original settings. For example…

iPlot1.BeginUpdate() 'Stops painting to the control to reduce flicker ..Your Code 'Set background colors for Chart and DataView areas to a light color or white ..

iPlot1.Print() 'Prints Chart

.

.Your Code 'Set background colors back to their original settings ..

iPlot1.EndUpdate() 'This resumes painting to the control

Always, always, always use TrueType fonts to get the best results when saving to a graphic format or when printing. When using non-TrueType fonts, you may see distorted fonts or incorrect kerning.

Iocomp Components – Plot Pack Manual Page 113 of 336

Page 126: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Chapter 27 - Plot Pack Events

Since not all component standards support events on the Plot Pack sub objects, you will find all events for objects such as the Channel or Axes on the PlotPack component's main interface. For example, if you wish to utilize the "Data Point Click" event of the channel object, you would need to use the"OnClickDataPoint" event located on the component's main interface. The event will pass to you the index of the channel object that contained the data pointthat was clicked as well as information about the data point.

Plot Events PageOnClick 114OnDblClick 115OnMouseDown 115OnMouseMove 116OnMouseUp 117OnKeyDown 118OnKeyPress 119OnKeyUp 119

OnClickAnnotation 119OnClickChannel 120OnClickDataCursor 120OnClickDataPoint 120OnClickDataView 121OnClickLegend 121OnClickLimit 121OnClickXAxis 122OnClickYAxis 122OnDblClickAnnotation 122OnDblClickChannel 123OnDblClickDataCursor 123OnDblClickDataPoint 123OnDblClickDataView 124OnDblClickLegend 124OnDblClickLimit 124OnDblClickXAxis 125OnDblClickYAxis 125

OnXAxisCustomizeLabel 126OnXAxisMinChange 126OnXAxisMinSpanChange 127OnXAxisSpanChange 127OnYAxisCustomizeLabel 128OnYAxisMinChange 128OnYAxisMinSpanChange 129OnYAxisSpanChange 129

OnDataCursorChange 130

Plot Events PageOnDataCursorCustomizeHint 130

OnLimitLine1PositionChange 131OnLimitLine2PositionChange 131

OnGotFocusAnnotation 132OnGotFocusChannel 132OnGotFocusDataCursor 133OnGotFocusDataView 133OnGotFocusLegend 133OnGotFocusXAxis 134OnGotFocusYAxis 134OnLostFocusAnnotation 134OnLostFocusChannel 135OnLostFocusDataCursor 135OnLostFocusDataView 135OnLostFocusLegend 136OnLostFocusXAxis 136OnLostFocusYAxis 136OnPopUpMenuAnnotation 137OnPopUpMenuChannel 137OnPopUpMenuDataCursor 138OnPopUpMenuDataView 138OnPopUpMenuLegend 139OnPopUpMenuLimit 139OnPopUpMenuXAxis 140OnPopUpMenuYAxis 140

OnBeforePrint 141OnAfterPrint 142

OnAnnotationCoordinatesChange 143OnAnnotationCoordinatesChangeFinished 143OnAfterLoadProperties 144OnBeforeLoadProperties 144OnBeforeZoomBox 145OnBeforeNewOPCData 145OnNewOPCData 146

Standard Events

OnClick This event occurs when the user clicks the mouse button over the Plot Component.

Visual Basic:Private Sub iPlotX1_OnClick() Caption = "OnClick"End Sub

Visual C++:void CEventTestingManualView::OnOnClickIplotx1() { m_ValueEdit = "OnClick"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1Click(Sender: TObject);begin Caption := 'OnClick';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1Click(TObject *Sender){ Caption = "OnClick";}

Page 114 of 336 Iocomp Components – Plot Pack Manual

Page 127: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnDblClick This event occurs when the user double clicks the mouse button over the Plot Component.

Visual Basic:Private Sub iPlotX1_OnDblClick() Caption = "OnDoubleClick"End Sub

Visual C++:void CEventTestingManualView::OnOnDblClickIplotx1() { m_ValueEdit = "OnDoubleClick"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClick(Sender: TObject);begin Caption := 'OnDoubleClick';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClick(TObject *Sender){ Caption = "OnDoubleClick";}

OnMouseDown This event occurs when the user presses a mouse button and the mouse cursor is over the Plot Component.

Visual Basic:Private Sub iPlotX1_OnMouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long) Dim FWhichKey As String If (Shift = 0) Then FWhichKey = "Mouse was pressed" If (Shift = 1) Then FWhichKey = "Shift and Mouse were pressed" If (Shift = 2) Then FWhichKey = "Alt and Mouse were pressed" If (Shift = 4) Then FWhichKey = "Control and Mouse were pressed" Caption = FWhichKey & " MouseX=" & X & " MouseY=" & Y & " of the Component"End Sub

Visual C++:VoidOnOnMouseDownIplotx1(short Button, short Shift,long X, long Y) {CString FWhichKey; if (Shift == 0) FWhichKey = "Mouse was pressed"; if (Shift == 1) FWhichKey = "Shift and Mouse were pressed"; if (Shift == 2) FWhichKey = "Alt and Mouse were pressed"; if (Shift == 4) FWhichKey = "Control and Mouse were pressed"; m_ValueEdit.Format("%s%s%d%s%d%s", FWhichKey, " MouseX=", X, "MouseY=", Y, " of the Component"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var FWhichKey : string;begin if ssLeft in Shift then FWhichKey := 'Mouse was pressed'; if ssShift in Shift then FWhichKey := 'Shift and Mouse were pressed'; if ssAlt in Shift then FWhichKey := 'Alt and Mouse were pressed'; if ssCtrl in Shift then FWhichKey := 'Control and Mouse were pressed'; Caption := FWhichKey + ' MouseX=' + IntToStr(X) + ' MouseY='+ IntToStr(Y) + ' of the Component';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y){ String FWhichKey;

if (Shift.Contains(ssLeft)) FWhichKey = "Mouse was pressed"; if (Shift.Contains(ssShift)) FWhichKey = "Shift and Mouse were pressed"; if (Shift.Contains(ssAlt)) FWhichKey = "Alt and Mouse were pressed"; if (Shift.Contains(ssCtrl)) FWhichKey = "Control and Mouse were pressed"; Caption = FWhichKey + " MouseX = " + IntToStr(X) + " MouseY=" + IntToStr(Y) + " of the Component";}

Iocomp Components – Plot Pack Manual Page 115 of 336

Page 128: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnMouseMove This event occurs when the user moves the mouse cursor over the Plot Component.

Visual Basic:Private Sub iPlotX1_OnMouseMove(ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long) Dim FWhichKey As String If (Shift = 0) Then FWhichKey = "Mouse is Moving" If (Shift = 1) Then FWhichKey = "Shift was pressed and Mouse is Moving" If (Shift = 2) Then FWhichKey = "Alt was pressed and Mouse is Moving" If (Shift = 4) Then FWhichKey = "Control was pressed and Mouse is Moving" Caption = FWhichKey & " MouseX = " & X & " MouseY=" & Y & " of the Component"End Sub

Visual C++:void::OnOnMouseMoveIplotx1(short Shift, long X, long Y) {CString FWhichKey;

if (Shift == 0) FWhichKey = "Mouse is Moving"; if (Shift == 1) FWhichKey = "Shift was pressed and Mouse is Moving"; if (Shift == 2) FWhichKey = "Alt was pressed and Mouse is Moving"; if (Shift == 4) FWhichKey = "Control was pressed and Mouse is Moving"; m_ValueEdit.Format("%s%s%d%s%d%s", FWhichKey, " MouseX=", X, "MouseY=", Y, " of the Component"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlotMosemove(Sender: TObject; Shift: TShiftState; X,Y: Integer);var FWhichKey : string;begin if ssLeft in Shift then FWhichKey := 'Mouse is Moving'; if ssShift in Shift then FWhichKey := 'Shift was pressed and Mouse is Moving'; if ssAlt in Shift then FWhichKey := 'Alt was pressed and Mouse is Moving'; if ssCtrl in Shift then FWhichKey := 'Control was pressed and Mouse is Moving'; Caption := FWhichKey + ' MouseX=' + IntToStr(X) + ' MouseY=' + IntToStr(Y) + ' of the Component';end;

CBuilder (Windows/Linux):void __fastcall:iPlot1MouseMove(TObject *Sender, TShiftState Shift , int X, int Y){ String FWhichKey;

if (Shift.Contains(ssLeft)) FWhichKey = "Mouse is Moving"; if (Shift.Contains(ssShift)) FWhichKey = "Shift was Pressed and Mouse is Moving"; if (Shift.Contains(ssAlt)) FWhichKey = "Alt was Pressed and Mouse is Moving"; if (Shift.Contains(ssCtrl)) FWhichKey = "Control was Pressed and Mouse is Moving"; Caption = FWhichKey + " MouseX=" + IntToStr(X) + " MouseY=" + IntToStr(Y) + " of the Component";}

Page 116 of 336 Iocomp Components – Plot Pack Manual

Page 129: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnMouseUp This event occurs when the user releases a mouse button and the mouse cursor is over the Plot Component.

Visual Basic:Private Sub iPlotX1_OnMouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long) Dim FWhichKey As String If (Button = 1) Then FWhichKey = "Left Button of the Mouse is released" If (Button = 2) Then FWhichKey = "Right Button of the Mouse is released" If (Button = 4) Then FWhichKey = "Middle Button of the Mouse is released" Caption = FWhichKey & " at MouseX = " & X & " MouseY=" & Y & " of the Component"End Sub

Visual C++:void::OnOnMouseUpIplotx1(short Button, short Shift, long X, long Y) {CString FWhichKey;

if (Button == 1) FWhichKey = "Left Button of the Mouse is released"; if (Button == 2) FWhichKey = "Right Button of the Mouse is released"; if (Button == 4) FWhichKey = "Middle Button of the Mouse is released";

m_ValueEdit.Format("%s%s%d%s%d%s", FWhichKey, " at MouseX=", X, " MouseY=",Y, " of the Component"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1MouseUp(Sender:TObject; Button:TMouseButton; Shift: TShiftState; X, Y: Integer);Var FWhichKey : string;Begin if Button = mbLeft then FWhichKey := 'Left Button of the Mouse is released'; if Button = mbRight then FWhichKey := 'Right Button of the Mouse is released'; if Button = mbMiddle then FWhichKey := 'Middle Button of the Mouse is released'; Caption := FWhichKey + ' at MouseX=' + IntToStr(X) + ' MouseY=' +IntToStr(Y) + 'of the Component';end;

CBuilder (Windows/Linux):void __fastcall::iPlot1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y){ String FWhichKey; if (Button == mbLeft) FWhichKey = "Left Button of the Mouse is released"; if (Button == mbRight) FWhichKey = "Right Button of the Mouse is released"; if (Button == mbMiddle) FWhichKey = "Middle Button of the Mouse is released"; Caption = FWhichKey + " at MouseX=" + IntToStr(X) + " MouseY=" + IntToStr(Y) + " of the Component";}

Iocomp Components – Plot Pack Manual Page 117 of 336

Page 130: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnKeyDown This event occurs when the user presses a key down on the Keyboard.

Visual Basic:Private Sub iPlotX1_OnKeyDown(Key As Integer, ByVal Shift As Integer) Dim FWhichKey As String If (Shift = 1) Then FWhichKey = "Shift and " If (Shift = 2) Then FWhichKey = "Alt and " If (Shift = 4) Then FWhichKey = "Control and " Caption = FWhichKey & Chr(Key) & " Keys were Pressed"End Sub

Visual C++:void::OnOnKeyDownIplotx1(short FAR* Key, short Shift) {CString FWhichKey;

if (Shift == 1) FWhichKey = "Shift and "; if (Shift == 2) FWhichKey = "Alt and "; if (Shift == 4) FWhichKey = "Control and ";

m_ValueEdit.Format("%s%s%s", FWhichKey, Key, " Keys were Pressed"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1KeyDown(Sender:TObject; var Key: Word;Shift: TShiftState);var FWhichKey : string;begin if ssShift in Shift then FWhichKey := 'Shift and '; if ssAlt in Shift then FWhichKey := 'Alt and '; if ssCtrl in Shift then FWhichKey := 'Control and '; Caption := FWhichKey + chr(Key) + ' Keys were Pressed';end;

CBuilder (Windows/Linux):void __fastcall::iPlot1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift){ String FWhichKey; if (Shift.Contains(ssShift)) FWhichKey = "Shift and "; if (Shift.Contains(ssAlt)) FWhichKey = "Alt and "; if (Shift.Contains(ssCtrl)) FWhichKey = "Control and "; Caption = FWhichKey + char(Key) + " Keys were Pressed";}

OnKeyPress This event occurs when the user presses a key on the Keyboard.

Visual Basic:Private Sub iPlotX1_OnKeyPress(Key As Integer) Caption = Chr(Key) & " Key was Pressed"End Sub

Visual C++:void::OnOnKeyPressIplotx1(short FAR* Key) { m_ValueEdit.Format("%s%s", Key, " Key were Pressed"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1KeyPress(Sender: TObject; var Key: Char);begin Caption := Key + ' Key was Pressed';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1KeyPress(TObject *Sender, char &Key){ Caption = String(Key) + " Key were Pressed";}

Page 118 of 336 Iocomp Components – Plot Pack Manual

Page 131: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnKeyUp This event occurs when the user presses a key on the Keyboard.

Visual Basic:Private Sub _OnKeyUp(Key As Integer, ByVal Shift As Integer) Dim FWhichKey As String If (Shift = 1) Then FWhichKey = "Shift and " If (Shift = 2) Then FWhichKey = "Alt and " If (Shift = 4) Then FWhichKey = "Control and " Caption = FWhichKey & Chr(Key) & " Keys were Released"End Sub

Visual C++:void::OnOnKeyUpIplotx1(short FAR* Key, short Shift) {CString FWhichKey; if (Shift == 1) FWhichKey = "Shift and "; if (Shift == 2) FWhichKey = "Alt and "; if (Shift == 4) FWhichKey = "Control and "; m_ValueEdit.Format("%s%s%s", FWhichKey, Key, " Keys were Released"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure .iPlot1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);var FWhichKey : string;begin if ssShift in Shift then FWhichKey := 'Shift and '; if ssAlt in Shift then FWhichKey := 'Alt and '; if ssCtrl in Shift then FWhichKey := 'Control and '; Caption := FWhichKey + chr(Key) + ' Keys were Released';end;

CBuilder (Windows/Linux):void __fastcall ::iPlot1KeyUp(TObject *Sender, WORD &Key, TShiftState Shift){ String FWhichKey;

if (Shift.Contains(ssShift)) FWhichKey = "Shift and "; if (Shift.Contains(ssAlt)) FWhichKey = "Alt and "; if (Shift.Contains(ssCtrl)) FWhichKey = "Control and "; Caption = FWhichKey + char(Key) + " Keys were Released";}

Sub-Object Click Events

OnClickAnnotation This event occurs whenever your application user clicks on an individual annotation object. The index of the annotation object is passed back, andyou can use that index to access properties and methods of the annotation that was clicked. Note: The standard OnClick, OnMouseDown, andOnMouseUp events will still fire.

Visual Basic:OnClickAnnotation(ByVal Index As Long) Caption = "Clicked Annotation X-Coordinate : " & iPlotX1.Annotation(Index).XEnd Sub

Visual C++:OnClickAnnotation(long Index){ m_ValueEdit = m_iPlotX1.GetAnnotation(Index).GetX(); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickAnnotation(Index: Integer);begin Caption := 'Clicked Annotation X-Coordinate : ' + FloatToStr(iPlot1.Annotation[Index].X);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickAnnotation(int Index){ Caption = "Clicked Annotation X-Coordinate : " + FloatToStr(iPlot1->Annotation[Index]->X);}

Iocomp Components – Plot Pack Manual Page 119 of 336

Page 132: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnClickChannel This event occurs when the application end-user clicks on an individual Channel object in the Legend. Use OnClickChannel to perform actionsafter an Channel is clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickChannel(ByVal Index As Long) Caption = iPlotX1.Channel(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickChannelIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetChannel (Index).GetName(), " Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickChannel(Index: Integer);begin Caption := iPlot1.Channel[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickChannel(int Index){ Caption = iPlot1->Channel[Index]->Name + " Has been Clicked";}

OnClickDataCursor This event occurs when the application end-user clicks on an individual DataCursor object. Use OnClickDataCursor to perform actions after anDataCursor is clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickDataCursor(ByVal Index As Long) Caption = iPlotX1.DataCursor(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickDataCursorIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetDataCursor (Index).GetName(), "Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickDataCursor(Index: Integer);begin Caption := iPlot1.DataCursor[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickDataCursor(int Index){ Caption = iPlot1->DataCursor[Index]->Name + " Has been Clicked";}

OnClickDataPoint This event occurs whenever your application user clicks on an individual data point object. The index of the channel and the index of the datapoint is passed back, and you can use that channel index to access properties and methods of the channel as well as determine the X and Ycoordinates of the data point that was clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:OnClickDataPoint(ByVal ChannelIndex As Long, ByVal DataIndex As Long) Caption = "Click DataPoint XData : " & iPlotX1.Channel(ChannelIndex).DataX(DataIndex)End Sub

Visual C++:OnClickDataPoint(long ChannelIndex, long DataIndex){ m_ValueEdit = m_iPlotX1.GetChannel(ChannelIndex).GetDataX(DataIndex); UpdateData(FALSE);}

Delphi (Windows/Linux):Procedure iPlot1ClickDataPoint(ChannelIndex, DataIndex:Integer);begin Caption := 'Click DataPoint XData : ' + FloatToStr(iPlot1.Channel[ChannelIndex].DataX[DataIndex]);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickDataPoint(int ChannelIndex,int DataIndex){ Caption = "Click DataPoint XData : " + FloatToStr(iPlot1->Channel[ChannelIndex]->DataX[DataIndex]);}

Page 120 of 336 Iocomp Components – Plot Pack Manual

Page 133: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnClickDataView This event occurs when the application end-user clicks on the DataView object. Use OnClickDataView to perform actions after an DataView isclicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickDataView(ByVal Index As Long) Caption = iPlotX1.DataView(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickDataViewIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetDataView(Index).GetName(), " Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickDataView(Index: Integer);begin Caption := iPlot1.DataView[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickDataView(int Index){ Caption = iPlot1->DataView[Index]->Name + " Has been Clicked";}

OnClickLegend This event occurs when the application end-user clicks on the Legend object. Use OnClickLegend to perform actions after an Legend is clicked.Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickLegend(ByVal Index As Long) Caption = iPlotX1.Legend(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickLegendIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetLegend(Index).GetName(), " Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickLegend(Index: Integer);begin Caption := iPlot1.Legend[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickLegend(int Index){ Caption = iPlot1->Legend[Index]->Name + " Has been Clicked";}

OnClickLimit This event occurs when the application end-user clicks on the Limit object. Use OnClickLimit to perform actions after an Limit is clicked. Note:The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickLimit(ByVal Index As Long) Caption = iPlotX1.Limit(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickLimitIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetLimit(Index).GetName()," Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickLimit(Index: Integer);begin Caption := iPlot1.Limit[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickLimit(int Index){ Caption = iPlot1->Limit[Index]->Name + " Has been Clicked";}

Iocomp Components – Plot Pack Manual Page 121 of 336

Page 134: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnClickXAxis This event occurs when the application end-user clicks on the XAxis object. Use OnClickXAxis to perform actions after an XAxis is clicked.Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickXAxis(ByVal Index As Long) Caption = iPlotX1.XAxis(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickXAxisIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetXAxis(Index).GetName()," Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickXAxis(Index: Integer);begin Caption := iPlot1.XAxis[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickXAxis(int Index){ Caption = iPlot1->XAxis[Index]->Name + " Has been Clicked";}

OnClickYAxis This event occurs when the application end-user clicks on the YAxis object. Use OnClickYAxis to perform actions after an YAxis is clicked.Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnClickYAxis(ByVal Index As Long) Caption = iPlotX1.YAxis(Index).Name & " Has been Clicked"End Sub

Visual C++:void::OnOnClickYAxisIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetYAxis(Index).GetName()," Has been Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1ClickYAxis(Index: Integer);begin Caption := iPlot1.YAxis[Index].Name + ' Has been Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1ClickYAxis(int Index){ Caption = iPlot1->YAxis[Index]->Name + " Has been Clicked";}

OnDblClickAnnotation This event occurs whenever your application user double clicks on an individual annotation object. The index of the annotation object is passedback, and you can use that index to access properties and methods of the annotation that was double clicked. Note: The standard OnClick,OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickAnnotation(ByVal Index As Long) Caption = "Double Clicked Annotation X-Coordinate : " & iPlotX1.Annotation(Index).xEnd Sub

Visual C++:void::OnOnDblClickAnnotationIplotx1(long Index) { m_ValueEdit.Format("%s%f", "Double Clicked Annotation X-Coordinate : ", m_iPlotX1.GetAnnotation(Index).GetX()); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickAnnotation(Index: Integer);begin Caption := 'Double Clicked Annotation X-Coordinate : ' + FloatToStr(iPlot1.Annotation[Index].X);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickAnnotation(int Index){ Caption = "Double Clicked Annotation X-Coordinate : " + FloatToStr(iPlot1->Annotation[Index]->X);}

Page 122 of 336 Iocomp Components – Plot Pack Manual

Page 135: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnDblClickChannel This event occurs when the application end-user double clicks on an individual Channel object in the Legend. Use OnDblClickChannel toperform actions after an Channel is double clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickChannel(ByVal Index As Long) Caption = iPlotX1.Channel(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickChannelIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetChannel (Index).GetName(), " Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickChannel(Index: Integer);begin Caption := iPlot1.Channel[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickChannel(int Index){ Caption = iPlot1->Channel[Index]->Name + " Has been Double Clicked";}

OnDblClickDataCursor This event occurs when the application end-user double clicks on an individual DataCursor object. Use OnDblClickDataCursor to perform actionsafter an DataCursor is double clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickDataCursor(ByVal Index As Long) Caption = iPlotX1.DataCursor(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickDataCursorIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetDataCursor(Index).GetName()," Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickDataCursor(Index: Integer);begin Caption := iPlot1.DataCursor[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickDataCursor(int Index){ Caption = iPlot1->DataCursor[Index]->Name + " Has been Double Clicked";}

OnDblClickDataPoint This event occurs whenever your application user double clicks on an individual data point object. The index of the channel and the index of thedata point is passed back, and you can use that channel index to access properties and methods of the channel as well as determine the X and Ycoordinates of the data point that was double clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickDataPoint(ByVal ChannelIndex As Long, ByVal DataIndex As Long) Caption = "Double Click DataPoint XData : " & iPlotX1.Channel(ChannelIndex).DataX(DataIndex)End Sub

Visual C++:void::OnOnDblClickDataPointIplotx1(long ChannelIndex, long DataIndex) { m_ValueEdit.Format("%s%f%s", "The X Coordinate is ", m_iPlotX1.GetChannel (ChannelIndex).GetDataX(DataIndex), " and Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickDataPoint(ChannelIndex, DataIndex: Integer);begin Caption := 'Double Click DataPoint XData : ' + FloatToStr (iPlot1.Channel[ChannelIndex].DataX [DataIndex]);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickDataPoint(int ChannelIndex, int DataIndex){ Caption = "Double Click DataPoint XData : " + FloatToStr(iPlot1->Channel[ChannelIndex]->DataX [DataIndex]);}

Iocomp Components – Plot Pack Manual Page 123 of 336

Page 136: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnDblClickDataView This event occurs when the application end-user double clicks on the DataView object. Use OnDblClickDataView to perform actions after anDataView is double clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickDataView(ByVal Index As Long) Caption = iPlotX1.DataView(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickDataViewIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetDataView(Index). GetName(), " Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickDataView(Index: Integer);begin Caption := iPlot1.DataView[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickDataView(int Index){ Caption = iPlot1->DataView[Index]->Name + " Has been Double Clicked";}

OnDblClickLegend This event occurs when the application end-user double clicks on the Legend object. Use OnDblClickLegend to perform actions after an Legendis double clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickLegend(ByVal Index As Long) Caption = iPlotX1.Legend(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickLegendIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetLegend(Index).GetName(), " Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickLegend(Index: Integer);begin Caption := iPlot1.Legend[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickLegend(int Index){ Caption = iPlot1->Legend[Index]->Name + " Has been Double Clicked";}

OnDblClickLimit This event occurs when the application end-user double clicks on the Limit object. Use OnDblClickLimit to perform actions after an Limit isdouble clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickLimit(ByVal Index As Long) Caption = iPlotX1.Limit(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickLimitIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetLimit(Index).GetName()," Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickLimit(Index: Integer);begin Caption := iPlot1.Limit[Index].Name + ' Has been double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickLimit(int Index){ Caption = iPlot1->Limit[Index]->Name + " Has been Double Clicked";}

Page 124 of 336 Iocomp Components – Plot Pack Manual

Page 137: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnDblClickXAxis This event occurs when the application end-user double clicks on the XAxis object. Use OnDblClickXAxis to perform actions after an XAxis isdouble clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickXAxis(ByVal Index As Long) Caption = iPlotX1.XAxis(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickXAxisIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetXAxis(Index).GetName(), " Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickXAxis(Index: Integer);begin Caption := iPlot1.XAxis[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickXAxis(int Index){ Caption = iPlot1->XAxis[Index]->Name + " Has been Double Clicked";}

OnDblClickYAxis This event occurs when the application end-user double clicks on the YAxis object. Use OnDblClickYAxis to perform actions after an YAxis isdouble clicked. Note: The standard OnClick, OnMouseDown, and OnMouseUp events will still fire.

Visual Basic:Private Sub iPlotX1_OnDblClickYAxis(ByVal Index As Long) Caption = iPlotX1.YAxis(Index).Name & " Has been Double Clicked"End Sub

Visual C++:void::OnOnDblClickYAxisIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetYAxis(Index).GetName()," Has been Double Clicked"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DblClickYAxis(Index: Integer);begin Caption := iPlot1.YAxis[Index].Name + ' Has been Double Clicked';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DblClickYAxis(int Index){ Caption = iPlot1->YAxis[Index]->Name + " Has been Double Clicked";}

Iocomp Components – Plot Pack Manual Page 125 of 336

Page 138: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Axis Object Events

OnXAxisCustomizeLabel This event occurs before each X-Axis major tick label is painted on the control. Use this event to modify a major tick label. This event will firefor each label and the Index parameter specifies which label is about to be painted. Modify the ALabel parameter to change the label. The ALabelparameter is passed by reference so that you may modify the label with your own text if desired.

Visual Basic:Private Sub iPlotX1_OnXAxisCustomizeLabel(ByVal Index As Long,ByVal Value As Double,ALabel As 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

Visual C++:void::OnXAxisCustomizeLabel_m_iPlotX1(long Index, double Value, BSTR FAR* ALabel){ 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" ); }

Delphi (Windows/Linux):procedure TForm1.iPlot1XAxisCustomizeLabel(Index: Integer; Value: Double; var ALabel: String);begin if Value = 0 then ALabel := 'Zero'; if Value = 2 then ALabel := 'Two'; if Value = 4 then ALabel := 'Four'; if Value = 6 then ALabel := 'Six'; if Value = 8 then ALabel := 'Eight'; if Value = 10 then ALabel := 'Ten';end;

CBuilder (Windows/Linux):void __fastcall::iPlot1XAxisCustomizeLabel(int Index, double Value, AnsiString &ALabel){ if (Value == 0) ALabel = "Zero" ; if (Value == 2) ALabel = "Two" ; if (Value == 4) ALabel = "Four" ; if (Value == 6) ALabel = "Six" ; if (Value == 8) ALabel = "Eight"; if (Value == 10) ALabel = "Ten" ;}

OnXAxisMinChange This event occurs when the min property of the X-Axis changes. The Index value passed is the Index of the X-Axis object that has had the minproperty change. The OldValue is the previous min value of the X-Axis, and the NewValue is the new min of the X-Axis that caused this event tofire.

Visual Basic:Private SubiPlotX1_OnXAxisMinChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old X-Axis Min Value : " & OldValue & " New X-Axis Min Value " & NewValueEnd Sub

Visual C++:void::OnOnXAxisMinChangeIplotx1(long Index, double OldValue, double NewValue){ m_ValueEdit = NewValue - OldValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1XAxisMinChange(Index: Integer; OldValue, NewValue: Double);begin Caption := 'The Old X-Axis Min Value : ' + FloatToStr(OldValue) + ' New X-Axis Min Value ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1XAxisMinChange(int Index, double OldValue, double NewValue){ Caption = "The Old X-Axis Min Value : " + FloatToStr(OldValue) + " New X-Axis Min Value " + FloatToStr(NewValue);}

Page 126 of 336 Iocomp Components – Plot Pack Manual

Page 139: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnXAxisMinSpanChange This event occurs when the span property of the X-Axis changes. The Index value passed is the Index of the X-Axis object that has had the minproperty change. The OldValue is the previous span value of the X-Axis, and the NewValue is the new span of the X-Axis that caused this eventto fire.

Visual Basic:Private Sub iPlotX1_OnXAxisMinSpanChange(ByVal Index As Long, ByVal OldMin As Double, ByVal OldSpan As Double, ByVal NewMin As Double, ByVal NewSpan As Double) Caption = iPlotX1.XAxis(Index).Name & " OldMin: " & OldMin & " OldSpan:" & OldSpan & " NewMin:" & NewMin & " NewSpan:" & NewSpanEnd Sub

Visual C++:void::OnOnXAxisMinSpanChangeIplotx1(long Index, double OldMin, double OldSpan, double NewMin, double NewSpan) { m_ValueEdit.Format("%s%s%.1f%s%.1f%s%.1f%s%.1f", m_iPlotX1.GetXAxis(Index).GetName(), " OldMin:" , OldMin, " OldSpan:", OldSpan, " NewMin: ", NewMin, " NewSpan:", NewSpan); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure.iPlot1XAxisMinSpanChange(Index: Integer; OldMin, OldSpan, NewMin,NewSpan : Double); Caption := iPlot1.XAxis[Index].Name + ' OldMin:' + FloatToStr(OldMin) + ' OldSpan:' + FloatToStr (OldSpan) + ' NewMin:' + FloatToStr (NewMin) + ' NewSpan:' + FloatToStr(NewSpan);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1XAxisMinSpanChange(int Index, double OldMin, double OldSpan, double NewMin, double NewSpan){ Caption = iPlot1->XAxis[Index]->Name + " OldMin:" + FloatToStr(OldMin) + " OldSpan:" + FloatToStr (OldSpan) + " NewMin:" + FloatToStr(NewMin) + " NewSpan:" + FloatToStr(NewSpan);}

OnXAxisSpanChange This event occurs when the span property of the X-Axis changes. The Index value passed is the Index of the X-Axis object that has had the minproperty change. The OldValue is the previous span value of the X-Axis, and the NewValue is the new span of the X-Axis that caused this eventto fire.

Visual Basic:Private Sub iPlotX1_OnXAxisSpanChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old X-Axis Span Value : " & OldValue & " New X-Axis Span Value " & NewValueEnd Sub

Visual C++:void::OnOnXAxisMinChangeIplotx1(long Index, double OldValue, double NewValue) { m_ValueEdit = NewValue - OldValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1XAxisMinChange(Index: Integer; OldValue, NewValue:Double);begin Caption := 'The Old X-Axis Min Value : ' + FloatToStr(OldValue) + ' New X-Axis Min Value ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1XAxisMinChange(int Index, double OldValue, double NewValue){ Caption = "The Old X-Axis Min Value : " + FloatToStr(OldValue) + " New X-Axis Min Value " + FloatToStr(NewValue);}

Iocomp Components – Plot Pack Manual Page 127 of 336

Page 140: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnYAxisCustomizeLabel This event occurs before each X-Axis major tick label is painted on the control. Use this event to modify a major tick label. This event will firefor each label and the Index parameter specifies which label is about to be painted. Modify the ALabel parameter to change the label. The ALabelparameter is passed by reference so that you may modify the label with your own text if desired.

Visual Basic:Private Sub iPlotX1_OnYAxisCustomizeLabel(ByVal Index As Long,ByVal Value As Double, ALabel As 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

Visual C++:void::OnYAxisCustomizeLabel_m_iPlotX1(long Index, double Value, BSTR FAR* ALabel){ 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" );}

Delphi (Windows/Linux):procedure TForm1.iPlot1XAxisCustomizeLabel(Index: Integer; Value: Double; var ALabel: String);begin if Value = 0 then ALabel := 'Zero'; if Value = 2 then ALabel := 'Two'; if Value = 4 then ALabel := 'Four'; if Value = 6 then ALabel := 'Six'; if Value = 8 then ALabel := 'Eight'; if Value = 10 then ALabel := 'Ten';end;

CBuilder (Windows/Linux):void __fastcall::iPlot1XAxisCustomizeLabel(int Index, double Value,AnsiString &ALabel){ if (Value == 0) ALabel = "Zero"; if (Value == 2) ALabel = "Two"; if (Value == 4) ALabel = "Four"; if (Value == 6) ALabel = "Six"; if (Value == 8) ALabel = "Eight"; if (Value == 10) ALabel = "Ten";}

OnYAxisMinChange This event occurs when the min property of the Y-Axis changes. The Index value passed is the Index of the Y-Axis object that has had the minproperty change. The OldValue is the previous min value of the Y-Axis, and the NewValue is the new min of the Y-Axis that caused this event tofire.

Visual Basic:Private Sub iPlotX1_OnYAxisMinChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old Y-Axis Min Value : " & OldValue & " New Y-Axis Min Value " & NewValueEnd Sub

Visual C++:void::OnOnYAxisMinChangeIplotx1(long Index, double OldValue, double NewValue) { m_ValueEdit = NewValue - OldValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1YAxisMinChange(Index: Integer; OldValue, NewValue: Double); begin Caption := 'The Old Y-Axis Min Value : ' + FloatToStr(OldValue) + ' New Y-Axis Min Value ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1YAxisMinChange(int Index, double OldValue, double NewValue){ Caption = "The Old Y-Axis Min Value : " + FloatToStr(OldValue) + " New Y-Axis Min Value " + FloatToStr(NewValue);}

Page 128 of 336 Iocomp Components – Plot Pack Manual

Page 141: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnYAxisMinSpanChange This event occurs when the span property of the Y-Axis changes. The Index value passed is the Index of the Y-Axis object that has had the minproperty change. The OldValue is the previous span value of the Y-Axis, and the NewValue is the new span of the Y-Axis that caused this eventto fire.

Visual Basic:Private Sub iPlotX1_OnYAxisMinSpanChange(ByVal Index As Long, ByVal OldMin As Double, ByVal OldSpan As Double, ByVal NewMin As Double, ByVal NewSpan As Double) Caption = iPlotX1.XAxis(Index).Name & " OldMin: " & OldMin & "OldSpan:" & OldSpan & " NewMin:" & NewMin & " NewSpan:" & NewSpanEnd Sub

Visual C++:void::OnOnYAxisMinSpanChangeIplotx1(long Index, double OldMin,double OldSpan, double NewMin, double NewSpan){ m_ValueEdit.Format("%s%s%.1f%s%.1f%s%.1f%s%.1f", m_iPlotX1.GetYAxis(Index).GetName(), " OldMin:" , OldMin, " OldSpan:" , OldSpan, " NewMin:", NewMin, " NewSpan:", NewSpan); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure.iPlot1YAxisMinSpanChange(Index: Integer; OldMin, OldSpan, NewMin, NewSpan: Double); Caption := iPlot1.YAxis[Index].Name + ' OldMin:' + FloatToStr(OldMin) + ' OldSpan:' + FloatToStr (OldSpan) + 'NewMin:' + FloatToStr (NewMin) + ' NewSpan:' + FloatToStr(NewSpan);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1YAxisMinSpanChange(int Index, double OldMin, double OldSpan, double NewMin, double NewSpan){ Caption = iPlot1->YAxis[Index]->Name + " OldMin:" + FloatToStr(OldMin) + " OldSpan:" + FloatToStr (OldSpan) + " NewMin:" + FloatToStr(NewMin) + " NewSpan:" + FloatToStr(NewSpan);}

OnYAxisSpanChange This event occurs when the span property of the Y-Axis changes. The Index value passed is the Index of the Y-Axis object that has had the minproperty change. The OldValue is the previous span value of the Y-Axis, and the NewValue is the new span of the Y-Axis that caused this eventto fire.

Visual Basic:Private Sub iPlotX1_OnYAxisSpanChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old Y-Axis Span Value : " & OldValue & " New Y-Axis Span Value " & NewValueEnd Sub

Visual C++:void::OnOnYAxisSpanChangeIplotx1(long Index, double OldValue, double NewValue) { m_ValueEdit = OldValue - NewValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1YAxisSpanChange(Index: Integer; OldValue, NewValue:Double); Begin Caption := 'The Old Y-Axis Span Value : ' + FloatToStr(OldValue) + ' New Y-Axis Span Value ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1YAxisSpanChange(int Index, double OldValue, double NewValue){ Caption = "The Old Y-Axis Span Value : " + FloatToStr(OldValue) + " New Y-Axis Span Value " + FloatToStr(NewValue);}

Iocomp Components – Plot Pack Manual Page 129 of 336

Page 142: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Data Cursor Object Events

OnDataCursorChange This event occurs when either the Pointer1Position or Pointer2Position properties of a particular data cursor change.

Visual Basic:Private Sub iPlotX1_OnDataCursorChange(ByVal Index As Long) Caption = "OnDataCursor Change : " & IndexEnd Sub

Visual C++:void::OnOnDataCursorChangeIplotx1(long Index) { UpdateData(TRUE); m_ValueEdit = Index; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DataCursorChange(Index: Integer);begin Caption := 'OnDataCursor Change : ' + IntToStr(Index);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1DataCursorChange(int Index){ Caption = "OnDataCursor Change : " + IntToStr(Index);}

OnDataCursorCustomizeHint This event occurs before each major tick label is painted and allows for the label to be modified. Use OnDataCursorCustomizeHint to modify aData Cursor Hint.

Visual Basic:Private SubiPlotX1_OnDataCursorCustomizeHint(ByVal Index As Long, AText As String) Dim XValue As Double Dim YValue As Double XValue = iPlotX1.DataCursor(Index).ValueX YValue = iPlotX1.DataCursor(Index).ValueY AText = "X:" & Format(XValue, "###0.00") & " Y:" & Format(YValue, "###0.00")End Sub

Visual C++:void::OnOnDataCursorCustomizeHintIplotx1(long Index, BSTR FAR* AText) { double XValue; double YValue; CString AString;

XValue = m_iPlotX1.GetDataCursor(Index).GetValueX(); YValue = m_iPlotX1.GetDataCursor(Index).GetValueY(); AString.Format("%s%.2f%s%.2f", "X:" , XValue, " Y:" , YValue); *AText = AString.AllocSysString(); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1DataCursorCustomizeHint(Index: Integer; var AText: String);var XValue : Double; YValue : Double;begin XValue := iPlot1.DataCursor[Index].ValueX; YValue := iPlot1.DataCursor[Index].ValueY; AText := 'X:' + Format('%.2f',[XValue]) + ' Y:' + Format('%.2f',[YValue]);end;

CBuilder (Windows/Linux):void __fastcall TForm1:iPlot1DataCursorCustomizeHint(int Index, AnsiString &AText){ Double XValue; Double YValue;

XValue = iPlot1->DataCursor[Index]->ValueX; YValue = iPlot1->DataCursor[Index]->ValueY; AText = "X:" + Format("%.2f",ARRAYOFCONST((XValue))) + " Y:" +Format("%.2f", ARRAYOFCONST((YValue)));}

Page 130 of 336 Iocomp Components – Plot Pack Manual

Page 143: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Limit Object Events

OnLimitLine1PositionChange This event occurs when the Line1Position property of a Limit object changes. The Index value passed is the Index of the Limit object that has hadthe Line1Position property change. The OldValue is the previous position of the limit line, and the NewValue is the new position of the limit linethat caused this event to fire. These values are passed by value, and cannot be changed. Use the properties of the actual limit to makemodifications.

Visual Basic:Private Sub iPlotX1_OnLimitLine1PositionChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old Limit Value :" & OldValue & " New Limit Value :" & NewValueEnd Sub

Visual C++:void::OnOnLimitLine1PositionChangeIplotx1(long Index, double OldValue, double NewValue) { m_ValueEdit = NewValue - OldValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LimitLine1PositionChange(Index: Integer; OldValue, NewValue: Double);Begin Caption := 'The Old Limit Value : ' + FloatToStr(OldValue) + 'New Limit Value : ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LimitLine1PositionChange(int Index, double OldValue, double NewValue){ Caption = "The Old Limit Value : " + FloatToStr(OldValue) + "New Limit Value : " + FloatToStr(NewValue);}

OnLimitLine2PositionChange This event occurs when the Line2Position property of a Limit object changes. The Index value passed is the Index of the Limit object that has hadthe Line2Position property change. The OldValue is the previous position of the limit line, and the NewValue is the new position of the limit linethat caused this event to fire. These values are passed by value, and cannot be changed. Use the properties of the actual limit to makemodifications.

Visual Basic:Private Sub iPlotX1_OnLimitLine2PositionChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = "The Old Limit Value :" & OldValue & " New Limit Value:" & NewValueEnd Sub

Visual C++:void::OnOnLimitLine2PositionChangeIplotx1(long Index, double OldValue, double NewValue) { m_ValueEdit = NewValue - OldValue; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LimitLine2PositionChange(Index: Integer; OldValue, NewValue: Double);Begin Caption := 'The Old Limit Value : ' + FloatToStr(OldValue) + 'New Limit Value : ' + FloatToStr(NewValue);end;

CBuilder (Windows/Linux):void __fastcall TForm1:iPlot1LimitLine2PositionChange(int Index, double OldValue, double NewValue){ Caption = "The Old Limit Value : " + FloatToStr(OldValue) + "New Limit Value : " + FloatToStr(NewValue);}

Iocomp Components – Plot Pack Manual Page 131 of 336

Page 144: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Plot Object Focus EventsNote: The following Plot Object Focus Events are for focus changes within the component and not for general focus changes of the entirecomponent. Use the container's events for the component to perform actions when the entire component loses or gets focus

OnGotFocusAnnotation Use OnGotFocusAnnotation Occurs when a Annotation object obtains focus. Use OnGotFocusAnnotation to specify actions to perform when theAnnotation object obtains focus. The Index value passed is the Index of the object that has obtained focus.

Visual Basic:Private Sub iPlotX1_OnGotFocusAnnotation(ByVal Index As Long) Caption = iPlotX1.Annotation(Index).Name & " Got Focus"End Sub

Visual C++:void::OnOnGotFocusAnnotationIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetAnnotation(Index).GetName(), " Got Focus"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusAnnotation(Index: Integer);begin Caption := iPlot1.Annotation[Index].Name + ' Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusAnnotation(int Index){ Caption = iPlot1->Annotation[Index]->Name + " Got Focus";}

OnGotFocusChannel Use OnGotFocusChannel to specify actions to perform when the Channel object obtains focus. The Index value passed is the Index of the objectthat has obtained focus.

Visual Basic:Private Sub iPlotX1_OnGotFocusChannel(ByVal Index As Long) Caption = iPlotX1.Channel(Index).Name & " Got Focus"End Sub

Visual C++:void::OnOnGotFocusChannelIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetChannel(Index).GetName(); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusChannel(Index: Integer);begin Caption := iPlot1.Channel[Index].Name + ' Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusChannel(int Index){ Caption = iPlot1->Channel[Index]->Name + " Got Focus";}

Page 132 of 336 Iocomp Components – Plot Pack Manual

Page 145: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnGotFocusDataCursor Use OnGotFocusDataCursor to specify actions to perform when the DataCursor object obtains focus. The Index value passed is the Index of theobject that has obtained focus.

Visual Basic:Private Sub iPlotX1_OnGotFocusDataCursor(ByVal Index As Long) Caption = iPlotX1.Channel(Index).Name & " DataCursor"End Sub

Visual C++:void::OnOnGotFocusDataCursorIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetChannel(Index).GetName() + " DataCursor"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusDataCursor(Index: Integer);begin Caption := iPlot1.Channel[Index].Name + ' DataCursor';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusDataCursor(int Index){ Caption = iPlot1->Channel[Index]->Name + " DataCursor";}

OnGotFocusDataView Use OnGotFocusDataView to specify actions to perform when the DataView object obtains focus. The Index value passed is the Index of theobject that has obtained focus. Note: Only one DataView is currently supported, so Index will always be 0.

Visual Basic:Private Sub iPlotX1_OnGotFocusDataView(ByVal Index As Long) Caption = "DataView Got Focus"End Sub

Visual C++:void::OnOnGotFocusDataViewIplotx1(long Index) { m_ValueEdit = "DataView Got Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusDataView(Index: Integer);begin Caption := 'DataView Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusDataView(int Index){ Caption = "DataView Got Focus";}

OnGotFocusLegend Use OnGotFocusLegend to specify actions to perform when the Legend object obtains focus. The Index value passed is the Index of the objectthat has obtained focus. Note: Only one Legend is currently supported, so Index will always be 0.

Visual Basic:Private Sub iPlotX1_OnGotFocusLegend(ByVal Index As Long) Caption = "Legend Got Focus"End Sub

Visual C++:void::OnOnGotFocusLegendIplotx1(long Index) { m_ValueEdit = "Legend Got Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusLegend(Index: Integer);begin Caption := 'Legend Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusLegend(int Index){ Caption = "Legend Got Focus";}

Iocomp Components – Plot Pack Manual Page 133 of 336

Page 146: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnGotFocusXAxis Use OnGotFocusXAxis to specify actions to perform when the X-Axis object obtains focus. The Index value passed is the Index of the object thathas obtained focus.

Visual Basic:Private Sub iPlotX1_OnGotFocusXAxis(ByVal Index As Long) Caption = iPlotX1.XAxis(Index).Name + " Got Focus"End Sub

Visual C++:void::OnOnGotFocusXAxisIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetXAxis(Index).GetName() + " GotFocus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusXAxis(Index: Integer);begin Caption := iPlot1.XAxis[Index].Name + ' Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusXAxis(int Index){ Caption = iPlot1->XAxis[Index]->Name + " Got Focus";}

OnGotFocusYAxis Use OnGotFocusYAxis to specify actions to perform when the Y-Axis object obtains focus. The Index value passed is the Index of the object thathas obtained focus.

Visual Basic:Private Sub iPlotX1_OnGotFocusYAxis(ByVal Index As Long) Caption = iPlotX1.YAxis(Index).Name + " Got Focus"End Sub

Visual C++:void::OnOnGotFocusYAxisIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetYAxis(Index).GetName() + " GotFocus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1GotFocusYAxis(Index: Integer);begin Caption := iPlot1.YAxis[Index].Name + ' Got Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1GotFocusYAxis(int Index){ Caption = iPlot1->YAxis[Index]->Name + " Got Focus";}

OnLostFocusAnnotation OnLostFocusAnnotation occurs when a Annotation object loses focus. Use OnLostFocusAnnotation to specify actions to perform when theAnnotation object loses focus. The Index value passed is the Index of the object that has lost focus.

Visual Basic:Private Sub iPlotX1_OnLostFocusAnnotation(ByVal Index As Long) Caption = iPlotX1.Annotation(Index).Name & " Has Lost Focus"End Sub

Visual C++:void::OnOnLostFocusAnnotationIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetAnnotation (Index).GetName(), " Has Lost Focus"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusAnnotation(Index: Integer);begin Caption := iPlot1.Annotation[Index].Name + ' Has Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusAnnotation(int Index){ Caption = iPlot1->Annotation[Index]->Name + " Has Lost Focus";}

Page 134 of 336 Iocomp Components – Plot Pack Manual

Page 147: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnLostFocusChannel Use OnLostFocusChannel to specify actions to perform when the Channel object loses focus. The Index value passed is the Index of the objectthat has lost focus.

Visual Basic:Private Sub iPlotX1_OnLostFocusChannel(ByVal Index As Long) Caption = iPlotX1.Channel(Index).Name + " Has Lost Focus"End Sub

Visual C++:void::OnOnLostFocusChannelIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetChannel(Index).GetName() + " Has Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusChannel(Index: Integer);begin Caption := iPlot1.Channel[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusChannel(int Index){ Caption = iPlot1->Channel[Index]->Name + " Lost Focus";}

OnLostFocusDataCursor Use OnLostFocusDataCursor to specify actions to perform when the DataCursor object obtains focus. The Index value passed is the Index of theobject that has lost focus.

Visual Basic:Private Sub iPlotX1_OnLostFocusDataCursor(ByVal Index As Long) Caption = "Data" & iPlotX1.DataCursor(Index).Name & " Lost Focus"End Sub

Visual C++:void::OnOnLostFocusDataCursorIplotx1(long Index) { m_ValueEdit = "Data" + m_iPlotX1.GetDataCursor(Index).GetName() + " Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusDataCursor(Index: Integer);begin Caption := 'Data' + iPlot1.DataCursor[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusDataCursor(int Index){ Caption = "Data" + iPlot1->DataCursor[Index]->Name + " Lost Focus";}

OnLostFocusDataView Use OnLostFocusDataView to specify actions to perform when the DataView object loses focus. The Index value passed is the Index of theobject that has lost focus. Note: Only one DataView is currently supported, so Index will always be 0.

Visual Basic:Private Sub iPlotX1_OnLostFocusDataView(ByVal Index As Long) Caption = iPlotX1.DataView(0).Name + " Lost Focus"End Sub

Visual C++:void::OnOnLostFocusDataViewIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetDataView(Index).GetName() + " Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusDataView(Index: Integer);begin Caption := iPlot1.DataView[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusDataView(int Index){ Caption = iPlot1->DataView[Index]->Name + " Lost Focus";}

Iocomp Components – Plot Pack Manual Page 135 of 336

Page 148: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnLostFocusLegend Use OnLostFocusLegend to specify actions to perform when the Legend object loses focus. The Index value passed is the Index of the object thathas lost focus. Note: Only one Legend is currently supported, so Index will always be 0.

Visual Basic:Private Sub iPlotX1_OnLostFocusLegend(ByVal Index As Long) Caption = iPlotX1.Legend(0).Name + " Lost Focus"End Sub

Visual C++:void::OnOnLostFocusLegendIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetLegend(Index).GetName() + " Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusLegend(Index: Integer);begin Caption := iPlot1.Legend[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusLegend(int Index){ Caption = iPlot1->Legend[Index]->Name + " Lost Focus";}

OnLostFocusXAxis Use OnLostFocusXAxis to specify actions to perform when the X-Axis object loses focus. The Index value passed is the Index of the object thathas lost focus.

Visual Basic:Private Sub iPlotX1_OnLostFocusXAxis(ByVal Index As Long) Caption = iPlotX1.XAxis(Index).Name + " Lost Focus"End Sub

Visual C++:void::OnOnLostFocusXAxisIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetXAxis(Index).GetName() + " Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusXAxis(Index: Integer);begin Caption := iPlot1.XAxis[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusXAxis(int Index){ Caption = iPlot1->XAxis[Index]->Name + " Lost Focus";}

OnLostFocusYAxis Use OnLostFocusYAxis to specify actions to perform when the Y-Axis object loses focus. The Index value passed is the Index of the object thathas lost focus.

Visual Basic:Private Sub iPlotX1_OnLostFocusYAxis(ByVal Index As Long) Caption = iPlotX1.YAxis(Index).Name + " Lost Focus"End Sub

Visual C++:void::OnOnLostFocusYAxisIplotx1(long Index) { m_ValueEdit = m_iPlotX1.GetYAxis(Index).GetName() + " Lost Focus"; UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1LostFocusYAxis(Index: Integer);begin Caption := iPlot1.YAxis[Index].Name + ' Lost Focus';end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1LostFocusYAxis(int Index){ Caption = iPlot1->YAxis[Index]->Name + " Lost Focus";}

Page 136 of 336 Iocomp Components – Plot Pack Manual

Page 149: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnPopUpMenuAnnotation Use OnPopUpMenuAnnotation occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on an Annotation object. UseOnPopupMenuAnnotation to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened onan Annotation object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuAnnotation(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuAnnotationIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY) { CMenu menu;

VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuAnnotation(Index: Integer; var Cancel: Boolean; ScreenX, ScreenY: Integer);begin Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuAnnotation(int Index, bool &Cancel, int ScreenX, int ScreenY){ Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

OnPopUpMenuChannel Use OnPopUpMenuChannel occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a Channel object. UseOnPopupMenuChannel to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on a Channel object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuChannel(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Caption = iPlotX1.Channel(Index).Name & " PopUp Menu is Selected" Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuChannelIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY){ CMenu menu;

m_ValueEdit.Format("%s%s", m_iPlotX1.GetChannel(Index).GetName(), " PopUp Menu is Selected"); UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY,AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuChannel(Index:Integer; var Cancel:Boolean;ScreenX, ScreenY:Integer);begin Caption := iPlot1.Channel[Index].Name + ' PopUp Menu is Selected'; Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1PopupMenuChannel(int Index, bool &Cancel, int ScreenX, int ScreenY){ Caption = iPlot1->Channel[Index]->Name + " PopUp Menu is Selected"; Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

Iocomp Components – Plot Pack Manual Page 137 of 336

Page 150: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnPopUpMenuDataCursor Use OnPopUpMenuDataCursor occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a DataCursor object. UseOnPopupMenuDataCursor to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened ona DataCursor object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuDataCursor(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Caption = iPlotX1.Channel(Index).Name & " DataCursor PopUp Menu is Selected" Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuDataCursorIplotx1(long Index, BOOL FAR* Cancel, long ScreenX,long ScreenY) { CMenu menu;

m_ValueEdit.Format("%s%s", m_iPlotX1.GetChannel(Index).GetName(), " DataCursorPopUp Menu is Selected"); UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuDataCursor(Index: Integer; var Cancel:Boolean; ScreenX, ScreenY: Integer);begin Caption := iPlot1.Channel[Index].Name + ' DataCursor PopUp Menu is Selected'; Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuDataCursor(int Index, bool &Cancel, int ScreenX,int ScreenY){ Caption = iPlot1->Channel[Index]->Name + " DataCursor PopUp Menu is Selected"; Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

OnPopUpMenuDataView Use OnPopUpMenuDataView occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a DataView object. UseOnPopupMenuDataView to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on aDataView object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuDataView(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuDataViewIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY){ CMenu menu;

UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuDataView(Index: Integer; var Cancel: Boolean;ScreenX, ScreenY: Integer);begin Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuDataView(int Index, bool &Cancel, int ScreenX, int ScreenY){ Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

Page 138 of 336 Iocomp Components – Plot Pack Manual

Page 151: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnPopUpMenuLegendUse OnPopUpMenuLegend occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a Legend object. UseOnPopupMenuLegend to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on aLegend object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuLegend(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuLegendIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY){ CMenu menu;

UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuLegend(Index: Integer; var Cancel: Boolean; ScreenX, ScreenY: Integer);begin Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuLegend(int Index, bool &Cancel, int ScreenX, int ScreenY){ Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

OnPopUpMenuLimitUse OnPopUpMenuLimit occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a Limit object. UseOnPopupMenuLimit to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on aLimit object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuLimit(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Caption = iPlotX1.Limit(Index).Name & " PopUp Menu is Selected" Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuLimitIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY) { CMenu menu;

m_ValueEdit.Format("%s%s", m_iPlotX1.GetLimit(Index).GetName()," PopUp Menu is Selected"); UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuLimit(Index: Integer; var Cancel:Boolean; ScreenX, ScreenY: Integer);begin Caption := iPlot1.Limit[Index].Name + ' PopUp Menu is Selected'; Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuLimit(int Index, bool &Cancel, int ScreenX, int ScreenY){ Caption = iPlot1->Limit[Index]->Name + " PopUp Menu is Selected"; Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

Iocomp Components – Plot Pack Manual Page 139 of 336

Page 152: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnPopUpMenuXAxisUse OnPopUpMenuXAxis occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a X-Axis object. UseOnPopupMenuXAxis to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on a X-Axis object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuXAxis(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Caption = iPlotX1.XAxis(Index).Name & " PopUp Menu is Selected" Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuXAxisIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY){ CMenu menu;

m_ValueEdit.Format("%s%s", m_iPlotX1.GetXAxis(Index).GetName()," PopUp Menu is Selected"); UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuXAxis(Index: Integer; var Cancel: Boolean; ScreenX, ScreenY: Integer);begin Caption := iPlot1.XAxis[Index].Name + ' PopUp Menu is Selected'; Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuXAxis(int Index, bool &Cancel, int ScreenX, int ScreenY){ Caption = iPlot1->XAxis[Index]->Name + " PopUp Menu is Selected"; Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

OnPopUpMenuYAxisUse OnPopUpMenuYAxis occurs when the Popup Menu or Context-Sensitive Menu is about to be opened on a Y-Axis object. UseOnPopupMenuYAxis to specify actions to perform whenever the context-sensitive menu (i.e. the right-click menu) is about to be opened on a Y-Axis object.

Visual Basic:Private Sub iPlotX1_OnPopupMenuYAxis(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) Caption = iPlotX1.YAxis(Index).Name & " PopUp Menu is Selected" Cancel = True PopUpForm.PopUpMenu PopUpForm.MyPopUpMenu, vbPopupMenuLeftAlignEnd Sub

Visual C++:void::OnOnPopupMenuYAxisIplotx1(long Index, BOOL FAR* Cancel, long ScreenX, long ScreenY){ CMenu menu;

m_ValueEdit.Format("%s%s", m_iPlotX1.GetYAxis(Index).GetName()," PopUp Menu is Selected"); UpdateData(FALSE); VERIFY(menu.LoadMenu(IDR_MYPOPUPMENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, ScreenX, ScreenY, AfxGetMainWnd()); *Cancel = TRUE;}

Delphi (Windows/Linux):procedure TForm1.iPlot1PopupMenuYAxis(Index: Integer; var Cancel: Boolean; ScreenX, ScreenY: Integer);begin Caption := iPlot1.YAxis[Index].Name + ' PopUp Menu is Selected'; Cancel := True; PopupMenu1.Popup(ScreenX, ScreenY);end;

CBuilder (Windows/Linux):void __fastcall::iPlot1PopupMenuYAxis(int Index, bool &Cancel, int ScreenX, int ScreenY){ Caption = iPlot1->YAxis[Index]->Name + " PopUp Menu is Selected"; Cancel = True; PopupMenu1->Popup(ScreenX, ScreenY);}

Page 140 of 336 Iocomp Components – Plot Pack Manual

Page 153: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

Printing Events

OnBeforePrint Use OnBeforePrint to perform actions before the chart is sent to the printer. This event will fire just before the print is sent to the Printer, after theprinter selection dialog is displayed. This event is generally used to make modifications to the chart before printing, such as inverting colors orsetting colors to black and white for better looking printouts. Changes to the component between the OnBeforePrint and OnAfterPrint events willnot be displayed on the screen. This is useful when you want to make changes for printing purposes only, and don’t want the screen to flash orchange.

Visual BasicPrivate Sub iPlotX1_OnBeforePrint() iPlotX1.XAxis(0).LabelsFont.Bold = True iPlotX1.YAxis(0).LabelsFont.Bold = True iPlotX1.Channel(0).TraceLineWidth = 2 iPlotX1.Channel(1).TraceLineWidth = 2 iPlotX1.Channel(2).TraceLineWidth = 2 iPlotX1.Channel(3).TraceLineWidth = 2 iPlotX1.Channel(4).TraceLineWidth = 2 iPlotX1.Channel(5).TraceLineWidth = 2 iPlotX1.DataView(0).GridLineXMajorCustom = True iPlotX1.DataView(0).GridLineYMajorCustom = True iPlotX1.DataView(0).GridLineXMajorWidth = 2 iPlotX1.DataView(0).GridLineYMajorWidth = 2 iPlotX1.Legend(0).Font.Bold = True iPlotX1.Labels(0).Visible = TrueEnd Sub

Visual C++:OnBeforePrint(){ ColeFont MyFont;

MyFont = m_iPlotX1.GetXAxis(0).GetLabelsFont(); MyFont.SetBold(TRUE);

m_iPlotX1.GetXAxis(0).SetLabelsFont(MyFont); m_iPlotX1.GetChannel(0).SetTraceLineWidth(2); m_iPlotX1.GetChannel(1).SetTraceLineWidth(2); m_iPlotX1.GetChannel(2).SetTraceLineWidth(2); m_iPlotX1.GetChannel(3).SetTraceLineWidth(2); m_iPlotX1.GetChannel(4).SetTraceLineWidth(2); m_iPlotX1.GetChannel(5).SetTraceLineWidth(2); m_iPlotX1.GetDataView(0).SetGridLineXMajorCustom(TRUE); m_iPlotX1.GetDataView(0).SetGridLineYMajorCustom(TRUE); m_iPlotX1.GetDataView(0).SetGridLineXMajorWidth(2); m_iPlotX1.GetDataView(0).SetGridLineYMajorWidth(2); m_iPlotX1.GetLegend(0).SetFont(MyFont); m_iPlotX1.GetLabels(0).SetVisible(TRUE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1BeforePrint(Sender: TObject);begin iPlot1.XAxis[0].LabelsFont.Style := [fsBold]; iPlot1.YAxis[0].LabelsFont.Style := [fsBold]; iPlot1.Channel[0].TraceLineWidth := 2; iPlot1.Channel[1].TraceLineWidth := 2; iPlot1.Channel[2].TraceLineWidth := 2; iPlot1.Channel[3].TraceLineWidth := 2; iPlot1.Channel[4].TraceLineWidth := 2; iPlot1.Channel[5].TraceLineWidth := 2; iPlot1.DataView[0].GridLineXMajorCustom := True; iPlot1.DataView[0].GridLineYMajorCustom := True; iPlot1.DataView[0].GridLineXMajorWidth := 2; iPlot1.DataView[0].GridLineYMajorWidth := 2; iPlot1.Legend[0].Font.Style := [fsBold]; iPlot1.Labels[0].Visible := True;end;

Iocomp Components – Plot Pack Manual Page 141 of 336

Page 154: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1BeforePrint(TObject *Sender){ iPlot1->XAxis[0]->LabelsFont->Style = TFontStyles()<<fsBold; iPlot1->YAxis[0]->LabelsFont->Style = TfontStyles()<<fsBold; iPlot1->Channel[0]->TraceLineWidth = 2; iPlot1->Channel[1]->TraceLineWidth = 2; iPlot1->Channel[2]->TraceLineWidth = 2; iPlot1->Channel[3]->TraceLineWidth = 2; iPlot1->Channel[4]->TraceLineWidth = 2; iPlot1->Channel[5]->TraceLineWidth = 2; iPlot1->DataView[0]->GridLineXMajorCustom = True; iPlot1->DataView[0]->GridLineYMajorCustom = True; iPlot1->DataView[0]->GridLineXMajorWidth = 2; iPlot1->DataView[0]->GridLineYMajorWidth = 2; iPlot1->Legend[0]->Font->Style = TfontStyles()<<fsBold; iPlot1->Labels[0]->Visible = True;}

OnAfterPrint This event is useful to undo changes you made in the OnBeforePrint event. Changes to the component between the OnBeforePrint and OnAfterPrint eventswill not be displayed on the screen.

Visual Basic:Private Sub iPlotX1_OnAfterPrint() iPlotX1.XAxis(0).LabelsFont.Bold = False iPlotX1.YAxis(0).LabelsFont.Bold = False iPlotX1.Channel(0).TraceLineWidth = 1 iPlotX1.Channel(1).TraceLineWidth = 1 iPlotX1.Channel(2).TraceLineWidth = 1 iplotX1.Channel(3).TraceLineWidth = 1 iplotX1.Channel(4).TraceLineWidth = 1 iplotX1.Channel(5).TraceLineWidth = 1 iplotX1.DataView(0).GridLineXMajorCustom = False iplotX1.DataView(0).GridLineYMajorCustom = False iplotX1.DataView(0).GridLineXMajorWidth = 1 iplotX1.DataView(0).GridLineYMajorWidth = 1 iplotX1.Legend(0).Font.Bold = False iplotX1.Labels(0).Visible = FalseEnd Sub

Visual C++:OnAfterPrint(){ ColeFont MyFont; MyFont = m_iPlotX1.GetXAxis(0).GetLabelsFont(); MyFont.SetBold(FALSE);

m_iPlotX1.GetXAxis(0).SetLabelsFont(MyFont); m_iPlotX1.GetChannel(0).SetTraceLineWidth(1); m_iPlotX1.GetChannel(1).SetTraceLineWidth(1); m_iPlotX1.GetChannel(2).SetTraceLineWidth(1); m_iPlotX1.GetChannel(3).SetTraceLineWidth(1); m_iPlotX1.GetChannel(4).SetTraceLineWidth(1); m_iPlotX1.GetChannel(5).SetTraceLineWidth(1); m_iPlotX1.GetDataView(0).SetGridLineXMajorCustom(FALSE); m_iPlotX1.GetDataView(0).SetGridLineYMajorCustom(FALSE); m_iPlotX1.GetDataView(0).SetGridLineXMajorWidth(1); m_iPlotX1.GetDataView(0).SetGridLineYMajorWidth(1); m_iPlotX1.GetLegend(0).SetFont(MyFont); m_iPlotX1.GetLabels(0).SetVisible(FALSE);}

Delphi (Windows/Linux):Procedure TForm1.iPlot1AfterPrint(Sender: TObject);Begin Iplot1.XAxis[0].LabelsFont.Style := []; Iplot1.YAxis[0].LabelsFont.Style := []; Iplot1.Channel[0].TraceLineWidth := 1; Iplot1.Channel[1].TraceLineWidth := 1; Iplot1.Channel[2].TraceLineWidth := 1; Iplot1.Channel[3].TraceLineWidth := 1; Iplot1.Channel[4].TraceLineWidth := 1; iPlot1.Channel[5].TraceLineWidth := 1; iPlot1.DataView[0].GridLineXMajorCustom := False; iPlot1.DataView[0].GridLineYMajorCustom := False; iPlot1.DataView[0].GridLineXMajorWidth := 1; iPlot1.DataView[0].GridLineYMajorWidth := 1; iPlot1.Legend[0].Font.Style := []; iPlot1.Labels[0].Visible := False;end;

Page 142 of 336 Iocomp Components – Plot Pack Manual

Page 155: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

CBuilder (Windows/Linux):void __fastcall TForm1::iPlot1AfterPrint(TObject *Sender){ iPlot1->XAxis[0]->LabelsFont->Style = TFontStyles(); iPlot1->YAxis[0]->LabelsFont->Style = TFontStyles(); iPlot1->Channel[0]->TraceLineWidth = 1; iPlot1->Channel[1]->TraceLineWidth = 1; iPlot1->Channel[2]->TraceLineWidth = 1; iPlot1->Channel[3]->TraceLineWidth = 1; iPlot1->Channel[4]->TraceLineWidth = 1; iPlot1->Channel[5]->TraceLineWidth = 1; iPlot1->DataView[0]->GridLineXMajorCustom = False; iPlot1->DataView[0]->GridLineYMajorCustom = False; iPlot1->DataView[0]->GridLineXMajorWidth = 1; iPlot1->DataView[0]->GridLineYMajorWidth = 1; iPlot1->Legend[0]->Font->Style = TFontStyles(); iPlot1->Labels[0]->Visible = False;}

Misc EventsNote: The following Plot Object Focus Events are for focus changes within the component and not for general focus changes of the entirecomponent. Use the container's events for the component to perform actions when the entire component loses or gets focus

OnAnnotationCoordinatesChange Occurs when either the position or size of an Annotation changes. Use OnAnnotationCoordinatesChange to specify actions to perform wheneverthe X, Y, X2, Y2, Width, or Height properties of an annotation object changes.

Visual Basic:Private Sub iPlotX1_OnAnnotationCoordinatesChange(ByVal Index As Long) Caption = iPlotX1.Annotation(Index).Name & " has Moved"End Sub

Visual C++:void::OnOnAnnotationCoordinatesChangeIplotx1(long Index) { m_ValueEdit.Format("%s%s", m_iPlotX1.GetAnnotation (Index).GetName(), " has Moved"); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure.iPlot1AnnotationCoordinatesChange(Index: Integer);begin Caption := iPlot1.Annotation[Index].Name + ' has Moved';end;

CBuilder (Windows/Linux):void __fastcall::iPlot1AnnotationCoordinatesChange(int Index){ Caption = iPlot1->Annotation[Index]->Name + " has Moved";}

OnAnnotationCoordinatesChangeFinished Occurs when either the position or size of an Annotation changes. Use OnAnnotationCoordinatesChangeFinished to specify actions to performwhenever the X, Y, X2, Y2, Width, or Height properties of an annotation object changes.

Visual Basic:Private Sub iPlotX1_OnAnnotationCoordinatesChangeFinished(ByVal Index As Long) Caption = iPlotX1.Annotation(Index).Name & " has Stopped Moving at XValue:" & Format(iPlotX1. Annotation(Index).X(),"###0.00") & " YValue:" & Format(iPlotX1.Annotation(Index).Y(), "###0.00")End Sub

Visual C++:void::OnOnAnnotationCoordinatesChangeFinishedIplotx1(long Index) { m_ValueEdit.Format("%s%s%.2f%s%.2f", m_iPlotX1.GetAnnotation(Index).GetName()," has Stopped Moving at XValue:", m_iPlotX1. GetAnnotation(Index).GetX(), " YValue:", m_iPlotX1.GetAnnotation(Index).GetY()); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure.iPlot1AnnotationCoordinatesChangeFinished(Index: Integer);begin Caption := iPlot1.Annotation[Index].Name + ' has Stopped Moving at XValue:' + Format('%.2f',[iPlot1.Annotation[Index].X]) + ' YValue: ' + Format('%.2f',[iPlot1.Annotation[Index].Y]);end;

CBuilder (Windows/Linux):void __fastcall:iPlot1AnnotationCoordinatesChangeFinished(int Index){ Caption = iPlot1->Annotation[Index]->Name + " has Stopped Moving at XValue:" + Format("%.2f", ARRAYOFCONST((iPlot1->Annotation[Index]->X))) + " YValue:" + Format("%.2f",ARRAYOFCONST((iPlot1->Annotation [Index]->Y)));}

Iocomp Components – Plot Pack Manual Page 143 of 336

Page 156: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

iPlotX1.EditorFormStyle = ipfsStayOnTop: Specifies the Window Display style of the Plot Component Runtime Property Editor. WhenipfsStayOnTop is used, code that relies on WndProc messages will continue to function. However, the runtime property editor will bedisplayed on top of all Windows, including other applications. Setting this property to ipfsStayOnTop is useful in Visual Basic where youwant your application to continue executing while the runtime property editor is open.

OnAfterLoadProperties Occurs after properties are loaded into the component using the Runtime Property Editor or LoadPropertiesFromFile method. UseOnAfterLoadProperties to specify actions to perform after properties of the component have been loaded either from the use of the RuntimeProperty Editor or from the use of the LoadPropertiesFromFile method.

.Visual Basic:Private Sub iPlotX1_OnAfterLoadProperties() iPlotX1.LoadAnnotationsFromFile "C:\Annotation22.cfg" iPlotX1.LoadDataFromFile "C:\Data22.cfg"End Sub

Visual C++:void::OnOnAfterLoadPropertiesIplotx1() { m_iPlotX1.LoadAnnotationsFromFile("C:\\Annotation22.cfg"); m_iPlotX1.LoadDataFromFile("C:\\Data22.cfg");}

Delphi (Windows/Linux):procedure TForm1.iPlot1AfterLoadProperties(Sender: TObject);begin iPlot1.LoadAnnotationsFromFile('C:\Annotation22.cfg'); iPlot1.LoadDataFromFile('C:\Data22.cfg');end;

CBuilder (Windows/Linux):void __fastcall::iPlot1AfterLoadProperties(TObject *Sender){ iPlot1->LoadAnnotationsFromFile("C:\Annotation22.cfg"); iPlot1->LoadDataFromFile("C:\Data22.cfg");}

.iPlotX1.EditorFormStyle = ipfsStayOnTop: Specifies the Window Display style of the Plot Component Runtime Property Editor. WhenipfsStayOnTop is used, code that relies on WndProc messages will continue to function. However, the runtime property editor will bedisplayed on top of all Windows, including other applications. Setting this property to ipfsStayOnTop is useful in Visual Basic where youwant your application to continue executing while the runtime property editor is open.

OnBeforeLoadProperties Occurs after properties are loaded into the component using the Runtime Property Editor or LoadPropertiesFromFile method. UseOnAfterLoadProperties to specify actions to perform after properties of the component have been loaded either from the use of the RuntimeProperty Editor or from the use of the LoadPropertiesFromFile method.

Visual Basic:Private Sub iPlotX1_OnBeforeLoadProperties() iPlotX1.SaveAnnotationsToFile "C:\Annotation22.cfg" iPlotX1.SaveDataToFile "C:\Data22.cfg"End Sub

Visual C++:void::OnOnBeforeLoadPropertiesIplotx1() { m_iPlotX1.SaveAnnotationsToFile("C:\\Annotation22.cfg"); m_iPlotX1.SaveDataToFile("C:\\Data22.cfg");}

Delphi (Windows/Linux):procedure TForm1.iPlot1BeforeLoadProperties(Sender: TObject);begin iPlot1.SaveAnnotationsToFile('C:\Annotation22.cfg'); iPlot1.SaveDataToFile('C:\Data22.cfg');end;

CBuilder (Windows/Linux):void __fastcall::iPlot1BeforeLoadProperties(TObject *Sender){ iPlot1->SaveAnnotationsToFile("C:\Annotation22.cfg"); iPlot1->SaveDataToFile("C:\Data22.cfg");}

Page 144 of 336 Iocomp Components – Plot Pack Manual

Page 157: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnBeforeZoomBox Occurs after the user selects an area to zoom and releases the mouse button. Use OnBeforeZoomBox to specify actions to perform before thezoom is applied to the chart or to cancel the zoom before the zoom is applied. Example below shows canceling the zoom and replacing the areafor zoom with a rectangular annotation.

Visual Basic:Private Sub iPlotX1_OnBeforeZoomBox(Left As Long, Top As Long, Right As Long, Bottom As Long, Cancel As Boolean) Cancel = True With iPlotX1.Annotation(iPlotX1.AddAnnotation) .Style = ipasRectangle .ChannelName = iPlotX1.Channel(0).Name .Reference = iprtChannel .Height = iPlotX1.YAxis(0).PixelsToPosition(Bottom) –iPlotX1.YAxis(0).PixelsToPosition(Top) .Width = iPlotX1.XAxis(0).PixelsToPosition(Right) –iPlotX1.XAxis(0).PixelsToPosition(Left) .x = iPlotX1.XAxis(0).PixelsToPosition(Left) + (.Width / 2) .y = iPlotX1.YAxis(0).PixelsToPosition(Top) + (.Height / 2) End With Caption = "Zoom Coordinates Left : " & Format(Left, "###0.0") & " Top : " & Format(Top, "###0.0") & " Right : " & Format(Right, "###0.0") & " Bottom : " & Format(Bottom, "###0.0") & " Zoom Cancel = " & CancelEnd Sub

Visual C++:void::OnOnBeforeZoomBoxIplotx1(long FAR* Left, long FAR* Top, long FAR* Right, long FAR* Bottom, BOOL FAR* Cancel) { int Index; *Cancel = TRUE; Index = m_iPlotX1.AddAnnotation(); m_iPlotX1.GetAnnotation(Index).SetStyle(2); m_iPlotX1.GetAnnotation(Index).SetChannelName(m_iPlotX1.GetChannel(0). GetName()); m_iPlotX1.GetAnnotation(Index).SetReference(1); m_iPlotX1.GetAnnotation(Index).SetHeight(m_iPlotX1.GetYAxis(0).PixelsToPosition(*Bottom) –m_iPlotX1.GetYAxis(0).PixelsToPosition (*Top )); m_iPlotX1.GetAnnotation(Index).SetWidth(m_iPlotX1.GetXAxis(0).PixelsToPosition(*Right ) - m_iPlotX1.GetXAxis(0).PixelsToPosition (*Left)); m_iPlotX1.GetAnnotation(Index).SetX(m_iPlotX1.GetXAxis(0).PixelsToPosition(*Left) + (m_iPlotX1.GetAnnotation(Index).GetWidth() / 2)); m_iPlotX1.GetAnnotation(Index).SetY(m_iPlotX1.GetYAxis(0).PixelsToPosition(*Top) + (m_iPlotX1.GetAnnotation(Index).GetHeight() / 2)); m_ValueEdit.Format("%s%d%s%d%s%d%s%d", " Left : ", *Left, " Top : ", *Top, " Right : ", *Right, " Bottom : ", *Bottom); UpdateData(FALSE);}

Delphi (Windows/Linux):procedure TForm1.iPlot1BeforeZoomBox(var ZoomRect: TRect; var Cancel: Boolean);begin Cancel := True; With iPlot1.Annotation[iPlot1.AddAnnotation()] do begin Style := ipasRectangle; ChannelName := iPlot1.Channel[0].Name; Reference := iprtChannel; Height := iPlot1.YAxis[0].PixelsToPosition(ZoomRect.Bottom) – iPlot1.YAxis[0].PixelsToPosition(ZoomRect.Top); Width := iPlot1.XAxis[0].PixelsToPosition(ZoomRect.Right) - iPlot1.XAxis[0].PixelsToPosition(ZoomRect.Left); x := iPlot1.XAxis[0].PixelsToPosition(ZoomRect.Left)+ (Width / 2); y := iPlot1.YAxis[0].PixelsToPosition(ZoomRect.Top)+ (Height / 2); end; if Cancel = True then Caption := 'Zoom Coordinates Left : ' + IntToStr(ZoomRect.Left) + ' Top : ' + IntToStr(ZoomRect.Top)+ ' Right : ' + IntToStr(ZoomRect.Right) + ' Bottom : ' + IntToStr(ZoomRect.Bottom) + ' Zoom Cancel = True' else Caption := 'Zoom Coordinates Left : ' + IntToStr(ZoomRect.Left) + ' Top : ' + IntToStr(ZoomRect.Top) + 'Right : ' + IntToStr (ZoomRect.Right) + ' Bottom : ' + IntToStr(ZoomRect.Bottom) + ' Zoom Cancel = False';end;

CBuilder (Windows/Linux):void __fastcall:iPlot1BeforeZoomBox(TRect &ZoomRect, bool &Cancel){ int Index; Cancel = TRUE; Index = iPlot1->AddAnnotation(); iPlot1->Annotation[Index]->Style = ipasRectangle; iPlot1->Annotation[Index]->ChannelName = iPlot1->Channel[0]- >Name; iPlot1->Annotation[Index]->Reference = iprtChannel; iPlot1->Annotation[Index]->Height = iPlot1->YAxis[0]->PixelsToPosition(ZoomRect.Bottom) – iPlot1->YAxis[0]->PixelsToPosition(ZoomRect. Top); iPlot1->Annotation[Index]->Width = iPlot1->XAxis[0]->PixelsToPosition(ZoomRect.Right) – iPlot1->XAxis[0]->PixelsToPosition(ZoomRect. Left); iPlot1->Annotation[Index]->X = iPlot1->XAxis[0]->PixelsToPosition(ZoomRect.Left) + (iPlot1->Annotation[Index]->Width / 2); iPlot1->Annotation[Index]->Y = iPlot1->YAxis[0]->PixelsToPosition(ZoomRect.Top) + (iPlot1->Annotation[Index]->Height / 2);

if (Cancel == True ) Caption = "Zoom Coordinates Left : " + IntToStr(ZoomRect.Left) + " Top : " + IntToStr(ZoomRect.Top) + " Right : " + IntToStr(ZoomRect.Right) + " Bottom : " + IntToStr(ZoomRect.Bottom) + " Zoom Cancel = True"; else Caption = "Zoom Coordinates Left:" + IntToStr(ZoomRect.Left) + " Top : " + IntToStr(ZoomRect.Top) + "Right:" + IntToStr(ZoomRect. Right) + " Bottom : " + IntToStr(ZoomRect.Bottom) + "Zoom Cancel = False";}

OnBeforeNewOPCData The OnBeforeNewOPCData is OPC Data for the Component not the Channel OPC Data. This event Occurs before data from an attached OPCserver is sent to the control. Use OnBeforeNewOPCData to give yourself the opportunity to modify OPC data before it is sent to the control. TheOnBeforeNewOPCData event will fire every time OPC data is received by the component, regardless or whether the data is different thanpreviously received values.

Iocomp Components – Plot Pack Manual Page 145 of 336

Page 158: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 27 - Plot Pack Events

OnNewOPCData The OnNewOPCData is OPC Data for the Component not the Channel OPC Data. This event occurs when data from an attached OPC server issent to the control. Use OnNewOPCData to specify actions to perform whenever new OPC data is sent to the control. This event is in contrast tothe standard events on the component (for example, the OnPositionChange event for controls that have a Position property tied to an OPC Server)which only fire when OPC data changes the property on the component. The OnNewOPCData event will fire every time OPC data is received bythe component, regardless or whether the data is different than previously received values.

Page 146 of 336 Iocomp Components – Plot Pack Manual

Page 159: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

Chapter 28 - Layout Control Through Code

Layout objects are objects that surround the Data-View such as Axes, Labels, Tables, Legend and the ToolBar. Generally, you will use the built-in propertyeditor to setup and layout objects. This chapter covers how you can manipulate the location of the Layout objects through code.

Layout ManagerThe layout manager automatically adjusts the position of layout objects such as the Axes, ToolBar, and Legend for you. If you are manuallyadjusting the location of layout objects through code, you will need to disable the layout manger first and then re-enable after you have completedthe movement of objects.

To Disable the Layout Manager, execute the following…

iPlot1.DisableLayoutManager()

To Enable the Layout Manager, execute the following…

iPlot1.EnableLayoutManager()

Layout Object ZOrderThe ZOrder of a plot object determines how it is displayed in relation of other plot objects of the same type. Each plot object has a ZOrderproperty that determines how the layout object is painted on the control in relation to other layout objects. If two layout objects of the same typehave the same ZOrder, then they are considered to be “stacked”.

In FIGURE 28.1 for example, Y-Axis 1 & 2 have the same ZOrder, so they take up the same vertical position and are therefore “stacked”…

FIGURE 28.1Diagram showing the

first two Vertical objectZ-Orders as well as two

Y-Axes sharing thesame Z-Order resultingin them being stacked.

Layout Object StartPercent and StopPercentTo specify how much area a particular layout object takes up, you will need to set the Start and Stop Percent properties. These properties arecurrently only supported by the X-Axis, Y-Axis, Table, and Label objects.

A Start percent of 25% for a vertical layout object means that the layout object begins drawing 25% from the bottom of the area reserved for theaxes. A Start percent of 25% for a horizontal layout object means that the layout object begins drawing 25% from the left side of the componentas shown in FIGURE 28.2 and FIGURE 28.3.

A Stop percent of 75% for a vertical layout object means that the layout object ends drawing 75% from the bottom of the area reserved for theaxes. A Stop percent of 75% for a horizontal layout object means that the layout object ends drawing 75% from the left side of the component asshown in FIGURE 28.2 and FIGURE 28.3.

Horizontal Layout ObjectiPlot1.XAxis(0).StartPercent = 25iPlot1.XAxis(0).StopPercent = 75

FIGURE 28.2Diagram showing aHorizontal Layout

Object with a StartingPercent of 25% and aStopping Percent of

75%.

Iocomp Components – Plot Pack Manual Page 147 of 336

Page 160: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

Vertical Layout ObjectiPlot1.YAxis(0).StartPercent = 25iPlot1.YAxis(0).StopPercent = 75

FIGURE 28.3Diagram showing a

Vertical LayoutObject with a

Starting Percent of25% and a Stopping

Percent of 75%.

DataViewZVert and DataViewZHorzSince the DataView is both a horizontal and vertical layout object, you need to use these properties off of the main plot component interface to setthe relative ZOrder position of the DataView in relation to other horizontal and vertical layout objects.

DataViewZVertTo place the DataView in ZOrder #2 relative to other vertical layout objects, you would set the DataViewZVert property equal to 2.

iPlot1.DataViewZVert = 2

FIGURE 28.4Diagram showing the

relationship of theDataViewZVert property

and the DataView’s ZOrderas it fits with the Z-Order of

other Vertical Objects.

DataViewZHorzTo place the DataView in ZOrder #1 relative to other horizontal layout objects, you would set the DataViewZHorz property equal to 1.

iPlot1.DataViewZHorz = 1

FIGURE 28.5Diagram showing the

relationship of theDataViewZHorz property

and the DataView’sZOrder as it fits with the

Z-Order of otherHorizontal Objects.

ToolBar LocationCurrently the Visual Layout Manager in the property editor does not support changing the ZOrder of the ToolBar. You can however change theZOrder of the ToolBar relative to other horizontal layout objects (such as the DataView or X-Axes) by changing the ZOrder of the ToolBarthrough code at run-time. Note: this feature is not yet fully supported for positions other than the top of the component. The ToolBar must alwaysbe the top most ZOrder (i.e. the ZOrder must always be greater than other horizontal layout objects).

Only one tool bar and one legend are supported at this time. Always use an index value of 0 when accessing the ToolBar or Legend.

X and Y-Axes The plot component axes are designed to automatically take care of drawing, aligning, and maintaining the layout of the axes for you. You do,however, have control over several

Page 148 of 336 Iocomp Components – Plot Pack Manual

Page 161: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

parameters that affect how the automated layout is handled.

StackingEndsMarginUse StackingEndsMargin to get or set the margin at the end of the axis when stacked. StackingEndsMargin represents the percentageof a character size and is based on the LabelFont used 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 stacking margin only applies to layout objectsthat touch each other and only affects the ends that touch. In the following example, the first Y-Axis (on the bottom) has a startingpercent of 0 and ending percent of 50. The second Y-Axis (on top) has a starting percent of 50 and an ending percent of 100. TheStacking Ends Margin allocates additional space to separate the two stacked axes. The total spacing 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 theaxes unless they touch another 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

FIGURE 28.6Example Chart showingthe results of setting the

stacked Y-AxesStackingEndsMarginproperty to “0.25”.

Layout Object HorizontalThis property should not be modified by the developer and is for internal use by the component to manage the layout and rotation oflayout objects. To rotate the X and Y-Axes, use the XYAxesReverse property off of the main plot component interface…

iPlot1.XYAxesReverse = True

All axes margins use units of character widths and heights. This allows the component to dynamically adjust the scales based upon the fontused instead of using rigid pixel specifications. A value of 0.25 would be equivalent to size (horizontal or vertical depending on if the marginrelates to a horizontal or vertical margin) of a single character from the font being used in the layout object.

Iocomp Components – Plot Pack Manual Page 149 of 336

Page 162: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

Plot Component Outer MarginYou can change the inner margin of the plot component, thereby creating a margin between the layout objects and the edge of the component. Themargin values are specified in pixels.

In FIGURE 28.7 example sets a 5-pixel margin around the inside of the Plot Component…

iPlot1.OuterMarginLeft = 5iPlot1.OuterMarginRight = 5iPlot1.OuterMarginTop = 5iPlot1.OuterMarginBottom = 5

FIGURE 28.7Diagram showingthe Outer Margin

properties

Full Layout Through Code ExampleThe following example demonstrates adding an additional X-Axis and two additional Y-Axes, moving the X-Axis and Y-Axes by manipulatingthe ZOrder of all of the appropriate layout objects, and then adjusting two of the Y-Axes to be stacked. The code assumes you have added a fairlylarge iPlot component to your form and you are placing the code in your form load event.

You don’t have to hand-code the layout of objects unless you wish or need to do so. You can always use the Visual Layout Manager toarrange the layout objects without using any code in your program. See Chapter 15 - Visual Layout Manager page 75 for more informationabout using the Visual Layout Manager.

The output from the program should look like the following on FIGURE 28.8.

FIGURE 28.8Example Output from

the Full LayoutThrough Code

Example.

Page 150 of 336 Iocomp Components – Plot Pack Manual

Page 163: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

Visual Basic/VBA/VBScript iPlotX1.AddXAxis iPlotX1.AddYAxis iPlotX1.AddYAxis

iPlotX1.DisableLayoutManager 'So that it doesn't interfere with our manual layout code iPlotX1.XAxis(0).ZOrder = 0 'Configure ZOrder of Horizontal Layout Objects iPlotX1.DataViewZHorz = 1 iPlotX1.XAxis(1).ZOrder = 2 iPlotX1.Labels(0).ZOrder = 3 iPlotX1.ToolBar(0).ZOrder = 4

iPlotX1.YAxis(0).ZOrder = 0 'Configure ZOrder of Vertical Layout Objects Note that the first two Y-Axes iPlotX1.YAxis(1).ZOrder = 0 'will have the same ZOrder, making them stacked axes iPlotX1.DataViewZVert = 1 iPlotX1.YAxis(2).ZOrder = 2 iPlotX1.Legend(0).ZOrder = 3 iPlotX1.YAxis(0).StartPercent = 0 'Start and Stop Percent of the two Y-Axes we wish to stack iPlotX1.YAxis(0).StopPercent = 50 iPlotX1.YAxis(1).StartPercent = 50 iPlotX1.YAxis(1).StopPercent = 100 iPlotX1.YAxis(0).StackingEndsMargin = 0.25 'For each of the stacked axes to allow for a separation total of half of a character iPlotX1.YAxis(1).StackingEndsMargin = 0.25

iPlotX1.DataView(0).GridYAxisName = iPlotX1.YAxis(2).Name 'To use Y-Axis on the far right side Grid looks consistent iPlotX1.EnableLayoutManager 'Re-Enable the Layout Manager

Visual Basic/VBA/VBScript iPlotX1.AddXAxis iPlotX1.AddYAxis iPlotX1.AddYAxis iPlotX1.DisableLayoutManager 'So that it doesn't interfere with our manual layout code iPlotX1.XAxis(0).ZOrder = 0 'Configure ZOrder of Horizontal Layout Objects iPlotX1.DataViewZHorz = 1 iPlotX1.XAxis(1).ZOrder = 2 iPlotX1.Labels(0).ZOrder = 3 iPlotX1.ToolBar(0).ZOrder = 4 iPlotX1.YAxis(0).ZOrder = 0 'Configure ZOrder of Vertical Layout Objects. Note that the first two Y-Axes iPlotX1.YAxis(1).ZOrder = 0 'will have the same Zorder, making them stacked axes iPlotX1.DataViewZVert = 1 iPlotX1.YAxis(2).ZOrder = 2 iPlotX1.Legend(0).ZOrder = 3 iPlotX1.YAxis(0).StartPercent = 0 'Configure the Start and Stop Percent of the two Y-Axes we wish to stack. iPlotX1.YAxis(0).StopPercent = 50 iPlotX1.YAxis(1).StartPercent = 50 iPlotX1.YAxis(1).StopPercent = 100 iPlotX1.YAxis(0).StackingEndsMargin = 0.25 'For each of the stacked axes to allow for a separation total of half of a character iPlotX1.YAxis(1).StackingEndsMargin = 0.25 iPlotX1.DataView(0).GridYAxisName = iPlotX1.YAxis(2).Name 'To use Y-Axis on far the right so the Grid looks consistent iPlotX1.EnableLayoutManager 'Re-Enable the Layout Manager

Delphi (Windows/Linux): iPlot1.AddXAxis; iPlot1.AddYAxis; iPlot1.AddYAxis;

iPlot1.DisableLayoutManager; //So that it doesn't interfere with our manual layout code

iPlot1.XAxis[0].ZOrder := 0; //Configure ZOrder of Horizontal Layout Objects iPlot1.DataViewZHorz := 1; iPlot1.XAxis[1].ZOrder := 2; iPlot1.Labels[0].ZOrder := 3; iPlot1.ToolBar[0].ZOrder := 4;

iPlot1.YAxis[0].ZOrder := 0; //Configure ZOrder of Vertical Layout Objects. Note that the first two Y-Axes iPlot1.YAxis[1].ZOrder := 0; //will have the same ZOrder, making them stacked axes iPlot1.DataViewZVert := 1; iPlot1.YAxis[2].ZOrder := 2; iPlot1.Legend[0].ZOrder := 3;

iPlot1.YAxis[0].StartPercent := 0; //Configure the Start and Stop Percent of the two Y-Axes we wish to stack. iPlot1.YAxis[0].StopPercent := 50; iPlot1.YAxis[1].StartPercent := 50; iPlot1.YAxis[1].StopPercent := 100;

iPlot1.YAxis[0].StackingEndsMargin := 0.25; //For each of the stacked axes to allow for a separation total of half of a character iPlot1.YAxis[1].StackingEndsMargin := 0.25;

iPlot1.DataView[0].GridYAxisName := iPlot1.YAxis[2].Name; //To use Y-Axis on far the right so the Grid looks consistent iPlot1.EnableLayoutManager; //Re-Enable the Layout Manager

Iocomp Components – Plot Pack Manual Page 151 of 336

Page 164: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

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"================================================================ m_iPlotX1.AddXAxis();

m_iPlotX1.AddYAxis(); m_iPlotX1.AddYAxis();

m_iPlotX1.DisableLayoutManager(); //So that it doesn't interfere with our manual layout code

m_iPlotX1.GetXAxis(0).SetZOrder(0); //Configure ZOrder of Horizontal Layout Objects m_iPlotX1.SetDataViewZHorz(1); m_iPlotX1.GetXAxis(1).SetZOrder(2); m_iPlotX1.GetLabels(0).SetZOrder(3); m_iPlotX1.GetToolBar(0).SetZOrder(4);

m_iPlotX1.GetYAxis(0).SetZOrder(0); //Configure ZOrder of Vertical Layout Objects. Note that the first two Y-Axes m_iPlotX1.GetYAxis(1).SetZOrder(0); //will have the same ZOrder, making them stacked axes m_iPlotX1.SetDataViewZVert(1); m_iPlotX1.GetYAxis(2).SetZOrder(2); m_iPlotX1.GetLegend(0).SetZOrder(3);

m_iPlotX1.GetYAxis(0).SetStartPercent(0); //Configure the Start and Stop Percent of the two Y-Axes we wish to stack. m_iPlotX1.GetYAxis(0).SetStopPercent(50); m_iPlotX1.GetYAxis(1).SetStartPercent(50); m_iPlotX1.GetYAxis(1).SetStopPercent(100);

m_iPlotX1.GetYAxis(0).SetStackingEndsMargin(0.25); //Each of the stacked axes to allow for a separation total of half of a character m_iPlotX1.GetYAxis(1).SetStackingEndsMargin(0.25);

m_iPlotX1.GetDataView(0).SetGridYAxisName(m_iPlotX1.GetYAxis(2).GetName()); //Uses Y-Axis on far the right so the Grid consistency m_iPlotX1.EnableLayoutManager(); //Re-Enable the Layout Manager

Page 152 of 336 Iocomp Components – Plot Pack Manual

Page 165: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 28 - Layout Control Through Code

Visual C++ [High-Speed iDispatch Inteface]Place the following include statements at the top of your file… #import "iPlotLibrary.tlb" named_guids //Place at top of cpp file #include "atlbase.h" extern CComModule _Module; using namespace iPlotLibrary; ================================================================ double XData; double YData; CWnd* m_Wnd; IUnknown* m_iUnknown; CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

m_Wnd = GetDlgItem(IDC_IPLOTX1); m_iUnknown = m_Wnd->GetControlUnknown(); m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \(LPVOID*)&iPlotX1);

iPlotX1->AddXAxis(); iPlotX1->AddYAxis(); iPlotX1->AddYAxis();

iPlotX1->DisableLayoutManager(); //So that it doesn't interfere with our manual layout code iPlotX1->XAxis[0]->ZOrder = 0; //Configure ZOrder of Horizontal Layout Objects iPlotX1->DataViewZHorz = 1; iPlotX1->XAxis[1]->ZOrder = 2; iPlotX1->Labels[0]->ZOrder = 3; iPlotX1->ToolBar[0]->ZOrder = 4;

iPlotX1->YAxis[0]->ZOrder = 0; //Configure ZOrder of Vertical Layout Objects. Note that the first two Y-Axes iPlotX1->YAxis[1]->ZOrder = 0; //will have the same ZOrder, making them stacked axes iPlotX1->DataViewZVert = 1; iPlotX1->YAxis[2]->ZOrder = 2; iPlotX1->Legend[0]->ZOrder = 3;

iPlotX1->YAxis[0]->StartPercent = 0; //Configure the Start and Stop Percent of the two Y-Axes we wish to stack. iPlotX1->YAxis[0]->StopPercent = 50; iPlotX1->YAxis[1]->StartPercent = 50; iPlotX1->YAxis[1]->StopPercent = 100;

iPlotX1->YAxis[0]->StackingEndsMargin = 0.25; //Each of the stacked axes to allow for a separation total of half of a character iPlotX1->YAxis[1]->StackingEndsMargin = 0.25;

iPlotX1->DataView[0]->GridYAxisName = iPlotX1->YAxis[2]->Name; //Uses Y-Axis on far the right so the Grid consistency

iPlotX1->EnableLayoutManager(); //Re-Enable the Layout Manager

CBuilder (Windows/Linux):iPlot1->AddXAxis();

iPlot1->AddYAxis();iPlot1->AddYAxis();

iPlot1->DisableLayoutManager();

iPlot1->XAxis[0]->ZOrder = 0; //So that it doesn't interfere with our manual layout codeiPlot1->DataViewZHorz = 1; //Configure ZOrder of Horizontal Layout ObjectsiPlot1->XAxis[1]->ZOrder = 2;iPlot1->Labels[0]->ZOrder = 3;iPlot1->ToolBar[0]->ZOrder = 4;

iPlot1->YAxis[0]->ZOrder = 0; //Configure ZOrder of Vertical Layout Objects. Note that the first two Y-AxesiPlot1->YAxis[1]->ZOrder = 0; //will have the same ZOrder, making them stacked axesiPlot1->DataViewZVert = 1;iPlot1->YAxis[2]->ZOrder = 2;iPlot1->Legend[0]->ZOrder = 3; iPlot1->YAxis[0]->StartPercent = 0; //Configure the Start and Stop Percent of the two Y-Axes we wish to stack.iPlot1->YAxis[0]->StopPercent = 50;iPlot1->YAxis[1]->StartPercent = 50;iPlot1->YAxis[1]->StopPercent = 100;

iPlot1->YAxis[0]->StackingEndsMargin = 0.25; //Each of the stacked axes to allow for a separation total of half of a characteriPlot1->YAxis[1]->StackingEndsMargin = 0.25;

iPlot1->DataView[0]->GridYAxisName = iPlot1->YAxis[2]->Name; //Uses Y-Axis on far the right so the Grid consistency

iPlot1->EnableLayoutManager(); //Re-Enable the Layout Manager

Iocomp Components – Plot Pack Manual Page 153 of 336

Page 166: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 29 - Layer Control

Chapter 29 - Layer Control

All Objects shown in the Data View will be drawn in the order specified by their layer number. Objects with lower layer numbers will be drawnfirst, and objects with higher layer numbers will be drawn last. If more than one object has the same layer number, then they will be drawn in theorder listed in Table 29.1. By default, all objects have there layer number set to 100. The layer property can be any valid 32-bit integer value (–2147483648...2147483647) and the numbers can be positive or negative.

Order from bottom to top (e.g. Annotations are on top of Channel Data1. Filled Limit Lines (Band, Poly Limits)2. DataView Grid Lines3. Non-Filled Limit Lines4. Y-Axes (Cartesian Only) 5. X-Axes (Cartesian Only)6. Channel Data7. AnnotationsTable 29.1

Even though all plot objects have a layer property, only objects that are drawn in the Data View will have their layer property taken into account.All objects outside of the Data View do not overlap and their layer property is ignored. In Table 29.2 shows plot objects that are drawn in the dataview.

Plot Object of the DataView• Channel Data (Which includes Trace Lines, Bars, Fill, and Data Markers)• Limit Lines• Data Cursor• Annotations• Cartesian-Axes• DataView (Grid Lines Only. Background is always drawn on the bottom)Table 29.2

Below is an example of how you would set an annotation to a higher layer number to bring it to the front assuming all other objects have theirlayer numbers still set to the default of 100...

iPlot1.Annotation(Index).Layer = 101

The following figures show some examples of using the layering feature. The first example in Figure 29.1 shows both the DataView and Channellayer property set to 100, and in Figure 29.2 the Channel layer property is change to 99 showing the grid lines of the DataView on top of the Channel.

iPlot1.Channel(0).Layer = 100 iPlot1.Channel(0).Layer = 99

Figure 29.1DataView and Channel Layer property set to 100.

Figure 29.2 DataView Layer Control set to 100 Channel Layer property set to 99.

Page 154 of 336 Iocomp Components – Plot Pack Manual

Page 167: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 29 - Layer Control

The next example in Figure 29.3 shows both Channel1(Yellow Trace) and Channel2(Red Fill) layer property set to 100, and in Figure 29.4 Channel2 layer property is changed to 99 showing Channel2 on the bottom of the Channel1.

iPlot1.Channel(0).Layer = 100 iPlot1.Channel(0).Layer = 100iPlot1.Channel(1).Layer = 100 iPlot1.Channel(1).Layer = 99

Figure 29.3Channel1 and Channel2 Layer property set to 100.

Figure 29.4 Channel1 Layer set to 100 Channel2 Layer property set to 99.

Figure 29.5 shows both the Channel and Annotation-Ellipse layer properties set to 100. Figure 29.6 shows the Annotation-Ellipse layer propertyset to 101 showing Annotation Ellipse on top of the Channel-Fill.

iPlot1.Annotation(0).Layer = 100 iPlot1.Annotation(0).Layer = 101

Figure 29.5Channel and Annotation-Ellipse Layer property set to 100.

Figure 29.6Channel Layer set to 100 Annotation-Ellipse Layer set to 101.

Iocomp Components – Plot Pack Manual Page 155 of 336

Page 168: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 30 - Pixel, Percent, and Position

Chapter 30 - Pixel, Percent, and Position

The Pixel, Percent, and Percentage are units used by plot objects for determining locations, sizes, or areas of objects drawn to the screen. Some object canuse one or more of the unit styles. Table Table 30.1 provides a list of the unit types and their definitions.

Unit Type Definition

Pixel

Used when referring to specific location on the screen or when dealing with mouse event coordinates. Pixel values are aninteger type and range in value from –2147483648 ...2147483647. For Left to Right orientation, Left is 0 and increases tothe Right. For Top to Bottom orientation, Top is 0 and increases towards the Bottom.

Percent

Used in reference to the Data View and ranges in value from 0-100 for points inside of the Data View. Values outside the 0-100 range, correspond to areas outside of the Data View. For Left to Right orientation, Left is 0 and Right is 100. For Topto Bottom orientation, Bottom is 0 and Top is 100. Percent values are of double type.

Position

Used when referring to specific Axes locations. The position value is a double type and can range in value from -1E300 to1E300. Position values shown in the Data View must be in the range of Min-Max of the axes. All other position values areon the axes, but outside of the Data View.

Table 30.1

All Channel and Limit data is in Position units. Both will be rendered to the screen through an internal process where the Position units are automaticallyconverted to Pixel units for display. The axes are the objects that define the Position units and will perform the actual conversion from Position to Pixels.

All PlotLayout objects and Data Cursors are located based on percent units. The rendering to the screen occurs through an internal process where the Percentunits are automatically converted to Pixel units for display. The Data View object is the reference for Percent units and will perform the actual conversionfrom Percent to Pixels.

Ultimately, all Percent and Position units are converted to Pixel units for rendering items to the screen. All mouse events when fired will specify the X&Ycoordinates in Pixel units and must be converted back to Percent or Position units for use in manipulating plot objects or determining areas where the user isinteracting with the plot.

See Table 30.2 for a converting methods on the Axes objects for converting between the various units. Table 30.3 is for converting methods on theAnnotation objects for converting between the various units. Table 30.4 a list of conversion methods on the Data View object for converting between thevarious units.

DataView Axes AnnotationPixelsXToPositionPercent PositionToPixels PositionXToPixelsPixelsYToPositionPercent WidthToPixels PositionYToPixelsPositionPercentToPixelsX PixelsToPosition PixelsXToPositionPositionPercentToPixelsY PercentToPosition PixelsYToPosition

PositionToPercentTable 30.2 Table 30.3 Table 30.4

Page 156 of 336 Iocomp Components – Plot Pack Manual

Page 169: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 31 - Implementing ToolBar Externally

Chapter 31 - Implementing ToolBar Externally

The built-in tool bar is intended to be a very simple and easy to use tool bar, providing basic user tools and functionality for the Plot Pack components. If youneed a more advanced tool bar, or if you want to include functionality for other features of your application, you will need to use an external tool bar control.

The Plot Pack components have interfaces that allow you to easily map and perform the same functions as the built-in tool bar. Many developmentenvironments come with their own tool bar controls and you can find many other third-party tool bars with many advanced features. You will need to use ourtool bar interfaces in the event code that is generated by the tool bar that you use. Each function interface will perform the same action as if the user hadclicked on the corresponding built-in ToolBar button.

Methods that are available to perform ToolBar functions are as follows…

Resume Button

iPlot1.ToolBar(0).DoButtonClickResume

Pause Button

iPlot1.ToolBar(0).DoButtonClickPause

Axes Scroll Mode Button

iPlot1.ToolBar(0).DoButtonClickScrollAxesMode

Axes Zoom Mode Button

iPlot1.ToolBar(0).DoButtonClickZoomAxesMode

Zoom In Button

iPlot1.ToolBar(0).DoButtonClickZoomOut

Zoom Out Button

iPlot1.ToolBar(0).DoButtonClickZoomIn

Select Button

iPlot1.ToolBar(0).DoButtonClickSelect

Zoom Box Button

iPlot1.ToolBar(0).DoButtonClickZoomBox

Cursor Button

iPlot1.ToolBar(0).DoButtonClickCursor

Edit Button

iPlot1.ToolBar(0).DoButtonClickEdit

Copy Button

iPlot1.ToolBar(0).DoButtonClickCopy

Save Button

iPlot1.ToolBar(0).DoButtonClickSave

Print Button

iPlot1.ToolBar(0).DoButtonClickPrint

If you need to check if a particular mode is active, use the following properties...

• ZoomBoxActive • CursorActive • SelectActive

Currently, only one tool bar is supported. Always use ToolBar(0) when referencing the ToolBar. In a future release, the Plot Componentswill support multiple tool bars.

Iocomp Components – Plot Pack Manual Page 157 of 336

Page 170: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 32 - Implementing Legend Externally

Chapter 32 - 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

FIGURE 32.1Sample Chart

showing variousitems supported bythe built-in legend.

… if you wish to implement your own legend outside of our component, you can emulate the features listed above as follows…

Channel Name ListingThe value displayed in the Title column is actually not the ChannelName property, but the ChannelTitle property. The ChannelTitle propertycontrols 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.

To access all of the Channel Titles in a loop, execute the following…

For x = 0 to iPlot1.ChannelCount -1 ChannelTitleTextString = iPlot1.Channel(x).ChannelTitleNext 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 notrepresented and that the line style is simulated to make it easier to distinguish among the different line styles available. To access a particular Channel Line Style or Line Color, use the following…

iPlot1.Channel(0).TraceLineStyleiPlot1.Channel(0).Color

In Table 32.1 shows the line style that are used in the corresponding FIGURE 32.2 where 0 is the Channel index of the 1st Channel.

Line Style Integer ValueiplsDash 0iplsDashDot 1iplsDashDotDot 2iplsDot 3iplsSolid 4Table 32.1

FIGURE 32.2Multi-

TraceLineStyles.

Page 158 of 336 Iocomp Components – Plot Pack Manual

Page 171: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 32 - Implementing Legend Externally

Channel Marker Style and Color ListingThe colored marker displayed in the first represents the marker style and color of the channel’s marker. There are several properties that affect thelook of a Channel Marker. A marker is drawn using 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).MarkersBrushColor iPlot1.Channel(0).MarkersBrushStyle iPlot1.Channel(0).MarkersBrushUseChannelColor iPlot1.Channel(0).MarkersPenColor iPlot1.Channel(0).MarkersPenStyle iPlot1.Channel(0).MarkersPenUseChannelColor iPlot1.Channel(0).MarkersPenWidth iPlot1.Channel(0).MarkersSize iPlot1.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…

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 recently added data point for a particular channel. InFIGURE 32.3, the green channel (Channel 6) shows a current Y value of 30, which corresponds to the X-Value displayed in the graph and in thelegend.

FIGURE 32.3Legend showing

the last addeddata point’s X

and Y value foreach channel.

To access any particular X or Y coordinate of a particular data point, use the following where Index 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)

Iocomp Components – Plot Pack Manual Page 159 of 336

Page 172: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 33 - Performance Tuning

Chapter 33 - Performance Tuning

By default, the Plot Components are designed to provide real-time performance even at high data rates on most system and application configurations.However, there are certain limitations and realities of the 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 chart on a standard Windows 95/98/ME/NT/2000 orLinux system. However, the operating system can only draw 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 need to take the following items into consideration whensetting up the component and or your computer system…

Component SizeThis is by far the most important item that affects the perceived speed and processor usage on your system.

For example, when you display a video file on a standard system (high frame rate video, 500Mhz processor, 64MB Ram, 1024x768 system), youwill see the processor usage climb as you increase the size of the video window. This happens because the operating system has to draw morepixels 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 workharder to draw the increased number of pixels to the system.

Frame RateAll of Iocomp’s components include properties and methods that allow you to control how often the control is repainted when changes are madeto the components such as adding data or scrolling axes. Properties and methods that allow this control are: AutoFrameRate, UpdateFrameRate,BeginUpdate, and EndUpdate. These features allow you to either automatically or manually control how often the control’s display area isupdated.

If you will be adding data points in real-time, we recommend that you set AutoFrameRate to True so that we can optimize the repainting ofthe control. However, if you will not be adding data in real-time (working with a static dataset), then we recommend turning off this featuresince AutoFrameRate optimizations rely on continuously updated data coming into the channel.

AutoFrameRateThe AutoFrameRate property specifies whether the control automatically controls the frame repaint rate. With AutoFrameRate enabled, thecontrol will automatically throttle the number of repaints per second that the control executes according to the number of frame per secondspecified in the UpdateFrameRate property. By using the Auto Frame Rate feature, you can control the number of repaints that the operatingsystem has to make for the control, therefore reducing the amount of processing time used by this component.

iPlot1.AutoFrameRate = True

UpdateFrameRateThe UpdateFrameRate property specifies the frame rate at which the control automatically repaints in frame per second. Every time adata point is plotted or when a user scrolls the axes, the control has to repaint itself to reflect the new changes.

iPlot1.UpdateFrameRate = 10

The frame rate is used to improve performance by controlling the number of times the control repaints itself per second. To activateautomatic frame rate control, the UpdateFrameRate property must be non zero. You can also use the manual BeginUpdate andEndUpdate method to manually control repainting even if the UpdateFrameRate feature is turned on.

Each time a change occurs to the control that requires a repaint, the control will determine if a new frame needs to be displayed. TheFrameTime is one second divided by the UpdateFrameRate. If a change occurs to the control before the FrameTime has elapsed, thecontrol is not repainted. If a change occurs to the control after the FrameTime has elapsed, the control is repainted and the next frameis started.

There must be a steady stream of changes to the control that require repainting for the automatic frame rate control to functioncorrectly. The rate of change per second must be greater than the UpdateFrameRate for the desired frame rate to be achieved. Oncechanges to the control that require repainting have been stopped, call the EndUpdate method to force the control to repaint the lastchanges that may be cached.

When the frame rate control is inactive, the control will attempt to repaint when a change is made to the control that requires a repaint.The actual number of repaints per second is dependent of the system hardware, system activity, and the number of requests being madeto repaint the control.

The frame rate can be manually controlled by using the BeginUpdate and EndUpdate methods. Make sure that the UpdateFrameRateproperty is set to 0 to disable automatic frame rate control. Your code will need to keep track of the last update before beginning a newframe. To begin a new frame, call the EndUpdate method and then the BeginUpdate method to start the next frame.

Note: If the user is interacting with the component, such as scrolling the axes, clicking the tool bar buttons, etc, the UpdateFrameRate

Page 160 of 336 Iocomp Components – Plot Pack Manual

Page 173: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 33 - Performance Tuning

is ignored. This allows the control to repaint quickly when the user is using the UI of the component so that it doesn’t appear sluggishwith very slow Update Rates.

BeginUpdateThis method is used to manually stop all painting to the control if needed. This is useful if you plan on adding a very large amount ofdata to the chart or wish to make many changes to the chart, but don’t want the chart to repaint until you have completed youroperations.

iPlot1.BeginUpdate()

EndUpdateThis method is used in conjunction with the AutoFrameRate feature mentioned above. It can also be used to manually resume allpainting to the control if needed when AutoFrameRate is turned off.

iPlot1.EndUpdate()

System HardwareMost modern or new computer systems are easily capable of displaying real-time data to the video display. If you need to display our controlswith very high data rates on large video displays with large component sizes, then you will need to ensure that your computer hardware is up tothe task.

ProcessorHaving a faster processor generally will improve overall performance of your system and will increase the speed of draws to yourvideo screen. Most modern systems (approximately 400Mhz or higher) have processors fast enough to handle most real-timeapplications used with our controls.

MemoryThe amount of memory is generally not that important to the speed of displaying data to the screen. The amount of RAM memory onlycomes into play when you are buffering many 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 to store additional program memory, which issignificantly slower than using physical RAM. See Chapter 34 - Memory Utilization page 164 for more information regardingMemory Utilization of our Plot Pack components.

Note: Windows NT and 2000 allow you to set specific minimum and maximum sizes for the virtual memory swap file. If you will bestoring may millions of data points in the chart, ensure that your maximum virtual memory swap file settings are set to accommodatethe expected memory usage.

Video CardMany computer manufacturers have opted to include video card chipsets into the system motherboard. Generally, these types of videochipsets are not designed for displaying high-speed data to the video display. Also, some video cards that are included with systemsare similarly not designed for displaying high-speed data.

Many people ask about their processor usage being very high when adding data at very high data rates. Generally this is not a problem sincerepaints to the screen have very low priority on the system, and if other processes need processor time during very heavy system loads, therepaints will be dropped. Our component attempts to use more processor power to keep up with the requested number of repaints, but willdefer to other processes that need processor time when needed. By using the AutoFrameRate feature of our components, you can reduce theactual processor load on the system due to repaints by our controls if needed.

It is recommended that you use a high quality (many are not expensive), accelerated video card in your system if you will be using very largecomponent sizes or video resolutions.

Special ActiveX Example:When iterating through a large loop and access sub objects of the ActiveX plot component, it is more efficient to create a temporary variable tokeep track of the sub object in memory instead of having 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 100 times for each AddXY method. There is a verysmall performance penalty when accessing the channel, which is magnified when looping, and can be noticeable with very large loops. To rectifythis, we can sacrifice a small amount of memory to greatly speed up large loops. We will set a local variable to reference the channel sub-objectonly once, and then reuse the local variable in the loop.

In the following example we will create a temporary variable to hold the channel sub object and will loop through 1,000,000 data points. You canflip between the method used in the example above 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).

Iocomp Components – Plot Pack Manual Page 161 of 336

Page 174: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 33 - Performance Tuning

Visual BasicPrivate Sub PlotButton_Click() Dim x As Long Dim XData As Double Dim YData As Double Dim TempChannel as iPlotChannelX

Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000 XData = XData + 1 YData = Rnd(1) * 100 TempChannel.AddXY XData, YData Next x

End Sub

Visual C++ [Disp Interface]#include "iplotx.h"#include "iplotchannelx.h"

void CFormDlg::OnPlotButton() { double XData; double YData; CiPlotChannelX TempChannel;

XData = 0;

TempChannel = m_iPlotX1.GetChannel(0);

for(int i=0; i<1000000; i++) { XData = XData + 1; YData = (rand()/(double)RAND_MAX)*100; TempChannel.AddXY(XData, YData); }}

Visual C++ [High-Speed iDispatch Interface]#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;

m_Wnd = GetDlgItem(IDC_IPLOTX1); m_iUnknown = m_Wnd->GetControlUnknown(); m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \(LPVOID*)&iPlotX1);

tempChannel = iPlotX1->Channel[0];

XData = 0;

for(int i=0; i<1000000; i++) { XData = XData + 1; YData = (rand()/(double)RAND_MAX)*100; tempChannel->AddXY(XData, YData); };}

See Chapter 36 - Visual C++ Disp vs. iDispatch Interface page 168 for more information. about the High-Speed iDispatch Interface.

Page 162 of 336 Iocomp Components – Plot Pack Manual

Page 175: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 33 - Performance Tuning

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 x Dim XData Dim YData Dim TempChannel Set TempChannel = iPlotX1.Channel(0)

For x = 1 To 1000000 XData = XData + 1 YData = Rnd(1) * 100 TempChannel.AddXY XData, YData Nextend sub--></script></body></html>

VB.NETPrivate Sub PlotButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlotButton.Click Dim x As Long Dim XData As Double Dim YData As Double Dim TempChannel As iPlotLibrary.IiPlotChannelX

TempChannel = AxiPlotX1.get_Channel(0)

For x = 1 To 1000000 XData = XData + 1 YData = Rnd(1) * 100 TempChannel.AddXY(XData, YData) Next xEnd Sub

C#.NETprivate void PlotButton_Click(object sender, System.EventArgs e){ double XData = 0; double YData = 0;

iPlotLibrary.IiPlotChannelX TempChannel = axiPlotX1.get_Channel(0);

Random rnd = new Random(unchecked((int)DateTime.Now.Ticks));

for (int i = 1; i <= 1000000; i++) { XData = XData + 1; YData = rnd.NextDouble() * 100; TempChannel.AddXY(XData, YData); }}

Iocomp Components – Plot Pack Manual Page 163 of 336

Page 176: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 34 - Memory Utilization

Chapter 34 - Memory Utilization

The Plot Pack components include several mechanisms for controlling the amount of RAM memory that is used to store channel data. By storing all or someof the data for each channel, the plot component makes it possible to use the built in scrolling, zooming, and cursor tools to be able to look at historical dataand 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 the amount of RAM memory that is used to suit your needs.

Data Storage

FeaturesFull

FeatureStandard(Default)

Compact CompactInterval

Bytes Per Data Point 136 24 8 4Maximum # of Data Points (1.4GB Limit) 11 Meg 62 Meg 187 Meg 375 MegTable 34.1

Memory Usage Calculations [Standard Data Set Style]Since the plot pack components are designed to handle asynchronous data channels (i.e. the data points from one channel don’t have to be in syncwith data points in another channel), each data point use 24 bytes data point to store the double values for

2 doubles and a Boolean value are used to represent one data point.2 Double Values = 16 bytes (double = 8 bytes)Extended Feature Storage = 8 bytesTotal = 16 + 8 = 24 bytes per data point

Therefore, each data point that you add to the chart takes up 24 bytes of memory. If you expect to add 1 million (1,000,000) data points to yourchart, you can expect to use…

24 bytes * 1,000,000 = 24,000,000 bytes24 million bytes / 1024 bytes per KB = 23,437.50 KB23,437.50 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 data points 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.75 KB11,718.75KB / 1024KB = 11.44MB in 5 channels, total 500,000 Data Points

…a total of 11.44MB of data storage needed for 5 channels with 100,000 data points each channel.

2GB Application RAM BarrierUnder the Windows 32-bit operating system, each application is limited to using a total 2GB of RAM Memory (2048 MB). This includes memoryusage by everything in the program, including variables in your code and memory used by all components in the application (ActiveX, VCL, orCLX components). Keep this in mind when determining how much data you can fit into the chart as exceeding the 2GB RAM Usage barrier canresult in out of memory or other program and system errors. If you run into this issue, then either use the Ring Buffer feature of the Plot Pack,reduce the number of data points added to the chart, or periodically save the data to an external file and clear out the buffer before addingadditional data points. Future versions of Windows will support larger memory usage sizes. Consult your development environmentdocumentation and Windows documentation for more information about future updates to this limitation

Note: In our research, we have determined that the real-world, actual maximum amount of memory, regardless of how little memory is used inother parts of your application, that a single component can utilize is approximately 1.3GB depending on the system and particular OperatingSystem. Of course, the more memory that you application uses, the lower this value will be.

Under Linux (CLX components only) the amount of memory accessible by an application depends on your kernel version, kernel build, anddevelopment environment. This can range between 2GB and 64GB depending on your situation, but is generally a 2GB limit for mostdistributions. Consult your development environment documentation and Linux distribution documentation for more information.

Channel Memory StatisticsAt runtime, you can access various channel statistics such as memory utilization from either the run-time property editor or from code…

DataPointSizeThe number of bytes used by each data point added to the chart. This value depends on the Data Style used by the chart. See the DataStyle chart above for the currently supported styles and their data point sizes. This value is useful for your own, internal memorycalculations in your code.

MaxDataPointsThe maximum theoretical number of data points that you can fit into the chart. For 32-bit Windows, this represents the maximumtheoretical number of data points that will fit into the 2GB process memory limitation ( minus the application’s memory footprint)imposed by Windows. In our own research and testing, the actual real-world limitation under 32-bit Windows is 1.3GB. This maychange in future 32-bit or 64-bit versions of Windows.

Page 164 of 336 Iocomp Components – Plot Pack Manual

Page 177: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 34 - Memory Utilization

CapacityThe number of data points that have been allocated for the channel. This value is increased by 25% whenever your actual number ofdata points added to the channel exceeds the memory capacity of the channel. This is done to reduce the number of memoryallocations. If we were to increase the memory allocation for each data point added to the chart, there would be a large overhead indoing this and would result in slow or sluggish performance. The only drawback to this is that the amount of memory “reserved” bythe operating system will always be greater than the actual number of data points used. You have to always trade off memoryutilization for performance.

MemoryUsedThis is identical to Capacity, but represents the number of bytes currently allocated by the channel.

Resource Memory vs. RAM MemoryRAM Memory

Modern operating systems such as Microsoft Windows 95/98/ME/NT/2000 and Linux support Virtual Memory and can handle theaddition of data sets of this size. This means that 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 fit in your available system RAM memory. Ifyou need additional memory, increase the allocation of virtual memory (See your System control panel or operating systemdocumentation) or install additional RAM modules.

Resource MemoryResource Memory, on the other hand, depends on your operating system and is not related to the amount of Physical RAM or VirtualMemory you have allocated for your operating system. Resources refer to memory allocated to brushes, pens, windows, fontmanagers, and other operating system dependent resources. Operating systems such as Windows 95/98/ME have a smaller limit on theamount of resources that can be allocated at any one time compared to Windows NT/2000/XP systems. This is a function of theoperating system and does not matter how much RAM you have installed, even if you have gigabytes of memory installed.

This resource memory barrier limits the number of programs, windows, and controls that you can have open at any one time. Youshould have no problem running several Plot Pack 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 + controlson a Windows NT/2000 system. Windows XP 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 as a guide.

Ring BufferBy default, the plot components store all data that has been added to available system RAM memory. To control the amount of memory that isused by the charts, you can take advantage of the Ring 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 data point added is the first data point to beoverwritten) type buffer where you specify the maximum amount of data points that can fit in the buffer. Once that maximum number isexceeded, then data is removed from the buffer starting with the first data points that were initially added.

The RingBufferSize is specified in the number of data points allowed in the buffer for this particular channel. This property setting does notaffect other channels.

When you set the Ring Buffer to a non-zero value, then memory will be allocated for that number of data points whether or not those datapoints actually exist. The advantage to this type of buffer is that you will always know if the buffer you have set exceeds the available RAM+ Virtual Memory on your system ahead of time, instead of find this out after running the chart overnight!

Iocomp Components – Plot Pack Manual Page 165 of 336

Page 178: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 34 - Memory Utilization

To enable the Ring Buffer for a particular channel, set the RingBufferSize property for the number of data points that you wish to remain in thebuffer for a specific channel.

iPlot1.Channel(0).RingBufferSize = 10000

To disable the ring buffer and storage all data to available memory (up to the 2GB per application limit), set the ring buffer property to zero…

iPlot1.Channel(0).RingBufferSize = 0

FIGURE 34.1Ring Buffer (FIFO)

Example Calculating Memory Utilization

First you need to determine the number of Bytes used for each data point. For the example below, we will use the Standard Data-Style which uses 24-bytesper data point. Lets use 5-Million data points and perform the calculation...

24 bytes * 5,000,000 = 120,000,000 bytes120 million bytes / 1024 bytes per KB = 117,187.5 KB117,187.5 KB / 1024 KB per MB = 114.44 MB for 5-Million Data Points

…a total of 114.44 MB for all 5-million data points. If you have 5 channels with 5-Million data points each, that would be…

114.44 MB * 5 channels = 572.2 MB

…a total of 572.2 MB of data storage would be required for 5-Channels with 5-Million data points in each channel.

Table 34.2 provides a list of the maximum number of data points for each Channel Data-Style and assumes only one channel. If you have more than one channel, you will need to divide the maximum by the number of Channels if each channel has the same data-Style setting and the same number of datapoints.

FeaturesFull

FeatureStandard(Default)

Compact CompactInterval

Bytes Per Data Point 136 24 8 4Data Point Precision Double Double Single SingleMaximum # of Data Points (1.3GB Limit) 10 Meg 62 Meg 187 Meg 375 MegTable 34.2

Page 166 of 336 Iocomp Components – Plot Pack Manual

Page 179: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 35 - Using With Databases

Chapter 35 - Using With Databases

Adding data to the Plot Pack component chart from a database is straightforward. Simply loop through the data in your record set and add a data point fromeach record into the chart. The following issues should 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 files on a per channel or per chart basis. See Chapter 24 - Loading and Saving Data page 107 for more information.

Simple X and Y DataTo add simple integer or double (floating point) data from your database to the chart, simply load your database record set, and then loop througheach record, adding each X and Y data point by using the 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 its original format to a Double format beforeadding 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 toit’s corresponding Date/Time double format value. See Appendix L - What is DateTime Format? page 287 for more information and also see Chapter 16 - Adding Data page 79 for moreinformation.

Many development environments have functions that automate this procedure. For example, if the X value in the Database is a Time or Datevalue 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

Don’t forget that if you are using Date/Time format values, you need to setup the associated axis to use DateTime formatted labels. See Chapter 16 - Adding Data page 79 and Appendix L - What is DateTime Format? page 287 for more information.

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.YAxis(0).LabelsFormatStyle = iptfDateTime

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), then you have to take into account the memory limits ofWindows Applications (2GB per application and associated components), network speed to transfer large amounts of data, and the processing time needed tomove the data through memory or from a database located on your local hard drive or over a network.

1,000,000 data points = 22.35 MB of memory storage5,000,000 data points = 111.75 MB of memory storage10,000,000 data points = 223.50 MB of memory storage25,000,000 data points = 558.75MB of memory storage50,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 Network since this is a huge amount of data to move at one time.You may want to consider loading the data dynamically as needed instead of trying to load all of the data at once.

See Chapter 34 - Memory Utilization page 164 for more information.

Iocomp Components – Plot Pack Manual Page 167 of 336

Page 180: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 36 - Visual C++ Disp vs. iDispatch Interface

Chapter 36 - Visual C++ Disp vs. iDispatch Interface

Visual C++ supports two different types of ways to interface with an ActiveX component...

Disp Interface [Late Binding, Class Wizard Default]This is the type of interface that is used if you add an ActiveX component to your project and use member variables to access your component.This type of interface is slower than the iDispatch interface, and is not recommended for our Plot Components.

FIGURE 36.1Example screen shots of

adding an ActiveXcomponent wrapper

class to your project foruse with the late binding

Disp Interface.

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 900Mhz computer showing the speed differences between the Disp andiDispatch interface speed. One million data points were plotted on the chart, and the time 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

iDispatch Interface [Early Binding, High-Speed]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 “InsertActiveX Control”) or when you create an ActiveX component dynamically at runtime. This interface is used with your use the #import directivein your project to dynamically import the TLB during compilation.

The iDispatch Interface is much faster when accessing methods and properties of the Plot Pack component and is the recommended interface forusing our components. Also, accessing sub-objects of the components such as channels is much easier and you are able to use the namespace ofthe components to access enumerated properties.

iDispatch Coding Example

Index = iPlotX1.AddChannel(); //Using the iDispatch InterfaceiPlotX1->Channel[Index].MarkersStyle = ipmsPlus;iPlotX1->Channel[Index].TraceLineWidth = 2;iPlotX1->Channel[Index].AddXY(XValue, YValue);

Page 168 of 336 Iocomp Components – Plot Pack Manual

Page 181: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 36 - Visual C++ Disp vs. iDispatch Interface

In FIGURE 36.2 shows the iDispatch Interface, inserting an ActiveX component onto your form by right clicking on the form and selecting“Insert ActiveX Component.”

FIGURE 36.2Inserting an ActiveXcomponent withoutadding a wrapper

class to your project.

Place the following code at the top of your form’s CPP file...

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

To access the component placed on the form (we named the IDC of the component in this example “IDC_IPLOTX1”, refer to the followingexample. This example uses a local variable to access 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;

m_Wnd = GetDlgItem(IDC_IPLOTX1); //Get interface to Plot Component Assuming that name of componentm_iUnknown = m_Wnd->GetControlUnknown(); //on form is IDC_IPLOTX1 in this examplem_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX), \(LPVOID*)&iPlotX1);

Now to access the component, use the newly created variable “iPlotX1”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_iPlotX1.GetDataView(0).SetGridShow(TRUE);m_iPlotX1.GetXAxis(0).SetMin(100);m_iPlotX1.GetYAxis(0).SetSpan(100);m_iPlotX1.GetChannel(0).SetName(“Channel 1”);m_iPlotX1.GetLegend(0).SetVisible(TRUE);m_iPlotX1.GetToolBar(0).SetShowEditButton(FALSE);m_iPlotX1.GetAnnotation(0).SetText(“Sample Annotation”);m_iPlotX1.GetDataCursor(0).SetStyle(3); //ipcsDeltaXm_iPlotX1.GetLimit(0).SetXAxisName(“X-Axis 1”);m_iPlotX1.GetLabels(0).SetCaption(“Chart Y vs. Time”);

//iDispatch Interface (High-Speed)iPlotX1->DataView[0]->GridShow = TRUE;iPlotX1->XAxis[0]->Min = 100;iPlotX1->YAxis[0]->Span = 100;iPlotX1->Channel[0]->Name = “Channel 1”;iPlotX1->Legend[0]->Visible = TRUE;iPlotX1->ToolBar[0]->ShowEditButton = FALSE;iPlotX1->Annotation[0]->Text = “Sample Annotation”;iPlotX1->DataCursor[0]->Style = ipcsDeltaX;iPlotX1->Limit[0]->XAxisName = “X-Axis 1”;iPlotX1->Labels[0]->Caption = “Chart Y vs. Time”;

Notice that you no longer have to use get and set methods to access properties or to access sub objects when using the iDispatch interface. Simplyuse the properties as you would in Visual Basic.

Since we are using the namespace for the iPlotLibrary, you can also use enumerated properties, such as “ipcsDeltaX” in the example above.

Iocomp Components – Plot Pack Manual Page 169 of 336

Page 182: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 37 - ASP (Active Server Pages)

Chapter 37 - 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 ourcomponent on the server side, add data to the chart, and then stream an image of the chart to your end user without using temporary files. This is all donewithout needing to run a copy of our component on the web browser client, allowing for cross-platform support of our component in static mode.

Here is a simple example that shows how to create a Plot component on the web server, set some properties of the component, add some data, and thenstream out a JPEG image of the component to your client by using the Response object. ASP Page code is interpreted on the web server before it is sent tothe client, so the following script would be replaced with a JPEG image in the resulting HTML code sent to the browser.

Microsoft IIS Server ASP Page (VBScript)<%@ Language=VBScript %><!--METADATA NAME="iPlotLibrary" TYPE="TypeLib" UUID="{DA259054-D93B-498C-8C10-DEBD83EF1357}"--><% Response.Expires = 0 'Setup Response Response.Buffer = True Response.Clear

Set iPlotX1 = Server.CreateObject("iPlotLibrary.iPlotX") 'Create ActiveX Control

iPlotX1.Width=500 'Set Some Properties iPlotX1.Height=300 iPlotX1.Labels(0).Caption = "Test Chart 1"

iPlotX1.ToolBar(0).Visible = False

for x = 0 to 100 'Plot Some Random Data iPlotX1.Channel(0).AddXY x, sin(x) * 100 next

Response.ContentType = "image/jpeg" 'Stream JPEG Image Response.BinaryWrite(iPlotX1.GetBytesJPEG(100, TRUE)) Set iPlotX1 = Nothing 'Cleanup%>

Page 170 of 336 Iocomp Components – Plot Pack Manual

Page 183: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 38 - Internet Explorer (Client Side)

Chapter 38 - Internet Explorer (Client Side)

Our ActiveX version of our Plot Pack components can be used to display Real-Time chart data in the Microsoft Internet Explorer Browser. This chaptercovers running our Plot Pack ActiveX components on 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 Internet Explorer and Windows.See Chapter 37 - ASP (Active Server Pages) page 170 for more information.

The following requirements must be met to be able to display Real-Time data from your network server to your local client’s web browser…

The client must be running 32-bit Windows.The client must be running Microsoft Internet Explorer 3.01 or higher versionYou must provide code or another ActiveX component in your HTML web page code to transfer data from the web server or other network server orcomputer. If your web page will be acquiring data from the client’s machine or if you will be statically embedding your data in the web page (or staticallythrough ASP or other server side scripts), then this is not needed. SOAP as well as direct database-linking support will be provided in a future release.

Netscape and The Mozilla project do have solutions for embedding ActiveX controls in their browsers on Windows machines with varyingdegrees of success. Some solutions support properties and events, others do not. Iocomp does not support these solutions at this time, but willsupport future versions of Netscape, Mozilla, and other browsers when they attain sufficient support for embedding ActiveX controls.

Creating the Plot Pack ActiveX Object in Your Web PageTo create an ActiveX object on the client’s machine, you would need to include the following html code in the body section of your web page…

<object classid="clsid:1791C036-8981-492A-BD28-F2331BC9B7C7" id="iPlotX1" width="500" height="200"></object>

Many HTML development tools such as InterDev and FrontPage will automatically generate this code for you, and will also stream out design-time properties of the control to the html document for you. If you are using an HTML development tool that doesn’t automatically generate thiscode for you, you will need to manually type in the information as needed.

ClassID List for Plot Pack Components

• iPlot1791C036-8981-492A-BD28-F2331BC9B7C7

• iXYPlotD1CAE8F4-6DFF-4187-B1B8-DDCF91F98A8A

See Appendix I - ActiveX HTML Properties and Events page 269 for a listing of all of the supported properties and events than can be usedwith our Plot Pack components in an HTML web page.

Installing the Plot Pack ActiveX Control on the ClientTo automatically install and update our Plot Pack ActiveX controls on your client machine, you will need to modify the “object” tag used in theprevious 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 to download, install, and register the Plot PackActiveX components (compressed in a CAB file) under the following conditions…

• The Plot Pack ActiveX is not installed on the client’s computer• 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 ActiveX components, navigate to our downloads web page athttp://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 will contain the full version information about 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 thecodebase parameter of the object tag. If you need to place our ActiveX in your own self-created CAB file, then you will need to obtain acertificate from a Digital Certificate provider such as Verisign or Thawte. By using our digitally signed CAB files or using your owndigitally signed CAB file, your clients can leave their Internet Security Settings set on High.

Iocomp Components – Plot Pack Manual Page 171 of 336

Page 184: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 38 - Internet Explorer (Client Side)

Licensing the Plot Pack ActiveX ControlAll ActiveX controls that require licensing must have an LPK file specified in each web page that uses that control. Since only one LPK file canbe specified in any one web page, it is recommended that you generate an LPK file for all ActiveX controls (no matter which vendor) that youmay be using in your web pages.

To integrate the LPK file into your web page, you will need to associate the LPK file with the Microsoft License Manager control that is built intothe Internet Explorer browser as follows…

<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT><param name="LPKPath" value="pathname/LPKFile.lpk"></object>

The CLASSID used is for the Microsoft License Manager control and not the other ActiveX controls used in your web page!

To generate an LPK file, you will need to obtain the LPK Tool program from Microsoft. You can download this tool from Microsoft’s Websiteand from their Internet Explorer Toolkit.

Accessing the Plot Pack ActiveX Control from VBScriptIf you are familiar with Microsoft Visual Basic or VBA from Microsoft Office products, you should find the VBScript language to be almostidentical. Accessing the chart from your VBScript code follows the same rules as Visual Basic. Consult documentation or books on how to useVBScript, or consult our example below and in the Examples Section of our Support Website.

AddXY Example<script LANGUAGE="VBScript"><!--Sub PlotButton_OnClick() Dim x Dim XData Dim YData For x = 1 To 100 XData = XData + 1 YData = Rnd(1) * 100 iPlotX1.Channel(0).AddXY XData, YData NextEnd sub--></script>

VBScript does not support variable types. When you dimension your variables, do not give a type. All variable types in VBScript areVariants.

Full Source Example

FIGURE 38.1Example Internet

Explorer output forthe Full Source

Example.

Page 172 of 336 Iocomp Components – Plot Pack Manual

Page 185: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 38 - Internet Explorer (Client Side)

<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 x Dim XData Dim YData For x = 1 To 100 XData = XData + 1 'Increment X Counter YData = Rnd(1) * 100 'Generate Random Data iPlotX1.Channel(0).AddXY XData, YData 'Plot XY Data Pair Nextend sub--></script></body></html>

Iocomp Components – Plot Pack Manual Page 173 of 336

Page 186: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 39 - OPC (OLE For Process Control)

Chapter 39 - OPC (OLE For Process Control)

OPC, or OLE for Process Control, is a standard for linking properties and channels of our components to hardware signals or configurations from industrystandard OPC servers. Most of our components now include support for linking properties to OPC servers, allowing them to be automatically updated or toupdate the OPC server automatically without writing code!

OPC is a specification or set of written rules and procedures for the way multiple software programs ("applications") can talk to each other. The OPCspecification was created by users and software developers in the manufacturing/process control industry to serve the needs of the manufacturingautomation/process control industry specifically. The specification is managed by volunteer effort and administered by the independent OPC Foundation.

The OPC Add-On features are included as a free upgrade to our current Version 2.x component products. Each development license comes with a free OPCdistribution license for development and testing purposes. If you choose to distribute our components with the OPC features enabled, additional OPCdistribution licenses are available.

Iocomp Component OPC Add-On Features• OPC Client capability built into most of the ActiveX controls in the 3 Component Packages we offer. See component list for details on

which controls offer OPC capabilities. • Connect to OPC Servers supporting the Data Access 1.x and 2.x specifications. Intuitive Point and Click Configuration including item

browsing • Support for connecting to local and remote (via DCOM) OPC Servers • Properties automatically update with live process data without any user code once connected to OPC server items.• For controls with user input enabled, the control can automatically write data to the OPC server - user input is easily disabled both at design

and runtime to provide write-protection • User configurable update rate (in millisecond units) on each control - tune performance to application needs • OPC item connections can be programmatically added and removed using code for users wanting to create sophisticated applications that

change their behavior at runtime based on operating conditions. • Connect one or many properties to OPC items - for example - tie configuration settings for min/max ranges to OPC items to allow the

control to adapt on the fly to changing conditions • Supported development environments - Visual Basic, Visual C++, Delphi, and C++ Builder*.

Developer Benefits• Ease of configuration and use • Reduced engineering time • Faster time to completion for your projects • Little expertise of OPC interface specifics and coding details required • Affordable distribution licensing models available including runtime free distribution

OPC TutorialTo use the OPC features in the Plot pack is simple and straightforward. The following tutorial will guide you through the steps of setting up anOPC connection to a Channel in the Plot Pack at design-time. You can easily accomplish the same thing at run-time through your own code, andthat will be covered later in this chapter.

Open the built-in property editor of the iPlot or iXYPlot component. In this example, we are using only one channel, but you can setup individualOPC connections to as many channels as you wish. Each OPC connection is tied to one and only one channel, so everything is kept separate. Youwill notice that there are 6 items that you will need to configure to get everything to work...

• Computer: this is the name of the computer that has the OPC server running. This can be the system that you are currently using (usethe word "Local") or can be any computer on your LAN.

• OPC Server: this is the name of the OPC server running on the computer previously specified.• Item: this is the name of the data item on the OPC server that you wish to connect to.• UpdateRate: this is the "desired" data update rate that you are requesting from the server. This will instruct the OPC server to send

data update to you at this rate, but there is no guarantee that the OPC server will actually do this. Depends on the OPC Server.• AutoConnect: if this is checked, when the component is created, the connection to the OPC server will immediately be made and data

will begin plotting immediately. To control this manually, uncheck this box and then use the OPCActivate and OPCDeactivatemethods on the individual channel.

• X-Value Source: each data point is made up of two double values, the X-Value Coordinate and the Y-Value Coordinate. The Y-Valuecoordinate is obtained from the OPC Server Item. The X-Value coordinate is obtained form the source that you select here.

Page 174 of 336 Iocomp Components – Plot Pack Manual

Page 187: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 39 - OPC (OLE For Process Control)

FIGURE 39.1Design-time

property editorshowing X-Value

Source combo.

You can type in the above information manually, or you can use the built-in browsing panels by clicking on the button next to the item.

FIGURE 39.2OPC browser windows for Computer, OPC

Server, and OPC Item.

Computer Browser OPC Server Browser OPC Item Browser

To be able to receive data from an OPC server, you need to supply all of the three values above. The name of the computer is the NetBios name ofthe computer on the network, and the name is always preceded by two back slashes "\\". The OPC Server is the name of the server softwarerunning on the specified networked Computer. If the OPC Server is running on your local machine, use the name "Local" without anybackslashes. The OPC Item is typically a double or floating point Item Tag that supplies data to the channel.

FIGURE 39.3OPC browser

windowsshowing theitems chosenabove in their

respectiveproperty boxes.

Iocomp Components – Plot Pack Manual Page 175 of 336

Page 188: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 39 - OPC (OLE For Process Control)

The next two options control the "requested' speed at which updates are sent to the channel by the OPC Server as well as connection options atstartup. By "requested", we mean that you are requesting that the OPC Server send you updates according to the number of milliseconds yousuggest in the UpdateRate field. Depending on the OPC server, this may not be guaranteed but will be honored by the OPC Server 90%+ of theOPC servers in existence.

The Auto Connect option controls whether or not an automatic connection is made to the OPC server when the component is created on the form.You can utilize the following methods to manually initiate the connection or to break the connection to the OPC server at runtime...

iPlotX1.Channel(0).OPCActivateiPlotX1.Channel(0).OPCDeactivate

FIGURE 39.4OPC Browsershowing theavailable X-Value Source

selections.

The final setting controls what X-Value Coordinate is paired with each data update from the OPC Server (which is the Y Value Coordinate) whenplotting a data point to the channel.

Here are the possible values...

Value MeaningiopcxvsOPCServerTimeStamp Whenever data is received, the X-Coordinate will be obtained from the OPC Server's Time StampiopcxvsSystemTimeStamp Whenever data is received, the X-Coordinate will be obtained from the local computer's System Time Stamp.iopcxvsElapsedTime Whenever data is received, the X-Coordinate will be obtained from the time (In Date/Time Format, be sure to

setup the X-Axis for Date/Time values)elapsed since the ResetElapsedStartTime procedure has been called.iopcxvsElapsedSeconds Whenever data is received, the X-Coordinate will be obtained from the time elapsed (In Seconds, not in

Date/Time format) since the ResetElapsedStartTime procedure has been called.Table 39.1

Now, when you connect to the OPC server, every time an update is sent to the channel from the OPC server, the channel will plot a data point.The X-Coordinate will be obtained from the X-Value Source Option specified, and the Y Coordinate will be obtained from the OPC Item datathat is sent from the OPC Server. The data point will then be plotted on the channel!

It is important that you setup the X-Axis associated with the channel to use Date/Time formatting when using the first three X-Value SourceOptions: iopcxvsOPCServerTimeStamp, iopcxvsSystemTimeStamp, and iopcxvsElapsedTime as the actual value used will be in Date/Timeformat. The iopcxvsElapsedSeconds option does not use Date/Time format.

Page 176 of 336 Iocomp Components – Plot Pack Manual

Page 189: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Chapter 40 - Scope Component

The iScope component is a direct replacement for an actual Analog or Digital oscilloscope. There is a built in Triggering and Time Base unit and can supportan unlimited number of channels.

For hardware, all that is required is a dedicated A/D converter board with a buffer that can transfer data to the PC in packets or blocks of data. All A/Dsamples must be collected at a constant rate for the triggering mechanism to function properly and for the data to be accurately displayed. You can use anyoff the shelf hardware and then transfer the data in to the scope component and it will handle the triggering and displaying of the data.

On a typical 1 GHZ system, you can achieve a 5 MHZ data transfer rate between the data acquisition card and the scope component. This availablebandwidth must be divided up among the channels. For five channels, each channel would have a 1 MHZ bandwidth. If using the Nyquist theorem (Thesample rate must be twice the desired maximum frequency), then the maximum frequency component that can be detected is 500 KHZ. In reality, you wouldwant to have 10 or more samples than the greatest frequency component that you are sampling and the for the current example, you would achieve a 50 KHZscope. The current discussion is based on continuous data being transferred to the scope, you can use the NeedPacketsNow method and you can achieve amuch higher frequency bandwidth per channel on the scope.

Using the NeedPacketsNow method, you can achieve a much higher bandwidth per channel by dropping packets. For example, if the Scope is configuredsuch that each channel is receiving one million samples per second and the Time Base is set up to display a 1 ms window, then there would be a 1000samples per frame and 1000 frames would be display per second. The human eye can only detect about 50 frames per second and the other 950 frames wouldnot be detected. By using this to our advantage, we can drop the data for 950 of the frames to decrease the load on the PC processor. With the lower load onthe processor, we can increase the number of samples being taken at the data acquisition card and increase the bandwidth per channel. Using this technique,you can achieve sample rates of over a gigahertz since most of the data will not be transferred to the scope. The only disadvantage to using this technique iswhen trying to detect glitches in a signal. If your application is only for waveform inspection, then this technique will have no negative consequences.

FIGURE 3.2iScope Hierarchy

Generic Code Example The following example shows how to add continuous data to the iScope component.

iScope1.DataBlockBegin

for x = 0 to BufferCount-1 iScope1.AddChannelData(0, BufferData(x))

iScope1.DataBlockEnd

The following example shows how to use the NeedPacketsNow method to increase the bandwidth

if not iScope1.NeedPacketsNow then iScope.DataBlockClear(); Exit;End If

iScope1.DataBlockBegin

for x = 0 to BufferCount-1 iScope1.AddChannelData(0, BufferData(x))

iScope1. DataBlockEnd

Iocomp Components – Plot Pack Manual Page 177 of 336

Page 190: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Hiding the Control Panel By default, the built-in Control-Panel is visible as shown in FIGURE 40.1. You can optionally hide the Control-Panel to prevent the user fromchanging any parameters of the scope or you can use it to implement your own external Control-Panel. FIGURE 40.2 shows an example of whatthe scope looks like with the Control-Panel hidden. Use the HideControlPanels property to hide or show the Control-Panel

FIGURE 40.1Example of the scope with Control Panel.

FIGURE 40.2Example of the scope without Control Panel.

Control Properties

FIGURE 40.3Example of theControl General

Tab.

Samples Per Second: Specifies the number of samples per second that will be added to the chart. Use SamplesPerSecond to specify the numberdata samples that will be added to the chart per second. It is necessary to specify the number of samples per second so that the component knowsthe time spacing between each sample.

HideControl Panels: Use HideControlPanels to show or hide the Scope Control Panels. Setting this property to False is useful where you wishto implement your own external control panel, and just want the Scope control to simply be a Scope Display with no built-in control panel.

UpdateFrameRate: Use UpdateFrameRate to get or set the frame rate at which the Display repaints. The frame rate is used to improveperformance by controlling the number of times the Display repaints itself per second.

Each time a change occurs to the Display that requires a repaint, the Display will determine if a new frame needs to be displayed. The Frame Timeis one second divided by the UpdateFrameRate. If a change occurs to the control before the Frame Time has elapsed, the Display is not repainted.If a change occurs to the Display after the Frame Time has elapsed, the Display is repainted and the next frame is started.

There must be a steady stream of changes to the Display that require repainting for the automatic frame rate Display to function correctly. The rateof change per second must be greater than the UpdateFrameRate for the desired frame rate to be achieved. When the frame rate control is inactive,the Display will attempt to repaint when a change is made to the Display that requires a repaint. The actual number of repaints per second isdependent of the system hardware, system activity, and the number of request being made to repaint the Display.

Auto Frame Rate: Use AutoFrameRate to specify whether the Display automatically "throttles" the frame-rate (i.e. the rate of repaints of thedisplay per second) for you automatically.

Page 178 of 336 Iocomp Components – Plot Pack Manual

Page 191: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Print Properties

FIGURE 40.4Example of theControl Print

Tab.

Print Show Dialog: Use PrintShowDialog to specify whether the printer setup dialog is shown to the user when the PrintDisplay method iscalled. If Enabled, the user can select a local or network printer, specify the orientation, number of copies, and etc. before actually printing thechart.

Print Orientation: Use PrintOrientation to set the orientation of the chart on the printed page.

Value MeaningpoPortrait PortraitpoLandscape LandscapeTable 40.1

Margins: Specifies the top, left, right, and bottom margins when printing the chart

Print Document Name: Use PrintDocumentName to get or set the document name displayed on the Printer's display, if supported by the printer,when printing the chart using the built-in printing functionality.

Channel PropertiesFIGURE 40.5Example of the

ChannelGeneral Tab.

TitleText: Use TitleText to get or set the title text for the channel.

Volts Per Division: Use VoltsPerDivision to specify the number of volts per division on the vertical axis display. There are 8 major divisions.The Total Voltage Span displayed will be 8x this value. Note: The value specified must be from one of the following values. If you do notspecify one of the following values, this property will not change.

Voltage Double Value1 µV 0.0000012 µV 0.0000025 µV 0.00000510 µV 0.00001020 µV 0.00002050 µV 0.000050100 µV 0.0001001 mV 0.0010002 mV 0.0020005 mV 0.00500010 mV 0.010000

Voltage Double Value20 mV 0.02050 mV 0.050100 mV 0.100200 mV 0.200500 mV 0.5001 V 1.0002 V 2.0005 V 5.00010 V 10.00020 V 20.00050 V 50.000

Table 40.2

Position: Specifies the vertical offset of the entire channel in Percent of the Display.

Coupling: Specifies the coupling of the channel.

Iocomp Components – Plot Pack Manual Page 179 of 336

Page 192: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Ref Line Show: Use Ref Line Show to specify whether the Channel Reference Line is shown. If this property is TRUE, then a dashed line isdrawn horizontally through the center of the channel data. This line allows your application user to move the channel reference with the mouse inaddition to the functionality of the Control Panel..

Color: Use Color to get or set the color of the channel. The Color property is used by the Trace drawing routine and is used by default for theMarkers and Fill drawing routines.

Trace Visible: Use Trace Visible to specify whether the channel trace line is visible. Typically, the trace line is hidden for a scatter type plot.

Trace Line Width: Specifies the pen width used when drawing the channel trace line.

Scaler Multiplier: Specifies the Scaler Multiplier of the Channel Data. Use Scaler Multiplier to specify the Scaler Multiplier of the Channel Data.All channel data will be scaled according to this property. For example, setting this property to 2 will double all Data added. Setting this propertyto 0.5 will halve all Data added. This property is useful in situations where you are obtaining data from other computer systems or hardware thatprovide data that does not follow "2's compliment".

Scaler Offset: Use Scaler Offset to specify the Scaler Offset of the Channel Data. All channel data will be offset according to this property. Forexample, setting this property to 0.5 will offset all Data added. Adding a value of 2 to the channel will result in the value being interpreted as 2.5.f the property is –0.5, then adding a value of 2 to the channel will result in the value being interpreted as 1.5.

Display Properties

FIGURE 40.6Example of theDisplay Tab.

Text Show: Specify whether the Channel and TimeBase Information display text is shown on the display.

Horz Scroll Show: Specifies whether the horizontal scroll bar is shown in the Display.

Grid Color: Specifies the color of the grid lines drawn in the scope display.

Time Base

FIGURE 40.7Example of theTime Base Tab.

Page 180 of 336 Iocomp Components – Plot Pack Manual

Page 193: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

SEC/DIV: Specifies the number of seconds per division on the Horizontal Axis Display. There are 10 major divisions. The Total Time Spandisplayed will be 10x this value.

Note: The value specified must be from one of the following values. If you do not specify one of the following values, this property will notchange .

Time Double Format10 ns 0.00000001020 ns 0.00000002050 ns 0.0000000500.1 us 0.0000001000.2 us 0.0000002000.5 us 0.0000005001 us 0.0000010002 us 0.0000020005 us 0.00000500010 us 0.00001000020 us 0.000020000Table 40.3

Time Double Format50 us 0.0000500000.1 ms 0.0001000000.2 ms 0.0002000000.5 ms 0.0005000001 ms 0.0010000002 ms 0.0020000005 ms 0.00500000010 ms 0.01000000020 ms 0.02000000050 ms 0.0500000000.1 s 0.100000000

Position: Specifies the horizontal offset of the entire channel in percent of the Display. The maximum offset is ±50% of the Display, plus 10% foreach PreCapture or PostCapture division.

PreCapture: Specifies how much data to capture before the beginning of the display. The value is specified in divisions of the horizontal axis.Pre-Capturing channel data is useful for situations where you want to offset the Display Position to see the signal before the actual triggeroccurred. Note: range of values must be between 0 and 100 and must be whole numbers. (e.g. 0, 1, 2, 3, ..., 98, 99, 100).

PostCapture: Specifies how much data to capture after the end of the display. The value is specified in divisions of the horizontal axis. Post-capturing channel data is useful for situations where you want to offset the Display Position to see the signal after the actual trigger occurred.Note: range of values must be between 0 and 100 and must be whole numbers. (e.g. 0, 1, 2, 3, ..., 98, 99, 100).

Trigger

FIGURE 40.8Example of the

Trigger Tab.

Level: Specifies the level where the trigger mechanism will trigger a new frame to be displayed. This is used in conjunction with the PositiveSlope property. Level is a percentage integer property and ranges in value from 10-90.

If the slope is set to positive slope, once the signal drops below the 5% mark and then rises above the trigger level, then a new frame will betriggered.

FIGURE 40.9Example of the

Level on PositiveSlope.

Iocomp Components – Plot Pack Manual Page 181 of 336

Page 194: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

If the slope is set to negative slope, once the signal rises above the 95% mark and then drops below the trigger level, then a new frame will betriggered.

FIGURE 40.10Example of the

Level on NegativeSlope.

Source: Specifies the channel used for Triggering.

Positive Slope: Specifies whether a positive or negative slope is used when triggering. When this property is TRUE, then the slope used ispositive. When this property is FALSE, then the slope used is negative. This is used in conjunction with the Level property.

Auto: Specifies whether the Trigger is Automatic or Manual. If this value is TRUE, then the Trigger will automatically be evaluated wheneverDataBlockEnd is called. If this value is FALSE, then you must manually evaluate the Trigger by pressing the trigger button in the Trigger sectionof the Scope Panel.

FIGURE 40.11Example Auto orManual Trigger

Buttons and Positiveor Negative Slope

Control.

Cursor Channels DisplayThe Cursor Channel Display gives the user the capability to measure each individual signal on the scope.

FIGURE 40.12Example of theCursor ChannelDisplay Control

for the ScopeComponent.

Cursor Style Value XThe Value X style allows the user to measure the X-Value on the display. A single pointer is provided that the user can move across the display.

FIGURE 40.13Example of the CursorValue X Control for

the Scope Component.

Page 182 of 336 Iocomp Components – Plot Pack Manual

Page 195: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Cursor Style Value YThe Value Y style allows the user to measure the X-Value on the display. A single pointer is provided that the user can move across the display.

FIGURE 40.14Example of theCursor Value Y

Control for the ScopeComponent.

Cursor PeriodThe Period style allows the user to measure the Period on the display. Two vertical bars are shown and the user can move them independently.

FIGURE 40.15Example of theCursor Period

Control for the ScopeComponent.

Cursor Peak-PeakThe Peak-Peak style allows the user to measure the Peak-Peak on the display. Two horizontal bars are shown and the user can move themindependently.

FIGURE 40.16Example of the

Cursor Peak-PeakControl for the Scope

Component.

Cursor FrequencyThe Frequency style allows the user to measure the Frequency on the display. Two vertical bars are shown and the user can move themindependently.

FIGURE 40.17Example of the

Cursor FrequencyControl for the Scope

Component.

Iocomp Components – Plot Pack Manual Page 183 of 336

Page 196: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Chapter 40 - Scope Component

Flip AlignmentThe Flip Alignment helps the user when the hint window is interfering with the view of the data. The Flip Alignment allows the user to control onwhich side of the cursor pointer line that the hint window is shown on. This option only applies to cursor styles that have a single pointer line.Cursors with dual pointer lines always show the hint display between the two bars. For the double pointer cases, the user can slide the hintwindow up/down or left to right depending on the orientation of the double pointer lines.

FIGURE 40.18Example of Flip

Alignment Control forthe Scope Component.

Page 184 of 336 Iocomp Components – Plot Pack Manual

Page 197: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Appendix A - Plot Pack Property Editors

Property Editor Page Property Editor PageControl General 185 Limits General 201Control Title 186Control Background 187 Labels General 203Control Print 187Control Hints 188 Axes General 203Control Images 188 Axes Title 205Control File I/O 189 Axes Labels Default 205Control Translation 189 Axes Labels Cursor 206Control Annotation Defaults 190 Axes Labels Legend 207

Axes Tracking 207Visual Layout Manager 190 Axes Cursor 208

Axes Scroll 208Channels General 191 Axes Scale 209Channels Trace 192 Axes Cartesian 209Channels Marker 193Channels Bar 194 Legend General 210Channels High/Low 195 Legend Columns 211Channels Fill 196 Legend Wrap 211Channels Digital 196Channels File I/O 197 Table General 212Channels OPC 197 Table Grid 213

Table Layout 213Cursors General 198Cursors Channel 199 ToolBar 213Cursors Hint 199Cursors Menu Items 200 Data View General 214

Data View Grid Lines 215

Control General

FIGURE A.1Example of

Control GeneralTab.

User Can Edit Objects: Use to specify whether your application user can open the runtime property editor by right-clicking on a plot object andselecting the “Edit” menu item. Only the “Edit” menu item is hidden when this property is set to False.User Can Add/Remove Channels: Use to specify whether or not a user can use the run-time property editor to add and remove channels.Clip Annotations To Axes: Use to specify whether annotations clip to the axes they are assigned to or whether they can be drawn outside of theaxes bounds. This only has a real effect if the associated X and/or Y-Axis of the annotation does not span 100% of the DataView area (i.e.Stacked Axes).Editor Form Style: Use to specify whether the run-time property editor is modal or a “non-modal, stay-on-top”-type of dialog. Setting this toStay On Top is useful in Visual Basic where you want your underlying program code to continue executing while the run-time property editor isbeing used.Copy To ClipBoard Format: Use to specify the image format used when using the built-in copy to clipboard functions of the Plot Component.Auto Frame Rate: Use AutoFrameRate to specify whether the control automatically activates the repaint frame rate control. When theAutoFrameRate is set to true, the control automatically calls BeginUpdate when the control is performing its next repaint. From then on, thecontrol repaint frame rate is equal to the UpdateFrameRate no matter how many changes are maid to the control every second.

Iocomp Components – Plot Pack Manual Page 185 of 336

Page 198: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Update Frame Rate: Use UpdateFrameRate to get or set the frame rate at which the control repaints.

The frame rate is used to improve performance by controlling the number of times the control repaints itself per second. To activate automaticframe rate control, the UpdateFrameRate property must be non zero and the BeginUpdate method must be called. To deactivate automatic framerate control, call the EndUpdate method.

Each time a change occurs to the control that requires a repaint, the control will determine if a new frame needs to be displayed. The FrameTimeis one second divided by the UpdateFrameRate. If a change occurs to the control before the FrameTime has elapsed, the control is not repainted.If a change occurs to the control after the FrameTime 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 the automatic frame rate control to function correctly. The rateof change per second must be greater than the UpdateFrameRate for the desired frame rate to be achieved. Once changes to the control thatrequire repainting have been stopped, call the EndUpdate method 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 change is made to the control that requires a repaint. The actualnumber of repaints per second is dependent of the system hardware, system activity, and the number of request being made to repaint the control.

The frame rate can be manually controlled by using the BeginUpdate and EndUpdate methods. Make sure that the UpdateFrameRate property isset to 0 to disable automatic frame rate control. Your code will need to keep track of the last update before beginning a new frame. To begin anew frame, call the EndUpdate method and then the BeginUpdate method to start the next frame. Border Style: Use BorderStyle to provide the control with a three-dimensional beveled look.

Value MeaningibsNone No borderibsRaised The outer border is raisedibsLowered The outer border is loweredTable A.1

Outer Margin: Use OuterMarginLeft, OuterMarginRight, OuterMarginTop, or OuterMarginBottom to set the margin between the left, right, top,or bottom side edge of the control and the internal drawn elements. The values are specified in pixels.

Control Title

FIGURE A.2Example of

Control TitleTab.

Note: this property page has been depreciated. The title property now modifies Label Index#0. These properties are provided for backwardcompatibility only.Title Visible: Use to show or hide the main chart title displayed above the DataView area. 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 DataView area. Title Font: Use to set the font of the title.

These properties have been Deprecated in favor of our multiple label support. Please use the Labels tab to set properties for the Title Labeland other labels in the Plot Component.

Page 186 of 336 Iocomp Components – Plot Pack Manual

Page 199: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Control Background

FIGURE A.3Example of

ControlBackground

Tab.

Background Color: Use BackgroundColor to read or change the background color of the control. Gradient Enabled: Specifies whether the component’s background is filled with a gradient.Gradient Direction: Specifies the background gradient fill direction.

Value MeaningTop/Bottom Start Color /Stop ColorBottom/Tom Start Color /Stop ColorLeft/Right Start Color /Stop ColorRight/Left Start Color /Stop ColorTopLeft/BottomRight Start Color /Stop ColorBottomRight/ TopLeft Start Color /Stop ColorBottomLeft/TopRight Start Color /Stop ColorTopRight/BottomLeft Start Color /Stop ColorRectangle Out Start Color /Stop ColorRectangle In Start Color /Stop ColorCircle Out Start Color /Stop ColorCircle In Start Color /Stop ColorTable A.2

Gradient Start Color: Specifies the start color of the background gradient fill. Gradient Stop Color: Specifies the stop color of the background gradient fill.

Control PrintFIGURE A.4Example of

Control PrintTab.

Show Dialog: Use PrintShowDialog to specify whether the printer setup dialog is shown to the user when the PrintChart method is called. IfEnabled, the user can select a local or network printer, specify the orientation, number of copies, and etc before actually printing the chart. Orientation: Use PrintOrientation to set the orientation of the chart on the printed page.

Value MeaningpoPortrait PortraitpoLandscape LandscapeTable A.3

Margin: The left, right, top, and bottom margins on the printed page. Document Name: Used to set the document name displayed on some printer displays when the document is being printed.

Iocomp Components – Plot Pack Manual Page 187 of 336

Page 200: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Control Hints

FIGURE A.5Example ofControl Hint

Tab.

Hints Show: Use HintsShow to specify whether Help Hints are shown for the entire control. Hints Pause: Use HintsPause to get or set the time interval that passes before the control's Help Hint appears when the user places the mousepointer on a object. The HintsPause value is in milliseconds. Hints Hide Pause: Use HintsHidePause to get or set the time interval to wait before hiding the Help Hint if the mouse has not moved from theobject. The HintsHidePause value is in milliseconds.

Control Images

FIGURE A.6Example of

Control ImagesTab.

Add: Use to add a bitmap image to the component’s built-in image list. Images are used in other parts of the component such as in the BitmapAnnotations. All bitmaps added to a particular image list must have the same dimensions as the first image. If the added image size differs fromthe first image, then it will be either cropped, if it is too large, or padded with the transparent color and centered(the color of the lower-right-handpixel of the image), if it is too small. There are currently three custom image lists supported.Remove: Remove the selected image from the image list.Clear: Use to clear out all images from the image list.

Page 188 of 336 Iocomp Components – Plot Pack Manual

Page 201: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Control File I/O

FIGURE A.7Example ofControl File

I/O Tab.

Log File Name: Use LogFileName to get or set the filename (including path) for the log file. This is the log file for all axes.

Warning! All channels must be synchronized. You must use the AddDataArray method when adding data to the plot component when using themain plot interface’s logging feature. If you wish to use asynchronous channels, then you must use the LogFileName logging feature off of each channel.Log Buffer Size: Use LogBufferSize to get or set the size of the log buffer. When logging is active, data will flow into the log buffer if theLogBufferSize 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 wantto 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 thechart.

The value is in number of data points per channel. If you have 5 channels and set this value to 10, then the log will be written to and the buffercleared after 50 data points have been accumulated.

Warning! All channels must be synchronous. You must use the AddDataArray method when adding data to the plot component when using themain plot interface’s logging feature. If you wish to use asynchronous channels, then you must use the LogBufferSize logging feature off of eachindividual channel.

Note: if the log is deactivated, the buffer will automatically be flushed to the log file and cleared. Properties Save: Call SavePropertiesToFile to stream out all of the properties of the plot component to a file.Properties Load: Call LoadPropertiesFromFile to stream in all of the properties of the plot component from a file.

Control Translation

FIGURE A.8Example of

ControlTranslation

Tab.

Add: Adds a translation string pair to the list of translations.Remove: Removes the selected translation from the list of translations.Clear All: 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.

Iocomp Components – Plot Pack Manual Page 189 of 336

Page 202: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Control Annotation Defaults

FIGURE A.9Example of

ControlAnnotation

Defaults Tab.

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 data markers.

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 combinationspsClear No line is drawn (used to omit the line around shapes that draw an outline using the current pen)psInsideFrame A solid line, but one that may use a dithered color if Width is greater than 1Table A.4

Pen Width: Use MarkersPenWidth to get or set the pen width used when drawing data markers. Brush Color: Use MarkersBrushColor to get or set the brush color used to draw data markers. Brush Style: Use MarkersBrushStyle to get or set the brush style used when drawing data markers.

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 bsBDiagonalTable A.5

Visual Layout Manager

FIGURE A.10Example ofLayout Tab.

Page 190 of 336 Iocomp Components – Plot Pack Manual

Page 203: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

How To Use: The Layout Manager is a visual, graphical representation of the individual plot component objects as they are drawn on thecomponent. You can drag-and-drop individual items to reposition them within the control. You can also change the width and height of objects byplacing your mouse cursor over one of the ends of the objects (look for the cursor to change to a double arrow) and dragging them to the desiredsize. If you drop one axes object on another, and they do not overlap, then the axes will stack on top of one another. To flip the X and Y-Axes,right click anywhere in the Layout Manager for a menu item to rotate the X and Y-Axes. ToolBar: The ToolBar object. This item cannot be moved at this time. A feature to reposition this item will be added in future versions. Label(Title): The Label Object. In this example, the only label in the component is named “Title”. There must always be at least one label in thecomponent for backward compatibility with older versions, though it can be hidden. Data View: The object which contains the plotted data. All objects move in relation to this object, so it is fixed. X-Axis: An individual X-Axis. If you have added multiple X-Axes, there would be multiple X-Axis objects which you could reorder or stack. Y-Axis: An individual Y-Axis. If you have added multiple Y-Axes, there would be multiple 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.

Channels General

FIGURE A.11Example of Channel Tab.

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 reference the object. There is no restrictions on the length of thename or the characters used. Title: Use TitleText to get or set the title text for the channel. This is the title that is displayed in the legend for this channel. Ring Buffer Size: Use RingBufferSize to get or set the size of the data buffer used for storing channel data. By setting this property to a non-zerovalue, the ring buffer feature is enable. To disable the ring buffer feature, set this property to 0. The ring buffer will remain a constant size nomatter how many data points are added to the channel and will act 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 the legend. Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.Fast Draw: Enables or disables the Fast Draw feature. This feature dramatically speeds up redraws to the screen if you are displaying large datasets (>100000 data points).Layer: Specifies the Painting Layer Order of the Plot Object with respect to other Plot Objects.Color: Use Color to get or set the color of the channel. The Color property is used by the Trace drawing routine and is used by default for theMarkers and Fill drawing routines. X-Axis Name: Use XAxisName to get or set the name of the x-axis used for plotting the channel x data against. If the XAxisName is not a validx-axis name, the channel data will not be drawn. Y-Axis Name: Use YAxisName to get or set the name of the Y-Axis used for plotting the channel y data against. If the YAxisName is not a validY-Axis name, the channel data will not be drawn. X-Axis Tracking Enabled: Use XAxisTrackingEnabled to specify whether the channel sends tracking data to its assigned x-axis. Y-Axis Tracking Enabled: Use YAxisTrackingEnabled to specify whether the channel sends tracking data to its assigned Y-Axis.

Iocomp Components – Plot Pack Manual Page 191 of 336

Page 204: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Data Style: Use to set the type of dataset that the channel will use. Some styles use more memory per data point to utilize expanded features ofthe component while other styles use less memory (and correspondingly faster access speeds, memory utilization, and max # of data pointssupported) with a more limited feature set.

FeaturesFull

FeatureStandard(Default)

Compact CompactInterval

Bytes Per Data Point 136 24 8 4Maximum # of Data Points (1.4GB Limit) 11 Meg 62 Meg 187 Meg 375 Meg

Unique Y (Per Data Point)Unique X (Per Data Point) Interval Spaced XNullsEmptiesTrace LineMarkersBarsHigh/LowFillDigitalInterpolationIndividual Data Points ControlMarker Style (Only)Marker Show (Only)Marker Properties (All)Trace Line Properties (All)Bar Properties (All)Table A.6

Channels Trace

FIGURE A.12Example of

Channel TraceTab.

Visible: Use TraceVisible to specify whether the channel trace line is visible. Typically the 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 combinationsTable A.7

Line Width: Use TraceLineWidth to get or set the pen width used when drawing the channel trace line.

Page 192 of 336 Iocomp Components – Plot Pack Manual

Page 205: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Interpolation Style: The type of interpolation used to draw the trace line between data points in the channel. To turn off the trace line, go back tothe trace tab and uncheck “Visible”.

Value MeaningipistStraightLine Draws a straight trace line between each data point.ipistCubicSpline Draws a curve based on Cubic Spline curve fitting interpolation equations.

ipistPolynomialDraws a curve based on Polynomial Interpolation curve fitting equations and is only good for smalldata sets (~100 data points)Polynomial degree is fixed at [n – 1] or [n =number of data points]

ipistRational

Draws a curve based on Rational Interpolation curve fitting equations. This is an alternative to theipistPolynomial Interpolation with functions that have poles. This interpolation is good for small tomedium-sized data sets.

ipistDifferential

Draws a curve based on Differential Interpolation. This style draws horizontal and vertical linesbetween data points. A line is drawn horizontal between one point’s X and Y-Value to the next datapoint’s X-Value. A vertical line is then drawn perpendicular from the end point up or down to theY-Value of the second data point.

ipistDifferentialTerminatedSame as ipistDifferential option with the exception that there is not a line drawn to from the lastpoint to infinity, but instead terminates at the last point.

Table A.8

Channels Marker

FIGURE A.13Example of

Channel MarkerTab.

Show: Use MarkersVisible to specify whether the data markers are visible. Allow Individual: Use MarkersAllowIndividual to specify whether the DataMarkerShow and DataMarkerStyle properties are used to drawindividual data point data markers.

When this property is set to True, then the data markers are initially drawn using the MarkersStyle property but can be modified individually withthe DataMarkerShow and DataMarkerStyle properties. When this property is set to False, then all of the data markers are drawn using theMarkersStyle 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 RightipmsVerticalLine A Vertical LineipmsHorizontalLine A Horizontal LineipmsCharacter A CharacterTable A.9

Size: Use MarkersSize to get or set the size of data markers. The MarkersSize value is in pixels. Font Specifies the font attributes of the Channel's Markers.Turn off Limit Provides for a maximum limit to the number of Data Markers that will be drawn to the screen.Pen Use Channel Color: Use MarkersPenUseChannelColor to specify whether markers use the channel color for the pen color. WhenMarkersPenUseChannelColor is set to True, the pen uses the color of the Color property. When MarkersPenUseChannelColor is set to False, thepen uses the color of the MarkersPenColor property.

Iocomp Components – Plot Pack Manual Page 193 of 336

Page 206: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Pen Style: Use MarkersPenStyle to get or set the pen style used when drawing data markers.

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 combinationspsClear No line is drawn (used to omit the line around shapes that draw an outline using the current pen)psInsideFrame A solid line, but one that may use a dithered color if Width is greater than 1Table A.10

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 data markers. Brush Use Channel Color: Use MarkersBrushUseChannelColor to specify whether markers use the channel color for the brush color. WhenMarkersBrushUseChannelColor is set to True, the brush uses the color of the Color property. When MarkersBrushUseChannelColor is set toFalse, the brush uses the color of the MarkersBrushColor property. Brush Style: Use MarkersBrushStyle to get or set the brush style used when drawing data markers.

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 bsBDiagonalTable A.11

Brush Color: Use MarkersBrushColor to get or set the brush color used to draw data markers.

Channels Bar

FIGURE A.14Example of Channel Bar

Tab.

Enabled: Use to turn on the bar feature of the channel. When the feature is turned on, a bar of the specified Width starting at the specifiedReference will be drawn to the Data point’s Y coordinate. Width: Use to specify the width of the bar in units of the X-Axis.Reference: Use to specify the point at which the bar begins to draw in units of the Y-Axis.Pen Use Channel Color: Use to specify whether the color of the pen used to draw the bar is derived from the channel’s color or the Pen Colorproperty. Pen Style: Use to specify the style of the pen used to draw the bar.

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 combinationspsClear No line is drawn (used to omit the line around shapes that draw an outline using the current pen)psInsideFrame A solid line, but one that may use a dithered color if Width is greater than 1Table A.12

Pen Color: Use to specify the color of the pen used to draw the bar. Pen Width: Use to specify the width of the pen used to draw the bar.Brush Use Channel Color: Use to specify whether the color of the brush used to draw the bar is derived from the channel’s color or the BrushColor property.Brush Color: Use. To specify the color of the brush used to draw the bar

Page 194 of 336 Iocomp Components – Plot Pack Manual

Page 207: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Brush Style: Use to specify the style of the brush used to draw the bar.

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 bsBDiagonalTable A.13

Channels High/Low Open/Close

FIGURE A.15Example of

ChannelHigh/Low Tab.

HighLowEnabled: Use HighLowEnabled to specify whether the High-Low bars are shown for the data points in this channel. HighLowStyle Used to specify the style of the High/Low channel data.

Value Meaning

iphlsOpenCloseThe data point is displayed with a bar representing the DataOpen and DataClose properties of the datapoint. Two horizontal bars represent the DataHigh and DataLow properties.

iphlsCandleStickThe data point is displayed with a bar representing the DataOpen and DataClose properties of the datapoint. A vertical line bisecting the bar represents the DataHigh and DataLow properties.

Table A.14

HighLowBarColor: Use HighLowBarColor to specify the color of the High-Low Bar. HighLowBarWidth: Use HighLowBarWidth to specify the width of the High-Low Bar.HighLowOpenShow Use HighLowOpenShow to specify whether the Open bar is shown for the High-Low Bars of this channel.HighLowOpenColor: Use HighLowOpenColor to specify the color of the High-Low Open Bar.HighLowOpenWidth: Use HighLowOpenWidth to specify the width of the High-Low OpenBar.HighLowOpenHeight: Use HighLowOpenHeight to specify the height of the High-Low OpenBar.HighLowCloseShow Use HighLowCloseShow to specify whether the Close bar is shown for the High-Low Bars of this channel.HighLowCloseColor: Use HighLow Close Color to specify the color of the High-Low Close Bar.HighLowCloseWidth: Use HighLow Close Width to specify the width of the High-Low Close Bar.HighLowCloseHeight: Use HighLow Close Height to specify the height of the High-Low Close Bar.

Channels High/Low Candlestick

FIGURE A.16Example of

ChannelHigh/Low Tab.

Iocomp Components – Plot Pack Manual Page 195 of 336

Page 208: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Candlestick ShadowColor: Specifies the color of the High-Low CandleStick shadow. Candlestick BullishColor: Specifies the color of the High-Low CandleStick bar when the the data point is "Bullish".Candlestick BearishColor: Specifies the color of the High-Low CandleStick bar when the the data point is "Bearish".

Channels Fill

FIGURE A.17Example of Channel Fill

Tab.

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 the channel color when drawing the fill underneath the channeldata. When FillUseChannelColor is set to True, the fill color used is the Color property value. When FillUseChannelColor is set to False, the fillcolor used is the FillColor property value. Reference: Use FillReference to get or set the reference line that the fill is drawn to on the 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 the channel 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 bsBDiagonalTable A.15

Channels Digital

FIGURE A.18Example of

Channel DigitalTab.

Enabled: Use DigitalEnabled to specify whether the data in the channel is interpreted as digital or analog data.. If DigitalEnabled is TRUE, thenvalues of 0 and 1 are plotted against DigitalReferenceLow and DigitalReferenceHigh respectively.

Y coordinate values that are equal to 0 (i.e. Value = 0) are plotted on the scale at the Y coordinate specified by DigitalReferenceLow.

X coordinates that are not equal to 0 (i.e. 0 < Value > 0) are plotted on the scale at the Y coordinate specified by DigitalReferenceHigh.Reference High: Use DigitalReferenceHigh to get or set the Y coordinate for digital high values or Logic = TRUE used for plotting data pointswhile in Digital Mode when the value is not equal to 0 (i.e. 0 < Value > 0).

Page 196 of 336 Iocomp Components – Plot Pack Manual

Page 209: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Reference Low: Use DigitalReferenceLow to get or set the Y coordinate for digital low values or Logic = FALSE used in Digital Mode while inDigital Mode when the value is equal to 0 (i.e. Value = 0).Reference Style: Use DigitalReferenceStyle to get or set the formatting style of a digital channel.

Value Meaning

ipdrScaleDigitalReferenceLow and DigitalReferenceHigh properties are interpreted as actual valueson the associated Y-Axis Scale

ipdrPercent

DigitalReferenceLow and DigitalReferenceHigh properties are interpreted as a percentage ofthe distance from the bottom of the DataView (0%) and the top of the DataView (100%)[Note: Acceptable values are between 0 and 100]

Table A.16

Channels File I/OFIGURE A.19

Example of Channel File

I/O Tab.

Log File Name: Use LogFileName to get or set the filename (including path) for the log file. This is the log file only for the associated channel.Note: Channels may be synchronous or asynchronous. If you are only using synchronous data, you can use the LogFileName logging feature off of the main component interface to save all channel data to a single log file.Buffer Size: Use LogBufferSize to get or set the size of the log buffer. When logging is active, data will flow into the log buffer if theLogBufferSize 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 wantto 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 thechart.

Note: Channels may be synchronous or asynchronous. If you are only using synchronous data, you can use the LogBufferSize logging feature off of the main component interface to 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 and cleared. Properties Save: Call Properties Save Call SavePropertiesToFile to Stream all the properties associated channel to a file.Properties Load: Call LoadPropertiesFromFile to stream in all of the properties of the associated channel from a file.

Channels OPCFIGURE A.20

Example of Channel OPC

Tab.

Computer: The name of the OPC server that you wish to connect this channel to. Each channel can have their own independent settings. OPC Server: The name of the OPC server running on the computer specified by “Computer” Item: The name of the data item on the OPC Server that you wish to connect the channel to.UpdateRate: Use to specify the “requested” update rate from the server in milliseconds. The actual update rate is dictated by the server, so this isonly a request. Auto Connect: Use to instruct the component to automatically create a connection to the server and begin to acquire data immediately duringcomponent creation.

Iocomp Components – Plot Pack Manual Page 197 of 336

Page 210: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

X-Value Source: Use to specify how X-Data is acquired for each incoming piece of Y-data.

Value MeaningiopcxvsOPCServerTimeStamp Whenever data is received, the X-Coordinate will be obtained from the OPC Server's Time Stamp

iopcxvsSystemTimeStampWhenever data is received, the X-Coordinate will be obtained from the local computer's System TimeStamp.

iopcxvsElapsedTime

Whenever data is received, the X-Coordinate will be obtained from the time (In Date/Time Format, be sureto setup the X-Axis for Date/Time values)elapsed since the ResetElapsedStartTime procedure has beencalled.

iopcxvsElapsedSecondsWhenever data is received, the X-Coordinate will be obtained from the time elapsed (In Seconds, not inDate/Time format) since the ResetElapsedStartTime procedure has been called.

Table A.17

Cursors GeneralFIGURE A.21

Example ofCursor General

Tab.

Cursor Name: Use Name to set the Plot Object’s name. This name can then be used to reference the object. There is no restrictions on the lengthof the name or the characters used. Cursor Style: Use Style to get or set the style of the data cursor object. The style determines 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

ipcsValueXYDisplays Data Point’s ValueX and ValueY with a single pointer line for the iPlot component and a cross-hair (two pointer lines) for the iXYPlot component.

ipcsValueX Displays Data Point’s ValueX with a single pointer lineipcsValueY Displays Data Point’s ValueY with a single pointer lineipcsDeltaX Displays Data Points’ X Span between to pointer lines. Use ValueX to retrieve the X Span.ipcsDeltaY Displays Data Points’ Y Span between to pointer lines. Use ValueY to retrieve the Y Span.

ipcsInverseDeltaXDisplays Frequency between two pointer lines. Uses scale values and CursorScaler property of theassociated channel’s X-Axis. Use ValueX to retrieve the calculated value.

Table A.18

Pointer 1 Position: Use Pointer1Position to get or set the position of the first cursor pointer. The units of the Pointer1Position are in reference tothe DataView area in percent. 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 the DataView area with 0 being the bottom of the DataView and100 being the top of the data view.

If the data cursor is vertical, the position is in reference to the X-Axis side of the DataView area with 0 being the left side of the DataView and100 being the right side of the data view.

For data cursors of style ValueXY (iPlot Component Only), ValueX, and ValueY, this property sets the position of the single cursor line usedwith these data cursor styles. Pointer 2 Position: Use Pointer2Position to get or set the position of the second cursor pointer. The units of the Pointer2Position are in referenceto the DataView area in percent. Therefore the only valid values are between 0 and 100.

For data cursors of style ValueXY (iPlot Component Only), ValueX, and ValueY, this property is ignored since they don’t have a second cursorline. Pointer Pen Width: Specifies the pen width used when drawing the Data Cursor pointer.Pointer Color: Use Color to get or set the color of the data cursor line or lines. This property is overridden if the UseChannelColor property is setto True. Use Channel Color: Use UseChannelColor to specify whether the data cursor line use the channel color for the line color. WhenUseChannelColor is set to True, the data cursor line is drawn using the associated Channel’s Color property. When UseChannelColor is set toFalse, 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.

Page 198 of 336 Iocomp Components – Plot Pack Manual

Page 211: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.

Cursors Channel

FIGURE A.22Example of

Cursor ChannelTab.

Cursor Channel Name: Use ChannelName to get or set the name of the channel used for referencing. This property associates a particular channel’s data with the cursor. Data from the channel is then used by the cursor to display individual data points, ranges, and other cursorcalculated values. Allow All : Specifies whether the right-click, context-sensitive pop up menu on the Data Cursor shows the "<All>" option when specifying the channel associated with this Data cursor.Show All in Legend: Specifies whether the Data Cursor displays cursor data in the Legend when the Data Cursor ChannelName property is set to "<All>".

Cursors Hint

FIGURE A.23Example ofCursor Hint

Tab.

Show: Use HintShow to specify whether the hint is shown next to the data cursor in the DataView area. You will generally want to leave thisvalue set to TRUE so that the X and/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 be notified when the cursor moves so that you can externallydisplay or react to the X and Y values of the cursor.. Hide On Release: Use HintHideOnRelease to specify whether the hint is automatically hidden when the user releases the mouse button. The hintwill be shown when the user selects, clicks down, and while moving the cursor in the DataView area. If this property is set to True, then the hintwill 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 orvertical 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 the cursor is vertical, then the top side of the hint will be 60% of the distance from the top side of the DataView area.Orientation Side: Use HintOrientationSide to get or set the orientation of the hint displayed next to the cursor.

Note: the orientation will automatically be flipped if a cursor is moved in such a way as to move the hint window outside of the DataView area(i.e. there is no room between the cursor and the edge of the DataView boundaries).

Iocomp Components – Plot Pack Manual Page 199 of 336

Page 212: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

These are the possible values: Value MeaningiosBottomRight Displays the hint to the right of a vertical cursor and below a horizontal cursor.iosTopLeft Displays the hint to the left of a vertical cursor and above a horizontal cursor.Table A.19

Cursors Menu Items

FIGURE A.24Example of

Cursor MenuItems Tab.

Show Options: Use the Show Options property to show options pop up menu of the cursor at runtime. Value XY Visible: Use MenuItemVisibleValueXY to specify whether right-click, context-sensitive menu for the data cursor object displays the“ValueXY” entry. This menu 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 item allows the user to change the cursor to display only X values. Value Y Visible: Use MenuItemVisibleValueY to specify whether right-click, context-sensitive menu for the data cursor object displays the“ValueY” entry. This menu item allows 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 displaysthe “InverseDeltaX” entry. This menu item allows the user to change the cursor to display the inverse of the range of X values between two cursorlines (value = 1/range). This is typically used in conjunction with the Axis CursorScaler property to display calculated frequency 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 item allows the user to change the cursor to display the range of Y values between two cursor lines. Inverse Delta X Visible: Use MenuItemVisibleInverseDeltaX to specify whether right-click, context-sensitive menu for the data cursor objectdisplays the “InverseDeltaX” entry. This menu item allows the user to change the cursor to display the inverse of the range of X values betweentwo cursor lines (value = 1/range). This is typically used in conjunction with the Axis CursorScaler property to display calculated frequencyvalues.Value XY Caption: Use MenuItemCaptionValueXY to specify the caption of the “ValueXY” right-click, run-time pop up menu for the datacursor object. This is useful for customizing the menu for application specific descriptions. The menu item allows the user to change the cursor todisplay both X and Y values. Value X Caption: Use CaptionValueX to specify the caption of the “ValueX” right-click, run-time pop up menu for the data cursor object. Thisis useful for customizing the menu for application specific descriptions. The menu item allows the user to change the cursor to display only Xvalues. Value Y Caption: Use MenuItemCaptionValueY to specify the caption of the “ValueY” right-click, run-time pop up menu for the data cursorobject. This is useful for customizing the menu for application specific descriptions. The menu item allows the user to change the cursor todisplay only Y values. Delta X Caption: Use MenuItemCaptionDeltaX to specify the caption of the “DeltaX” right-click, run-time pop up menu for the data cursorobject. This is useful for customizing the menu for application specific descriptions. The menu item allows the user to change the cursor todisplay 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 pop up menu for the data cursorobject. This is useful for customizing the menu for application specific descriptions. The menu item allows the user to change the cursor todisplay the range of Y values between two cursor lines. Inverse Delta X Caption: Use MenuItemCaptionDeltaX to specify the caption of the “InverseDeltaX” right-click, run-time pop up menu for thedata cursor object. This is useful for customizing the menu for application specific descriptions. The menu item allows the user to change thecursor to display the inverse of the range of X values between two cursor lines (value = 1/range). This is typically used in conjunction with theAxis CursorScaler property to display calculated frequency values..

Page 200 of 336 Iocomp Components – Plot Pack Manual

Page 213: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Limits General

FIGURE A.25Example of Limit

General Tab.

Name: Use Name to set the Plot Object’s name. This name can then be used to reference the object. There is no restrictions on the length of thename or the characters used. Style: Use Style to get or set the style of the limit object. The style determines the type of the limit and how it is drawn on the screen andmanipulated.

These are the possible values:

Value MeaningiplsLineX Displays a single line perpendicular to the X-Axis at a position specified by Line1Position.iplsLineY Displays a single line perpendicular to the Y-Axis at a position specified by Line1Position.iplsBandX Displays a filled or two line band perpendicular to the X-Axis specified by the Line1Position and .

iplsBandYDisplays a filled or two line band perpendicular to the Y-Axis specified by the Line1Position andLine2Position properties.

iplsPolyBandXDisplays a filled or two line band using elements (upper and lower limit values specified for a particular Y-Axis positions) added by the AddBandElement method.

iplsPolyBandYDisplays a filled or two line band using band elements (upper and lower limit values specified for a particularY-Axis positions) added by the AddBandElement method.

Table A.20

Line 1 Position: Use Line1Position to get or set the position of the first limit line. The units of the Line1Position are in reference to the values onthe 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 limit line used with these limit styles.

CursorStyle Position Value MeaningiplsLineX References the X-Axis scale referenced in the XAxisName property.iplsLineY References the Y-Axis scale referenced in the YAxisName property.Table A.21

For limit lines of style BandX and BandY, this property sets the position of the first cursor line with these fill-region or dual-line data limit linestyles. For limit lines of style PolyBandX or PolyBandY, this property is ignored.

CursorStyle Position Value MeaningiplsBandX References the X-Axis scale referenced in the XAxisName property.iplsBandY References the Y-Axis scale referenced in the YAxisName property.iplsPolyBandX Property Ignored. Use AddBandElement.iplsPolyBandY Property Ignored. Use AddBandElement.Table A.22

Line 2 Position: Use Line2Position to get or set the position of the second limit line. The units of the Line2Position are in reference to the valueson 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.Table A.23

Iocomp Components – Plot Pack Manual Page 201 of 336

Page 214: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

For limit lines of style BandX and BandY, this property sets the position of the second cursor line with these fill-region or dual-line data limit linestyles. For limit lines of style PolyBandX or PolyBandY, this property is ignored.

CursorStyle Position Value MeaningiplsBandX References the X-Axis scale referenced in the XAxisName property.iplsBandY References the Y-Axis scale referenced in the YAxisName property.iplsPolyBandX Property Ignored. Use AddBandElement.iplsPolyBandY Property Ignored. Use AddBandElement.Table A.24

Layer: Specifies the Painting Layer Order of the Plot Object with respect to other Plot Objects.Fill Style: Use FillStyle to get or set the fill style used when drawing the fill between limit lines. This property has no effect if the Limit Styleproperty is set to iplsLineX or iplsLineY.

These are the possible values:

Value MeaningbsSolid Solid.

bsClearClear. No fill will be created, but two solid lines of line width 1 using the Limit’s Color property will bedrawn at the Line1Position and Line2Position positions.

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.Table A.25

Line Style: Use LineStyle to get or set the line style of the limit line or lines. This property is ignored if the Limit’s Style property is set toiplsBandX, 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-dot combinations.psClear No line is drawn.psInsideFrame A solid line, but one that may use a dithered color if Width is greater than 1.Table A.26

Note: Only the psInsideFrame style will produce a dithered color to match a Color property that is not in the color table. All others choose theclosest color from the Windows color table.Note: Dotted or dashed pen styles are not available when the Width property is not 1 or 0.Line Width: Use LineWidth to get or set the pen width used when drawing the limit line or lines. This property is ignored if the Limit’s Styleproperty is set to iplsBandX, iplsBandY, iplsPolyBandX, or iplsPolyBandY.Color: Use Color to get or set the color of the limit line or lines…

Value MeaningiplsLineX Displays a single line perpendicular to the X-Axis at a position specified by Line1Position.iplsLineY Displays a single line perpendicular to the Y-Axis at a position specified by Line1Position.

iplsBandX Displays a filled or two line perpendicular to the X-Axis specified by the Line1Position and Line2Positionproperties.

iplsBandY Displays a filled or two line band perpendicular to the Y-Axis specified by the Line1Position andLine2Position properties.

iplsPolyBandX Displays a filled or two line band using elements (upper and lower limit values specified for a particular Y-Axis positions) added by the AddBandElement method.

iplsPolyBandY Displays a filled or two line band using band elements (upper and lower limit values specified for aparticular Y-Axis positions) added by the AddBandElement method.

Table A.27

X-Axis Name: Use XAxisName to get or set the name of the X-Axis used for referencing. This property is used by the Line1Position,Line2Position, and AddBandElement properties and methods for positioning the limit line or lines against the specified X-Axis.Y-Axis Name: Use YAxisName to get or set the name of the Y-Axis used for referencing. This property is used by the Line1Position,Line2Position, and AddBandElement properties and methods for positioning the limit line or lines against the specified Y-Axis.

Page 202 of 336 Iocomp Components – Plot Pack Manual

Page 215: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Labels General

FIGURE A.26Example of

Labels GeneralTab.

Name: Use Name to set the Plot Object’s name. This name can then be used to reference the object. There is no restrictions on the length of thename 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, see the Visible property of the Label Object .

Note: for backward compatibility, the TitleText property will always modify the Caption property of Label Index 0.Alignment: Set Alignment to specify how the text is aligned within the ClientRect of the label 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.Table A.28

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 inpercent of the title font height or width.

Axes General

All X-Axis and Y-Axis Property Editor Tabs are exactly the same, this section is for both X-Y Axes

FIGURE A.27Example of

Axes GeneralTab.

Name: Use Name to set the Plot Object’s name. This name can then be used to reference the object. There is no restrictions on the length of thename or the characters used. Min: Use Min to get or set the minimum value that will be displayed 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. This property will affect what value will be on the first major tickof the axis.

Let’s say the Axis starts at 0, but you want it to start at 9. Setting this value to 9 will instruct the Axis to start the first major tick on 9 and thenfollow the DesiredIncrement property for all further major ticks.

Iocomp Components – Plot Pack Manual Page 203 of 336

Page 216: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Note: due to performance issues, this property only has effect if the value exists in the visible axis (i.e. the value must be equal to or between theaxis’ 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.Desired Increment: Use DesiredIncrement to get or set the desired increment for the axis scale.

If this property is set to 0, then the AutoScale feature of the axis scale will automatically adjust the scale to follow a 1-2-5 rule, which ensures thatthe scale major ticks and labels fall 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 property settings.

If this property is greater than zero, the AutoScale feature will attempt to create a scale using your increment values depending on your min andspan property settings, adding major ticks and labels that will fit in the area used by the scale. If the AutoScale finds that not all of the labels willfit in the scale area (depends on your font properties), then it will 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 and span properties are 0 and 50, then the AutoScale code willattempt 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 the space 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 to ipstLog10, the Min and Span properties are restricted tobeing greater than 0.

Value MeaningipstLinear LinearipstLog10 Logarithmic Base 10Table A.29

Visible: Use the Visible property to show or hide a specific Plot Object. Grid Lines Visible: Use to specify whether the grid-lines drawn for this axis are shown or hidden. Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a Plot Object.

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 isenabled. Note that setting this property 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 is disabled. Note that this will override all other properties thataffect the UI of this Plot Object.

Note: when a Plot Object is disabled, the Plot Object will not “look disabled” like standard text boxes or labels. Only the UI will be disabled.Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object in your particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.Reverse Scale: Use ReverseScale to specify whether the scale is reversed. If ReverseScale is False, the axis goes from left to right for horizontalorientation or bottom to top for vertical orientation. If ReverseScale is True, the axis goes from right to left for horizontal orientation, or top tobottom for vertical orientation. Restore Values On Resume: Use RestoreValuesOnResume to set whether or not the axis restores the original axis parameters and values thatwere in effect when the Pause All Tracking Button is clicked. All parameters (such as axis min and span) are restored when the Resume AllTracking 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 for all axes of this type.

For example, let’s say you have three (3) Y-Axes. If you set this property to TRUE on the first Y-Axis, then all UI (User Input, such as mouse orkeyboard input) on that axis will 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 thesame type).

This is useful if you want the scrolling action of one axis to be synchronized with all other axes of the same type. If you want all Axes of the sametype to be synchronized, set this property to TRUE on all of them. If you want all Axes to be independent, set this property to FALSE on all ofthem.

Page 204 of 336 Iocomp Components – Plot Pack Manual

Page 217: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Axes Title

FIGURE A.28Example of Axes

Title Tab.

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 the TitleShow property. Axes Title Margin: Use TitleMargin to get or set margin between the axis title and axis scale labels. TitleMargin represents the percentage of acharacter size and is based on the TitleFont 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.

Axes Labels Default

FIGURE A.29Example of Axes

Label DefaultTab.

Visible: Used to hide or show the specified Plot Object.Label Font: The Font for the Axes Labels. Label Separation: Use LabelSeparation to get or set the minimum separation between scale labels. LabelSeparation represents the percentage ofa character size and is based on the LabelsFont used for the axis. A value of 0.5 is equal to half the size of a character. The actual separationmaybe greater due to the AutoScale reducing the number of major ticks to keep the scale labels in a human readable format (1-2-5 Rule). Margin: Use LabelsMargin to get or set the spacing between the major tick and major tick labels. LabelsMargin represents the percentage of acharacter size and is based on the LabelsFont used for the axis. A value of 0.5 is equal to half the size of a character. Precision: Use LabelsPrecision to get or set the precision of the axis labels. The actual number of digits shown to the right of the decimal placedepends on the setting of the LabelsPrecisionStyle property.

For example, if LabelsPrecision is 1, LabelsPrecisionStyle is set to ipsFixedDecimalPoints, and the value is 40.56 then the label text will beformatted to display “40.6”. To show integers only, set LabelsPrecision to 0. Min Length: Use LabelsMinLength to get or set the minimum label length used in calculating the number of scale labels (Major Ticks) duringAutoScale. This property has no effect if the axis is not horizontal.

AutoScale automatically calculates the number of scale labels based on the LabelsFont, LabelSeparation, and LabelsMinLength to ensure labelsthat are in a human readable format (1-2-5 Rule). Min Length Auto Adjust: Use LabelsMinLengthAutoAdjust to specify whether the LabelsMinLength property is automatically adjusted as theminimum required label length increases.

While plotting, or user scrolling/zooming, the actual minimum label length may become greater than the LabelsMinLength property value. Thiswill result it the axis growing in size to accommodate the wider label. If the plotting data or user changes the displayed data causing the labelwidth to vary, it may cause an annoying oscillation of the display plot objects sizes. To prevent this oscillation, 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 theprevious value when TrackingEnabled property is set back to True.

Iocomp Components – Plot Pack Manual Page 205 of 336

Page 218: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Precision Style: Use PrecisionStyle to specify how the LabelsPrecision property is interpreted when formatting scale labels. When PrecisionStyleis set to ipsSignificantDigits, the number of digits to the right of the decimal point is automatically calculated to ensure that the span of the valueswill show enough significant digits.

For Example :

LabelsPrecision = 3LabelsPrecisionStyle = ipsSignificantDigitsSpan = 50

Number of digits shown to the right of the decimal point = 1

Value MeaningipsSignificantDigits Precision property specifies the number of significant digitsipsFixedDecimalPoints Precision property specifies the number of digits to the right of the decimal pointTable A.30

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 and Securities 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 as 100.231.

iptfThousandsex. 100,231,456.00 This format groups digits using the current thousands separator specified in yourregional settings.

Table A.31

Date Time Format: Use DateTimeFormat to get or set the Date/Time formatting string for the labels. See Appendix L - What is DateTime Format? page 287 for more information for specific values.

Value Meaninghh:nn:ss Displays the hour with leading zeros, minutes with leading zeros and seconds with leading zeros.

hh:nn:ss.zzzDisplays the hour with leading zeros, minutes with leading zeros, seconds with leading zeros andmilliseconds with leading zeros.

m/d hh:nn:ssDisplays Month, Day, the hour with leading zeros, minutes with leading zeros, seconds with leadingzeros.

d mmm h:nn:ss am/pmDisplays Day, Month as an 3 letter abbreviation, hour, minutes with leading zeros seconds withleading zeros and uses the 12-hour clock with AM/PM.

m/d/yy h:nn:ss am/pmDisplays Day, Month, year as a two-digit number, the hour, minutes with leading zeros, seconds withleading zeros, and uses the 12-hour clock with AM/PM.

m/d/yyyy h:nn:ss am/pmDisplays Month, Day, year as a four-digit number, hour minutes with leading zeros, seconds withleading zeros, and uses the 12-hour clock with AM/PM.

Table A.32

Axes Labels CursorFIGURE A.30

Example ofAxes LabelCursor Tab.

Use Default Format: Specifies whether associated Data Cursors use the Axis Default Formatting.Copy Default: Copies the the default setting from the default tab.Format Style: See Axes Labels Default page 205 for more information for specific values.DateTime Format: See Axes Labels Default page 205 for more information for specific values.

Page 206 of 336 Iocomp Components – Plot Pack Manual

Page 219: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Precision Style: See Axes Labels Default page 205 for more information for specific values.Precision: See Axes Labels Default page 205 for more information for specific values.Min Length: See Axes Labels Default page 205 for more information for specific values.Min Length Auto Adjust: See Axes Labels Default page 205 for more information for specific values.

Axes Labels Legend

FIGURE A.31Example of Axes

Label LegendTab.

Use Default Format: Specifies whether associated Legend uses the Axis Default Formatting..Copy Default: Copies the the default setting from the default tab.Format Style: See Axes Labels Default page 205 for more information for specific values.DateTime Format: See Axes Labels Default page 205 for more information for specific values.Precision Style: See Axes Labels Default page 205 for more information for specific values.Precision: See Axes Labels Default page 205 for more information for specific values.Min Length: See Axes Labels Default page 205 for more information for specific values..Min Length Auto Adjust: See Axes Labels Default page 205 for more information for specific values.

Axes TrackingFIGURE A.32

Example of AxesTracking Tab.

Enabled: Use TrackingEnabled to specify whether the axis will adjust itself to new tracking data from the channels. Depending on theTrackingStyle, When the TrackingEnabled property is set to True, the axis will scroll or compress based on the new tracking data. Style: Use TrackingStyle to specify how the axis adjusts itself in response to new tracking data if off scale.

Value MeaningiptsScaleMinMax Will adjust the Min or Span property to keep the new tracking data in viewiptsScaleMax Will adjust the Max property if necessary to keep the new tracking data in viewiptsScaleMin Will adjust the Min property if necessary to keep the new tracking data in viewiptsScrollSmooth If the data is off axis, the scale will be adjusted to show the data at the end of the scaleiptsScrollPage If the data is off axis, the scale will be adjusted to show the data at the beginning of the scale

iptsExpandCollapseExpands and Collapses the scale to keep all data and data markers in view using up the total area of theDataView.

iptsExpandCollapseFast

Uses the cached RunningXMax, RunningXMin, RunningYMax, and/or RunningYMin properties of the channelto keep all data and data markers in view using up the total area of the DataView.Warning: do not use this new feature if you modify historical data unless you manually call the appropriateGetXMax/GetXMin or GetYMax/GetYMin functions to force an update of the corresponding running totals.(e.g. if you modify the Y-value of a previous data point, you must call GetYMax and GetYMin to update theRunningYMax and RunningYMin properties for the new "Fast" features to work correctly. ).

Table A.33

Iocomp Components – Plot Pack Manual Page 207 of 336

Page 220: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Align First Style: Use TrackingAlignFirstStyle to specify how the axis aligns itself when it receives it first piece of tracking data. If there is morethan one channel sending tracking data, only the data from the first channel is used to set the first alignment. To force the axis to realign to thenext piece of tracking data, call the ResetFirstAlign method.

Value MeaningipafsMin Axis is adjusted to show first data point on the beginning of the scaleipafsMax Axis is adjusted to show first data point on the end of the scale

ipafsAutoAxis is unchanged if first data point is in view. If out of view then the axis is adjusted to show first data point on thebeginning of the scale

ipafsNone Axis is not adjusted on the first data pointTable A.34

Scroll Compress Max: Use TrackingScrollCompressMax to get or set the maximum span value when compressing the scale. When new trackingdata is received and the TrackingEnabled is set to True, the Span property will be increased (Compressed) to include the tracking data if thecurrent Span property is less than the TrackingScrollCompressMax. To disable this feature, set TrackingScrollCompressMax to 0.

Axes Cursor

FIGURE A.33Example ofAxes Cursor

Tab.

Cursor Scalar: Use CursorScaler to get or set the desired scalar for the cursor associated with this axis scale. CursorScaler is only used withcursors that have their Style property set to InverseDeltaX, typically used for frequency calculations. The Scalar is a multiplier used to convertthis axis’ units to seconds format so that the cursor can property display the frequency calculation. For example, if the axis units are ms(milliseconds or 1/1,000th of a second), then you would 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,000 to convert from µs to seconds. If your units are already inseconds on this axis, then you would set the Scalar to 1.

Axes Scroll

FIGURE A.34Example ofAxes Scroll

Tab.

Min/Max Enabled: Use ScrollMinMaxEnabled to specify whether scrolling of the axis is fixed to a range of values specified by ScrollMax andScrollMin. If this property is set to True, then the axis will stop scrolling when ScrollMax and/or ScrollMin are reached on the scale.Min: Use ScrollMin to set a fixed maximum limit on scrolling of the axis. If the user attempts to scroll the axis past this point on the axis andScrollMinMaxEnabled is set to True, 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 user attempts to scroll the axis past this point on the axis andScrollMinMaxEnabled is set to True, the axis will not scroll past the specified maximum point.

Page 208 of 336 Iocomp Components – Plot Pack Manual

Page 221: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Axes Scale

FIGURE A.35Example ofAxes Scale

Tab.

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 numberof minor sections. For example, if you want 5 minor sections, set MinorCount to 4. Lines Show: Specifies whether the DataView grid lines are drawn to this axis.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 the side towards the data view. The InnerMargin value is inpixels. Outer Margin: Use OuterMargin to get or set margin between the axis labels or the axis title if shown and the side away form the data view. TheOuterMargin value is in pixels. Stacking Ends Margin: Use StackingEndsMargin to get or set the margin at the end of the axis when stacked. StackingEndsMargin representsthe percentage of a character size and is based on the LabelFont used for the axis. A value of 0.5 is equal to half the size of a character.Force Stacking Use ForceStacking to force the Axis to behave as if it was stacked. Start Percent: Use StartPercent to get or set the starting position within the plot layout drawing area where the layout object is drawn. Thereference for 0% is the bottom or left of the data view and depends on the orientation of the layout object. The reference for 100% is the top orright of the data view and depends on the orientation of the layout object. Currently, only the axes support the StartPercent and StopPercentproperties. The legend, and tool bar ignore the StartPercent and StopPercent properties. Stop Percent: Use StopPercent to get or set the stopping position within the plot layout drawing area where the layout object is drawn. Thereference for 0% is the bottom or left of the data view and depends on the orientation of the layout object. The reference for 100% is the top orright of the data view and depends on the orientation of the layout object. Currently, only the axes support the StartPercent and StopPercentproperties. The legend, and tool bar ignore the StartPercent and StopPercent properties.

Axes CartesianFIGURE A.36

Example ofAxes Cartesian

Tab.

Style: Use MajorLength to get or set the axis major ticks length.

Value Meaning

ipcsNoneThis style formats the axis as a non-Cartesian style axis that is placed along the edge of the DataView. This is the defaultsetting and represents the original axis style of the Plot Components.

ipcsMasterThis style formats the axis as a master Cartesian axis. There must be one axis that has the ipcsMaster style set. A masterCartesian axis is centered along perpendicular sides of the DataView.

ipcsChild

This style formats the axis as a child Cartesian axis. A child Cartesian axis is positioned perpendicular to the opposite axistype specified by the CartesianChildRefAxisName property, and the position is specified by the CartesianChildRefValueproperty of the child Cartesian axis.

Table A.35

Iocomp Components – Plot Pack Manual Page 209 of 336

Page 222: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Child Ref Axis Name: Use CartesianChildRefAxisName to get or set the name of the Axis used for referencing the axis. The specified AxisName refers to the perpendicular axis scale that will be used to position this Child Cartesian Axis when using the CartesianChildRefValueproperty. This property only affects Axes that have their CartesianStyle set to ipcsChild. Child Ref Value: Use CartesianChildRefValue to get or set the position of a Child Cartesian Axis along it's perpendicular reference axisspecified by the CartesianChildRefAxisName property. This property only affects Axes that have their CartesianStyle set to ipcsChild.Layer: Specifies the Painting Layer Order of the Plot Object with respect to other Plot Objects.

Legend General

FIGURE A.37Example of

Legend GeneralTab.

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 Plot Object. When this property is set to TRUE, then the UIfunctionality (ability to move a scale, scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting this property to TRUE willnot 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 Objectis disabled. Note that this will override all other properties that affect the UI of this Plot Object. Note: when a Plot Object is disabled, the PlotObject will not “look disabled” like standard text boxes or labels. Only the UI will be disabled.Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object. Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object inyour particular application. Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will bedisabled.Column Spacing Specifies the spacing between columns in the legend.Column Font The font used in the Legend.Column Spacing: Use ColumnSpacing to get or set the spacing between columns in the legend. ColumnSpacing represents the percentage of acharacter size and is based on the Font 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 maximum channel name width allowed in the Legend before wordwrapping occurs. This property allows you to set a maximum width of the Channel Name column, allowing those channel names that exceed thiswidth to word-wrap to the next line.. Column Name Color Style

Value MeaningiplcncsFont The color used is determined by the Font property of the Legend.iplcncsChannelColor The color used is determined by the Color property of the Channel.iplcncsXAxisFontColor The color used is determined by the LabelsFont property of the XAxis associated with the Channel.iplcncsYAxisFontColor The color used is determined by the LabelsFont property of the YAxis associated with the Channel.Table A.36

Margin: Use OuterMarginLeft, OuterMarginRight, OuterMarginTop, or OuterMarginBottom to set the margin between the left, right, top, orbottom side edge of the control and the internal drawn elements. The values are specified in pixels. Background Transparent: Use the BackGroundTransparent property to specify whether the background behind the legend shows through. Background Color: Use BackGroundColor to get or set the background color of the legend. Selected Item Background Color: Use SelectedItemBackGroundColor to get or set the background color of selected items in the legend. Selected Item Font: The font of the selected item.

Page 210 of 336 Iocomp Components – Plot Pack Manual

Page 223: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Legend Columns

FIGURE A.38Example of

Legend ColumnsTab.

Titles Visible: Use ColumnTitlesVisible to specify whether the column titles are visible in the legend. Titles Font: Use ColumnTitlesFont to change the attributes of the column titles font. To change to a new font, specify a new IFontDisp object. Show Column Line: Use ShowColumnLine to specify whether the line column is shown in the legend. Show Column Marker: Use ShowColumnMarker to specify whether the marker column is 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 value column is shown in the legend. The value displayed is the lastx value added to the channel. The formatting of the text is control by the formatting of the X-Axis that the channel is using. Show Column Y-Value: Use ShowColumnYValue to specify whether the y value column is shown in the legend. The value displayed is the lasty value added to the channel. The formatting of the text is control by the formatting of the Y-Axis that the channel is using. Show Column Y-Max: Use ShowColumnYMax to specify whether the Y-Maximum Value for each channel is shown in the legend.Show Column Y-Min: Use ShowColumnYMin to specify whether the Y Minimum Value for each channel is shown in the legend. Show Column Y-Mean: Use ShowColumnYMean to specify whether the Y Mean Value for each channel is shown in the legend.Column Caption Title: Specifies the column title text for the legend’s "Title" column.Column Caption X-Axis Title: Specifies the column title text for the legend’s "XAxisTitle" column.Column Caption Y-Axis Title: Specifies the column title text for the legend’s "YAxisTitle" column.Column Caption X-Value: Specifies the column title text for the legend’s "XValue" column.Column Caption Y-Value: Specifies the column title text for the legend’s "YValue" column.Column Caption Y-Max: Specifies the column title text for the legend’s "YMax" column.Column Caption Y-Min: Specifies the column title text for the legend’s "YMin" column.Column Caption Y-Mean: Specifies the column title text for the legend’s "YMean" column.

If you change previous data points, the YMax, YMin, and YMean values will no longer be valid. To refresh these values if you changeprevious data points, call GetYMax, GetYMin, and/or GetYMean to force a recalculation of these values after making your changes.

Legend WrapFIGURE A.39

Example ofLegend Wrap

Tab.

Column Desired Count: Specifies the desired number of columns before wrapping the channel entries in the Legend.Column Auto Count Enable: Specifies whether the number of columns displayed in the Legend before wrapping the channel entries isautomatically determined.Column Auto Count Max: Specifies the maximum number of columns that the Automatic Column Count function will allow.Column Spacing Auto: Specifies whether the spacing between columns is automatically determined.Column Spacing Min: Specifies the spacing between channel columns in the Legend.

Iocomp Components – Plot Pack Manual Page 211 of 336

Page 224: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Row Desired Count: Specifies the desired number of rows before wrapping the channel entries in the Legend.Row Auto Count Enable: Specifies whether the number of rows displayed in the Legend before wrapping the channel entries is automaticallydetermined.Row Auto Count Max: Specifies the maximum number of rows that the Automatic Row Count function will allow.Row Spacing Auto: Specifies whether the spacing between rows is automatically determined.Row Spacing Min: Specifies the spacing between channel rows in the Legend.

Table General

FIGURE A.40Example of

Table GeneralTab.

Add Button: Adds a Table to the list Remove Button: Removes the selected Table from the list Name: Use Name to set the table’s name. This name can then be used to reference the object. There is no restrictions on the length of the name orthe characters used. Visible: Use the Visible property to show or hide a specific Object. Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a Plot Object. When this property is set to TRUE, then the UIfunctionality (ability to move a scale, scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting this property to TRUE willnot 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 Objectis disabled. Note that this will override all other properties that affect the UI of this Plot Object. Note: when a Plot Object is disabled, the PlotObject will not “look disabled” like standard text boxes or labels. Only the UI will be disabled.Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object. Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object inyour particular application.Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.Data Font: Use ColumnTitlesFont to change the font attributes of data contained in the Table "Cells". To change to a new font, specify a newTFont Object. To modify a font, change the value of the Color, Height, Name, Pitch, Size, or Style of the TFont Object.Column Titles Visible: Use the ColumnTitlesVisible property to specify whether the Column Titles are shown or not.Column Font: Specifies the font attributes of column titles in the Table.Column Spacing: Use ColumnSpacing to get or set the margin between each column of "cells" of the Table. ColumnSpacing represents thepercentage of a character size and is based on the DataFont used in the Table. A value of 0.5 is equal to half the width of a character.Row Spacing: Use RowSpacing to get or set the margin between each row of "cells" of the Table. RowSpacing represents the percentage of acharacter size and is based on the DataFont used in the Table. A value of 0.5 is equal to half the height of a character.Row Max: Use RowsMax to manually get or set the maximum number of rows of "cells" to show in the Table before displaying scroll bars.Specifying a value of 0 will enable the automatic display of scroll bars if not all of the rows can be displayed within the current size of the table.Margin: Use OuterMarginLeft, OuterMarginRight, OuterMarginTop, or OuterMarginBottom to set the margin between the left, right, top, orbottom side edge of the control and the internal drawn elements. The values are specified in pixels.

Page 212 of 336 Iocomp Components – Plot Pack Manual

Page 225: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Table Grid

FIGURE A.41Example of

Table Grid Tab.

Grid Lines Show: Use the GridLinesShow property to specify whether the Table Grid Lines are shown or not. Grid Lines Color: Use GridLinesColor to get or set the color of the Table Grid Lines. Grid Background Transparent: Use the GridBackGroundTransparent property to specify whether the background behind the Table showsthrough.Grid Background Color: Use Grid BackgroundColor to get or set the background color of the Cells contained within the Table Grid.

Table LayoutFIGURE A.42

Example ofTable Layout

Tab.

Start Percent: Specifies the starting position within the table layout drawing where the layout object is drawn.Stop Percent: Specifies the stopping position within the table layout drawing where the layout object is drawn.

ToolBarFIGURE A.43

Example ofToolBar Tab.

Visible: Shows or hide entire tool bar. Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a Plot Object. When this property is set to TRUE, then the UIfunctionality (ability to move a scale, scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting this property to TRUE willnot override other properties that affect the UI of this Plot Object.

Iocomp Components – Plot Pack Manual Page 213 of 336

Page 226: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

When this property is set to FALSE, then the UI functionality of the Plot Object is disabled. Note that this will override all other properties thataffect the UI of this Plot Object. Note: when a Plot Object is disabled, the Plot Object will not “look disabled” like standard text boxes or labels.Only the UI will be disabled.

Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object. Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object inyour particular application.

Note: when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.Flat Border: Specifies whether the tool bar has a raised or flat border.Flat Buttons: Specifies whether the tool bar buttons have a Flat or 3D look.Small Buttons: Specifies whether the tool bar buttons are small or large.Zoom In/Out Factor: Use ZoomInOutFactor to get or set the ToolBar Zoom button zoom factor. When your application user clicks on either theZoom In or Zoom Out buttons, or you use the tool bar methods DoButtonClickZoomIn or DoButtonClickZoomOut, the chart axes will be zoomedaccording to this factor.

When the ScaleType is set to Linear the scale factor to zoom in and out by 100% set the value to 2. To zoom in our out by 50% set the value to1.5. A setting of 1 will have no effect, and the zoom in and out capability will be disabled. When the ScaleType is set to Logarithmic this propertyhas no effect. Log based scales always zoom in our out by 100%, or by a factor of 2. Show: Determines whether a button is shown on the tool bar or not.

Button MeaningResume Button: Resumes tracking on ALL axes

Pause Button: Pauses tracking for ALL axes

Axes Mode Buttons: Changes the mode that the axes are in when 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 view area. Generates events that can be used by the programmer to reactto 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 for each channel are displayed in a hint window next to the cursor(s).

Edit Button: Brings up the Run-Time property editor for the user to change most control properties.

Copy Button: Copies the current component image to the Windows' clipboard.

Save Button: Brings up a dialog to allow the user to save chart data to currently supported file types.

Print Button: Allows user to print image of chart to printer. See Print properties for more information.Table A.37

Data View General

FIGURE A.44Example ofDataView

General Tab.

Enabled: Use the Enabled property to enable or disable the UI (User Interface) of a Plot Object. When this property is set to TRUE, then the UIfunctionality (ability to move a scale, scroll a list, click on buttons, etc) of the Plot Object is enabled. Note that setting this property to TRUE willnot 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 is disabled. Note that this will override all other properties thataffect the UI of this Plot Object. Note: when a Plot Object is disabled, the Plot Object will not “look disabled” like standard text boxes or labels.Only the UI will be disabled.

Page 214 of 336 Iocomp Components – Plot Pack Manual

Page 227: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Popup Enabled: Use the PopupEnabled property to enable or disable the Popup Menu of a Plot Object. The Popup Menu is shown when a userright-clicks on this Plot Object.

Setting this property to FALSE is useful if you don’t want the Popup Menu functionality of this Plot Object in your particular application. Note:when the Enabled property is set to FALSE, then this property will have no effect and the Popup will be disabled.Background Transparent: Use BackGroundTransparent to specify whether the background behind the data view shows through. Background Color: Use BackGroundColor to get or set the background color of the data view. Grid Show: Use GridXAxisName to get or the name of the X-Axis used for displaying X-Axis major and minor lines in the grid. UseGridLineShowXMajors and GridLineShowXMinors to specify which ticks are used to draw grid lines. Grid X-Axis Name: Use GridXAxisName to get or the name of the X-Axis used for displaying X-Axis major and minor lines in the grid. UseGridLineShowXMajors and GridLineShowXMinors 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 axis to ensure that the grid lines extend over the entire PlotData View area. If not, then the grid lines will only be drawn to the X-Axis specified, and will not be drawn to areas where the X-Axis has beenrestricted by the StartPercent and StopPercent properties of that Axis. Grid Y-Axis Name: Use GridXAxisName to get or the name of the Y-Axis used for displaying Y-Axis major and minor lines in the grid. UseGridLineShowYMajors and GridLineShowYMinors to specify which ticks are used to draw grid lines. Axes Control EnabledAxes Control Mouse Style

Value Meaning

ipacsBothBoth the X-Axis and Y-Axis scrolls/zooms when the user moves clicks on the DataView, holds down themouse button, and moves the mouse. The X-Axis will scroll/zoom

ipacsXAxis

Only the X-Axis scrolls/zooms when the user moves clicks on the DataView, holds down the mouse button,and moves the mouse. The X-Axis only scrolls when the mouse is moved horizontally. (Vertical if the X andY-Axes are reversed).

ipacsYAxis

Only the Y-Axis scrolls/zooms when the user moves clicks on the DataView, holds down the mouse button,and moves the mouse. The Y-Axis only scrolls when the mouse is moved vertically. (Horizontal if the X andY-Axes are reversed).

Table A.38

Axes Control Wheel Style

Value MeaningipacsBoth Both the X-Axis and Y-Axis scrolls/zooms when the user turns the mouse wheel.ipacsXAxis Only the X-Axis scrolls/zooms when the user turns the mouse wheel.ipacsYAxis Only the X-Axis scrolls/zooms when the user turns the mouse wheel.Table A.39

Data View Grid Lines X-Major

FIGURE A.45Example of

DataView GridLines Tab.

Color: Use to specify the overall/default color of the grid lines. You can override specific X-Axis and Y-Axis Major and Minor tick line settingsusing properties on the X-Majors, X-Minors, Y-Majors, and Y-Minors Tabs.Show Left: Specifies whether the left border grid line is shown. Show Right: Specifies whether the right border grid line is shown. Show Top: Specifies whether the top border grid line is shown. Show Bottom: Specifies whether the bottom border grid line is shown. Major Style: Use the GridLineMajorStyle property to get or set the line style of grid lines drawn from major ticks (major ticks from axesspecified by the GridXAxisName and GridYAxisName properties). You can override specific X-Axis and Y-Axis Major and Minor tick linesettings using properties on the X-Majors, X-Minors, Y-Majors, and Y-Minors Tabs.

Iocomp Components – Plot Pack Manual Page 215 of 336

Page 228: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Value MeaningipglsSolid A solid lineipglsDash A line made up of a series of dashesipglsDot A line made up of a series of dotsTable A.40

Minor Style: Use the GridLineMinorStyle property to get or set the line style of grid lines drawn from minor ticks (minor ticks from axesspecified by the GridXAxisName and GridYAxisName properties). You can override specific X-Axis and Y-Axis Major and Minor tick linesettings using properties on the X-Majors, X-Minors, Y-Majors, and Y-Minors Tabs.

Value MeaningipglsSolid A solid lineipglsDash A line made up of a series of dashesipglsDot A line made up of a series of dotsTable A.41

Layer: Specifies the Painting Layer Order of the Plot Object with respect to other Plot Objects.X-Major Show: Use to specify whether grid lines for this specific axis tick type are shown.X-Major Custom: Use to specify whether the below “Custom Properties” override the overall grid settings specified previously for this Axis ticktype. X-Major Custom Properties Color: Use to specify the grid line color for this Axis tick type.

X-Major Custom Properties Width: Use to specify the grid line width for this Axis tick type.X-Major Grid Line Style Use to specify the grid line style for this Axis tick type.

Value MeaningipglsSolid A solid lineipglsDash A line made up of a series of dashesipglsDot A line made up of a series of dotsTable A.42

Data View Grid Lines X-Minor

FIGURE A.46Example of

DataView GridLines Tab.

X-Minor Show: See Data View Grid Lines X-Major page 215 for more information.X-Minor Custom: See Data View Grid Lines X-Major page 215 for more information.X-Minor Custom Properties Color: See Data View Grid Lines X-Major page 215 for more information.X-Minor Custom Properties Width: See Data View Grid Lines X-Major page 215 for more information.X-Minor Grid Line Style See Data View Grid Lines X-Major page 215 for more information.

Page 216 of 336 Iocomp Components – Plot Pack Manual

Page 229: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix A - Plot Pack Property Editors

Data View Grid Lines Y-Major

FIGURE A.47Example of

DataView GridLines Tab.

Y-Major Show: See Data View Grid Lines X-Major page 215 for more information.Y-Major Custom: See Data View Grid Lines X-Major page 215 for more information.Y-Major Custom Properties Color: See Data View Grid Lines X-Major page 215 for more information.Y-Major Custom Properties Width: See Data View Grid Lines X-Major page 215 for more information.Y-Major Grid Line Style See Data View Grid Lines X-Major page 215 for more information.

Data View Grid Lines Y-Minor

FIGURE A.48Example of

DataView GridLines Tab.

Y-Minor Show: See Data View Grid Lines X-Major page 215 for more information.Y-Minor Custom: See Data View Grid Lines X-Major page 215 for more information.Y-Minor Custom Properties Color: See Data View Grid Lines X-Major page 215 for more information.Y-Minor Custom Properties Width: See Data View Grid Lines X-Major page 215 for more information.Y-Minor Grid Line Style See Data View Grid Lines X-Major page 215 for more information.

Iocomp Components – Plot Pack Manual Page 217 of 336

Page 230: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

Appendix B - Getting Started with Microsoft Visual Basic 6.0

TutorialOpen Visual Basic and select "Standard EXE" from the New Project wizard or select the "File/New Project" menu and then create a "Standard EXE project"as shown in FIGURE B.1.

FIGURE B.1To create a new project,

select "New Project" fromthe File menu, select

"Standard EXE", and thenpress OK.

Right-click on the component pallette and select "Components…" as shown in FIGURE B.2 or select "Components…" from the Project menu.

FIGURE B.2To make an ActiveX

component available for usewith your application, right-

click on your componentpallette and select"Components…".

Scroll down the list and place a check mark next to "Iocomp Plot Pack", as seen in FIGURE B.3 and click OK.

FIGURE B.3View of the available ActiveXcomponents on your computersystem. Select "Iocomp Plot

Pack" to make our PlotComponents available to your

application.

Page 218 of 336 Iocomp Components – Plot Pack Manual

Page 231: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

Click once on the iPlotX icon shown in FIGURE B.4.

FIGURE B.4To add a component tothe form, click on thecomponent icon in the

Visual Basic componentpallette.

Click and drag-out the component on your form to the size shown in FIGURE B.5 and FIGURE B.6. You can also drop a component on the form at thedefault size by double-clicking on the component icon in the toolbox.

FIGURE B.5Click and drag out the

component to the desiredsize.

FIGURE B.6View of an iPlotX

component on a VisualBasic form.

Iocomp Components – Plot Pack Manual Page 219 of 336

Page 232: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

Right-click on the component and select "Properties" as shown in FIGURE B.7

FIGURE B.7To open the iPlotX

Component’s CustomProperty Editor, right-click

on the component and select"Properties".

Click on the "X-Axes" tab. Change the Span property to "20". Change the Min property to "-10". Press the OK button as shown in FIGURE B.8. Noticethat the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to -10 (i.e. The right-hand label of the X-axis isnow 10 and the left-hand label is now -10).

FIGURE B.8View of the X-Axes Property

Editor Tab.

Insert a standard Button onto your dialog, as shown in FIGURE B.9. Double-click the button to generate the OnClick event handler for the button.

FIGURE B.9Add a button to your form.

Page 220 of 336 Iocomp Components – Plot Pack Manual

Page 233: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

Type the name of the component "iPlotX1" and then enter a ".". A list of valid sub-objects, properties, and methods will appear, as shown in FIGURE B.10.

FIGURE B.10To bring up an Intellisense listof sub-objects, properties ,and

methods for a component,press CTRL-SPACEBAR.

Select the Channel sub-object, type “(0)” and then enter a “.”. A list of valid properties and methods will appear for the channel as shown in FIGURE B.11.

FIGURE B.11Properties and Methods of the

Channel Sub-Object.

Select the Color property and then complete the line as follows…

Private Sub Command1_Click() iPlotX1.Channel(0).Color = vbYellowEnd Sub

Iocomp Components – Plot Pack Manual Page 221 of 336

Page 234: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

Now, add some data to the channel using the AddXY method. Type “iPlotX1.Channel(0).” as shown in FIGURE B.12.

FIGURE B.12To bring up an Intellisense listof sub-objects, properties ,and

methods for a component,press CTRL-SPACEBAR.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart…

Private Sub Command1_Click() iPlotX1.Channel(0).Color = vbYellow iPlotX1.Channel(0).AddXY -10, 5.5 iPlotX1.Channel(0).AddXY -5, 45.4 iPlotX1.Channel(0).AddXY 0, 85.8 iPlotX1.Channel(0).AddXY 5, 55.5 iPlotX1.Channel(0).AddXY 10, 22.2End Sub

Select the iPlotX component "iPlotX1" from the upper left-hand combo-box. Select the OnXAxisMinChange event from the combo box on the upper right-hand as shown in FIGURE B.13.

FIGURE B.13View of the Visual Basiccode window and the listof events for the iPlotX1

component.

Enter the code as shown in FIGURE B.14…

Private Sub iPlotX1_OnXAxisMinChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) Caption = iPlotX1.XAxis(Index).MinEnd Sub

Page 222 of 336 Iocomp Components – Plot Pack Manual

Page 235: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix B - Getting Started with Microsoft Visual Basic 6.0

FIGURE B.14View of the Visual Basic

code window and theiPlotX

OnXAxisMinChangeevent.

Press the F5 button to execute the program. When the button on the dialog is clicked, the Color property of the Channel #1 is set to yellow and 5 datapoints are added to the channel as shown in FIGURE B.15. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse buttondown, and dragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event thensets the caption of the dialog to the Min property of the X-Axis.

FIGURE B.15View of the running program.

Accessing HelpPlace your mouse cursor over the AddXY method and then press . This will open the Iocomp help on the AddXY method of the iPlotX component.Select the iPlotX1 component on the form and then press to open the overall help topic for the iPlotX component. Select a property in the Visual basicproperties window and press for help on the specific property.

Iocomp Components – Plot Pack Manual Page 223 of 336

Page 236: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

TutorialCreate a new Dialog-based MFC project that supports ActiveX controls as follow…

• Close any currently open workspace by selecting "Close Workspace" form the File menu• Select "New…" from the File Menu, as shown in FIGURE C.1. • Select "MFC AppWizard (exe)", and enter the project name as "IocompDispExample".• Click the OK button to continue.

FIGURE C.1To create a new MFC

Application, Select"New…" from the Filemenu, click on "MFC

AppWizard (exe), and thenenter a unique Project Name

in the edit box.

• Select a "Dialog based" type of application, as shown in FIGURE C.2.• Click the FINISH button to create the application.

FIGURE C.2MFC AppWizard,

showing the creation of aDialog based application.

• Click the OK button to close the information dialog as shown in FIGURE C.3.

FIGURE C.3MFC AppWizard, showing

the New ProjectInformation.

Page 224 of 336 Iocomp Components – Plot Pack Manual

Page 237: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Delete all of the buttons and label that were added to the dialog by the Visual C++ App Wizard, as shown in FIGURE C.4

FIGURE C.4Delete all controls added bythe Visual C++ App Wizard.

Right-click on the dialog and select "Insert ActiveX Control…" as shown in FIGURE C.5.

FIGURE C.5To add an ActiveX

component to your dialog,right-click on the dialog and

select "Insert ActiveXControl…".

Iocomp Components – Plot Pack Manual Page 225 of 336

Page 238: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Scroll down the list, select "iPlotX Control", and click on OK to add the control to the form as shown in FIGURE C.6.

FIGURE C.6Select the "iPlotX Control" from

the list of available ActiveXcomponents registered on your

computer system.

The component will then be displayed on the form as shown in FIGURE C.7

FIGURE C.7iPlotX component on

dialog.

Note: Sometimes Visual C++ doesn't update the metafile representation used during the design of your dialog, so you may need to resize or move thecomponent after you first insert it to force Visual C++ to update. This is only an issue at design-time, never at run-time.

Page 226 of 336 Iocomp Components – Plot Pack Manual

Page 239: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Right-click on the component and select "Properties iPlotX Control Object" as shown in FIGURE C.8…

FIGURE C.8To open the iPlotX

Component’s CustomProperty Editor, right-click

on the component and select"Properties iPlotX Control

Object".

Select the top-row "Control" tab and then the second-row "X-Axes" tab . Change the Span property to "20". Change the Min property to "-10". Press theOK button as shown in FIGURE C.9. Notice that the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to-10 (i.e. The right-hand label of the X-axis is now 10 and the left-hand label is now -10).

FIGURE C.9View of the X-Axes

Property EditorTab.

Right-click anywhere on your dialog or your C++ code window, and select "Class Wizard…" as shown in FIGURE C.10, or press the CTRL-W key to openthe Visual C++ Class Wizard…

FIGURE C.10Right-click on the dialog

or in your source codewindow and select"ClassWizard…"

Iocomp Components – Plot Pack Manual Page 227 of 336

Page 240: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Select the "Member Variables" tab, select the IDC value for the iPlotX component "IDC_IPLOTX1", and then click the "Add Variable…" button, as shownin FIGURE C.11…

FIGURE C.11To add a member variable, open theMFC ClassWizard, navigate to the"Member Variables" tab, select the

Control ID of the iPlotXComponent, and then click the "Add

Variable" button.

You will be prompted to generate wrapper files for the ActiveX component as shown in FIGURE C.12. Click the OK button to continue.

FIGURE C.12Create ActiveX

wrapper messagebox.

Simply accept the default generated classes and click on the OK button as shown in FIGURE C.13.

FIGURE C.13Confirmation of ActiveX wrapperauto-generated classes. Always

select the default settings and clickOK.

You will then be prompted to specify a Member Variable. Name the component "m_iPlotX1" as shown in FIGURE C.14. Click on the OK button to closethe “Add Member Variable” dialog and then click OK again to close the “MFC Class Wizard” dialog.

FIGURE C.14Specify a member variable

name for this component. Thisname will be used in your

Visual C++ code to access thecomponent.

Page 228 of 336 Iocomp Components – Plot Pack Manual

Page 241: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Insert a standard button and edit box to your dialog from the Visual C++ control palette as shown in FIGURE C.15.

FIGURE C.15Add a standard Edit Box

and Button to your dialog.

Right-click anywhere on your dialog or your C++ code window, and select "Class Wizard…" or press the CTRL-W key to open the Visual C++ ClassWizard. Select the “Member Variables” tab, click on the IDC value of the Edit Box “IDC_BUTON1”, and then click on the “Add Variable...” button.Create a member variable for the Edit Box, naming it "m_Edit1" and as Variable type "double", as shown in FIGURE C.16. Click on the OK button to closethe dialog and then click the OK button to close the MFC Class Wizard dialog.

FIGURE C.16Add a member variable for the

Edit Control, naming it"m_Edit1" and of Variable type

"double".

Double-click the button and the code window will open up to allow you to add the event handler code. Select the OK button when prompted as shown inFIGURE C.17.

FIGURE C.17Add Member Function Dialog for

Button OnClick event. Acceptdefault name by clicking on the OK

button.

Iocomp Components – Plot Pack Manual Page 229 of 336

Page 242: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Type in the member variable of the ActiveX component "m_iPlotX1", and then type a ".". A list of valid methods will appear, as shown in FIGURE C.18.

FIGURE C.18To bring up an Intellisense

listing of methods for acomponent member

variable, press CTRL-SPACEBAR.

Select the GetChannel method, type “(0)” and then enter a “.”. A list of valid methods will appear for the channel as shown in FIGURE C.19.

FIGURE C.19To bring up an Intellisense

listing of methods for acomponent member

variable, press CTRL-SPACEBAR.

Select the SetColor method and then complete the line as follows…

Example OnButton1void CIocompDispExampleDlg::OnButton1(){ m_iPlotX1.GetChannel(0).SetColor(0x0000ffff); //yellow}

Page 230 of 336 Iocomp Components – Plot Pack Manual

Page 243: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Since we will be accessing the channel and axis sub-objects of the component, we will need to add include statement to the top of our cpp file to referencethese sub-objects. Type #include "iplotchannelx.h" and #include "iplotaxisx.h" as shown in FIGURE C.20...

FIGURE C.20Include statements at top of

the form's CPP file..

Table C.1 shows the wrapper and sub-object header files that are created by Visual C++ for Plot Pack components that you might add to your project.Include the following sub-object “.h” files in an #include statement at the top of each file where you will be accessing that sub-object. Also listed are fontand picture header files if you are accessing font or image properties/methods...

iPlotX Control[CiPlotX Class]

iXYPlotX Control[CiXYPlotX Class]

iScopeX Control[CiScopeX Class]

font.h font.h iscopechannelx.hpicture.h picture.h iscopedisplayx.hiplotannotationx.h iplotannotationx.h iscopetimebasex.hiplotaxisx.h iplotaxisx.h iscopetoolbarx.hiplottoolbarx.h iplottoolbarx.h iscopetriggerx.hiplotdatacursorx.h iplotdatacursorx.hiplotdataviewx.h iplotdataviewx.hiplotlabelx.h iplotlabelx.hiplotlegendx.h iplotlegendx.hiplotlimitx.h iplotlimitx.hiplottablecolumnx.h iplottablecolumnx.hiplottablex.h iplottablex.hiplotchannelx.h ixyplotchannelx.h

Table C.1*Items highlighted in green illustrate the only file differences between the iPlotX and iXYPlotX controls.**In older versions of our Plot Pack Components, some of the files above may not exist for your particular version. For example, version 3.0.0SP0 doesn't include the "iplottable.h" file listed above, only Versions 3.0.2 SP1 and higher do.

Iocomp Components – Plot Pack Manual Page 231 of 336

Page 244: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Now, add some data to the channel using the AddXY method. Type “m_iPlotX1.GetChannel(0).” as shown in FIGURE C.21.

FIGURE C.21To bring up an Intellisense

listing of methods for acomponent member variable,

press CTRL-SPACEBAR.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart…

Example OnButton1void CIocompDispExampleDlg::OnButton1(){ m_iPlotX1.GetChannel(0).SetColor(0x0000ffff); //yellow m_iPlotX1.GetChannel(0).AddXY(-10, 5.5); m_iPlotX1.GetChannel(0).AddXY(-5, 45.4); m_iPlotX1.GetChannel(0).AddXY(0, 85.8); m_iPlotX1.GetChannel(0).AddXY(5, 55.5); m_iPlotX1.GetChannel(0).AddXY(10, 22.2);}

Right-click anywhere on your dialog or your C++ code window, and select "Class Wizard…" or press the CTRL-W key to open the Visual C++ ClassWizard. Select the "Message Maps" tab, select the Object ID for the iPlotX Component from the list of "Object IDs". In the list box to the right, select theOnXAxisMinChange event and then press the Add Function button as shown in FIGURE C.22.

FIGURE C.22To map an event message to amember function (a.k.a. EventHandler), select the Object ID,then select the Message to map,then click the "Add Function…"

button.

Accept the default Member function name and press the OK button as shown in FIGURE C.23…

FIGURE C.23Specify a name for theEvent Handler member

function.

Page 232 of 336 Iocomp Components – Plot Pack Manual

Page 245: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Select the "OnOnXAxisMinChangeIplotx1" function in the "Member functions" list box and then click on the Edit Code button as shown in FIGURE C.24.

FIGURE C.24After adding the member

function, it will be listed inthe lower "Member

functions" list box. Double-click or select and click "Edit

Code" to edit the EventHandler code.

Enter the code as shown in FIGURE C.25…

Example OnXAxisMinChangevoid CIocompDispExampleDlg::OnOnXAxisMinChangeIplotx1(long Index, double OldValue, double NewValue){ m_Edit1 = m_iPlotX1.GetXAxis(Index).GetMin(); UpdateData(FALSE);}

FIGURE C.25View of the Visual C++ code

window and the iPlotXOnXAxisMinChange event.

Iocomp Components – Plot Pack Manual Page 233 of 336

Page 246: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix C - Getting Started with Microsoft Visual C++ 6.0 (Disp Interface)

Press the F5 button to execute the program as shown in FIGURE C.26. When the button on the dialog is clicked, the Color property of the Channel #1 isset to yellow and 5 data points are added to the channel. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse button down,and dragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event then sets thecaption of the dialog to the Min property of the X-Axis.

FIGURE C.26View of running program.

Accessing HelpIf you chose to integrate our HTML help files with your MSDN Help collection, you will be able to open our help file directly from the Visual C++ codeeditor window as follows…

Place your mouse cursor over the SetColor method and then press . This will open the Iocomp help on the Color property of the Channel object.

If you chose not to integrate our HTML help files, you can manually open our ActiveX help files from the “Start/All Programs/Iocomp/Help Files” as shown7in FIGURE C.27…

FIGURE C.27Iocomp Start Menu Items

and Shortcuts.

Page 234 of 336 Iocomp Components – Plot Pack Manual

Page 247: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

TutorialCreate a new Dialog-based MFC project that supports ActiveX controls by following these steps…

1. Close any currently open workspace by selecting "Close Workspace" form the File menu2. Select "New…" from the File Menu, as shown in FIGURE D.1. 3. Select "MFC AppWizard (exe)", and enter the project name as "IocompiDispatchExample".4. Click the OK button to continue.

FIGURE D.1To create a new MFC

Application, Select "New…"from the File menu, click on"MFC AppWizard (exe), andthen enter a unique Project

Name in the edit box.

5. Select "Dialog based", as shown in FIGURE D.2.6. Click the FINISH button to create the application.

FIGURE D.2MFC AppWizard, showing

the creation of a Dialogbased application.

7. Click the OK button to close the information dialog as shown in FIGURE D.3.

FIGURE D.3MFC AppWizard, showing the

New Project Information.

Iocomp Components – Plot Pack Manual Page 235 of 336

Page 248: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Delete all of the buttons and label that were added to the dialog by the Visual C++ App Wizard, as shown in FIGURE D.4

FIGURE D.4Delete all controls added by the

Visual C++ App Wizard.

Open the "Tools" and "Options…" menu. Select the "Directories" tab, select a blank line, and add the directory where our ActiveX files are stored, usuallyin your system directory (For example, in “C:\Windows\System32” or “C:\Winnt\System32”), as shown in FIGURE D.5 if the path has not already beenadded. Click the OK button to close the dialog.

FIGURE D.5The Visual C++ Options dialogshowing adding the WindowsSystem32 directory (i.e. the

default location of our ActiveXTLB files) to the list of Include

file paths.

Right-click on the dialog and select "Insert ActiveX Control…" as shown in FIGURE D.6…

FIGURE D.6To add an ActiveX componentto your project, right-click onyour dialog and select "Insert

ActiveX Control".

Page 236 of 336 Iocomp Components – Plot Pack Manual

Page 249: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Scroll through the list and select "iPlotX Control" as shown in FIGURE D.7 and click the OK button to insert the control.

FIGURE D.7Select the "iPlotX Control"

from the list of availableActiveX components

registered on your computersystem.

Note: Sometimes Visual C++ doesn't update the metafile representation used during the design of your dialog, so you may need to resize or move thecomponent after you first insert it to force Visual C++ to update. This is only an issue at design-time, never at run-time.

Notice the second combo box in FIGURE D.8 inside the Visual C++ toolbar; this is the IDC name of the component, by default "IDC_IPLOTX1". You willgenerally not use this name in your code, but will create a CCOM pointer variable in your project so that you can access the control through code.

FIGURE D.8The component will

automatically be droppedinto your dialog.

Right-click on the component and select "Properties iPlotX Control Object", as shown in FIGURE D.9.

FIGURE D.9To open the iPlotX

Component’s CustomProperty Editor, right-click

on the component andselect "Properties iPlotX

Control Object".

Iocomp Components – Plot Pack Manual Page 237 of 336

Page 250: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Select the top-row "Control" tab and then the second-row "X-Axes" tab . Change the Span property to "20". Change the Min property to "-10". Press theOK button as shown in FIGURE D.10. Notice that the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to-10 (i.e. The right-hand label of the X-axis is now 10 and the left-hand label is now -10).

FIGURE D.10View of the X-AxesProperty Editor Tab.

Open the dialog's cpp file by double-clicking on a blank portion of the dialog if you are in the resource view. You can also open cpp file for this dialog byclicking on the "File View" tab, open the "Source Files" treeview list, and select the cpp for your project (for a project named "Project123", the Dialog cppfile is generally called "Project123Dlg.cpp".

Add the following code to the top of your dialog’s .cpp file, as shown in FIGURE D.11…

Example include #import "iPlotLibrary.tlb" named_guids #include "atlbase.h" extern CComModule _Module;

FIGURE D.11Example showing the additionof the above import, include,and extern directives to the

Dialog's CPP file.

Also, add the above code to your dialog's .h (header) file, as shown in FIGURE D.12. To open the header file for this dialog, right-click on the line #include“IocompiDispatchExampleDlg.h” and select “Open Document IocompiDispatchExampleDlg.h”. You can also open the header file by clicking on the "FileView" tab, opening the "Header Files" treeview list, and selecting the header for your project (for a project named "IocompiDispatchExample", the Dialogheader file is generally called "IocompiDispatchExampleDlg.h"

Page 238 of 336 Iocomp Components – Plot Pack Manual

Page 251: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

FIGURE D.12Example showing the addition of

the above import, include, andextern directives to the Dialog's

Header file.

Add the following to the public section of your dialog's class declaration in the dialog's .h file as shown in FIGURE D.13…

Example class declaration CComPtr<iPlotLibrary::IiPlotX> iPlotX1;

FIGURE D.13Example showing the

addition of the above import,include, and extern directives

to the Dialog's Header file.

Add the following code to the OnInitDialog message handler located in your dialog's .cpp file, as shown in FIGURE D.14 and the table below…

Example OnInitDialog CWnd* m_Wnd; IUnknown* m_iUnknown; //Get interface to iPlotX Component m_Wnd = GetDlgItem(IDC_IPLOTX1); m_iUnknown = m_Wnd->GetControlUnknown(); m_iUnknown->QueryInterface (__uuidof(iPlotLibrary::IiPlotX), (LPVOID*)&iPlotX1);

Iocomp Components – Plot Pack Manual Page 239 of 336

Page 252: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

FIGURE D.14Example showing CCOM pointerassignment in the OnInitDialog

message handler.

Insert a standard Button and Edit Box onto your dialog, as shown in FIGURE D.15…

FIGURE D.15Add a standard Edit Box and

Button to your dialog.

Right-click anywhere on your dialog or your C++ code window, and select "Class Wizard…" or press the CTRL-W key to open the Visual C++ ClassWizard. Select the “Member Variables” tab, click on the IDC value of the Edit Box “IDC_BUTON1”, and then click on the “Add Variable...” button.Create a member variable for the Edit Box, naming it "m_Edit1" and as Variable type "double", as shown in FIGURE D.16… Click the OK button to acceptyour settings. Click the OK button to close the MFC Class Wizard.

FIGURE D.16Add a member variable for the EditControl, naming it "m_Edit1" and

of Variable type "double".

Page 240 of 336 Iocomp Components – Plot Pack Manual

Page 253: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Double-click the button to open the dialog's cpp code editor window and to create the OnClick event handler for the button. Select the OK button whenprompted as shown in FIGURE D.17.

FIGURE D.17Add Member Function Dialog for Button

OnClick event. Accept default name by clickingon the OK button.

Type in the name of the CCOM pointer to the component "iPlotX1" and then type "->". A list of valid properties and methods will appear, as shown inFIGURE D.18…

FIGURE D.18To bring up an Intellisense

listing of methods for acomponent member variable,

press CTRL-SPACEBAR.

Select the Channel property, type “[0]” and then enter a “->”. A list of valid methods will appear for the channel as shown in FIGURE D.19

FIGURE D.19To bring up an Intellisense

listing of methods for acomponent member variable,

press CTRL-SPACEBAR.

Iocomp Components – Plot Pack Manual Page 241 of 336

Page 254: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Select the Color property and then complete the line as follows…

Example OnButton1void CIocompiDispatchExampleDlg::OnButton1() { iPlotX1->Channel[0]->Color = 0x0000ffff; //yellow}

Now, add some data to the channel using the AddXY method. Type “iPlotX1->Channel[0]->” as shown in FIGURE D.20

FIGURE D.20To bring up an Intellisense

listing of methods for acomponent member variable,

press CTRL-SPACEBAR.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart…

Example OnButton1

void CIocompiDispatchExampleDlg::OnButton1(){ iPlotX1->Channel[0]->Color = 0x0000ffff; //yellow iPlotX1->Channel[0]->AddXY(-10, 5.5); iPlotX1->Channel[0]->AddXY(-5, 45.4); iPlotX1->Channel[0]->AddXY(0, 85.8); iPlotX1->Channel[0]->AddXY(5, 55.5); iPlotX1->Channel[0]->AddXY(10, 22.2);}

Right-click anywhere on your dialog or your C++ code window, and select "Class Wizard…" or press the CTRL-W key to open the Visual C++ ClassWizard. In the "Message Maps" tab, select the Object ID for the iPlotX Component "IDC_IPLOTX1" from the list of "Object IDs". Select theOnXAxisMinChange event and then click the Add Function button as shown in FIGURE D.21…

FIGURE D.21To map an event message to a

member function (a.k.a.Event Handler), select theObject ID, then select theMessage to map, and then

click the "Add Function…"button.

Page 242 of 336 Iocomp Components – Plot Pack Manual

Page 255: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Accept the default Member function name by pressing the OK button as shown in FIGURE D.22…

FIGURE D.22Specify a name for the Event

Handler member function.

Select the "OnOnXAxisMinChangeIplotx1" function in the "Member functions" list box and then click on the Edit Code button as shown in FIGURE D.23.

FIGURE D.23After adding the member

function, it will be listed in thelower "Member functions" list

box. Double-click or select andclick "Edit Code" to edit the

Event Handler code.

Enter the code as shown in FIGURE D.24…

Example OnXAxisMinChangevoid CIocompiDispatchExampleDlg::OnOnXAxisMinChangeIplotx1(long Index, double OldValue, double NewValue){ m_Edit1 = iPlotX1->XAxis[Index]->Min; UpdateData(FALSE);}

FIGURE D.24View of the Visual C++ code

window and the iPlotXOnXAxisMinChange event.

This event fires every time theMin property of Axis changes.

Iocomp Components – Plot Pack Manual Page 243 of 336

Page 256: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix D - Getting Started with Microsoft Visual C++ 6.0 (iDispatch)

Press the F5 button to execute the program as shown in FIGURE D.25. When the button on the dialog is clicked, the Color property of the Channel #1 isset to yellow and 5 data points are added to the channel. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse button down,and dragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event then sets thecaption of the dialog to the Min property of the X-Axis.

FIGURE D.25View of running

program.

Accessing HelpIf you chose to integrate our HTML help files with your MSDN Help collection, you will be able to open our help file directly from the Visual C++ codeeditor window as follows…

Place your mouse cursor over the Color property of the channel and then press . This will open the Iocomp help on the Color property of the Channelobject.

If you chose not to integrate our HTML help files, you can manually open our ActiveX help files from the “Start/All Programs/Iocomp/Help Files” as shown7in FIGURE D.26…

FIGURE D.26Iocomp Start MenuItems and Shortcuts.

Page 244 of 336 Iocomp Components – Plot Pack Manual

Page 257: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

Appendix E - Getting Started with Microsoft .NET (VB.NET)

TutorialSelect "File/Close Solution" if you currently have a Solution or Project open. Select "New/Project…" from the File menu. Select the Windows Applicationtemplate from the "Visual Basic Projects" folder, and specify the name of the project as “Iocomp VB Example Project”, as shown in FIGURE E.1. Click onthe OK button to close the dialog.

FIGURE E.1To create a new VB project,

select "New/Project" from theFile menu, and then select the

"Windows Application" templatefrom the "Visual Basic Projects"

folder.

Select the General tab and then right-click on the component toolbox and select "Add/Remove Items…" if you are using Visual Studio.NET 2003 as shownin FIGURE E.2. If you are using Visual Studio.Net 2002, select "Customize Toolbox…".

FIGURE E.2To make an ActiveX

component available for usewith your application, right-

click on your componenttoolbox and select "Customize

Toolbox…".

Iocomp Components – Plot Pack Manual Page 245 of 336

Page 258: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

Scroll down the list and place a check mark next to "iPlotX Control", as shown in FIGURE E.3, and then press the OK button to close the dialog.

FIGURE E.3View of the available ActiveX(COM) components on your

computer system. Select"iPlotX Control" to make the

iPlotX Component available toyour application. The

component will then show up inthe .NET component toolbox.

Click once on the iPlotX icon as shown in FIGURE E.4.

FIGURE E.4To add a component to the

form, click on thecomponent icon in the .NET

component toolbox.

Click and drag out the component on your form as shown in FIGURE E.5 and FIGURE E.6…

FIGURE E.5Click and drag out the

component to the desiredsize

Page 246 of 336 Iocomp Components – Plot Pack Manual

Page 259: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

FIGURE E.6View of an iAngularGaugeX1component on a .NET form.

The component is named"AxiAngularGaugeX1" asshow in the .NET property

editor.

Right-click on the component and select "Properties" as shown in FIGURE E.7.

FIGURE E.7To open the iPlotX

Component’s CustomProperty Editor, right-click

on the component and select"Properties".

Select the second-row "Control" tab. Click on the "X-Axes" tab. Change the Span property to "20". Change the Min property to "-10". Press the OKbutton as shown in FIGURE E.8. Notice that the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to -10(i.e. The right-hand label of the X-axis is now 10 and the left-hand label is now -10).

FIGURE E.8View of the X-Axes Property

Editor Tab.

Iocomp Components – Plot Pack Manual Page 247 of 336

Page 260: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

Add a standard button onto your dialog, as shown in FIGURE E.9.

FIGURE E.9Add a button to your form,

naming it "Button1".

Type the name of the component "AxiPlotX1" and then enter a ".". A list of properties, and methods will appear, as shown in FIGURE E.10…

FIGURE E.10To bring up an Intellisense

listing of properties andmethods for a component,press CTRL-SPACEBAR.

Select the get_Channel method, type “(0)”, and then enter a “.”. A list of properties and methods will appear for the channel as shown in FIGURE E.11…

FIGURE E.11To bring up an

Intellisense listing ofproperties and methodsfor a component, pressCTRL-SPACEBAR.

Page 248 of 336 Iocomp Components – Plot Pack Manual

Page 261: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

Select the Color property and then complete the line as shown in FIGURE E.12…

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxiPlotX1.get_Channel(0).Color = Convert.ToUInt32(ColorTranslator.ToOle(Color.Yellow))End Sub

Now, add some data to the channel using the AddXY method. Type “AxiPlotX1.get_Channel(0).” as shown in FIGURE E.12

FIGURE E.12To bring up an Intellisense

listing of properties andmethods for a component,press CTRL-SPACEBAR.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart as…

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxiPlotX1.get_Channel(0).Color = Convert.ToUInt32(ColorTranslator.ToOle(Color.Yellow)) AxiPlotX1.get_Channel(0).AddXY(-10, 5.5) AxiPlotX1.get_Channel(0).AddXY(-5, 45.4) AxiPlotX1.get_Channel(0).AddXY(0, 85.8) AxiPlotX1.get_Channel(0).AddXY(5, 55.5) AxiPlotX1.get_Channel(0).AddXY(10, 22.2)End Sub

Select AxiPlotX1 from the left-hand combo box just below the “Form1.vb” tab. Select the "OnXAxisMinChange" event from the combo-box on the right, asshown in FIGURE E.13, to generate the event handler…

FIGURE E.13View of the VB.NET code

window and the list of iPlotXevents.

Enter the code as shown in FIGURE E.14…

Private Sub AxiPlotX1_OnXAxisMinChange(ByVal sender As Object, ByVal e As AxiPlotLibrary.IiPlotXEvents_OnXAxisMinChangeEvent) _HandlesAxiPlotX1.OnXAxisMinChange Text = AxiPlotX1.get_XAxis(e.index).MinEnd Sub

Iocomp Components – Plot Pack Manual Page 249 of 336

Page 262: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix E - Getting Started with Microsoft .NET (VB.NET)

FIGURE E.14View of the VB.NET code windowand the iPlotX OnXAxisMinChangeevent. This event fires every time the

Min property of axis changes.

Press the F5 button to execute the program. When the button on the dialog is clicked, the Color property of the Channel #1 is set to yellow and 5 datapoints are added to the channel as shown in FIGURE B.15. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse buttondown, and dragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event thensets the caption of the dialog to the Min property of the X-Axis.

FIGURE E.15View of the running

program.

Accessing HelpVisual Studio.NET does not support the older WinHelp or HTML Help files that were supported by Visual Studio 6 for ActiveX components.

You can manually open our ActiveX help files from the “Start/All Programs/Iocomp/Help Files” as shown in FIGURE E.16…

FIGURE E.16Iocomp Start MenuItems and Shortcuts.

Page 250 of 336 Iocomp Components – Plot Pack Manual

Page 263: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

Appendix F - Getting Started with Microsoft .NET (C#.NET)

TutorialSelect "File/Close Solution" if you currently have a Solution or Project open. Select "New/Project…" from the File menu. Select the Windows Applicationtemplate from the Visual C# Projects folder, and name the project “Iocomp CSharp Example Project”, as shown in FIGURE F.1…

FIGURE F.1To create a new C# project, select"New/Project" from the File menu,

and then select the "WindowsApplication" template from the

"Visual C# Projects" folder.

Select the General tab and then right-click on the component toolbox and select "Add/Remove Items…" if you are using Visual Studio.NET 2003 as shownin FIGURE F.2. If you are using Visual Studio.Net 2002, select "Customize Toolbox…".

FIGURE F.2To make an ActiveX

component available for usewith your application, right-

click on your componenttoolbox and select

"Add/Remove Items…".

Scroll down the list and place a check mark next to "iPlotX Control", as shown in FIGURE F.3. Press the OK button to close the dialog.

FIGURE F.3View of the available ActiveX (COM)components on your computer system.

Select "iPlotX Control" to make theiPlotX Component available to your

application. The component will thenshow up in the .NET component

toolbox.

Iocomp Components – Plot Pack Manual Page 251 of 336

Page 264: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

Click once on the iPlotX icon as shown in FIGURE F.4.

FIGURE F.4To add a component to the

form, click on the componenticon in the .NET component

toolbox.

Click and drag out the component on your form as shown in FIGURE F.5 and FIGURE F.6…

FIGURE F.5Click and drag out the

component to the desiredsize.

FIGURE F.6View of an iPlotX1

component on a .NET form.The component is named

"axiPlotX1" as show in the .NET property editor.

Page 252 of 336 Iocomp Components – Plot Pack Manual

Page 265: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

Right-click on the component and select "Properties" as shown in FIGURE F.7.

FIGURE F.7To open the iPlotX

Component’s CustomProperty Editor, right-click

on the component and select"Properties".

Select the second-row "Control" tab. Click on the "X-Axes" tab. Change the Span property to "20". Change the Min property to "-10". Press the OK buttonas shown in FIGURE F.8. Notice that the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to -10 (i.e. Theright-hand label of the X-axis is now 10 and the left-hand label is now -10).

FIGURE F.8View of the General

ComponentProperty Editor Tab.

Insert a standard button onto your dialog, as shown in FIGURE F.9

FIGURE F.9Add a button to your

form, naming it"button1".

Iocomp Components – Plot Pack Manual Page 253 of 336

Page 266: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

Type the name of the component "axiPlotX1" and then enter a ".". A list of properties, and methods will appear, as shown in FIGURE F.10…

FIGURE F.10To bring up an Intellisense

listing of properties andmethods for a component,press CTRL-SPACEBAR.

Select the get_Channel method, type “(0)”, and then enter a “.”. A list of properties and methods will appear for the channel as shown in FIGURE F.11…

FIGURE F.11To bring up an Intellisense

listing of properties andmethods for a component,press CTRL-SPACEBAR.

Select the Color property and then complete the line as shown in FIGURE F.12…

private void button1_Click(object sender, System.EventArgs e){ axiPlotX1.get_Channel(0).Color = Convert.ToUInt32(ColorTranslator.ToOle(Color.Yellow));}

Page 254 of 336 Iocomp Components – Plot Pack Manual

Page 267: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

Now, add some data to the channel using the AddXY method. Type “axiPlotX1.get_Channel(0).” as shown in FIGURE F.12…

FIGURE F.12To bring up an Intellisense

listing of properties andmethods for a component,press CTRL-SPACEBAR.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart as…

private void button1_Click(object sender, System.EventArgs e){ axiPlotX1.get_Channel(0).Color = Convert.ToUInt32(ColorTranslator.ToOle(Color.Yellow)); axiPlotX1.get_Channel(0).AddXY(-10, 5.5); axiPlotX1.get_Channel(0).AddXY(-5, 45.4); axiPlotX1.get_Channel(0).AddXY(0, 85.8); axiPlotX1.get_Channel(0).AddXY(5, 55.5); axiPlotX1.get_Channel(0).AddXY(10, 22.2);}

To create an event handler for the iPlotX Component, select the “Form1.cs [Design]” tab, and click on the button in the Properties window, as shown inFIGURE F.13. Double-click in the combo box next to the OnXAxisMinChange event and the .NET IDE will automatically create the event handler for you.

FIGURE F.13View of the C#.NET

properties list of events forthe iPlotX control.

Enter the code as shown in FIGURE F.14…

private void axiPlotX1_OnXAxisMinChange(object sender, AxiPlotLibrary.IiPlotXEvents_OnXAxisMinChangeEvent e){ Text = axiPlotX1.get_XAxis(e.index).Min.ToString();}

Iocomp Components – Plot Pack Manual Page 255 of 336

Page 268: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix F - Getting Started with Microsoft .NET (C#.NET)

FIGURE F.14View of the C#.NET code

window and the iPlotXOnXAxisMinChange event.

This event fires every time theMin property of the axis

changes.

Press the F5 button to execute the program. When the button on the dialog is clicked, the Color property of the Channel #1 is set to yellow and 5 data pointsare added to the channel as shown in FIGURE F.15. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse button down, anddragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event then sets thecaption of the dialog to the Min property of the X-Axis.

FIGURE F.15View of the running

program.

Accessing HelpVisual Studio.NET does not support the older WinHelp or HTML Help files that were supported by Visual Studio 6 for ActiveX components.

You can manually open our ActiveX help files from the “Start/All Programs/Iocomp/Help Files” as shown in FIGURE F.16…

FIGURE F.16Iocomp Start Menu Items and

Shortcuts.

Page 256 of 336 Iocomp Components – Plot Pack Manual

Page 269: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

Appendix G - Getting Started with Delphi (Windows/Linux)

TutorialFirst close any project that you may have open. Select the New/Application menu as shown in FIGURE G.1.

FIGURE G.1To create a new project,

Select "New/Application"from the File Menu.

Scroll through the tabs in the component palette and look for "Iocomp Plot". Click once on the iPlot icon as shown in FIGURE G.2.

FIGURE G.2Example of the Iocomp Plot

tab showing the iPlotcomponent.

Click and drag out the component on your form as Shown in FIGURE G.3 and FIGURE G.4 or double-click the component.

FIGURE G.3Click and drag out the

component to the desiredsize.

Iocomp Components – Plot Pack Manual Page 257 of 336

Page 270: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

FIGURE G.4View of a iPlot component

on a Delphi Form.

If you are using the evaluation version of our components, you will need to configure your project to use "Packages". If you are using the Full Version ofour product, skip ahead to the next section referring to FIGURE G.6.

To configure your project to use packages, open your "Project/Options…" menu, select the "Packages" tab, and then make sure the "Build with runtimepackages" checkbox is checked. Also, ensure that our package is listed in the edit box below the "Build with runtime packages" checkbox as shown inFIGURE G.5. If not, please add the appropriate package for your compiler language and version as shown in Table G.2 and Table G.3…

WindowsCompiler/IDE Package NameDelphi 4 iocomp40Delphi 5 iocomp50Delphi 6 VCL iocomp60Delphi 6 CLX iocomp60clxDelphi 7 VCL iocomp70Delphi 7 CLX iocomp70clxTable G.2

LinuxCompiler/IDE Package NameKylix 1 iocomp10clxKylix 2 iocomp20clxKylix 3 Delphi Edition iocomp30clx

Table G.3

FIGURE G.5View of the Delphi 7 Project’sPackage options tab. Check

the “Build with runtimepackages” option and be sure

the appropriate Iocomppackage is in the edit box

below..

Page 258 of 336 Iocomp Components – Plot Pack Manual

Page 271: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

Right-click on the component and select "Edit…" as shown in FIGURE G.6 or double-click on the component to bring up the component’s custom propertyeditor.

FIGURE G.6To open the iPlot

Component’s CustomProperty Editor, right-click

on the component and select"Edit…".

Click on the "X-Axes" tab. Change the Span property to "20". Change the Min property to "-10". Press the OK button as shown in FIGURE G.7. Noticethat the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to -10 (i.e. The right-hand label of the X-axis isnow 10 and the left-hand label is now -10).

FIGURE G.7View of the X-AxesProperty Editor Tab.

Insert a standard button onto your dialog, as shown in FIGURE G.8.

FIGURE G.8Add a button to your form.

Iocomp Components – Plot Pack Manual Page 259 of 336

Page 272: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

Double-click the button on the form to generate the OnClick event handler for the button. Type in the name of the component "iPlot1" and then type a ".". Alist of valid properties, methods, and events will appear, as shown in FIGURE G.9…

FIGURE G.9To bring up a listing ofproperties and methodsfor a component, pressCTRL-SPACEBAR.

Double-click the button on the form to generate the OnClick event handler for the button. Type in the name of the component "iPlot1" and then type a ".". Alist of valid properties, methods, and events will appear, as shown in FIGURE G.10…

FIGURE G.10To bring up a listing of

properties and methods for acomponent, press CTRL-

SPACEBAR.

Select the Channel sub-object, type “[0]” and then enter a “.”. A list of valid properties and methods will appear for the channel as shown in FIGURE G.11.

FIGURE G.11Properties and Methods ofthe Channel Sub-Object.

Select the Color property and then complete the line as follows…

procedure TForm1.Button1Click(Sender: TObject);begin iPlot1.Channel[0].Color := clYellow;end;

Page 260 of 336 Iocomp Components – Plot Pack Manual

Page 273: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

Now, add some data to the channel using the AddXY method. Type “iPlotX1.Channel(0).” as shown in FIGURE G.12FIGURE B.12.

FIGURE G.12Properties and Methods ofthe Channel Sub-Object.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart…

procedure TForm1.Button1Click(Sender: TObject);begin iPlot1.Channel[0].Color := clYellow; iPlot1.Channel[0].AddXY(-10, 5.5); iPlot1.Channel[0].AddXY( -5, 45.4); iPlot1.Channel[0].AddXY( 0, 85.8); iPlot1.Channel[0].AddXY( 5, 55.5); iPlot1.Channel[0].AddXY( 10, 22.2);end;

To create an event handler for the iPlot Component, open the Object Inspector window, select the iPlot component from the combo box, and click on the"Events" tab. Find the OnXAxisMinChange event and double-click in the blank combo box area to the right, as shown in FIGURE G.13. This will causeC++ Builder to automatically create the event handler for you.

FIGURE G.13Object Inspector list of

available events for the iPlotcomponent.

Enter the code as shown in FIGURE G.14…

procedure TForm1.iPlot1XAxisMinChange(Index: Integer; OldValue, NewValue: Double);begin Caption = FloatToStr(iPlot1.XAxis[Index].Min);end;

Iocomp Components – Plot Pack Manual Page 261 of 336

Page 274: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix G - Getting Started with Delphi (Windows/Linux)

FIGURE G.14Object Inspector list ofavailable events for the

iPlot component.

Press the F5 button to execute the program. When the button on the dialog is clicked, the Color property of the Channel #1 is set to yellow and 5 data pointsare added to the channel as shown in FIGURE G.15. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse button down, anddragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event then sets thecaption of the dialog to the Min property of the X-Axis.

FIGURE G.15View of the

running program.

Accessing HelpYou can access our help files under Windows as follows…

• Click on a component on your dialog and press .• Select a property or event from the Object Inspector and press .• Select or place your cursor on a component name, class name, property, method, or event in the Code Editor and press .

The Iocomp Component help files are distributed as a HTML website for use under Linux. You will find links to the Iocomp HTML website help inside ofthe Iocomp component folder, usually "/home/myusername/components/help".

Page 262 of 336 Iocomp Components – Plot Pack Manual

Page 275: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

Appendix H - Getting Started with CBuilder (Windows/Linux)

TutorialCreate a new project by first closing any project that you may have open. Select the New/Application menu as shown in FIGURE H.1.

FIGURE H.1To create a new project,

Select "New/Application"from the File Menu.

Scroll through the tabs in the component palette and look for "Iocomp Plot". Click once on the iPlot icon as shown in FIGURE H.2.

FIGURE H.2Iocomp VCL and CLX

components areautomatically installed into

the C++ Builder IDE foryou.

Click and drag out the component on your form to the size you desire as shown in FIGURE H.3 and FIGURE H.4.

FIGURE H.3Click and drag out the

component to the desiredsize.

Iocomp Components – Plot Pack Manual Page 263 of 336

Page 276: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

FIGURE H.4View of a iPlot component

on a C++ Builder Form.

If you are using the evaluation version of our components, you will need to configure your project to use "Packages". If you are using the Full Version ofour product, skip ahead to the next section referring to FIGURE H.6.

To configure your project to use packages, open your "Project/Options…" menu, select the "Packages" tab, and then make sure the "Build with runtimepackages" checkbox is checked. Also, ensure that our package is listed in the edit box below the "Build with runtime packages" checkbox as shown inFIGURE H.5. If not, please add the appropriate package for your compiler language and version as shown Table H.1 and Table H.2…

Windows LinuxCompiler/IDE Package Name Compiler/IDE Package NameC++ Builder 4 iocomp45 Kylix 3 C++ Builder Edition iocomp30clxC++ Builder 5 iocomp55C++ Builder 6 VCL iocomp65C++ Builder 6 CLX iocomp65clxC++ Builder 7 VCL Iocomp75C++ Builder 7 CLX Iocomp75clxTable H.1 Table H.2

FIGURE H.5View of the C++ Builder

6 Project’s Packageoptions tab. Check the

“Build with runtimepackages” option and be

sure the appropriateIocomp package is in the

edit box below..

Page 264 of 336 Iocomp Components – Plot Pack Manual

Page 277: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

Right-click on the component and select "Edit…" or double-click on the component as shown in FIGURE H.6.

FIGURE H.6To open the iPlot

Component’s CustomProperty Editor, right-click on the component

and select "Edit…".

Click on the "X-Axes" tab. Change the Span property to "20". Change the Min property to "-10". Press the OK button as shown in FIGURE H.7. Noticethat the span of the X-Axis changes from 100 to 20 and the minimum value of the X-Axis changes from 0 to -10 (i.e. The right-hand label of the X-axis isnow 10 and the left-hand label is now -10).

FIGURE H.7View of the ControlComponent Property

Editor Tab.

Insert a standard button onto your dialog, as shown in FIGURE H.8.

FIGURE H.8Add a button to your

form.

Double-click the button on the form to generate the OnClick event handler for the button. Type in the name of the component "iPlot1" and then type a "->".A list of valid properties, methods, and events will appear, as shown in FIGURE H.9…

Iocomp Components – Plot Pack Manual Page 265 of 336

Page 278: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

FIGURE H.9To bring up a listing of

properties and methods fora component, press CTRL-

SPACEBAR.

Select the Channel sub-object, type “[0]” and then enter a “->”. A list of properties and methods will appear for the channel as shown in FIGURE H.10…

FIGURE H.10Properties and Methods ofthe Channel Sub-Object.

Select the Color property and then complete the line as follows…

void __fastcall TForm1::Button1Click(TObject *Sender){ iPlot1->Channel[0]->Color = clYellow;}

Now, add some data to the channel using the AddXY method. Type “iPlotX1.Channel(0).” as shown in FIGURE H.11…

FIGURE H.11Properties and Methods ofthe Channel Sub-Object.

Select the AddXY method and then complete the lines as follows, repeating to add 5 data points to the chart…

procedure TForm1.Button1Click(Sender: TObject);begin iPlot1.Channel[0].Color := clYellow; iPlot1.Channel[0].AddXY(-10, 5.5); iPlot1.Channel[0].AddXY( -5, 45.4); iPlot1.Channel[0].AddXY( 0, 85.8); iPlot1.Channel[0].AddXY( 5, 55.5); iPlot1.Channel[0].AddXY( 10, 22.2);end;

Page 266 of 336 Iocomp Components – Plot Pack Manual

Page 279: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

To create an event handler for the iPlot Component, open the Object Inspector window, select the iPlot component from the combo box, and click on the"Events" tab. Find the OnXAxisMinChange event and double-click in the blank combo box area to the right, as shown in FIGURE H.12. This will causeC++ Builder to automatically create the event handler for you.

FIGURE H.12To create an event handler,simply double-click in the

blank combo-box area next tothe event.

Enter the code as shown in FIGURE H.13…

void __fastcall TForm1::iPlot1XAxisMinChange(int Index, double OldValue, double NewValue){ Caption = FloatToStr(iPlot1->XAxis[Index]->Min);}

FIGURE H.13View of the C++ Builder

code window with theOnXAxisMinChange event

handler.

Press the F5 button to execute the program. When the button on the dialog is clicked, the Color property of the Channel #1 is set to yellow and 5 data pointsare added to the channel as shown in FIGURE H.14. Scroll the X-Axis by placing the mouse on the X-Axis, clicking the left-hand mouse button down, anddragging the axis horizontally. When the X-Axis Min property is changed by scrolling, the OnXAxisMinChange event fires. That event then sets thecaption of the dialog to the Min property of the X-Axis.

FIGURE H.14View of the running

program.

Iocomp Components – Plot Pack Manual Page 267 of 336

Page 280: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix H - Getting Started with CBuilder (Windows/Linux)

Accessing HelpYou can access our help files under Windows as follows…

• Click on a component on your dialog and press .• Select a property or event from the Object Inspector and press .• Select or place your cursor on a component name, class name, property, method, or event in the Code Editor and press .

The Iocomp Component help files are distributed as a HTML website for use under Linux. You will find links to the Iocomp HTML website help inside ofthe Iocomp component folder, usually "/home/myusername/components/help".

Page 268 of 336 Iocomp Components – Plot Pack Manual

Page 281: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

Appendix I - ActiveX HTML Properties and Events

HTML Page Important NotesBoolean Values:

TRUE = -1FALSE = 0

Double Values: Double values cannot be of greater precision than 4 decimal places. This is a limitation of the streaming mechanism of InternetExplorer. This is generally a problem with Date/Time values used in the axes properties. It is recommended that you calculate and setDate/Time Min and Span values for axes (and any other property that you need greater than 4 decimal place precision) in your HTMLpage loading code as a work-around.

PropertiesBelow, you will find all of the currently supported properties that can be streamed in from an HTML page into the iPlotX component. Defaultvalues are provided. If you only need the default properties, then you do not need these lines in your HTML Object tag code since the control willset these default properties all by itself. You only need to include param tags for properties that differ from the default. (Note: some HTMLeditors will automatically insert all of these streamed properties for you. If you don’t need the default properties, simply delete the param lines. Ifyou used the built-in property editors in your HTML editor to set properties at design time, then leave in the param lines if you are not sure whichones to remove or leave)

Array Properties Note: “Channel0” refers to the first channel and “Channel1” refers to the second channel, and so on. All array properties (subobject properties) are coded with the number after the array name, and are zero based. Please note that only the Axes and Channels supportmultiple items at this time.

The following list shows the available param tags for our iPlot and iXYPlot components along with their default values…

<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"><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="Width" VALUE="500"><PARAM NAME="Height" VALUE="200"><PARAM NAME="UserCanAddRemoveChannels" VALUE="0"><PARAM NAME="Visible" VALUE="-1"><PARAM NAME="Enabled" VALUE="-1"><PARAM NAME="EditorFormStyle" VALUE="0"><PARAM NAME="CopyToClipBoardFormat" VALUE="0"><PARAM NAME="PrintDocumentName" VALUE="Untitled"><PARAM NAME="PrinterName" VALUE=""><PARAM NAME="ClipAnnotationsToAxes" VALUE="-1"><PARAM NAME="BackGroundGradientEnabled" VALUE="0"><PARAM NAME="BackGroundGradientDirection" VALUE="0"><PARAM NAME="BackGroundGradientStartColor" VALUE="16711680"><PARAM NAME="BackGroundGradientStopColor" VALUE="0"><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="0"><PARAM NAME="LabelCount" VALUE="1"><PARAM NAME="TableCount" VALUE="0"><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.Layer" VALUE="100"><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"><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="ToolBar0.FlatBorder" VALUE="0"><PARAM NAME="ToolBar0.FlatButtons" VALUE="0"><PARAM NAME="ToolBar0.SmallButtons" VALUE="0"><PARAM NAME="Legend0.Name" VALUE="Legend 1"><PARAM NAME="Legend0.Visible" VALUE="1"><PARAM NAME="Legend0.Enabled" VALUE="1"><PARAM NAME="Legend0.Layer" VALUE="100"><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.ShowColumnLine" VALUE="1"><PARAM NAME="Legend0.ShowColumnMarker" VALUE="0"><PARAM NAME="Legend0.ShowColumnXAxisTitle" VALUE="0">

Iocomp Components – Plot Pack Manual Page 269 of 336

Page 282: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

<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.CaptionColumnTitle" VALUE="Title"><PARAM NAME="Legend0.CaptionColumnXAxisTitle" VALUE="X-Axis"><PARAM NAME="Legend0.CaptionColumnYAxisTitle" VALUE="Y-Axis"><PARAM NAME="Legend0.CaptionColumnXValue" VALUE="X"><PARAM NAME="Legend0.CaptionColumnYValue" VALUE="Y"><PARAM NAME="Legend0.CaptionColumnYMax" VALUE="Y-Max"><PARAM NAME="Legend0.CaptionColumnYMin" VALUE="Y-Min"><PARAM NAME="Legend0.CaptionColumnYMean" VALUE="Y-Mean"><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.ColumnSpacing" VALUE="0.5"><PARAM NAME="Legend0.RowSpacing" VALUE="0.25"><PARAM NAME="Legend0.WrapColDesiredCount" VALUE="1"><PARAM NAME="Legend0.WrapColAutoCountEnabled" VALUE="0"><PARAM NAME="Legend0.WrapColAutoCountMax" VALUE="100"><PARAM NAME="Legend0.WrapColSpacingMin" VALUE="2"><PARAM NAME="Legend0.WrapColSpacingAuto" VALUE="1"><PARAM NAME="Legend0.WrapRowDesiredCount" VALUE="5"><PARAM NAME="Legend0.WrapRowAutoCountEnabled" VALUE="1"><PARAM NAME="Legend0.WrapRowAutoCountMax" VALUE="100"><PARAM NAME="Legend0.WrapRowSpacingMin" VALUE="0.25"><PARAM NAME="Legend0.WrapRowSpacingAuto" VALUE="0"><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.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.Layer" VALUE="100"><PARAM NAME="XAxis0.PopupEnabled" VALUE="1"><PARAM NAME="XAxis0.Horizontal" VALUE="1"><PARAM NAME="XAxis0.ZOrder" VALUE="0"><PARAM NAME="XAxis0.StartPercent" VALUE="0"><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.TitleShow" VALUE="0"><PARAM NAME="XAxis0.MajorLength" VALUE="7"><PARAM NAME="XAxis0.MinorLength" VALUE="3"><PARAM NAME="XAxis0.MinorCount" VALUE="1"><PARAM NAME="XAxis0.LabelsVisible" 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.LabelSeparation" VALUE="2"><PARAM NAME="XAxis0.LabelsPrecision" VALUE="3"><PARAM NAME="XAxis0.LabelsPrecisionStyle" VALUE="0"><PARAM NAME="XAxis0.LabelsFormatStyle" VALUE="0"><PARAM NAME="XAxis0.DateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="XAxis0.LabelsMinLength" VALUE="5"><PARAM NAME="XAxis0.LabelsMinLengthAutoAdjust" VALUE="0"><PARAM NAME="XAxis0.ScaleLineShow" VALUE="1"><PARAM NAME="XAxis0.ScaleLinesShow" VALUE="1"><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.CursorUseDefaultFormat" VALUE="1"><PARAM NAME="XAxis0.CursorFormatStyle" VALUE="0"><PARAM NAME="XAxis0.CursorDateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="XAxis0.CursorPrecisionStyle" VALUE="0"><PARAM NAME="XAxis0.CursorPrecision" VALUE="3"><PARAM NAME="XAxis0.CursorMinLength" VALUE="5"><PARAM NAME="XAxis0.CursorMinLengthAutoAdjust" VALUE="0"><PARAM NAME="XAxis0.LegendUseDefaultFormat" VALUE="1"><PARAM NAME="XAxis0.LegendFormatStyle" VALUE="0"><PARAM NAME="XAxis0.LegendDateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="XAxis0.LegendPrecisionStyle" VALUE="0">

<PARAM NAME="XAxis0.LegendPrecision" VALUE="3"><PARAM NAME="XAxis0.LegendMinLength" VALUE="5"><PARAM NAME="XAxis0.LegendMinLengthAutoAdjust" VALUE="0"><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="XAxis0.CartesianStyle" VALUE="0"><PARAM NAME="XAxis0.CartesianChildRefAxisName" VALUE="<None>"><PARAM NAME="XAxis0.CartesianChildRefValue" VALUE="0"><PARAM NAME="XAxis0.AlignRefAxisName" VALUE="<None>"><PARAM NAME="XAxis0.GridLinesVisible" VALUE="1"><PARAM NAME="XAxis0.ForceStacking" 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.Layer" VALUE="100"><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"><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.TitleShow" VALUE="0"><PARAM NAME="YAxis0.MajorLength" VALUE="7"><PARAM NAME="YAxis0.MinorLength" VALUE="3"><PARAM NAME="YAxis0.MinorCount" VALUE="1"><PARAM NAME="YAxis0.LabelsVisible" 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.LabelSeparation" VALUE="2"><PARAM NAME="YAxis0.LabelsPrecision" VALUE="3"><PARAM NAME="YAxis0.LabelsPrecisionStyle" VALUE="0"><PARAM NAME="YAxis0.LabelsFormatStyle" VALUE="0"><PARAM NAME="YAxis0.DateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="YAxis0.LabelsMinLength" VALUE="5"><PARAM NAME="YAxis0.LabelsMinLengthAutoAdjust" VALUE="0"><PARAM NAME="YAxis0.ScaleLineShow" VALUE="1"><PARAM NAME="YAxis0.ScaleLinesShow" VALUE="1"><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.CursorUseDefaultFormat" VALUE="1"><PARAM NAME="YAxis0.CursorFormatStyle" VALUE="0"><PARAM NAME="YAxis0.CursorDateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="YAxis0.CursorPrecisionStyle" VALUE="0"><PARAM NAME="YAxis0.CursorPrecision" VALUE="3"><PARAM NAME="YAxis0.CursorMinLength" VALUE="5"><PARAM NAME="YAxis0.CursorMinLengthAutoAdjust" VALUE="0"><PARAM NAME="YAxis0.LegendUseDefaultFormat" VALUE="1"><PARAM NAME="YAxis0.LegendFormatStyle" VALUE="0"><PARAM NAME="YAxis0.LegendDateTimeFormat" VALUE="hh:nn:ss"><PARAM NAME="YAxis0.LegendPrecisionStyle" VALUE="0"><PARAM NAME="YAxis0.LegendPrecision" VALUE="3"><PARAM NAME="YAxis0.LegendMinLength" VALUE="5"><PARAM NAME="YAxis0.LegendMinLengthAutoAdjust" VALUE="0"><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="YAxis0.CartesianStyle" VALUE="0"><PARAM NAME="YAxis0.CartesianChildRefAxisName" VALUE="<None>"><PARAM NAME="YAxis0.CartesianChildRefValue" VALUE="0"><PARAM NAME="YAxis0.AlignRefAxisName" VALUE="<None>"><PARAM NAME="YAxis0.GridLinesVisible" VALUE="1"><PARAM NAME="YAxis0.ForceStacking" 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.Layer" VALUE="100"><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="">

Page 270 of 336 Iocomp Components – Plot Pack Manual

Page 283: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

<PARAM NAME="DataView0.BackgroundTransparent" VALUE="1"><PARAM NAME="DataView0.BackgroundColor" VALUE="8421376"><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"><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.GridLineXMajorCustom" VALUE="0"><PARAM NAME="DataView0.GridLineXMajorColor" VALUE="32768"><PARAM NAME="DataView0.GridLineXMajorWidth" VALUE="0"><PARAM NAME="DataView0.GridLineXMajorStyle" VALUE="0"><PARAM NAME="DataView0.GridLineXMinorCustom" VALUE="0"><PARAM NAME="DataView0.GridLineXMinorColor" VALUE="32768"><PARAM NAME="DataView0.GridLineXMinorWidth" VALUE="0"><PARAM NAME="DataView0.GridLineXMinorStyle" VALUE="0"><PARAM NAME="DataView0.GridLineYMajorCustom" VALUE="0"><PARAM NAME="DataView0.GridLineYMajorColor" VALUE="32768"><PARAM NAME="DataView0.GridLineYMajorWidth" VALUE="0"><PARAM NAME="DataView0.GridLineYMajorStyle" VALUE="0"><PARAM NAME="DataView0.GridLineYMinorCustom" VALUE="0"><PARAM NAME="DataView0.GridLineYMinorColor" VALUE="32768"><PARAM NAME="DataView0.GridLineYMinorWidth" VALUE="0"><PARAM NAME="DataView0.GridLineYMinorStyle" VALUE="0"><PARAM NAME="DataView0.AxesControlEnabled" VALUE="0"><PARAM NAME="DataView0.AxesControlMouseStyle" VALUE="2"><PARAM NAME="DataView0.AxesControlWheelStyle" VALUE="0"><PARAM NAME="Channel0.Name" VALUE="Channel 1"><PARAM NAME="Channel0.Visible" VALUE="1"><PARAM NAME="Channel0.Enabled" VALUE="1"><PARAM NAME="Channel0.Layer" VALUE="100"><PARAM NAME="Channel0.PopupEnabled" VALUE="1"><PARAM NAME="Channel0.TitleText" VALUE="Channel 1"><PARAM NAME="Channel0.VisibleInLegend" VALUE="1"><PARAM NAME="Channel0.RingBufferSize" VALUE="0"><PARAM NAME="Channel0.TraceVisible" VALUE="1"><PARAM NAME="Channel0.Color" VALUE="255"><PARAM NAME="Channel0.TraceLineStyle" VALUE="0"><PARAM NAME="Channel0.TraceLineWidth" VALUE="1"><PARAM NAME="Channel0.MarkersAllowIndividual" VALUE="0"><PARAM NAME="Channel0.MarkersPenUseChannelColor" VALUE="1"><PARAM NAME="Channel0.MarkersBrushUseChannelColor" VALUE="1"><PARAM NAME="Channel0.MarkersTurnOffLimit" VALUE="0"><PARAM NAME="Channel0.MarkersVisible" VALUE="0"><PARAM NAME="Channel0.MarkersSize" VALUE="3"><PARAM NAME="Channel0.MarkersStyle" VALUE="0"><PARAM NAME="Channel0.MarkersPenColor" VALUE="255"><PARAM NAME="Channel0.MarkersPenStyle" VALUE="0"><PARAM NAME="Channel0.MarkersPenWidth" VALUE="0"><PARAM NAME="Channel0.MarkersBrushColor" VALUE="255"><PARAM NAME="Channel0.MarkersBrushStyle" VALUE="0"><PARAM NAME="Channel0.MarkersFont.Charset" VALUE="1"><PARAM NAME="Channel0.MarkersFont.Color" VALUE="16777215"><PARAM NAME="Channel0.MarkersFont.Height" VALUE="-11"><PARAM NAME="Channel0.MarkersFont.Name" VALUE="MS Sans Serif"><PARAM NAME="Channel0.MarkersFont.Pitch" VALUE="0"><PARAM NAME="Channel0.MarkersFont.Style" VALUE="1"><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.DataStyle" VALUE="0"><PARAM NAME="Channel0.Tag" VALUE="0"><PARAM NAME="Channel0.OPCComputerName" VALUE="Local"><PARAM NAME="Channel0.OPCServerName" VALUE=""><PARAM NAME="Channel0.OPCItemName" VALUE=""><PARAM NAME="Channel0.OPCUpdateRate" VALUE="500"><PARAM NAME="Channel0.OPCAutoConnect" VALUE="1"><PARAM NAME="Channel0.FastDrawEnabled" VALUE="1"><PARAM NAME="Channel0.InterpolationStyle" 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.HighLowEnabled" VALUE="0"><PARAM NAME="Channel0.HighLowBarColor" VALUE="16776960"><PARAM NAME="Channel0.HighLowBarWidth" VALUE="0.5"><PARAM NAME="Channel0.HighLowOpenShow" VALUE="1"><PARAM NAME="Channel0.HighLowOpenColor" VALUE="65280"><PARAM NAME="Channel0.HighLowOpenWidth" VALUE="1"><PARAM NAME="Channel0.HighLowOpenHeight" VALUE="1"><PARAM NAME="Channel0.HighLowCloseShow" VALUE="1"><PARAM NAME="Channel0.HighLowCloseColor" VALUE="255"><PARAM NAME="Channel0.HighLowCloseWidth" VALUE="1"><PARAM NAME="Channel0.HighLowCloseHeight" VALUE="1"><PARAM NAME="Channel0.BarEnabled" VALUE="0"><PARAM NAME="Channel0.BarPenUseChannelColor" VALUE="1"><PARAM NAME="Channel0.BarBrushUseChannelColor" VALUE="1"><PARAM NAME="Channel0.BarReference" VALUE="0"><PARAM NAME="Channel0.BarWidth" VALUE="5"><PARAM NAME="Channel0.BarPenColor" VALUE="255"><PARAM NAME="Channel0.BarPenWidth" VALUE="0"><PARAM NAME="Channel0.BarPenStyle" VALUE="0"><PARAM NAME="Channel0.BarBrushColor" VALUE="255"><PARAM NAME="Channel0.BarBrushStyle" VALUE="0"><PARAM NAME="Channel0.OPCXValueSource" VALUE="0"><PARAM NAME="DataCursor0.Name" VALUE="Cursor 1"><PARAM NAME="DataCursor0.Visible" VALUE="0"><PARAM NAME="DataCursor0.Enabled" VALUE="1"><PARAM NAME="DataCursor0.Layer" VALUE="100"><PARAM NAME="DataCursor0.PopupEnabled" VALUE="1"><PARAM NAME="DataCursor0.ChannelName" VALUE="Channel 1"><PARAM NAME="DataCursor0.ChannelAllowAll" VALUE="1"><PARAM NAME="DataCursor0.ChannelShowAllInLegend" VALUE="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.Color" VALUE="65535"><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.PointerPenWidth" VALUE="1"><PARAM NAME="DataCursor0.MenuUserCanChangeOptions" VALUE="1"><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="Label0.Name" VALUE="Title"><PARAM NAME="Label0.Visible" VALUE="1"><PARAM NAME="Label0.Enabled" VALUE="1"><PARAM NAME="Label0.Layer" VALUE="100"><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"><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">

Iocomp Components – Plot Pack Manual Page 271 of 336

Page 284: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

VBScript EventsEvents in VBScript under Internet Explorer are identical to their counterparts in Visual Basic or VBA except that VBScript does not supportvariable types and some events (such as drag and focus events). Internet Explorer VBA does not support variable types. All variables are assumedto be Variants, so you will not find any “as” operators in the event declarations.

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript><!--

Sub iPlotX1_OnAfterPrint() End SubSub iPlotX1_OnAfterLoadProperties() End SubSub iPlotX1_OnAnnotationCoordinatesChangeFinished(ByVal Index) End SubSub iPlotX1_OnAnnotationCoordinatesChange(ByVal Index) End SubSub iPlotX1_OnBeforeLoadProperties() End SubSub iPlotX1_OnBeforePrint() End SubSub iPlotX1_OnClick() End SubSub iPlotX1_OnClickAnnotation(ByVal Index) End SubSub iPlotX1_OnClickDataPoint(ByVal ChannelIndex, ByVal DataIndex) End SubSub iPlotX1_OnDataCursorChange(ByVal Index) End SubSub iPlotX1_OnDblClick() End SubSub iPlotX1_OnGotFocusAnnotation(ByVal Index) End SubSub iPlotX1_OnGotFocusChannel(ByVal Index) End SubSub iPlotX1_OnGotFocusDataCursor(ByVal Index) End SubSub iPlotX1_OnGotFocusDataView(ByVal Index) End SubSub iPlotX1_OnGotFocusLegend(ByVal Index) End SubSub iPlotX1_OnGotFocusXAxis(ByVal Index) End SubSub iPlotX1_OnGotFocusYAxis(ByVal Index) End SubSub iPlotX1_OnMouseDown(ByVal Button, ByVal Shift, ByVal X, ByVal Y) End SubSub iPlotX1_OnMouseMove(ByVal Shift, ByVal X, ByVal Y) End SubSub iPlotX1_OnMouseUp(ByVal Button, ByVal Shift, ByVal X, ByVal Y) End SubSub iPlotX1_OnLimitLine1PositionChange(ByVal Index, ByVal OldValue, ByVal NewValue) End SubSub iPlotX1_OnLimitLine2PositionChange(ByVal Index, ByVal OldValue, ByVal NewValue) End SubSub iPlotX1_OnLostFocusAnnotation(ByVal Index) End SubSub iPlotX1_OnLostFocusChannel(ByVal Index) End SubSub iPlotX1_OnLostFocusDataCursor(ByVal Index) End SubSub iPlotX1_OnLostFocusDataView(ByVal Index) End SubSub iPlotX1_OnLostFocusLegend(ByVal Index) End SubSub iPlotX1_OnLostFocusXAxis(ByVal Index) End SubSub iPlotX1_OnLostFocusYAxis(ByVal Index) End SubSub iPlotX1_OnPopupMenuAnnotation(ByVal Index) End SubSub iPlotX1_OnPopupMenuChannel(ByVal Index) End SubSub iPlotX1_OnPopupMenuDataCursor(ByVal Index) End SubSub iPlotX1_OnPopupMenuDataView(ByVal Index) End SubSub iPlotX1_OnPopupMenuLegend(ByVal Index) End SubSub iPlotX1_OnPopupMenuXAxis(ByVal Index) End SubSub iPlotX1_OnPopupMenuYAxis(ByVal Index) End SubSub iPlotX1_OnXAxisCustomizeLabel(ByVal Index, ByVal Value, ALabel) End SubSub iPlotX1_OnXAxisMinChange(ByVal Index, ByVal OldValue, ByVal NewValue) End SubSub iPlotX1_OnXAxisSpanChange(ByVal Index, ByVal OldValue, ByVal NewValue) End SubSub iPlotX1_OnYAxisCustomizeLabel(ByVal Index, ByVal Value, ALabel) End SubSub iPlotX1_OnYAxisMinChange(ByVal Index, ByVal OldValue, ByVal NewValue) End SubSub iPlotX1_OnYAxisSpanChange(ByVal Index, ByVal OldValue, ByVal NewValue) End Sub

--></SCRIPT>

JavaScript EventsIf you prefer to use JavaScript in your HTML code, then you will need to first “map” the event you wish to use with the iPlotX component to aparticular event handler as follows. Note that this is a hack in Internet Explorer to allow JavaScript to be used with the ActiveX component.Netscape Navigator and other 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="OnAfterLoadProperties">iPlotX1_OnAfterLoadProperties();</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnAnnotationCoordinatesChangeFinished(Index)">iPlotX1_OnAnnotationCoordinatesChangeFinished(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnAnnotationCoordinatesChange(Index)">iPlotX1_OnAnnotationCoordinatesChange(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnBeforeLoadProperties">iPlotX1_OnBeforeLoadProperties();</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>

Page 272 of 336 Iocomp Components – Plot Pack Manual

Page 285: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

<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)">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="OnGotFocusAnnotation(Index)">iPlotX1_OnGotFocusAnnotation(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusChannel(Index)">iPlotX1_OnGotFocusChannel(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusDataCursor(Index)">iPlotX1_OnGotFocusDataCursor(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusDataView(Index)">iPlotX1_OnGotFocusDataView(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusLegend(Index)">iPlotX1_OnGotFocusLegend(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusXAxis(Index)">iPlotX1_OnGotFocusXAxis(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnGotFocusYAxis(Index)">iPlotX1_OnGotFocusYAxis(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLimitLine1PositionChange(Index, OldValue, NewValue)">iPlotX1_OnLimitLine1PositionChange(Index, OldValue, NewValue);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLimitLine2PositionChange(Index, OldValue, NewValue)">iPlotX1_OnLimitLine2PositionChange(Index, OldValue, NewValue);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusAnnotation(Index)">iPlotX1_OnLostFocusAnnotation(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusChannel(Index)">iPlotX1_OnLostFocusChannel(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusDataCursor(Index)">iPlotX1_OnLostFocusDataCursor(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusDataView(Index)">iPlotX1_OnLostFocusDataView(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusLegend(Index)">iPlotX1_OnLostFocusLegend(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusXAxis(Index)">iPlotX1_OnLostFocusXAxis(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnLostFocusYAxis(Index)">iPlotX1_OnLostFocusYAxis(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuAnnotation(Index)">iPlotX1_OnPopupMenuAnnotation(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuChannel(Index)">iPlotX1_OnPopupMenuChannel(Index);</SCRIPT>

Iocomp Components – Plot Pack Manual Page 273 of 336

Page 286: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuDataCursor(Index)">iPlotX1_OnPopupMenuDataCursor(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuDataView(Index)">iPlotX1_OnPopupMenuDataView(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuLegend(Index)">

iPlotX1_OnPopupMenuLegend(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuXAxis(Index)">iPlotX1_OnPopupMenuXAxis(Index);</SCRIPT>

<SCRIPT LANGUAGE=javascript FOR=iPlotX1 EVENT="OnPopupMenuYAxis(Index)">iPlotX1_OnPopupMenuYAxis(Index);</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>

Events that have parameters must be enclosed within quotation marks.

Page 274 of 336 Iocomp Components – Plot Pack Manual

Page 287: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

Now include a separate script tag to include the event handlers, and the code you wish to run when that event is fired…

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript><!--

function iPlotX1_OnAfterPrint() { //Add your code here };function iPlotX1_OnAfterLoadProperties() { //Add your code here };function iPlotX1_OnAnnotationCoordinatesChangeFinished(Index) { //Add your code here };function iPlotX1_OnAnnotationCoordinatesChange(Index) { //Add your code here };function iPlotX1_OnBeforeLoadProperties() { //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_OnGotFocusAnnotation() { //Add your code here };function iPlotX1_OnGotFocusChannel() { //Add your code here };function iPlotX1_OnGotFocusDataCursor() { //Add your code here };function iPlotX1_OnGotFocusDataView() { //Add your code here };function iPlotX1_OnGotFocusLegend() { //Add your code here };function iPlotX1_OnGotFocusXAxis() { //Add your code here };function iPlotX1_OnGotFocusYAxis() { //Add your code here };function iPlotX1_OnLimitLine1PositionChange(Index, OldValue, NewValue) { //Add your code here };function iPlotX1_OnLimitLine2PositionChange(Index, OldValue, NewValue) { //Add your code here };function iPlotX1_OnLostFocusAnnotation() { //Add your code here };function iPlotX1_OnLostFocusChannel() { //Add your code here };function iPlotX1_OnLostFocusDataCursor() { //Add your code here };function iPlotX1_OnLostFocusDataView() { //Add your code here };function iPlotX1_OnLostFocusLegend() { //Add your code here };function iPlotX1_OnLostFocusXAxis() { //Add your code here };function iPlotX1_OnLostFocusYAxis() { //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 };function iPlotX1_OnPopupMenuAnnotation() { //Add your code here };function iPlotX1_OnPopupMenuChannel() { //Add your code here };function iPlotX1_OnPopupMenuDataCursor() { //Add your code here };function iPlotX1_OnPopupMenuDataView() { //Add your code here };function iPlotX1_OnPopupMenuLegend() { //Add your code here };function iPlotX1_OnPopupMenuXAxis() { //Add your code here };function iPlotX1_OnPopupMenuYAxis() { //Add your code here };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 Internet Explorer Web Browser. This file must becreated for all ActiveX components that require licensing, regardless of manufacturer.

Steps to create an LPK File...

FIGURE I.1Iocomp Installer“Repair” option.

Iocomp Components – Plot Pack Manual Page 275 of 336

Page 288: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

1. Make sure you have installed our ActiveX components using our Product Installer (either from the CD-ROM or downloaded version).If you have any reason to believe that our components are missing license information on your system, simply open our installer fromthe Windows Add/Remove Control Panel and select the REPAIR option to fix our ActiveX licensing.

FIGURE I.2Windows Explorer view

of the Microsoft“lpk_tool.exe” program

2. Obtain the Microsoft LPK File Generation Tool either from your Visual Studio Installation, from the Microsoft Internet Explorer APIPack, or from Microsoft's Download File Section of their website. This program is the only program that can generate LPK files and isprovided by Microsoft.

FIGURE I.3Sample selection

of ActiveXlicenses to add to

the LPK File.

3. Open the LPK Tool and select the Iocomp Components you will be using on the web page. Also select other ActiveX controls that youwill 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 allActiveX controls that will be used. We recommend that you create a single LPK file for all web pages on your site for simplicity.Click on the "ADD ->" button when you are done.

FIGURE I.4Sample ActiveXlicenses that have

been selected to beadded to the LPK

File.

4. Click the "Save & Exit" button to generate the LPK file.

FIGURE I.5“lpk_tool.exe” SaveAs dialog. You canchoose any filename

you wish.

5. You can name the LPK file anything you wish. We recommend that you don't include spaces or non-standard characters in the name asto avoid issues with different server operating systems (remember that our ActiveX components can be placed on any web server OS,they just have to run 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 LPKfile in the same folder as the web page. If you are creating multiple web pages, we recommend that you place the LPK file in acommon folder off of the root of your web server, such as /download.

You can only have one LPK file per web page. Therefore, you will need to include all licenses for all ActiveX components (whether they arefrom Iocomp or some other Third Party ActiveX company) in the single LPK file. We recommend that you make one single LPK file for useon your website to make things easier.

Page 276 of 336 Iocomp Components – Plot Pack Manual

Page 289: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix I - ActiveX HTML Properties and Events

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 body section 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>

2. That's it! Check out our other Internet Explorer Examples for information about integrating ActiveX components into the web page.

The LPK file must be located on the same server as where the HTML page is stored/generated.

The CLASSID must always be the value specified above. This is the CLASSID of the Microsoft License Manager component, whichprovides licensing services to ActiveX components that require licensing. This CLASSID is the same for all versions of Microsoft InternetExplorer You can only have one LPK file entry per web page!

Iocomp Components – Plot Pack Manual Page 277 of 336

Page 290: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix J - Color Codes and Constants

Appendix J - Color Codes and Constants

The following table lists commonly used colors, their hexadecimal values, and selected constants from popular development environments. For example, tospecify "00FF99CC", format as…

Delphi: $00FF99CCVisual Basic: &H00FF99CC&Visual C++/C++ Builder: 0x00FF99CCVB.NET and C#.NET System.Drawing.ColorTranslator.FromOle(&HFF99CC)

System Pallette Hex ValueDecimalValue .NET Compilers Visual Basic

Delphi/C++Builder/Kylix

Constant ColorBlack 00000000 0 Color.Black vbBlack clBlack Dark Red 00000080 128 Color.Maroon clMaroon Red 000000FF 255 Color.Red vbRed clRed Pink 00FF00FF 16711935 Color.Fuchsia vbMagenta clFuchsia Rose 00CC99FF 13408767 Brown 00003399 13209 Orange 000066FF 26367 Light Orange 000099FF 39423 Gold 0000CCFF 52479 Tan 0099CCFF 10079487 Olive Green 00003333 13107 Dark Yellow 00008080 32896 Color.Olive clOlive Lime 0000CC99 52377 Yellow 0000FFFF 65535 Color.Yellow vbYellow clYellow Light Yellow 0099FFFF 10092543 Dark Green 00003300 13056 Green 00008000 32768 Color.Green clGreen Sea Green 00669933 6723891 Bright Green 0000FF00 65280 Color.Lime vbGreen clLime Light Green 00CCFFCC 13434828 Dark Teal 00663300 6697728 Teal 00808000 8421376 Color.Teal clTeal Aqua 00CCCC33 13421619 Turquoise 00FFFF00 16776960 Color.Aqua vbCyan clAqua Light Turquoise 00FFFFCC 16777164 Dark Blue 00800000 8388608 Color.Navy clNavy Blue 00FF0000 16711680 Color.Blue vbBlue clBlue Light Blue 00FF6633 16737843 Sky Blue 00FFCC00 16763904 Pale Blue 00FFCC99 16764057 Indigo 00993333 10040115 Blue-Grey 00996666 10053222 Violet 00800080 8388736 Color.Purple clPurple Plum 00663399 6697881 Lavender 00FF99CC 16751052 Grey 80% 00333333 3355443 Grey 50% 00808080 8421504 Color.Gray clGray Grey 40% 00696969 6908265 Color.DimGray Grey 25% 00C0C0C0 12632256 Color.Silver clSilver White 00FFFFFF 16777215 Color.White vbWhite clWhite

Page 278 of 336 Iocomp Components – Plot Pack Manual

Page 291: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

Appendix K - Interfaces

iPlot & iXYPlot Common Objects

Properties

Properties (ActiveX/VCL/CLX)AnnotationDefaultBrushColor AnnotationDefaultBrushStlye * AnnotationDefaultFontColor AnnotationDefaultFont AnnotationDefaultPenColor AnnotationDefaultPenStlye AnnotationDefaultPenWidth AnnotationAutoFrameRate BackGroundColor BackGroundGradientDirection BackGroundGradientEnabledBackGroundGradientStartColor BackGroundGradientStopColor BorderStyle ChannelClipAnnotationsToAxes ComponentHandle CopyToClipBoardFormat DataCursorDataFileColumnSeparator DataFileFormat DataView DataViewZHorzDataViewZVert EditorFormStyle HintsFontColor HintsFontHintsHidePause HintsPause HintsShow LabelsLastDataFileName LastPropertiesFileName Legend LimitLogBufferSize LogFileName Logging Active OptionSaveAllPropertiesOuterMarginBottom OuterMarginLeft OuterMarginRight OuterMarginTopPrintDocumentName PrinterName PrintMarginBottom PrintMarginLeftPrintMarginRight PrintMarginTop PrintOrientation PrintShowDialogTable ToolBar Translation UpdateFrameRateUserCanAddRemoveChannels UserCanEditObjects XAxis XYAxesReverseYAxisTable K.1* ActiveX Only

Deprecated PropertiesThe following properties have been Deprecated due to the inclusion of newer functionality provided. These properties are provided for backwardcompatibility only.

Deprecated Properties (ActiveX/VCL/CLX)* TitleFontColor TitleFont TitleMargin TitleText TitleVisibleTable K.2* ActiveX Only

Methods

Methods (ActiveX/VCL/CLX)AddAnnotation AddChannel AddDataArray AddDataCursor AddDataView AddLabel AddLegend AddLimit AddTable AddToolBar AddTranslation AddXAxis AddYAxis AnnotationCount BeginUpdate ChannelCount ClearAllData CopyToClipboard DataCursorCount DataViewCount DeleteAnnotation DeleteChannel DeleteDataCursor DeleteDataView DeleteLabel DeleteLegend DeleteLimit DeleteTable DeleteToolBar DeleteTranslation DeleteXAxis DeleteYAxis DisableAllTracking DisableLayoutManager EnableAllTracking EnableLayoutManager EndUpdate GetAnnotationByName GetAnnotationIndexByName GetBytesJPEG GetChannelByName GetChannelIndexByName GetDataCursorByName GetDataCursorIndexByName GetDataViewByName GetDataViewIndexByName GetLabelByName GetLabelIndexByName GetLegendByName GetLegendIndexByName GetLimitByName GetLimitIndexByName GetNow GetSnapShotPicture GetTableByName GetTableIndexByName GetToolBarByName GetToolBarIndexByName GetTranslationOriginalString GetTranslationReplacementString GetXAxisByName GetXAxisIndexByName GetYAxisByName GetYAxisIndexByName ImageListAdd ImageListClear ImageListLoadFromResourceID ImageListLoadFromResourceName † iPaintToDC LabelCount LegendCount LimitCount LoadAnnotationsFromFile LoadDataFromFile LoadPropertiesFromFile Lock LogActivate LogDeactivate ‡ OPCAddItem ‡ OPCRemoveAllItems PrintChart ReCalcLayout RemoveAllAnnotations RemoveAllChannels RemoveAllDataCursors RemoveAllDataViews RemoveAllLabels RemoveAllLegends RemoveAllLimits RemoveAllTables RemoveAllToolBars RemoveAllTranslations RemoveAllXAxes RemoveAllYAxes RepaintAll SaveAnnotationsToFile SaveDataToFile SaveImageToBitmap SaveImageToJPEG SaveImageToMetaFile SavePropertiesToFile Save SaveTranslationsToFile ToolBarCount TransferChannelData TranslationCount Unlock XAxisCount YAxisCount Table K.3‡ VCL Only

Iocomp Components – Plot Pack Manual Page 279 of 336

Page 292: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

Deprecated Methods The following properties have been Deprecated due to the inclusion of newer functionality provided. These properties are provided for backwardcompatibility only. Please use the OPCItem property instead to access these features. OPC does not function under our CLX version of thecomponents.

Deprecated Methods (VCL/CLX)‡ GetOPCItemAutoConnect ‡ GetOPCItemComputerName ‡ GetOPCItemItemName ‡ GetOPCItemPropertyName‡ GetOPCItemServerName ‡ GetOPCItemUpdateRate ‡ OPCItemActivate ‡ OPCItemCount ‡ OPCItemDeactivate ‡ OPCItemLoaded ‡ OPCItemUpdateResume ‡ OPCItemUpdateSuspend ‡ SetOPCItemAutoConnect ‡ SetOPCItemComputerName ‡ SetOPCItemItemName ‡ SetOPCItemPropertyName ‡ SetOPCItemServerName ‡ SetOPCItemUpdateRateTable K.4‡ VCL Only

Events

Events (ActiveX/VCL/CLX)OnAfterCloseEditor OnAfterLoadData OnAfterLoadProperties OnAfterOpenEditor OnAfterPrint OnAfterSaveData OnAfterSaveProperties OnAnnotationCoordinatesChangeFinished OnAnnotationCoordinatesChange OnBeforeLoadProperties OnBeforeNewOPCData OnBeforePrint OnBeforeZoomBox ‡ OnClick OnClickAnnotation OnClickChannel OnClickDataCursor OnClickDataPoint OnClickDataView OnClickLegend OnClickLimit OnClickXAxis OnClickYAxis OnDataCursorChange OnDataCursorCustomizeHint ‡ OnDblClick OnDblClickAnnotation OnDblClickChannel OnDblClickDataCursor OnDblClickDataPoint OnDblClickDataView OnDblClickLegend OnDblClickLimit OnDblClickXAxis OnDblClickYAxis ‡ OnDragDrop ‡ OnDragOver ‡ OnEndDrag ‡ OnEnter ‡ OnExit OnGotFocusAnnotation OnGotFocusChannel OnGotFocusDataCursor OnGotFocusDataView OnGotFocusLegend OnGotFocusXAxis OnGotFocusYAxis OnKeyDown OnKeyPress OnKeyUp OnLimitLine1PositionChange OnLimitLine2PositionChange OnLostFocusAnnotation OnLostFocusChannel OnLostFocusDataCursor OnLostFocusDataView OnLostFocusLegend OnLostFocusXAxis OnLostFocusYAxis OnMouseDown OnMouseMove OnMouseUp OnNewOPCData OnPopupMenuAnnotation OnPopupMenuChannel OnPopupMenuDataCursor OnPopupMenuDataView OnPopupMenuLegend OnPopupMenuLimit OnPopupMenuXAxis OnPopupMenuYAxis ‡ OnStartDrag OnXAxisCustomizeLabel OnXAxisMinChange OnXAxisMinSpanChange OnXAxisSpanChange OnYAxisCustomizeLabel OnYAxisMinChange OnYAxisMinSpanChange OnYAxisSpanChange Table K.5‡ VCL Event Name Only Consult your container for the appropriate Events Name

iPlotDataView & iXYPlotDataView

Properties (Active X/VCL/CLX)AxesControlEnabled AxesControlMouseStyle AxesControlWheelStyle BackgroundColor BackgroundTranparentEnabled GridLineColor GridLineMajorStyle GridLineMinorStyle GridLineShowBottomGridLineShowLeft GridLineShowRight GridLineShowTop GridLineShowXMajors GridLineShowXMinorsGridLineShowYMajors GridLineShowYMinors GridLineXMajorColor GridLineXMajorCustom GridLineXMajorStyleGridLineXMajorWidth GridLineXMinorColor GridLineXMinorCustom GridLineXMinorStyle GridLineXMinorWidthGridLineYMajorColor GridLineYMajorCustom GridLineYMajorStyle GridLineYMajorWidth GridLineYMinorColorGridLineYMinorCustom GridLineYMinorStyle GridLineYMinorWidth GridShow GridXAxisNameGridYAxisName Height Horizontal Layer NamePopupEnabled StartPercent StopPercent Title UserSelected Visible Width ZOrderTable K.6

Methods (Active X/VCL/CLX)PixelsXToPositionPercent PixelsYToPositionPercent PositionPercentToPixelsX PositionPercentToPixelsYTable K.7

Events (Active X/VCL/CLX) OnBeforeZoomBox OnClickDataView OnDblClickDataView OnGotFocusDataViewOnLostFocusDataView OnPopupMenuDataViewTable K.8

Page 280 of 336 Iocomp Components – Plot Pack Manual

Page 293: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

iPlotAxis & iXYPlotAxis

Properties (ActiveX/VCL/CLX)AlignRefAxisName CartesianChildRefAxisName CartesianChildRefValue CartesianStyleCursorDateTimeFormat CursorFormatStyle CursorMinLengthAutoAdjust CursorMinLengthCursorPrecision CursorPrecisionStyle CursorScaler CursorUseDefaultFormatDateTimeFormat DesiredIncrement DesiredStart EnabledForceStacking GridLinesVisible Height HorizontalInnerMargin LabelSeparation * LabelsFontColor LabelsFontLabelsFormatStyle LabelsMargin LabelsMinLengthAutoAdjust LabelsMinLengthLabelsPrecision LabelsPrecisionStyle LabelsVisible LayerLegendDateTimeFormat LegendFormatStyle LegendMinLengthAutoAdjust LegendMinLengthLegendPrecision LegendPrecisionStyle LegendUseDefaultFormat MajorLengthMasterUIInput Max MaxPixels MinMinorCount MinorLength MinPixels Mode Name OuterMargin PopupEnabled RestoreValuesOnResumeReverseScale ScaleLinesColor ScaleLineShow ScaleLinesShowScaleType ScrollMax ScrollMin ScrollMinMaxEnabledSpan StackingEndsMargin StartPercent StopPercentTickListCount TickListCustom TickListItemLabel TickListItemPosition TickListItemStyle * TitleFontColor TitleFont TitleTitleMargin TitleShow TrackingAlignFirstStyle TrackingEnabledTrackingScrollCompressMax TrackingStyle UserSelected VisibleWidth ZOrderTable K.9* ActiveX Only

Methods (Active X/VCL/CLX) GetCursorText GetLabelText GetLegendText NewTrackingData PercentToPositionPixelsToPosition PositionToPercent PositionToPixels ResetFirstAlign SetMinSpan TickListAdd TickListClear UpdateResumeValues ValueOnScale WidthToPixels Zoom ZoomToFitFast ZoomToFitTable K.10

Events (Active X/VCL/CLX) OnClickXAxis OnClickYAxis OnDblClickXAxis OnDblClickYAxis OnGotFocusXAxisOnGotFocusYAxis OnLostFocusXAxis OnLostFocusYAxis OnPopupMenuXAxis OnPopupMenuYAxisOnXAxisCustomizeLabel OnXAxisMinChange OnXAxisMinSpanChange OnXAxisSpanChange OnYAxisCustomizeLabelOnYAxisMinChange OnYAxisMinSpanChange OnYAxisSpanChangeTable K.11

iPlotToolBar & iXYPlotToolBar

Properties (ActiveX/VCL/CLX)CursorActive Enabled FlatBorder FlatButtons Height Horizontal Layer Name PopupEnabled SelectActive ShowAxesModeButtons ShowCopyButton ShowCursorButton ShowEditButton ShowPauseButton ShowPrintButton ShowResumeButton ShowSaveButton ShowSelectButton ShowZoomBoxButton ShowZoomInOutButtons SmallButtons StartPercent StopPercent UserSelected Visible Width ZoomBoxActive ZoomInOutFactor ZOrder Table K.12

Methods (ActiveX/VCL/CLX)DoButtonClickCopy DoButtonClickCursor DoButtonClickEdit DoButtonClickPauseDoButtonClickPrint DoButtonClickResume DoButtonClickSave DoButtonClickScrollAxesModeDoButtonClickSelect DoButtonClickZoomAxesMode DoButtonClickZoomBox DoButtonClickZoomInDoButtonClickZoomOut TurnOffCursorTable K.13

Events (ActiveX/VCL/CLX)NoneTable K.14

Iocomp Components – Plot Pack Manual Page 281 of 336

Page 294: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

iPlotLegend & iXYPlotLegend

Properties (ActiveX/VCL/CLX)BackGroundColor BackGroundTransparent CaptionColumnTitle CaptionColumnXAxisTitleCaptionColumnXValue CaptionColumnYAxisTitle CaptionColumnYMax CaptionColumnYMeanCaptionColumnYMin CaptionColumnYValue ChannelNameColorStyle ChannelNameMaxWidthColumnSpacing * ColumnTitlesFontColor ColumnTitlesFont ColumnTitlesVisibleEnabled * FontColor Font HeightHorizontal Layer MarginBottom MarginLeftMarginRight MarginTop Name PopupEnabledRowSpacing SelectedItemBackGroundColor * SelectedItemFontColor SelectedItemFontShowColumnLine ShowColumnMarker ShowColumnXAxisTitle ShowColumnXValueShowColumnYAxisTitle ShowColumnYMax ShowColumnYMean ShowColumnYMinShowColumnYValue StartPercent StopPercent UserSelected ViewStartIndex ViewStopIndex Visible WidthWrapColAutoCountEnabled WrapColAutoCountMax WrapColDesiredCount WrapColSpacingAutoWrapColSpacingMin WrapRowAutoCountEnabled WrapRowAutoCountMax WrapRowDesiredCountWrapRowSpacingAuto WrapRowSpacingMin ZOrderTable K.15* ActiveX Only

Methods (ActiveX/VCL/CLX)NoneTable K.16

Events (ActiveX/VCL/CLX)OnClickLegend OnDblClickLegend OnGotFocusLegend OnLostFocusLegend OnPopupMenuLegend Table K.17

iPlotAnnotation & iXYPlotAnnotation

Properties (ActiveX/VCL/CLX)BrushColor BrushStyle ChannelName ClipToAxes Enabled * FontColorFont Height ImageIndex ImageListIndex Layer NamePenColor PenStyle PenWidth * PopupEnabled Reference StyleTextHorzAlignment TextHorzMargin Text TextRotation TextVertAlignment TextVertMarginUserCanMove UserCanSize UserSelected Visible Width X2X Y2 YTable K.18* ActiveX Only

Methods (ActiveX/VCL/CLX)PositionXToPixels PositionYToPixels PixelsXToPositon PixelsYToPositionTable K.19

Events (ActiveX/VCL/CLX)OnAnnotationCoordinatesChangeFinished OnAnnotationCoordinatesChange OnClickAnnotation OnDblClickAnnotation OnGotFocusAnnotation OnLostFocusAnnotation OnPopupMenuAnnotationTable K.20

iPlotDataCursor & iXYPlotDataCursor

Properties (ActiveX/VCL/CLX)ChannelAllowAll ChannelName ChannelShowAllInLegend ColorEnabled * FontColor Font HintHideOnReleaseHintOrientationSide HintPosition HintShow LayerMenuItemCaptionDeltaX MenuItemCaptionDeltaY MenuItemCaptionInverseDeltaX MenuItemCaptionValueXMenuItemCaptionValueXY MenuItemCaptionValueY MenuItemVisibleDeltaX MenuItemVisibleDeltaYMenuItemVisibleInverseDeltaX MenuItemVisibleValueX MenuItemVisibleValueXY MenuItemVisibleValueYMenuUserCanChangeOptions Name Pointer1Position Pointer2PositionPointerPenWidth PopupEnabled Status StyleUseChannelColor UserSelected ValueX ValueYVisibleTable K.21* ActiveX Only

Methods (ActiveX/VCL/CLX)NoneTable K.22

Events (ActiveX/VCL/CLX)OnClickDataCursor OnDataCursorChange OnDataCursorCustomizeHint OnDblClickDataCursor OnGotFocusDataCursor OnLostFocusDataCursor OnPopupMenuDataCursorTable K.23

Page 282 of 336 Iocomp Components – Plot Pack Manual

Page 295: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

iPlotTable & iXYPlotTable

Properties (ActiveX/VCL/CLX)ColumnCount Column ColumnSpacing ColumnTitlesFont ColumnTitlesFontColor ColumnTitlesVisible DataFont DataFontColor Data GridBackGroundColor GridBackGroundTransparent GridLinesColor GridLinesShow MarginBottom MarginLeft MarginRight MarginTop RowCount RowsMax RowSpacing Table K.24* ActiveX Only

Methods (ActiveX/VCL/CLX)AddColumn AddRow DeleteColumn DeleteRow RemoveAllColumns RemoveAllRowsTable K.25

Events (ActiveX/VCL/CLX)NoneTable K.26

iPlotTableColumn & iXYPlotTableColumn

Properties (ActiveX/VCL/CLX)AutoSize DataAlignment DataAlignmentMargin DataFontColor TitleAlignment TitleAlignmentMargin TitleFontColor Title Visible Width Table K.27

Methods (ActiveX/VCL/CLX)NoneTable K.28

Events (ActiveX/VCL/CLX)NoneTable K.29

iPlotLabel & iXYPlotLabel

Properties (ActiveX/VCL/CLX)Alignment Caption Enabled FontColor Font Height HorizontalLayer MarginBottom MarginLeft MarginRight MarginTop Name PopupEnabledStartPercent StopPercent UserSelected Visible Width ZOrderTable K.30

Methods (ActiveX/VCL/CLX)NoneTable K.31

Events (ActiveX/VCL/CLX)NoneTable K.32

iPlotLimit & iXYPlotLimit

Properties (ActiveX/VCL/CLX)Color Enabled FillStyle Layer Line1Position Line2Position LineStyleLineWidth Name PopupEnabled Style UserCanMove UserSelected VisibleXAxisName YAxisNameTable K.33

Methods (ActiveX/VCL/CLX)AddBandElement ClearAllElementsTable K.34

Methods (ActiveX/VCL/CLX)OnClickLimit OnDblClickLimit OnLimitLine1PositionChange OnLimitLine2PositionChange OnPopupMenuLimitTable K.35

iPlotTranslation & iXYPlotTranslation

Properties (ActiveX/VCL/CLX)OriginalString ReplacementStringTable K.36

Methods (ActiveX/VCL/CLX)See Main IntefaceTable K.37

Events (ActiveX/VCL/CLX)NoneTable K.38

Iocomp Components – Plot Pack Manual Page 283 of 336

Page 296: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

iPlotChannel Object

Properties (ActiveX/VCL/CLX)BarBrushColor BarBrushStyle BarBrushUseChannelColor BarEnabled BarPenColorBarPenStyle BarPenUseChannelColor BarPenWidth BarReference BarWidthCapacity Color Count DataBarBrushColor DataBarBrushStyle DataBarPenColor DataBarPenStyle DataBarPenWidth DataBarReference DataBarVisibleDataBarWidth DataClose DataCursorStatus DataCursorXText DataCursorXValueDataCursorYText DataCursorYValue DataEmpty DataHigh DataLow DataMarkerBrushColor DataMarkerBrushStyle DataMarkerCharacter DataMarkerPenColor DataMarkerPenStyleDataMarkerPenWidth DataMarkerShowing DataMarkerShow DataMarkerSize DataMarkerStyleDataNull DataOpen DataPointSize DataStyle DataTraceLineColorDataTraceLineStyle DataTraceLineWidth DataXDrawMax DataXDrawMin DataXDataYDrawMax DataYDrawMin DataY DigitalEnabled DigitalReferenceHighDigitalReferenceLow DigitalReferenceStyle DrawStartIndex DrawStopIndex ElapsedStartTimeEnabled FastDrawEnabled FillColor FillEnabled FillReferenceFillStyle FillUseChannelColor HighLowBarColor HighLowBarWidth HighLowBearishColor HighLowBullishColor HighLowCloseColor HighLowCloseHeight HighLowCloseShow HighLowCloseWidth HighLowEnabled HighLowOpenColor HighLowOpenHeight HighLowOpenShow HighLowOpenWidth HighLowShadowColor HighLowStyle InterpolationStyle Layer LogBufferSizeLogFileName LoggingActive MarkersAllowIndividual MarkersBrushColor MarkersBrushStyleMarkersBrushUseChannelColor * MarkersFontColor MarkersFont MarkersPenColor MarkersPenStyleMarkersPenUseChannelColor MarkersPenWidth MarkersSize MarkersStyle MarkersTurnOffLimitMarkersVisible MaxDataPoints MemoryUsed Name OPCAutoConnectOPCComputerName OPCItemName OPCServerName OPCUpdateRate OPCXValueSourcePopupEnabled RingBufferSize RunningXMax RunningXMean RunningXMinRunningYMax RunningYMean RunningYMin Tag TitleTextTraceLineStyle TraceLineWidth TraceVisible UserSelected VisibleInLegendVisible XAxisName XAxisTrackingEnabled YAxisName YAxisTrackingEnabledTable K.39* ActiveX Only

Methods (ActiveX/VCL/CLX)AddHighLow AddXEmpty AddXNull AddXYArray AddXYArraysAddXY AddYArray AddYElapsedSeconds AddYElapsedTime AddYNowClear DeletePoints GetXMax GetXMean GetXMinGetXValueText GetXYEmptyNull GetYInterpolated GetYMax GetYMeanGetYMin GetYValueText LoadDataFromFile LoadPropertiesFromFile LogActivateLogDeactivate OPCActivate OPCDeactivate ReCalcRunningMinMaxMean ResetElapsedStartTimeSaveDataToFile SavePropertiesToFileTable K.40

Events (ActiveX/VCL/CLX)OnClickChannel OnClickDataPoint OnDblClickChannel OnDblClickDataPoint OnGotFocusChannel OnLostFocusChannel OnPopupMenuChannelTable K.41

iXYPlotChannel Object

Properties (ActiveX/VCL/CLX)Capacity Color Count DataCursorStatusDataCursorXText DataCursorXValue DataCursorYText DataCursorYValueDataEmpty DataMarkerBrushColor DataMarkerBrushStyle DataMarkerCharacter DataMarkerPenColor DataMarkerPenStyle DataMarkerPenWidth DataMarkerShowing DataMarkerShow DataMarkerSize DataMarkerStyle DataNullDataPointSize DataStyle DataTraceLineColor DataTraceLineStyleDataTraceLineWidth DataXDrawMax DataXDrawMin DataXDataYDrawMax DataYDrawMin DataY DrawStartIndexDrawStopIndex Enabled Layer LogBufferSizeLogFileName LoggingActive MarkersAllowIndividual MarkersBrushColorMarkersBrushStyle MarkersBrushUseChannelColor * MarkersFontColor MarkersFont MarkersPenColor MarkersPenStyle MarkersPenUseChannelColor MarkersPenWidthMarkersSize MarkersStyle MarkersTurnOffLimit MarkersVisibleMaxDataPoints MemoryUsed Name OPCAutoConnectOPCComputerName OPCItemName OPCServerName OPCUpdateRatePopupEnabled RingBufferSize RunningXMax RunningXMeanRunningXMin RunningYMax RunningYMean RunningYMinTag TitleText TraceLineStyle TraceLineWidthTraceVisible UserSelected VisibleInLegend VisibleXAxisName XAxisTrackingEnabled YAxisName YAxisTrackingEnabledTable K.42* ActiveX Only

Page 284 of 336 Iocomp Components – Plot Pack Manual

Page 297: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

Methods (ActiveX/VCL/CLX)AddEmpty AddNull AddXYArray AddXYArrays AddXYClear DeletePoints GetXMax GetXMean GetXMinGetXValueText GetXYEmptyNull GetYMax GetYMean GetYMinGetYValueText LoadDataFromFile LoadPropertiesFromFile LogActivate LogDeactivateOPCActivate OPCDeactivate ReCalcRunningMinMaxMean SaveDataToFile SavePropertiesToFileTable K.43

Events (ActiveX/VCL/CLX)OnClickChannel OnClickDataPoint OnDblClickChannel OnDblClickDataPoint OnGotFocusChannel OnLostFocusChannel OnPopupMenuChannelTable K.44

iScope Objects

Properties

Properties (ActiveX/VCL/CLX)AutoFrameRate Channel ChannelCount DataBlockActive DataBlockSynchronized Display ‡ Enabled ‡ Height HideControlPanels NeedPacketsNow PrintDocumentName PrinterName PrintMarginBottom PrintMarginLeft PrintMarginRight PrintMarginTop PrintOrientation PrintShowDialog SamplesPerSecond TimeBase ToolBar TransferringActive Trigger UpdateFrameRate ‡ Visible ‡ Width Table K.45‡ VCL Event Name Only Consult your container for the appropriate Events Name

Methods

Methods (ActiveX/VCL/CLX)AddChannelData AddChannel AddDataBlockChannel AddDataBlock DataBlockBegin DataBlockClear DataBlockEnd DeleteChannel * GetObjectPointer PrintDisplay RemoveAllChannels Table K.46* ActiveX Only

Events

Events (ActiveX/VCL/CLX)OnClick OnDblClick OnEnter OnExit OnKeyDown OnKeyPress OnKeyUp OnMouseDown OnMouseMove OnMouseUp Table K.47 ‡ VCL Only

iScopeChannel

Properties (ActiveX/VCL/CLX)BufferCount Capacitor Color Coupling Position PositionVoltage RefLineShowScalerMultiplier ScalerOffset TitleText TraceLineWidth TraceVisible VoltsPerDivisionTable K.48

Methods (ActiveX/VCL/CLX)NoneTable K.49

Events (ActiveX/VCL/CLX)NoneTable K.50

iScopeTimeBase

Properties (ActiveX/VCL/CLX)Position PostCapture PreCapture SecPerDivTable K.51

Methods (ActiveX/VCL/CLX)NoneTable K.52

Events (ActiveX/VCL/CLX)NoneTable K.53

iScopeTrigger

Properties (ActiveX/VCL/CLX)Auto Level PositiveSlope SourceIndexTable K.54

Methods (ActiveX/VCL/CLX)ManualTrigger Table K.55

Events (ActiveX/VCL/CLX)NoneTable K.56

Iocomp Components – Plot Pack Manual Page 285 of 336

Page 298: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix K - Interfaces

iScopeToolBar

Properties (ActiveX/VCL/CLX)CursorActive Table K.57

Methods (ActiveX/VCL/CLX)DoButtonClickCopy DoButtonClickCursor DoButtonClickEdit DoButtonClickPrint DoButtonClickSaveTable K.58

Events (ActiveX/VCL/CLX)NoneTable K.59

iScopeDisplay

Properties (ActiveX/VCL/CLX)GridColor HorzScrollShow TextShowTable K.60

Methods (ActiveX/VCL/CLX)ManualTrigger Table K.61

Events (ActiveX/VCL/CLX)NoneTable K.62

Page 286 of 336 Iocomp Components – Plot Pack Manual

Page 299: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix L - What is DateTime Format?

Appendix L - What is DateTime Format?

Date/Time format is commonly used in Microsoft products such as Microsoft Excel and is based 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) Table L.1

Visual Basic: the following formula should be used when using Visual Basic: (1/(24#*60#*60#)). The # symbols force Visual Basic to treatthe numbers as floating point values, otherwise you will generate a compiler error since VB is trying to use Integer math. You may find ithelpful to setup a constant in your program for this calculation to represent one second... Const One Second As Double = 1 / (24# * 60# * 60#)

Visual Layout Manager: if you use the built-in property editor, notice the button next to values which can accept date-time values. If youclick on the button, you will be able to access a calculator that will do the above calculations for you when entering values.

C++ Compiler: the following formula should be used when using C++ Compilers such as Visual C++ or Borland C++ Builder and others:(1.0/(24.0*60.0*60.0)). Specifying the numerical values as floating point numbers forces the C++ compiler to use floating-point math, andnot integer math, which would result in incorrect results.

To specify a particular date such as March 12, 2000, you need to specify a decimal value that represents how much time has elapsed since December 30,1899 at 12:00am...

December 30, 1899 12:00am = 0 January 1, 1900 = 1March 12, 2000 = 36597December 31, 9999 = 2958525March 12, 2000 12:00pm = 36597.5March 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 the date/time format…

iPlot1.Xaxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.Yaxis(0).LabelsFormatStyle = iptfDateTime

...in a particular axis, then the axis scale would correspond to a range of 10 days. If you are plotting data to the chart component with such a large scale, itwould appear that the chart was not 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 valuefor ten seconds. You would set the X-Axis min value to 0 and the X-Axis max value to the calculated formula value.

Don’t forget to set the Axis LabelsFormatStyle and DateTimeFormat string properties for DateTime mode.

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "nn:ss:zzz"

Setting Time GetNow Setting the actual time in DateTime format for the X-Axis when the component is running.

iPlot1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlot1.XAxis(0).DateTimeFormat = "dd:nn:ss:zzz"iPlot1.XAxis(0).Min = iPlot1.GetNow

Iocomp Components – Plot Pack Manual Page 287 of 336

Page 300: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix L - What is DateTime Format?

DateTime Format StringHere in Table L.2 are some sample DateTimeFormat strings that can be used to format your date and time values in the axis. You can make othercombinations for this string if you need. Refer to Table L.3 for custom formats specifiers.

Format String Example Notesd mmm hh:nn:ss am/pm 1 May 12:01:32amd mmm hh:nn:ss 1 May 22:01:32m/d hh:nn:ss am/pm 2/28 12:01:32amm/d hh:nn:ss 2/28 22:01:32d mmm hh:nn am/pm 1 May 12:01 amd mmm hh:nn 1 May 22:01hh:nn:ss.zzzz 22:01:32.254“hh hour nn minute” 22 hour 01 minute You can use String names in DateTime Format“n minute ss seconds” 1 minute 32 seconds You can use String names in DateTime Formatj mm/dd 122 05/01 j - Julian numerical day representation for each day of the year.j m/d/yy 122 05/01/03 j - Julian numerical day representation for each day of the year.hh:nn:ss 00:00:00 Set DesiredStart to Zero hh:nn:ss 01:01:01 Set DesiredStart to 1 hour 1minute 1 second c 05/01/2003 c is Short Date Formatc hh:nn:ss 05/01/2003 10:01:32 c is Short Date FormatTable L.2

Format SpecifiersFormat specifiers may be written in upper case as well as in lower case letters. Both produce the same result.

Format String Displays

c

Displays the date using the format given by the Short Date Format global variable, followed by the time using theformat given by the Long Time Format global variable. The time is not displayed if the fractional part of the DateTimevalue is zero.

jDisplays the number of days (Julian) as a number without a leading zero (0-365). (Must be the first character in theformat string)

d Displays the day as a number without a leading zero (1-31).dd Displays the day as a number with a leading zero (01-31).ddd Displays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.dddd Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.ddddd Displays the date using the format given by the Short Date Format global variable.dddddd Displays the date using the format given by the Long Date Format global variable.m Displays the month as a number without a leading zero (1-12). mm Displays the month as a number with a leading zero (01-12).mmm Displays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.mmmm Displays the month as a full name (January-December) using the strings given by the LongMonthNames global variable.yy Displays the year as a two-digit number (00-99).yyyy Displays the year as a four-digit number (0000-9999).h Displays the hour without a leading zero (0-23).hh Displays the hour with a leading zero (00-23).n Displays the minute without a leading zero (0-59).nn Displays the minute with a leading zero (00-59).s Displays the second without a leading zero (0-59).ss Displays the second with a leading zero (00-59).z Displays the millisecond without a leading zero (0-999).zzz Displays the millisecond with a leading zero (000-999).t Displays the time using the format given by the Short Time Format global variable.tt Displays the time using the format given by the Long Time Format global variable.

am/pmUses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for anyhour after noon.

a/pUses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hourafter noon.

ampmUses the 12-hour clock for the preceding h or hh specifier, and displays the contents of the TimeAMString globalvariable for any hour before noon, and the contents of the TimePMString global variable for any hour after noon.

/ Displays the date separator character given by the DateSeparator global variable.: Displays the time separator character given by the TimeSeparator global variable.'xx'/"xx" Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.Table L.3

Page 288 of 336 Iocomp Components – Plot Pack Manual

Page 301: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Appendix M - Working with Variant Arrays

One powerful built-in type of many development environments is the Variant type. Variants represent values whose type is not determined at compile time.Instead, the type of their value can change at runtime. Variants can mix with other variants and with integer, real, string, and boolean values in expressionsand assignments; the compiler automatically performs type conversions.

However, variants are not always the same between different compilers. This section will cover how to setup Variant Arrays for use with our componentsthat take Variant parameters, mostly for our Plotting Components.

Note: Remember that arrays indices are generally zero-based for many compilers. This means that dimensions and elements begin at zero. Dimension 0 isthe first dimension, dimension 1 is the second dimension, and so on. Element 0 is the first element, element 1 is the second element, element 2 is the thirdelement, etc.

Even though some compilers allow you to specify lower bounds at values other than 0, we recommend that you always use 0 as the first element. All of ourmethods can handle elements and arrays that start at non-zero values. However, other methods and functions of the compiler or other components may notdo this. Therefore, we recommend that you always use 0 as the first element.

VBScript (Internet Explorer, ASP Pages)All variables in VBScript are Variants. You cannot set the type of variables you dimension because only the type Variant is available. Youwould create variant arrays just like you would do in Visual Basic or VBA, but you would omit the "as Variant" part.

To create a Variant Array of One Dimension with a Fixed Set of 10 Elements...

Dim TempVariant(9)

To create a Variant Array of Two Dimensions with a Fixed Set of 10 Elements per dimension...

Dim TempVariant(1, 9)

To create a dynamic Variant Array, then later specify the dimension and set of elements at a later point in your code...

Dim TempVariant()

...then later re-dimension the variable to the number of dimensions and/or elements as you need...

'Re-Dimension Array, specifying 10 elementsReDim TempVariant(9)

...or for two dimensions...

'Re-Dimension Array, specifying 2 dimensions'and 10 elements per dimensionReDim TempVariant(1, 9)

iPlotX Channel AddXYArray example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

Dim TempVariant(1, 99)Dim x

For x = 0 To 99 'Loop 100 times TempVariant(0, x) = x 'Populate 1st dimension of array with x loop value TempVariant(1, x) = Rnd(1)*100 Next x

iPlotX1.Channel(0).AddXYArray(TempVariant)

Visual Basic 5-6 and VBATo create a Variant Array of One Dimension with a Fixed Set of 10 Elements...

Dim TempVariant(9) as Variant

To create a Variant Array of Two Dimensions with a Fixed Set of 10 Elements per dimension...

Dim TempVariant(1, 9) as Variant

To create a dynamic Variant Array, then later specify the dimension and set of elements at a later point in your code...

Dim TempVariant() as Variant

...then later re-dimension the variable to the number of dimensions and/or elements as you need...

Iocomp Components – Plot Pack Manual Page 289 of 336

Page 302: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

'Re-Dimension Array, specifying 10 elementsReDim TempVariant(9)

...or for two dimensions...

'Re-Dimension Array, specifying 2 dimensions'and 10 elements per dimensionReDim TempVariant(1, 9)

Visual Basic iPlotX Channel AddXYArray example. Adds data to a channel from two variant arrays, each containing x and y values (synchronous addition). The number of elements in each arraymust be identical (i.e. if XData contains 100 elements, YData must contain 100 elements), otherwise an exception will be generated. Thisprocedure is able to handle variant arrays that start at element 0 or any value that you require. If you array starts at element XData(10), then thatvalue will be used to add the first data point.

Visual Basic:Private Sub Form_Load() Dim TempVariant(1, 99) As Variant Dim X As Long

For X= 0 To 99 TempVariant(0, X) = X TempVariant(1, X) = Rnd(1)*100 Next x

iPlotX1.Channel(0).AddXYArray(TempVariant)End Sub

Visual Basic iPlotX Channel AddXYArrays example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

Visual Basic:Private Sub Form_Load() Dim XDataArray(99) As Variant Dim YDataArray(99) As Variant Dim X As Integer For X = 0 To 99 XDataArray(X) = X YDataArray(X) = Rnd(1) * 100 Next X

iPlotX1.Channel(0).AddXYArrays XDataArray, YDataArrayEnd Sub

Visual Basic iPlotX Channel AddYArray example. Adds multiple y values with a specified X-Axis spacing interval. For example, if your variant array (Y values) contains 100 elements and yourXInterval 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)), seconddata point is (2,YData(1)), third data point is (3,YData(2)), fourth data point is (4, YData(3)), etc. This procedure is able to handle variant arraysthat start at element 0 or any value that you require. If you array starts at element YData(10), then that value will be used to add the first datapoint.

Visual Basic:Private Sub Form_Load() Dim YDataArray(20) As Variant Dim X As Integer For X = 0 To 20 YDataArray(X) = Rnd(1) * 100 Next X iPlotX1.Channel(0).AddYArray 5, YDataArrayEnd Sub

Page 290 of 336 Iocomp Components – Plot Pack Manual

Page 303: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Visual Basic iPlotX Main Interface AddDataArray example. Adds data to all channels (synchronous addition). The way data is added depends on the dimension of the Data passed. The XValue passed is arelative spacing value relative to each previous data point for each channel(first data point in the array is relative to the previously added x datapoint and the second is relative to the first data point in the array). If the previous X coordinate in the chart is 10 and the XValue is 5, then the XCoordinate for the first data in the array would be 15, the second 20, the third 25,etc. Each channel is independent.

Visual Basic:Private Sub Command1_Click()‘One Dimensional Array Dim TempVariant(9) As Variant Dim x As Long Dim y As Long Dim XValue As Double For y = 0 To 99 'Add 100 sets of Data Points For x = 0 To 9 'Loop through 10 channels TempVariant(x) = Rnd(1) * 10 + x * 10 Next x XValue = XValue + 1.5 iPlotX1.AddDataArray XValue, TempVariant Next yEnd Sub

Private Sub Command1_Click() Dim TempVariant(9, 99) As Variant ‘Two Dimensional Array Dim x As Long Dim y As Long

For y = 0 To 99 For x = 0 To 9 TempVariant(x, y) = Rnd(1) * 10 + x * 10 Next x Next y iPlotX1.AddDataArray 1.5, TempVariantEnd Sub

Visual C++ 5-6 and Visual C++.NETTo create a Variant Array of One Dimension with a Fixed Set of 10 Elements...COleSafeArray TempVariant;DWORD numElements[] = {10};TempVariant.Create(VT_R8, 1, numElements);

To create a Variant Array of Two Dimensions with a Fixed Set of 10 Elements per dimension...COleSafeArray TempVariant;DWORD numElements[] = {2, 10};TempVariant.Create(VT_R8, 2, numElements);

iPlotX Channel AddXYArray example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

Visual C++/Visual C++.Netvoid CProject1::OnButton1() { long index[2]; double tempX; double tempY; COleSafeArray TempVariant; tempX = 0; tempY = 0;

DWORD numElements[] = {2, 100}; //Create Variant Array 2 dimensional TempVariant.Create(VT_R8, 2, numElements); for(int i=0; i<100; i++) //Loop 100 Times { tempX = tempX + 1; //Stuff X-Data into Safe Array index[0] = 0; //Dimension index[1] = i; //Element #

TempVariant.PutElement(index, &tempX); tempY = (rand()/(double)RAND_MAX)*100; //Generate Random Y-Data Stuff Y-Data into Safe Array index[0] = 1; //Dimension index[1] = i; //Element # TempVariant.PutElement(index, &tempY); } m_iPlotX1.GetChannel(0).AddXYArray(TempVariant);}

Iocomp Components – Plot Pack Manual Page 291 of 336

Page 304: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Visual C++ iPlotX Channel AddXYArray example. Adds data to a channel from two variant arrays, each containing x and y values (synchronous addition). The number of elements in each arraymust be identical (i.e. if XData contains 100 elements, YData must contain 100 elements), otherwise an exception will be generated. Thisprocedure is able to handle variant arrays that start at element 0 or any value that you require. If you array starts at element XData(10), then thatvalue will be used to add the first data point.

Visual C++:Void::OnStartbutton() { long index[2]; double tempX; double tempY; COleSafeArray TempVariant; tempX = 0; tempY = 0;

DWORD numElements[] = {2, 100}; //Create Variant Array 2 dimensional TempVariant.Create(VT_R8, 2, numElements);

for(int i=0; i<100; i++) { tempX = tempX + 1; //Stuff X-Data into Safe Array index[0] = 0; //1st Dimension index[1] = i; //Element # TempVariant.PutElement(index, &tempX); tempY = (rand()/(double)RAND_MAX)*100; //Data to Put Into 2nd Dimension Array Element index[0] = 1; //Stuff Y-Data into Safe Array 2nd Dimension index[1] = i; //Element # TempVariant.PutElement(index, &tempY); } m_iPlotX1.GetChannel(0).AddXYArray(TempVariant);}

Visual C++ iPlotX Channel AddXYArrays example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

Visual C++:Void::OnStartbutton() { double tempX; double tempY; long index[1];

DWORD numElements[] = {100}; COleSafeArray XDataArray; XDataArray.Create(VT_R8, 1, numElements);

COleSafeArray YDataArray; YDataArray.Create(VT_R8, 1, numElements);

tempX = 0; tempY = 0;

for(int i=0; i<100; i++) { tempX = tempX + 1.5; //Data to Put Into 1st Dimension Array Element index[0] = i; //Stuff X-Data into Safe Array Element # XDataArray.PutElement(index, &tempX); tempY = (rand()/(double)RAND_MAX)*100; //Data to Put Into 2nd Dimension Array Element index[0] = i; //Stuff Y-Data into Safe Array Element # YDataArray.PutElement(index, &tempY); } m_iPlotX1.GetChannel(0).AddXYArrays(XDataArray, YDataArray);}

Page 292 of 336 Iocomp Components – Plot Pack Manual

Page 305: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Visual C++ iPlotX Channel AddYArray example. Adds multiple y values with a specified X-Axis spacing interval. For example, if your variant array (Y values) contains 100 elements and yourXInterval 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)), seconddata point is (2,YData(1)), third data point is (3,YData(2)), fourth data point is (4, YData(3)), etc. This procedure is able to handle variant arraysthat start at element 0 or any value that you require. If you array starts at element YData(10), then that value will be used to add the first datapoint.

Visual C++:Void::OnStartbutton() { double tempY; long index[1]; DWORD numElements[] = {21}; COleSafeArray YDataArray; YDataArray.Create(VT_R8, 1, numElements);

for(int i=0; i<21; i++) { tempY = (rand()/(double)RAND_MAX)*100; //Data to Put Into 1 Dimension Array Element index[0] = i; //Stuff Y-Data into Safe Array Element # YDataArray.PutElement(index, &tempY); } m_iPlotX1.GetChannel(0).AddYArray(5, YDataArray);}

Visual C++ iPlotX Main Interface AddDataArray example. Adds data to all channels (synchronous addition). The way data is added depends on the dimension of the Data passed. The XValue passed is arelative spacing value relative to each previous data point for each channel(first data point in the array is relative to the previously added x datapoint and the second is relative to the first data point in the array). If the previous X coordinate in the chart is 10 and the XValue is 5, then the XCoordinate for the first data in the array would be 15, the second 20, the third 25,etc. Each channel is independent.

Visual C++:Void::OnStartbutton(){ double tempY; long index[1]; DWORD numElements[] = {10}; COleSafeArray YDataArray; YDataArray.Create(VT_R8, 1, numElements);

for(int i=0; i<100; i++) { for (int j=0; j<10; j++) { tempY = (rand()/(double)RAND_MAX)*10 + 10*j; //Data to Put Into 1st Dimension Array Element index[0] = j; //Stuff Y-Data into Safe Array Element # YDataArray.PutElement(index, &tempY); } m_iPlotX1.AddDataArray(i, YDataArray); }}

Void::OnStartbutton(){ double tempY; long index[2]; DWORD numElements[] = {10, 100}; //2 dimensional COleSafeArray YDataArray; YDataArray.Create(VT_R8, 2, numElements);

for(int i=0; i<100; i++) { for (int j=0; j<10; j++) { index[0] = j; //1st Dimension index[1] = i; //Element # tempY = (rand()/(double)RAND_MAX)*10 + 10*j; //Data to Put Into 2nd Dimension Array Element YDataArray.PutElement(index, &tempY); } } m_iPlotX1.AddDataArray(1.5, YDataArray);}

Iocomp Components – Plot Pack Manual Page 293 of 336

Page 306: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Delphi/CBuilder (Windows/Linux)

Delphi iPlotX Channel AddXYArray example. Adds data to a channel from two variant arrays, each containing x and y values (synchronous addition). The number of elements in each arraymust be identical (i.e. if XData contains 100 elements, YData must contain 100 elements), otherwise an exception will be generated. Thisprocedure is able to handle variant arrays that start at element 0 or any value that you require. If you array starts at element XData(10), then thatvalue will be used to add the first data point.

Delphi (Windows/Linux):procedure TForm1.FormCreate(Sender: TObject);Var DataArray : Variant; i : Integer;begin DataArray := VarArrayCreate([0,1,0,100], varDouble); for i := 0 to 100 do Begin DataArray[1, i] := Random(100); DataArray[0, i] := i; end; iComponent.Channel[0].AddXYArray(DataArray);end;

CBuilder iPlotX Channel AddXYArray example. Adds data to a channel from two variant arrays, each containing x and y values (synchronous addition). The number of elements in each arraymust be identical (i.e. if XData contains 100 elements, YData must contain 100 elements), otherwise an exception will be generated. Thisprocedure is able to handle variant arrays that start at element 0 or any value that you require. If you array starts at element XData(10), then thatvalue will be used to add the first data point.

CBuilder (Windows/Linux):__fastcall TForm1::TForm1(TComponent* Owner): TForm(Owner){ Variant TempVariant; int bounds[4] = {0, 1, 0, 99};

TempVariant = VarArrayCreate(bounds, 3, varDouble);

for (int i=0; i<100; i++) { TempVariant.PutElement(i, 0, i); TempVariant.PutElement(random(100), 1, i); }

iPlot1->Channel[0]->AddXYArray(TempVariant);}

Delphi iPlotX Channel AddXYArrays example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

Delphi (Windows/Linux):procedure TForm1.FormCreate(Sender: TObject);Var YDataArray : Variant; XDataArray :Variant; i : Integer;Begin XDataArray := VarArrayCreate([0, 100], varDouble); YDataArray := VarArrayCreate([0, 100], varDouble);

for i := 0 to 100 do begin YDataArray[i] := Random(100); XDataArray[i] := i; end;

iComponent.Channel[0].AddXYArrays(XDataArray, YDataArray);end;

Page 294 of 336 Iocomp Components – Plot Pack Manual

Page 307: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

CBuilder iPlotX Channel AddXYArrays example. We need to pass a 2-dimensional variant array with the first dimension containing the X-coordinate Values and the second dimension containingthe Y-coordinate Values of each data point. Think of the first dimension as the first column of rows in a spread-sheet, and the second dimensionas the second column of rows in a spread-sheet. Each row in the spread-sheet represents an XCoordinate-YCoordinate pair making up a single-data point.

CBuilder (Windows/Linux):void __fastcall TForm1::Button1Click(TObject *Sender){ Variant XDataArray; Variant YDataArray; int bounds[2] = {0,99}; double XData; double YData;

XDataArray = VarArrayCreate(bounds,1,varDouble); YDataArray = VarArrayCreate(bounds,1,varDouble);

for (int i=0; i<100; i++) { XData += 1.5; XDataArray.PutElement(XData, i);

YData = random(100); YDataArray.PutElement(YData, i); };

iPlot1->Channel[0]->AddXYArrays(XDataArray, YDataArray);}

Delphi iPlotX Channel AddYArray example. Adds multiple y values with a specified X-Axis spacing interval. For example, if your variant array (Y values) contains 100 elements and yourXInterval 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)), seconddata point is (2,YData(1)), third data point is (3,YData(2)), fourth data point is (4, YData(3)), etc. This procedure is able to handle variant arraysthat start at element 0 or any value that you require. If you array starts at element YData(10), then that value will be used to add the first datapoint.

Delphi (Windows/Linux):procedure TForm1.FormCreate(Sender: TObject);var YDataArray : Variant; i : Integer;begin YDataArray := VarArrayCreate([0,20], varDouble); for i := 0 to 20 do begin YDataArray[i] := Random(100); end; iPlot1.Channel[0].AddYArray(5, YDataArray);end;

CBuilder iPlotX Channel AddYArray example. Adds multiple y values with a specified X-Axis spacing interval. For example, if your variant array (Y values) contains 100 elements and yourXInterval 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)), seconddata point is (2,YData(1)), third data point is (3,YData(2)), fourth data point is (4, YData(3)), etc. This procedure is able to handle variant arraysthat start at element 0 or any value that you require. If you array starts at element YData(10), then that value will be used to add the first datapoint.

CBuilder (Windows/Linux):void __fastcall TForm1::Button1Click(TObject *Sender){ Variant YDataArray; int bounds[2] = {0,20}; double YData;

YDataArray = VarArrayCreate(bounds,1,varDouble);

for (int i=0; i<20; i++) { YData = random(100); YDataArray.PutElement(YData, i); };

iPlot1->Channel[0]->AddYArray(5, YDataArray);}

Iocomp Components – Plot Pack Manual Page 295 of 336

Page 308: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix M - Working with Variant Arrays

Delphi Main Interface AddDataArray example. Adds data to all channels (synchronous addition). The way data is added depends on the dimension of the Data passed. The XValue passed is arelative spacing value relative to each previous data point for each channel(first data point in the array is relative to the previously added x datapoint and the second is relative to the first data point in the array). If the previous X coordinate in the chart is 10 and the XValue is 5, then the XCoordinate for the first data in the array would be 15, the second 20, the third 25,etc. Each channel is independent.

Delphi (Windows/Linux):procedure TForm1.Button1Click(Sender: TObject);var YDataArray : Variant; i, j : Integer; XValue : double;begin YDataArray := VarArrayCreate([0,9], varDouble); for i := 0 to 100 do begin for j := 0 to 9 do begin YDataArray[j] := Random(10) + j *10; end; XValue := XValue +1.5; iPlot1.AddDataArray(XValue, YDataArray); end;end;

procedure TForm1.Button1Click(Sender: TObject);var YDataArray : Variant; x, y : Integer;begin YDataArray := VarArrayCreate([0, 9, 0, 100], varDouble); for y := 0 to 100 do begin for x := 0 to 9 do begin YDataArray[x, y] := Random(10) + x *10; end; end; iPlot1.AddDataArray(1.5, YDataArray);end;

CBuilder Main Interface AddDataArray example. Adds data to all channels (synchronous addition). The way data is added depends on the dimension of the Data passed. The XValue passed is arelative spacing value relative to each previous data point for each channel(first data point in the array is relative to the previously added x datapoint and the second is relative to the first data point in the array). If the previous X coordinate in the chart is 10 and the XValue is 5, then the XCoordinate for the first data in the array would be 15, the second 20, the third 25,etc. Each channel is independent.

CBuilder (Windows/Linux):void __fastcall TForm1::Button1Click(TObject *Sender){ Variant YDataArray; int bounds[2] = {0,9}; double XValue; YDataArray = VarArrayCreate(bounds,1,varDouble);

XValue = 0; for (int i=0; i<100; i++) { for (int j=0; j<10; j++) { YDataArray.PutElement((random(10)+ j*10), j); } XValue = XValue +1.5; IPlot1->AddDataArray(XValue, YDataArray); }}

void __fastcall TForm1::Button1Click(TObject *Sender){ Variant YDataArray; int bounds[4] = {0, 9, 0, 99};

YDataArray = VarArrayCreate(bounds,3,varDouble);

for (int j=0; j<10; j++) { for (int i=0; i<100; i++) { YDataArray.PutElement((random(10)+ j*10),j, i); //Populate 2nd dimension of array with random y-coordinate data } } iPlot1->AddDataArray(1.5, YDataArray);}

Page 296 of 336 Iocomp Components – Plot Pack Manual

Page 309: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Appendix N - Frequently Asked Questions

Below, you will find some frequently asked questions and specific, real-world situations that our customers have been asking about in our PlotComponents…

Question PageHow do I determine the data point indexes of the channel’s data points currently viewable in the chart? 298How do I determine the pixel coordinate position of something within the Data View? 298How do I get X-Axis Date-Time labels to word wrap? 298I print my chart, but I don’t want a black background! 298I have a chart I want to print, but only the black portions of the chart print, not the colored portions! 298I tried to set the ZOrder of the Plot Objects , but they don’t go where I want them to go. What could be wrong? 299I have rotated Annotation Text or Y-Axis labels that won’t display. What is going on? 299I want the X-Axis labels to show the number of days since the plot was started, not a specific calendar date. How do I do this? 299How do I dynamically create a Plot Component at Runtime in Visual C++? 299I want to add a Text Annotation every time I add a data point to a channel using AddYElapsedSeconds. 300I was wondering if its possible to add items to the pop up menu you get when you right click on the Axis menu currently? 300I'm at a loss - everything seems to be working, but I'm not logging data. Any ideas? 300When the height property of the plot is < 500 the graph is filling fast, but when the height is over 500 it is going very slow. Should it be like this? 301Is there a way to PAUSE the iPlotX chart from plotting the data points and then RESUME the chart and plots the missing data points? 301I would like to customize printout of my plot in the before_print event based upon printer capabilities. 301I find that there is a great lag when updating the iPlotX chart with three different loops in VB6? 302I have a graph that will allow user to ZoomToFit but provide an option to reset the graph to the most recent data plot on the right-most x-axiswhen user have clicked the ZoomToFit using ScrollSmooth Tracking Style. How can I achieve that? 302Is there a way to allow the number of zooms to be set for the ZoomBox feature? 303DoButtonClickZoomBox() turn on and off zoom mode. I'd like it to operate in a once only fashion? 303I call "ZoomToFit"... all looks good, then I add a bunch of data points to a channel, and the axis then scale automatically. 303Just checking if this has been added anywhere for 3.0... I know 2.x did not have it. I would like to be able to turn on/off normal window scrollbars. I did this manually in 3.0, but it would be nice. As it is more intuitive for windows users than scroll the actual axis itself. 303Currently my iPlotX chart is continuously plotting data to 3 different data views on many different x-and-y-axis. And this is causing the charttaking up the windows memory resources quite a lot. 304I'm calling ZoomToFit for the X and Y axis, but it does not appear to work. I use SetMin and SetSpan, all works fine. 304I'd like to have the X axis vertical, and the Y horizontal? 304How can I find out the background grid spacing programmatically? 305The process of drawing is slow! What can i check to accelerate the drawing process, is it possible to draw every 'x' points ? 305If I'm adding data using Channel.AddXY(). What format does the date/time value have to be in? 305For .NET is the Dev environment. As far as I can tell there are no overloaded functions which allow DateTime to be added? 306I would like to plot just the points, and not draw a line between points. 306When I launch the Print Dialog and then switch to another application and switch back to the application, the Print Dialog is not display on topbut rather it stays behind the application. But I could see the Print dialog on the task bar. Is there a way to bring it to front again? 306When I set the x-axis's Min property to GetNow(). But would like to advance it by, say, 30 seconds 306In the iPlotX component is there a simple way to synchronize the scroll and/or zoom of all X Axes (and Y Axes - independent of X Axes)? 307I would like to know if there is a way to allow user to move left/right to the next adjacent major tick on the x-axis? 307I tried using event handler to change the tick label if detected Value = 100 to ALabel = "Hundred". But I could not see the result on my GUI? 307I would like to toggle display of a channel in the data view by allowing the user to double click on the corresponding channel in the legend. I'musing .NET with C# and can intercept the double-click event. The question is how to tie that to a specific channel in the legend? 308Is there a way to enable tracking enabled on the x-axis without reseting the zoom? 308I would like to zoom in by 0.5 for the Chart based on the range selected by the Zoom Box. How do I do that under OnBeforeZoomBox() method? 308I am using Prefix style on the Y-Axis but would like to display values on the Cursor Hints based on thousands separated commas format? 309I couldn't get the handle for Component.iPlotX.XAxis(0) to pass to a Win32 API function. How can I get the handle? 309Can now intercept the arrow keys on the keyboard to detect whether user press left or right to move the data cursor by +/-30. But how do Iachieve the same for mouse clicking? If user click on the right-hand side of the vertical Data Cursor line then it should move by +30 and viceversa. 309I want to run my program on another computer. I must move my computer's Plot OCX file to another computer ,and then use Regsvr32 on theOCX file? 309How do I intercept the index of the items in the X-Axis pop up menu? 309Also how do I disable the Zoom Axes mode to just zoom X-Axis only? 309I manually call DoButtonClickZoomAxesMode() but it doesn't reset back when clicked the second time? 310I need to display two kind of plot: the Long Term data and the Short Term data. 310I got a major problem in modifying your source code. I am trying to add the thousand comma separated feature for the plot chart it works on thedesign time but not for the runtime. It just displays "Unknown". What am I missing here. 310When the channel focus is changed by clicking on a new channel in the legend, the data cursor does not automatically update to the new channel.If I then move the cursor manually slightly and reselect the new channel, the cursor updates correctly. 310

Iocomp Components – Plot Pack Manual Page 297 of 336

Page 310: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Question PageIt seems that I set the ScrollMinMaxEnable to TRUE and set the .Min, Span, ScrollMin, and ScrollMax to the limit that I like but somehow thecode doesn't work. The axis still can scroll beyond the limit. It works for Linear scale. Is this a bug ? 310I would like to jump the data point cursor by 30 when user press on the CTRL+LEFT ARROW/RIGHT ARROW key on the keyboard. 310Can you have more than one cursor within a plot? 311How do I set the Y-Axis scale to look like below: 311When I keep clicking on the ZoomIn or ZoomOut, the Y-Axis keeps incrementing/decrementing the scales like there is no limit. How do I set theZoomIn and ZoomOut to a certain limit? 311I am facing a problem of displaying values in Data Cursor from a log base 10 Y axis in antilog values. How do I go about displaying antilogvalues for my data cursor from the Log base 10 Y-Axis? 312In the iPlotX chart print feature. How do I change the background color property to some other color, such as white background, before printingit to the B/W laser printer without affecting the current chart? 312For the Channel Title under Legend >Column Titles, I have enabled Visible. But how do I change the title text just like any other title property? 312I am using iPlotX component and my problem is that how to display current system clock time by using AddYElapsedTime function on the X-axis? 312What would be a way to restrict the ZoomBox reset method to only one of the two dimensions as per the X-Axis? 312When printing the image of the iPlotX component it has very thick Trace lines although the TraceLineWidth is set to 1? 313I want the X and Y axes to intersect at the origin? 313I want to display 500 value on the screen, and when I receive 500 value I want to restart the drawing from X = 0. The Problem being is that a traceline is drawn horizontally across the graph from X = 499 to X = 0, completely distorting the graph as shown in Figure N.1. How can I removethis trace line? 313I would like to be able to set the intervals of my major ticks in the X-Axis (Time "mm/dd hh:mm"). 313Why does the text not rotate when I set the rotation angle? 313

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I determine the data point indexes of the channel’s data points currently viewable in the chart?

A: Use the DrawStartIndex and DrawStopIndex properties of the channel object to obtain the first and last data point indexes of the viewable data points inthat channel. For example…

FirstDataPointIndex = iPlot1.Channel(0).DrawStartIndexLastDataPointIndex = iPlot1.Channel(0).DrawStopIndex

FirstDataPointXValue = iPlot1.Channel(0).DataX(FirstDataPointIndex)FirstDataPointYValue = iPlot1.Channel(0).DataY(FirstDataPointIndex)

LastDataPointXValue = iPlot1.Channel(0).DataX(LastDataPointIndex)LastDataPointYValue = iPlot1.Channel(0).DataY(LastDataPointIndex)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I determine the pixel coordinate position of something within the Data View?A: Utilize the PositionToPixels functions of the X-Axis and Y-Axis. The PositionToPixels function of the X-Axis will convert X coordinates on the X-Axisto pixel positions on the overall component (the 0,0 origin is in the upper-left-hand corner of the component) The PositionToPixels function of the Y-Axiswill convert Y coordinates on the Y-Axis to pixel positions on the overall component.

For example, to get the pixel coordinate center of a text annotation…

XPixelCoordinate = iPlot1.XAxis(0).PositionToPixels(iPlot1.Annotation(0).X)YPixelCoordinate = iPlot1.YAxis(0).PositionToPixels(iPlot1.Annotation(0).Y)

There are also other conversion functions to convert between pixels coordinates to position and “percent of data view” measurements to positions on theaxes: PixelsToPosition, PercentToPosition, and PositionToPercent.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I get X-Axis Date-Time labels to word wrap?A: Simply insert a carriage return character where you want the wrap to occur. For example…

iPlot1.Xaxis(0).DateTimeFormatString = “mmm/dd/yyyy” + chr(13) + “hh:nn:ss”

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I print my chart, but I don’t want a black background!A: What looks good on the screen doesn’t always look good on the printed page. What you need to do is utilize the OnBeforePrint and OnAfterPrint eventswhich allows you to intercept the chart before it gets printed, change the colors to be “printer-friendly”, and then switch them back after the print has beensent to the printer.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I have a chart I want to print, but only the black portions of the chart print, not the colored portions!

A: This is due to how the printer driver convert and handle color to gray scale prints. You will need to either upgrade your printer driver or figure out whatsettings in the driver will automatically convert color to gray scale. Unfortunately, all printer drivers are customized by the printer manufacturer or Microsoft,and each driver has it’s own feature set. You will need to experiment with different settings or consult the printer manufacturer.

Page 298 of 336 Iocomp Components – Plot Pack Manual

Page 311: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

The good news is that most new printer models and their drivers handle color conversion beautifully. The bad news is that some older printers and theirdrivers do not handle color conversion at all or not very well.

If all else fails, you will need to utilize the OnBeforePrint and OnAfterPrint events to change the chart colors to black and white colors before printing.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I tried to set the ZOrder of the Plot Objects , but they don’t go where I want them to go. What could be wrong? (Y-Axes, X-Axes, Legend,DataView, ToolBar, etc)

A: Be sure to disable the Layout Manager before making your manual ZOrder changes to the plot objects, and then re-enable the Layout Manager whendone. This is done automatically for you if you are using the Visual Layout Manager in the Design-Time or Run-Time property editor.

For example, if you are manually doing this using code…

iPlot1.DisableLayoutManager

iPlot.YAxis(0).ZOrder = 0iPlot.YAxis(1).ZOrder = 0iPlot.DataViewZVert = 1iPlot.Legend(0).ZOrder = 2

iPlot1.EnableLayoutManager

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I have rotated Annotation Text or Y-Axis labels that won’t display. What is going on?

A: Rotated text requires that the font used to draw the text be a True-Type font. If we try and rotate a non-True-Type font, the Windows and QT API willdisplay no text at all. Be sure that you are using True-Type fonts in all Font Name properties of the Plot Pack.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I want the X-Axis labels to show the number of days since the plot was started, not a specific calendar date. How do I do this?

A: The DateTimeFormatString property of the X-Axis can be configured to include the “Julian” (sometimes referred to as a Gregorian Date) or number ofdays in a year. For example, to show the number of days since you started adding data as well as the hours, minutes, and seconds, format theDateTimeFormat string as…

iPlot.XAxis(0).DateTimeFormatString = “J hh:nn:ss”

If you start adding data at a value of 0, then values of 5.5 will be displayed on the axis as “5 12:00:00”. A value of 30.75 will be “30 18:00:00”, a value of360.55243 will be “360 13:15:30, and so on.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I dynamically create a Plot Component at Runtime in Visual C++?

A: This is a complex question which has several solutions depending on your type of project (MFC application versus ATL component, etc.). For a straightMFC application, you would do the following…

//Add to the top of your form#include "iplotx.h"int IDiPlotX1 = 100; //make sure this is a unique value in your application

//Add somewhere in your initialization code usually in your OnInitDialog Event Handler You will need to obtain the actual//license string from the Windows Registry using Regedit.exe. The key is located in HKEY_LOCAL_MACHINE\SOFTWARE\Iocomp\Keys//under the name TiPlot or TiXYPlot, depending on which Plot Component

//you are creating.CRect ComponentRect;CString LicenseString = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}";

BSTR LicenseKey = LicenseString.AllocSysString();ComponentRect.SetRect(10,10, 640, 380);

m_iPlotX1.Create("Plot", WS_VISIBLE, ComponentRect, this, IDiPlotX1, NULL, FALSE, LicenseKey);

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 299 of 336

Page 312: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I want to add a Text Annotation every time I add a data point to a channel using AddYElapsedSeconds. I want the Text Annotation to displaythe Elapsed Seconds used by the channel. How do I do this?

A: Here is an example of how to do this, assuming you are using Visual Basic. Drop down a single iPlotX component and a Standard Windows timercomponent onto a form.

Private Sub Form_Load() iPlotX1.XAxis(0).Span = 10 iPlotX1.Channel(0).MarkersVisible = True Timer1.Interval = 1000 Timer1.Enabled = TrueEnd Sub

Private Sub Timer1_Timer() Dim DataPointIndex As Long Dim AnnotationIndex As Long

DataPointIndex = iPlotX1.Channel(0).AddYElapsedSeconds(Rnd(1) * 100) AnnotationIndex = iPlotX1.AddAnnotation()

With iPlotX1.Annotation(AnnotationIndex) .Style = ipasText .Text = "Time: " & Round(iPlotX1.Channel(0).DataX(DataPointIndex), 2) .ChannelName = iPlotX1.Channel(0).Name .Reference = iprtChannel .X = iPlotX1.Channel(0).DataX(DataPointIndex) .Y = iPlotX1.Channel(0).DataY(DataPointIndex) End WithEnd Sub

For more information, examples, and FAQs, check out our examples and FAQ sections of our support website.

Support: http:// www.iocomp. com /support FAQ: http://www.iocomp. com / faq Examples: http://www.iocomp. com / examples

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I was wondering if its possible to add items to the pop up menu you get when you right click on the Axis menu currently?

A: The current implementation allows you to cancel our pop-up menu and substitute with your own pop-up menu. You would use the OnPopupMenuXAxisand OnPopupMenuYAxis to intercept our pop-up menu. The event gives you ScreenX and ScreenY coordinates of the mouse where the user right-clicked,the index of the axis clicked, as well as a Cancel variable which you can set to True so that our pop-up is not shown. You would then show your own pop-upmenu in place of ours.

Private Sub iPlotX1_OnPopupMenuXAxis(ByVal Index As Long, Cancel As Boolean, ByVal ScreenX As Long, ByVal ScreenY As Long) 'Note: in VB, the ScreenX and ScreenY coordinates are not used as VB's pop up feature uses the current mouse pointer position Cancel = True 'tell our pop up to cancel not show itself frmPopup.PopupMenu frmPopup.PopupMenu1 'bring up the menu named "PopupMenu1" on form named "frmPopup"End Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I'm at a loss - everything seems to be working, but I'm not logging data. Any ideas?My problem comes when I try to log the data to a file using channel file I/O. I set the channel's LogFileName and call LogActivate() for the channel, thenstart adding data with AddXY. The data displays and the file is created, but no data is ever logged - it's zero length after I call LogDeactivate(). I've tried azero buffer size as well as 8K. I lock the iPlot during the data plots, and I've also tried putting the AddXY loop in a Synchronize() method. The ring buffersize is 100,000 if that matters.

A: The iPlot method ClearAllData() and the Channel method Clear() both disable logging.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 300 of 336 Iocomp Components – Plot Pack Manual

Page 313: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I am testing the evaluation version of the plot pack. I put some values into the iPlot with the following code: When the height property of the plotis < 500 the graph is filling fast, but when the height is over 500 it is going very slow. Should it be like this?

i := 1 for x := 0 to 100000 do begin iPlot1.Channel[0].AddXY(i,Random(100)); inc(i); Application.ProcessMessages; end;

A: You should be able to add 1,000,000 (1 million) data points per second on an average computer system. Are you calling the code below just once, orevery second? What version of our evaluation and what version of Delphi/Kylix are you using?

Reply Q:I use Delphi 4 with windows 2000. The version of the evaluation is 3.0.0 I can add the data points i will, but i will also see it on the screen.The question is how often should i refresh the plot. For example i will plot 10000 data points per second. How should i write this code to get a goodupdate of the plot. What i will know is should i use iPlot.Refresh or Application.ProcessMessages to make the plot update on the screen.

A: I would first move the Application.ProcessMessages out of the loop. This causes the component (and the rest of your application) to attempt to repaint100,000 times per second (assuming you are calling this code snippet every second) which the human brain can't see anyways as well as do other"housekeeping" by processing messages in the windows message queue for your application. This is not necessary to cause the component to redraw as itwill automatically attempt to redraw as many times as the Windows OS will let it if enough changes to the data (such as adding data points) are made.

The component itself, by default, restricts the maximum number of repaints to 60 frames per second, which is twice the frame-rate of standard US television.This was set to such a high value so that it would not affect general use. This maximum frame rate can be controlled or disabled via our AutoFrameRate andUpdateFrameRate properties.(or in our custom property editor at design-time or run-time). If you want the chart to repaint as many times as your CPU andgraphics card can handle, then disable the AutoFrameRate feature of our component.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Is there a way to PAUSE the iPlotX chart from plotting the data points and then RESUME the chart and plots the missing data points?

A: Yes and No. The chart will always be able to "accept" data points, and will plot them on the chart. I think what you may be wanting is to stop the chartfrom scrolling. What you would do is to disable tracking on the X-Axis by calling...

iPlotX1.XAxis(0).TrackingEnabled = False

and then resume scrolling or tracking by setting the property back toTrue...iPlotX1.XAxis(0).TrackingEnabled = True

You can also control whether a specific channel participates in the tracking by modifying the appropriate XAxisTrackingEnabled or YAxisTrackingEnabledproperties on the individual channel, but disabling on the axes may fit your situation better.

If what you want to do is stop the chart from painting to the chart, then you will need to turn off the AutoFrameRate feature and manually call BeginUpdateto stop painting and then call EndUpdate to resume painting. This is not recommended if disabling tracking does the trick for you, though that is up to you.

Q: I must say that the codes that I have changed does not really fix the problem. The iPlotX still re-paint when I move my mouse pointer to thechart.

A: I have managed to manually use BeginUpdate and EndUpdate to simulate the pausing but however, when I move the mouse cursor to the iPlotX, theupdate automatically occurs. How can I disable the auto repainting when the mouse is moving over the iPlotX?

ReplyThere is no way to completely stop the component from repainting as this goes against how Windows was designed. The Windows Operating System is incharge of managing all windows, and tells them to repaint if they are obscured by another window, or for other various reasons. Calling BeginUpdate simplystops our component requesting a repaint, mainly for performance purposes when you are adding large amounts of data at one time (note: this manualmethod is no longer totally necessary with our AutoFrameRate feature introduced in Version 2.x).

BeginUpdate doesn't stop the Windows Operating System fro requesting repaints. If we were to block all painting, then the window would start to fill upwith "garbage" if other Windows were moved over our component "window" or some other window obscured our component "window".

The solution would be to simply stop adding data to the chart, to hide the channel in question, to hide the form, or to hide our component.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I would like to customize printout of my plot in the before_print event based upon printer capabilities. Can you suggest a way to allow access towhether the selected printer supports color, etc?

A: This would be something where you would use the Windows API to check the "capabilities" of the printer driver, or preferably where you would ask theuser for print options before sending the job to the printer.

I caution this with saying that there is no real way to determine if the printer actually supports color, if the printer is setup to print color by actions of the userconfiguring the printer driver one way or the other, or if the printer has the correct "cartridges" to print in color at any given time. From all of the newsgrouparticles that I looked up on the issue, many people have found that some black and white-only printers report they support color, and there is no realconsistent way of doing it, though it works for some people. The API function of interest would be "DeviceCapabilities".

Many suggest that you modally show your own "Print Options" dialog in the OnBeforePrint dialog, or have your own print method all together where youcan have complete control on the sequence of asking options, changing chart colors, and then ultimately or not sending the job to the printer.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 301 of 336

Page 314: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I find that there is a great lag when updating the iPlotX chart with three different loops in VB6?

The situation is like this, I have 3 chart display mode and of these 3 chart data are updated concurrently. Each of this 3 chart display mode, it has a HEAVYfor loop. Each loop is executed when the previous one is completed.

So for the first chart display mode's for loop, there is not lag, but when it reaches the 3rd for loop for the 3rd chart display mode, lag can be seen on the chart.

How can I overcome this problem? I have tried BeginUpdate but this method couldn't solve the problem.

A: A few questions...

1. How are you obtaining your data? Is the data coming from dedicated hardware? Can you obtain the timestamps for each data point from the hardware, orare you relying on the computer clock?2. arSTCh1DistributionDataCounter(i) , how many data points are contained in each "packet" of data coming into this routine? If you have 100 data pointsfor each channel coming in, then using AddYNow would add all 100 data points at the same X-Value (time value)., resulting in data that is "hidden" sincethere is no resolution of X-Values between each data point. (i.e. they all overlap)3. Can you describe the lag in more detail? Is the data in the third chart "offset"? By how much?4. An observation. This may or may not affect the lag, depending on how long each loop takes or how long the external procedures (such asYAxisAutoScale) take to execute. You should separate out the "setup" pieces of code from the data related pieces of code. For example, I see that you set theYAxisName, XAxisName, and DataStyle properties of each channel before adding data. These "setup" operations should be done in a different, separateloop from the loops that add data.5. What does YAxisAutoScale do? This should be moved into a common area, possibly after you add data to all charts.6. Is the lag in the third chart an offset? Meaning, are the X-Values of the data points later than the data points added to the first two charts? Or are yousimply missing data points?

Q Reply:1. The data are obtained from the hardware and the call to obtain each data point is not based on the hardware timestamps. Each data point is obtain based onthe Iocomp timer (in which case, every second). Yes, I am relying the local computer clock.

2. For arSTCh1DistributionDataCounter(i), there are 7 items in it. Meaning 7 channels. No, each channel is plotted to the chart every second. So there is nooverlapping occur.

3. Well, the best explanation of the lag is to see from the graph image I have attached on the first post. The most recent data point is not plotted to the veryright-edge of the X-axis. However, data point is plotted correctly based on the timestamp.

4. I have checked the codes and those are required in the FOR loop for each channel because each Ch1 and Ch2 variables are not the same (incrementingeach time).

5. What YAxisAutoScale does is just calling ZoomToFit to trigger the Min and Span for Y-axis to re-scale the axis. That's all.

6. Yes, exactly the point. The offset is the keyword I am trying to explain to you. ;) How can I set the offset of the x-axis to situate to the right-most edge sothat you don't see the gap?

A: Ok, we found the problem. You have run into a situation in the Plot Component which occurs when the Compact Interval Data Type is incorrectly used,which assumes that you are adding data at a fixed X-Interval, but messes-up the tracking (which causes the offset) since the actual X-Values you are passingto the component are not a fixed-interval.

When using the Compact Interval DataStyle, the X-Value specified must exactly be an increment of the interval between the first and second data point. Forexample, if the interval between the first and second data point is exactly 1.0 seconds, then the interval between each subsequent data point must be exactly1.0 seconds. To use the Compact Interval Data Style, you must always increment the X-Value exactly the same...----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I have a graph that will allow user to ZoomToFit but provide an option to reset the graph to the most recent data plot on the right-most x-axiswhen user have clicked the ZoomToFit using ScrollSmooth Tracking Style. How can I achieve that?

A: When you manually zoom an axis using one of our tools, we cache the previous positions and reset them if the user clicks on the Resume Button (PlayButton) unless the user right-clicks on the axis and selects "Update Resume Values". It sounds like you are using your own tool bar or set of buttons outsideof our control. You can do the same thing we do by storing the previous X-Axis Min and Span values before you call Zoom-To-Fit on the Axis. When theuser selects your Resume button, simply set the X-Axis Min and Span to the stored values.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 302 of 336 Iocomp Components – Plot Pack Manual

Page 315: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: Is there a way to allow the number of zooms to be set for the ZoomBox feature? Say, I would like to let user to only zoom up to 3 times with everyZoomBox on the graph.

A: There are lots of events that can be used to detect this, and several ways to keep track of how many times or how much the user has zoomed the chartaxes. For all of them, you will have to keep track of the zooms yourself in a global variable (or some other kind of variable global to your form) and create analgorithm to restrict the user zooming as you see fit.

A simple example in Visual Basic.

Option ExplicitPrivate ZoomCount As Long

Private Sub iPlotX1_OnBeforeZoomBox(Left As Long, Top As Long, Right AsLong, Bottom As Long, Cancel As Boolean) ZoomCount = ZoomCount + 1 If ZoomCount >= 4 Then ZoomCount = 3 Cancel = True End IfEnd Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: DoButtonClickZoomBox() turn on and off zoom mode. I'd like it to operate in a once only fashion? I can probably turn it off with OnMouseUp(),but I can't detect if the plot is in zoom mode or not. Any ideas? Either to make it operate in a one go fashion, or to detect if DoButtonClickZoomBox() is on.

A: Use the ZoomBoxActive property on the ToolBar to check the status of this button.result = iComponentX.ToolBar(0).ZoomBoxActive

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I'd like to stop the auto scaling that occurs on the axis. I call "ZoomToFit"... all looks good, then I add a bunch of data points to a channel, andthe axis then scale automatically. What [if any] call can disable this behavior?

A: There are several places you disable the "Tracking" of newly added data. You can completely disable tracking on a particular axis by callingiPlotX1.XAxis(0).TrackingEnabled = False

Or, if you just want to disable tracking of a particular channel on a particular axis, the X-Axis for example, call the following on the particular channel youwant to block.

iPlotX1.Channel(0).XAxisTrackingEnabled = False

In which case, other channels (if they exist) will continue to be tracked on the X-Axis unless they have their XAxisTrackingEnabled property turned off aswell. If you want to turn off tracking for the entire chart, simply set the TrackingEnabled property to FALSE on all axes, both X and Y. Let me know if thishelps or if you need any other information or assistance.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Just checking if this has been added anywhere for 3.0... I know 2.x did not have it. I would like to be able to turn on/off normal window scrollbars. I did this manually in 3.0, but it would be nice. As it is more intuitive for windows users than scroll the actual axis itself.

A: You would need to add a scroll bar control outside of our control. You would then work off the scroll event of the scroll bar, and then modify the minproperty of the axis as needed. I can give this to the developers as a feature suggestion to see if it could be added to a future version.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 303 of 336

Page 316: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: Currently my iPlotX chart is continuously plotting data to 3 different data views on many different x-and-y-axis. And this is causing the charttaking up the windows memory resources quite a lot.

So I was thinking if the plot has a feature that can NOT REFRESH/UPDATE the x-and-y-axis when the user is not viewing that particular data but the datais still plotting in the background?

BTW, does BeginUpdate and EndUpdate do the trick?

A: Memory Resources? Are you referring to System Resources, Total Memory Usage, CPU utilization, or a possible memory leak?

The Plot Components, like all of our components, have a feature called Auto Frame Rate. This feature keeps the number of repaints by the component belowa specified value. This value is initially set to 60, or 60 frames per second. If the component tries to repaint itself more than 60 times per second, thecomponent will automatically "throttle-back" the repaints. (Note: updates caused by your application user scrolling axes, clicking tool bar buttons, orotherwise interacting with the chart using the mouse or keyboard will override the Auto Frame Rate feature so that the component doesn't appear sluggishwhen the user has the component in the foreground and interacting with it).

BeginUpdate and EndUpdate only work if you disable the Auto Frame Rate feature. BeginUpdate and EndUpdate are purely manual "throttling" of thepainting of the component. BeginUpdate will cause the component to stop repainting so that you can make a lot of changes before resuming the normalpainting updates by calling EndUpdate.

Repaints on our component, if you are adding large amounts of data, or scrolling very fast due to a small span but large distances between x-values, have alow priority on the operating system. This is especially true of the graph is large since the Windows API has to move a lot of pixels around on the screen,just like large video windows use a lot of CPU time. Since repaints are low priority, repaints by our control will also be automatically "dropped" by theoperating system if some other thread or program needs processor time. You can reduce the CPU used by setting the AutoFrameRate to a lower value, butfor most uses it is not necessary.

Adding data to our chart will not be affected, but is influenced by what method you are using to generate events to add data to the chart. If you are usinganother component (serial component for example, or a custom component for piece of hardware) to generate events to add data, then data will not bedropped due to high CPU utilization of painting by another component or program. If you are using a Thread (normal priority or higher) to add data or usingour Thread Timer, this should be a problem either. If you are using a Standard Windows Timer or an Idle priority Thread, then these are the lowest priorityon the operating system, lower than repaints. We recommend that you do not use Standard Windows Timers or Idle Priority Threads to add data as theoperating system may drop the events if the CPU utilization is high.

If you stop the automatic scrolling of the axes (known as Tracking in our terminology), then if the data plots off the graph, then no CPU utilization will beused to draw the component as the chart is stationary. Tracking automatically scrolls the axes (depending on how you configure it) to generally keep up withnewly added data or to scale axes to show all data.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I'm calling ZoomToFit for the X and Y axis, but it does not appear to work. I use SetMin and SetSpan, all works fine. NOTE: I have the x and yaxis not visible [but it doesn't work with it on either]. I've used this method in v2 with no problems.

X min = 202.83X max = 460.25Y min = 0Y max = 537

Sorry.... but by reversing the X and Y axis, I was able to get rid of this issue. Must be making some assumptions about the data for speed!

A: True. If you are using the iPlotX component, your data must satisfy the equation.

y=f(x)

Or that your data must be adding with ever increasing or decreasing x-values. There can not be two y values for any given x value. This is a requirementbecause it is necessary for all of the speed improvements and enhancements that make the iPlot component fast. If your data doesn't satisfy y=f(x) (mosttypes of charts do), then you should use the iXYPlot component instead.

Since you had substituted the X and Y Values, this would explain why the zoom to fit didn't work as your data didn't satisfy y=f(x).----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I'd like to have the X axis vertical, and the Y horizontal? I've simply switched the data values around, but this won't work for fills and bars, etc.Can I switch these around? Can't seem to find any toggle for that!

A: You can do this with our property editor. Open our property editor, goto the layout tab, right-click on the DataView area, and then select "X-Y AxesReverse".

You can also do this through code. Set the following property.

VB Example...iPlotX1.XYAxesReverse = True

Visual C++ Examplem_iPlotX1.SetXYAxesReverse(TRUE);

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 304 of 336 Iocomp Components – Plot Pack Manual

Page 317: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: How can I find out the background grid spacing programmatically? The scale seems to adjust automatically.

A: The Grid Lines by default are drawn to the Major Ticks of Axes. You can configure whether or not Major and/or Minor ticks and which axes (either onesingle or all axes) participate in the drawing of grid lines.

The major tick assignments are governed by our automatic 1-2-5 rule which ensures that the major tick labels fall on "human readable" marks such as 0, 25,50, 75, 100 or Jan 1, Jan 8, Jan 15, Jan 22. You can modify our automatic scaling by modifying the various properties that affect the automatic scaling.These properties tell the component about minimum spacing between labels, desired increments between major ticks, desired starting major tick values,minimum label lengths, etc. By default, they are setup for automatic scaling, but you can change to override the automatic settings.

Such properties include...LabelsMarginLabelsMinLengthAutoAdjustLabelsMinLengthDesiredIncrementDesiredStart----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I've got some trouble in my application, I've got special IO-Card in my PC and I capture data at 50Hz freq. Well, if my capture time is 100sec Imust have 5000 points, without adding my point to iPlot , I've got all points but when I want to add each value in iPlot I'm loosing some data, ex:I've got only 4500 points. I think that I've got a lot of overhead in my acquisition procedure when i add the call to iPlot AddXY function ! But, if iset visible property of iPlot to false, capture data, add data to iPlot (invisible state) then when finished i put visible on, and yes, I've got 5000 pointsand a correct plot. The conclusion: The process of drawing is slow! What can i check to accelerate the drawing process, is it possible to draw every'x' points ?

A: It looks like you are running into a Buffer Overflow in your data collection code. Are you using a Windows timer to collect data? If so, then sinceWindows Timer events are the lowest priority on the system, they will be dropped in favor of higher priority tasks such as painting.

You would first need to design your buffer to be able to handle other tasks that might be occurring on your system. A windows timer is not the best methodas the timer has the lowest priority on the system, which will result in buffer overflows if anything else on the system needs more processor time such asrepainting our component, disk access, repainting your form, etc.

As far as performance of our component, there are several things you can do to improve performance. Since repaints of our component are low priority onthe system (higher priority than the Windows Timer though), our component will simply drop frames if other tasks need more processor time.

1. You can "throttle" the painting of the component by using the AutoFrameRate feature and setting the maximum number of component repaints by settingthe UpdateFrameRate property. By default, the component will not paint more than 60 frames per second. You can take this down to a lower level to reducethe number of repaints per second. 2. You can "cache" interfaces to our component sub-objects if you are using our ActiveX components. Since accessing OLE interfaces has some overhead,you can cache the interface to a sub-object such as a channel or annotation by using a local variable. See our Plot Pack manual for more information.http://www.iocomp.com/documentation3. Use the iPlot component whenever your data follows the y=f(x) formula. Only use the iXYPlot component if your data does not always increment ordecrement or does not follow y=f(x). The iPlot component has many speed enhancements that can only be done on data that follows y=f(x), which mostcharts do follow.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Been looking at your charting component for displaying historical data. If I'm adding data using Channel.AddXY(). What format does thedate/time value have to be in? (for the X axis in my case)

A: If you have configured the X-Axis labels to format Date/Time, then the X-Values you pass to the channel must be in DateTime format. This format is aMicrosoft standard where a value of 0.5 = 12 hours, 7.0 = 1 week, 37669.5 = February 17 2003 at noon, etc.

What development environment are you using? Visual Basic and Visual C++ have functions for converting and dealing with the DateTime format, such asCDate. Let me know if this helps or if you need any other information or assistance.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 305 of 336

Page 318: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: For .NET is the Dev environment. As far as I can tell there are no overloaded functions which allow DateTime to be added? The parameters for Channel.AddXY() are 'doubles' and according to the documentation the only way (I think) to add date/time based data is by the Channel.AddXYArray(Data as Variant) but only as long as the time interval between samples is constant!? My requirements are simply an X/Y plot withtime on the X axis - not necessarily evenly spaced samples - and my data values on the Y axis. Do you have any pointers?

A; DateTime format is in Double format. DateTime is simply a way of encoding dates and times into a floating-point value and is not a class. You wouldsimply pass your date as a DateTime value (a double) as the first parameter of AddXY, and then the Y-Value coordinate as the second value.

For example in Visual Basic, add an iPlotX component and configure the X-Axis Labels to Date/Time.

Dim DateTimeValue as DoubleDim YValue as Double

'CDate Converts a date in string format to a double, or DateTime valueDateTimeValue = CDate("01/15/2003 2:45:23pm")YValue = 25.3

'Add a single X-Y coordinate pointiPlotX1.Channel(0).AddXY DateTimeValue, YValue

Customers ReplyOk, then to summarize: In order to add data/time based data to an iPlot chart we can happily use the Channel.AddXY(double x, double y) where, say, if the xaxis is defined as being a time axis the x values are in OLE date format (as a double)

For .NET btw this is done by calling 'ToOADate()' on a 'DateTime' object.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I would like to plot just the points, and not draw a line between points. Even better can the program switch back and forth during run time froma scatter plot to a line plot?

A: The Plot components support showing any of the following for a channel, either by themselves or in any combination. Data Markers Trace Lines Bars High-Low Bars (Available in our latest Version 3.x Beta)

By default, the chart is setup to only show the Trace Line between points. To do a scatter plot, you can simply turn off the Trace Line and Turn on the DataMarkers. You can show both the line and the markers, only one of them, or both if you would like.

For example, in Visual Basic you would set the following properties.

iPlotX1.Channel(0).MarkersVisible = TrueiPlotX1.Channel(0).TraceVisible = False

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: When I launch the Print Dialog and then switch to another application and switch back to the application, the Print Dialog is not display on topbut rather it stays behind the application. But I could see the Print dialog on the task bar. Is there a way to bring it to front again?

A: Currently, the only way to bring the Print Dialog back is to use the task bar or Alt-Tab. You could use some API commands on the dialog, but you wouldneed to search all visible dialogs and then command that dialog to come to the front. Though that can be difficult in Visual Basic. The Print Dialog is thestandard Microsoft supplied Print Dialog.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: When I set the x-axis's Min property to GetNow(). But would like to advance it by, say, 30 seconds from the current time triggered by GetNow(),how can I add that extra 30 seconds after calling the GetNow() method?

A: What compiler are you using? In DateTime, one day is equal to 1.0, one hour is equal to 1/24, etc.Assuming you are using Visual Basic here is an example.

Visual Basic Example

Const OneSecond As Double = 1 / (24# * 60# * 60#)iPlotX1.XAxis(0).Min = Now() + OneSecond * 30

...or ...

Const OneSecond As Double = 1 / (24# * 60# * 60#)iPlotX1.XAxis(0).Min = iPlotX1.GetNow + OneSecond * 30

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 306 of 336 Iocomp Components – Plot Pack Manual

Page 319: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: In the iPlotX component is there a simple way to synchronize the scroll and/or zoom of all X Axes (and Y Axes - independent of X Axes)? Note:the Axes all have different min and span values.

I have provisionally implemented this for scrolling using: the OnXAxisMinChange to find the amount moved. the span ratio for the next axis. moving the next axis by the scaled amount.

This works OK for scrolling but then does not work correctly when zooming since the Min Change event is fired for both span and scroll.Is there a way to detect if in zoom or scroll axes modes from the Plot Object? If so, then the OnXAxisMinChange could be skipped when zooming andpresumably the span change when scrolling. Any ideas or solutions would be much appreciated.

A: The easiest way to do this would be to use the MasterUIInput property of each axis. If this property is set to TRUE for an axis, then scrolling or zoomingthat axis will affect all other axes of that type (X-Axes only affect other X-Axes, Y-Axes affect other Y-Axes). If you want the scrolling or zooming of anyX-Axis to affect the other X-Axes, then set this property to True on ALL X-Axes.

iPlotX1.XAxis(0).MasterUIInput = True

NOTE: this property only affects Scrolling and/or Zooming initiated by the user. This property doesn't affect scrolling or zooming that is done automaticallyby the component either by the built-in tracking function or by setting the Min or Span properties through code.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I would like to know if there is a way to allow user to move left/right to the next adjacent major tick on the x-axis?

A: Here is some VB6 sample code that will allow you to accomplish this for you.

Option ExplicitPrivate XAxisMajorTickSpan As DoublePrivate TempXAxisMajorTickPrevious As Double

Private Sub iPlotX1_OnKeyDown(Key As Integer, ByVal Shift As Integer) 'Only move X-Axis if it has the focus If iPlotX1.XAxis(0).UserSelected Then 'Handle Left Key If Key = 37 Then 'Calculate position of next major tick iPlotX1.XAxis(0).Min = iPlotX1.XAxis(0).Min - XAxisMajorTickSpan 'Cancel Automatic, built-in arrow key Scroll Key = 0 End If 'Handle Right Key If Key = 39 Then 'Calculate position of next major tick iPlotX1.XAxis(0).Min = iPlotX1.XAxis(0).Min + XAxisMajorTickSpan 'Cancel Automatic, built-in arrow key Scroll Key = 0 End If End IfEnd Sub

Private Sub iPlotX1_OnXAxisCustomizeLabel(ByVal Index As Long, ByVal ValueAs Double, ALabel As String) 'Calculate the distance between major ticks This value will be calculated several times during each repaint, but the last time it is 'calculated will represent the span between the last two major ticks after the automatic scaling has been completed If (Value > TempXAxisMajorTickPrevious) Then XAxisMajorTickSpan = Value - TempXAxisMajorTickPrevious End If TempXAxisMajorTickPrevious = ValueEnd Sub

The UserSelected property is part of our Version 3.x Plot Pack. If you have Version 2.x, just omit the check to see if the X-Axis is selected. In Version 3.xSP1, we will be adding the capability to directly specify how much the axes scroll when using the keyboard without using the code above. The above codewill work in the meantime as the Plot Components give you the necessary tools to accomplish the same thing with a few lines of code.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I tried using event handler to change the tick label if detected Value = 100 to ALabel = "Hundred". But I could not see the result on my GUI?

A: This is an issue in computer languages where the expression (1.0 = 1.0) doesn't always return TRUE. This does not happen with Integer values, but occurswith floating point numbers such as Doubles. Since floating point numbers are stored as approximations in the computer to the resolution of the data type(for doubles this is 14 to 15 digits), 1.0 can sometimes actually be 0.9999999999999 or can sometimes be 1.0000000000001. So the expression0.9999999999999 = 1.0000000000001 would be False and 1.0 = 1.0000000000001 would also be False.

Now, the majority of the time 1.0 = 1.0 will return True, which leads some people to believe that it will always return True, which is not the case whendealing with floating point numbers.

We recommend that you setup your If statement as follows...

Private Sub iPlotX1_OnYAxisCustomizeLabel(ByVal Index As Long, ByVal Value As Double, ALabel As String) If Value > (100 - 1E13) And Value < (100 + 1E13) Then ALabel = "hundred" End IfEnd Sub

The reason that we use 1E13 is that doubles have precision out to 1E14, so if we check for values with slightly less resolution, everything will work outcorrectly.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 307 of 336

Page 320: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I would like to toggle display of a channel in the data view by allowing the user to double click on the corresponding channel in the legend. I'musing .NET with C# and can intercept the double-click event. The question is how to tie that to a specific channel in the legend?

A: You can accomplish this with the following code.

Visual Basic 6

Option Explicit Private SelectedChannel As Integer

Private Sub Form_Load() Dim i As Long Dim x As Long Dim tempChannel As iPlotChannelX

'Add Random Data to all channels in the Chart For i = 0 To iPlotX1.ChannelCount - 1 Set tempChannel = iPlotX1.Channel(i) For x = 0 To 100 tempChannel.AddXY x, Rnd(1) * 100 Next x Next iEnd Sub

Private Sub iPlotX1_OnDblClick() Dim x As Long

'Hide all Channels For x = 0 To iPlotX1.ChannelCount - 1 iPlotX1.Channel(x).Visible = False Next x

'Show Selected Channel iPlotX1.Channel(SelectedChannel).Visible = TrueEnd Sub

Private Sub iPlotX1_OnGotFocusChannel(ByVal Index As Long) 'Cache the channel that was selected. This event will fire just before OnDblClick SelectedChannel = IndexEnd Sub

C#.NET

int SelectedChannel;private void Form1_Load(object sender, System.EventArgs e) { Random TempRandom = new Random(); iPlotLibrary.IiPlotChannelX TempChannel;

//Add Random Data to All Channels for (int i = 0; i <= axiPlotX1.ChannelCount - 1; i++) { TempChannel = axiPlotX1.get_Channel(i); for (int x = 0; x <= 100; x++) { TempChannel.AddXY(x, (TempRandom.NextDouble() * 100)); }; }; }private void axiPlotX1_OnGotFocusChannel(object sender, AxiPlotLibrary.IiPlotXEvents_OnGotFocusChannelEvent e) { //Cache the channel that was selected. This event will fire just before OnDblClick SelectedChannel = e.index; }private void axiPlotX1_OnDblClick(object sender, System.EventArgs e) { //Hide all channels for (int x = 0; x <= axiPlotX1.ChannelCount - 1; x++) { axiPlotX1.get_Channel(x).Visible = false; }; //Show Selected Channel axiPlotX1.get_Channel(SelectedChannel).Visible = true; }

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Is there a way to enable tracking enabled on the x-axis without reseting the zoom?

A: Yes; you will need to call UpdateResumeValues on the axis in question. This will accept the zoom settings so that they will not revert back to theprevious settings before you stopped tracking.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I would like to zoom in by 0.5 for the Chart based on the range selected by the Zoom Box. How do I do that under OnBeforeZoomBox() method?

A: The OnBeforeZoomBox passes you Left, Right, Top, and Bottom pixel coordinates. You can use these coordinates along with the PixelsToPositionmethod of the Axes or DataView to convert to coordinates on the axes. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 308 of 336 Iocomp Components – Plot Pack Manual

Page 321: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I am using Prefix style on the Y-Axis but would like to display values on the Cursor Hints based on thousands separated commas format?

A: This feature has already been added to our Version 3.x beta version per your request, and from several other customers who were requesting thousandsseparated comma format. It allows you to specify formatted values differently on the Axes versus the Legend or Data Cursors. If you would like to downloadthe Version 3.x beta, e-mail me and I can get you setup.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I couldn't get the handle for Component.iPlotX.XAxis(0) to pass to a Win32 API function. How can I get the handle?

A: The Plot component sub-objects (such as axes, channels, labels, tool bar, legend, etc.) are not windowed controls. The iPlotX component is a single,windowed ActiveX component. It only has one Window handle which is found on the main component interface.

To access the Plot Component's handle, access The ComponentHandle property of the control...

value = iComponentX.ComponentHandle

Depending on your development environment, they may also provide their own handle property in addition to ours.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Can now intercept the arrow keys on the keyboard to detect whether user press left or right to move the data cursor by +/-30. But how do Iachieve the same for mouse clicking? If user click on the right-hand side of the vertical Data Cursor line then it should move by +30 and vice versa.

A: You will need to use a combination of our PositionToPixels and PixelsToPosition method(s) on the X-Axis to convert the current X mouse pixelcoordinate (obtained from the OnMouseUp) event. These methods allow you to convert the pixel position of the mouse to positions on the X-Axis. You thencompare this position on the X-Axis to the position of the Cursor, and then move the cursor accordingly.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I bought the plot pack and I made a Windows program using the iPlotX So, I want to run my program on another computer. I must move mycomputer's Plot OCX file to another computer ,and then use Regsvr32 on the OCX file? Or is there some other utility? And If there was anevaluation OCX already installed, is it OK just to register it using "regsvr32"?

A: There are many ways to install your program and our OCX files on another computer. Some people like to use a software installation package such asWise, InstallShield, Windows Installer, or the Package and Deployment Wizard (if you are using VB). Others like to manually install their software andour components.

See our FAQ: http://www.iocomp. com / faq / acx /FAQ001.htm The manual registration process of our ActiveX components is the same whether you are usingour evaluation version or our full-product version.

Yes; manual registration just requires that you call "regsvr32" on a command line along with the name of the ActiveX OCX file you wish to register.

If you are distributing to Windows 95 or Windows 98 computers, you will probably need to install DCOM95 (for Win95) or DCOM98 (for Win98) if it hasnot already been installed. There are no dependencies on any other files on Windows ME/NT4SP3/2000/XP computers.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I intercept the index of the items in the X-Axis pop up menu? OnPopupMenuXAxis() doesn't seem to do the trick.

A: Currently you can't do this. The OnPopup events in the component allow you to get the index of the object that is calling it's internal pop up. The event isintended to allow you to override our pop up menu with your own custom pop up menu.

For example, if OnPopupMenuXAxis is fired, and it passes you an index of "2", then the X-Axis with index 2 (i.e. the third axis in the chart) was the X-Axisthat called this event.

You will then have the opportunity to Cancel our built-in pop up (By setting the variable "Cancel" passed to you by reference), and use your own pop upinstead. The ScreenX and ScreenY values are provided so that you can easily position your own custom pop up right where we would have placed our popup.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Also how do I disable the Zoom Axes mode to just zoom X-Axis only?

A: There are several ways to zoom the plot with the tool bar. 1. The Zoom In and Zoom Out Buttons (Look like a magnifying glass with a -and + inside the lens). These buttons zoom all axes according the ZoomIn/OutFactor setting of the ToolBar Object(iPlotX1.ToolBar(0).ZoomInOutFactor).2. The Axes Mode buttons (Looks like a cross of two double-headed arrows and a magnifying glass with four arrows). These control whether clicking on andaxis and moving the mouse, scrolls or zooms that particular axis. Zooming is controlled by the movement of the mouse when the Zoom Axis Mode button isclicked down.

3. The Zoom Box (looks like a lightly-dotted square). This zooms in on the selected area by the mouse. This affects all axes.

If you want to just zoom in on one particular axis (without having the user click the Zoom Axis Mode button and use the mouse to zoom in-out), then youwill need to implement your own code using the Zoom method of the axis object...

iPlotX1.XAxis(0).Zoom 2 'Zooms the axis out two fold (i.e. doubles the span)iPlotX1.XAxis(0).Zoom 0.5 'Zooms the axis in two fold (i.e. halves the span)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 309 of 336

Page 322: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I manually call DoButtonClickZoomAxesMode() but it doesn't reset back when clicked the second time?

A: When you mean it doesn't reset, do you mean that the mouse cursor doesn't reset back to the default scrolling behavior of the mouse instead of zooming?Calling DoButtonClickZoomAxesMode changes how the mouse is interpreted when used on the Axis (i.e. when you call this, clicking and dragging on theaxis now makes it zoom in and out instead of scroll). To go back to scrolling, call DoButtonClickScrollAxesMode.

If you want to call the ZoomIn and ZoomOut buttons, you would need to call either DoButtonClickZoomIn or DoButtonClickZoomOut. If you want yourown custom zooming (such as zooming only one axis), then you will need to create your own ToolBar and call the Axis methods (Zoom or ZoomToFit)----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I have a situation here: I need to display two kind of plot: the Long Term data and the Short Term data. Since AddDataView is not available atthe moment, is there anywhere I can display the data for two separate plots (one for the Short Term and the other for the Long Term) using thesame Channel Items?

What I am trying to accomplish is that I need to have two separate DataViews to display two different information :1. Long Term Data (plotting data to chart every hour)2. Short Term Data (plotting data to chart every half an hour)

The data being plot to the two DataViews are based on the same Channel Items displaying on the Legends. Since your AddDataView is not working rightnow, is there any alternative to doing it?

A: You can use our stacked axes feature, whereby you can have a common X-Axis for all data and have two, separate Y-Axes. See the bottom, right-handchart on this web page: http://www.iocomp. com /components/ plot / PlotPackComponents.htm

The only other alternative would be to use two components. Add your data to each chart (duplicate data), but only show the legend in one of the charts.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I got a major problem in modifying your source code. I am trying to add the thousand comma separated feature for the plot chart it works on thedesign time but not for the runtime. It just displays "Unknown". What am I missing here.

A: One of our developers is currently working on integrating this feature into the Plot Axes. We can send you an updated source file if you would like, oryou can obtain the update in one of our next Version 3.x betas. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: When the channel focus is changed by clicking on a new channel in the legend, the data cursor does not automatically update to the new channel.If I then move the cursor manually slightly and reselect the new channel, the cursor updates correctly.

A: This is by design since the component supports multiple data cursors displayed at one time, the last Data Cursor to have focus before clicking on a channel in the legend is the DataCursor that has its channel changed. When you click into a blank area of the Legend, then the Legend takes focus, soclicking on a channel no longer has any meaning since the Data Cursor has lost focus.

We are planning on adding an option to the Legend to prevent it from taking focus all together. In our Version 3.x Plot Pack, there is currently aUserSelected property which you can use to reset the DataCursor focus when the Legend obtains focus by using the OnGotFocusLegend event. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: It seems that I set the ScrollMinMaxEnable to TRUE and set the .Min, Span, ScrollMin, and ScrollMax to the limit that I like but somehow thecode doesn't work. The axis still can scroll beyond the limit. It works for Linear scale. Is this a bug ?

A: This is one of those situations where it is not really a bug, but the ScrollMinMaxEnable feature of the component does not work with Log10 scales ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I would like to jump the data point cursor by 30 when user press on the CTRL+LEFT ARROW/RIGHT ARROW key on the keyboard. How doI intercept it?

A: Here is a Visual Basic Example. Create a new project and drop down an iPlotX component.

Private Sub Form_Load() iPlotX1.DataCursor(0).Visible = TrueEnd Sub

Private Sub iPlotX1_OnKeyUp(Key As Integer, ByVal Shift As Integer) 'Handle Right Arrow Key and Ctrl Key If Key = 39 And Shift = 4 Then iPlotX1.DataCursor(0).Pointer1Position = iPlotX1.DataCursor(0).Pointer1Position + 30 End If 'Handle Left Arrow Key and Ctrl Key If Key = 37 And Shift = 4 Then iPlotX1.DataCursor(0).Pointer1Position = iPlotX1.DataCursor(0).Pointer1Position - 30 End IfEnd Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Page 310 of 336 Iocomp Components – Plot Pack Manual

Page 323: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: Can you have more than one cursor within a plot?

A: Yes; by default, we automatically add one cursor for you. You can add additional Data Cursors.

Visual BasicIndex = iPlotX1.AddDataCursor

And then use the Index value returned to access the Data Cursor.iPlotX1.DataCursor(Index).Style = ipcsDeltaY

Visual C++Index = m_iPlotX1.AddDataCursor();

And then use the Index value returned to access the Data Cursor.iPlotX1.GetDataCursor(Index).SetStyle(4); //ipcsDeltaY

Delphi(Windows/Linux) Index := iPlot1.AddDataCursor;

And then use the Index value returned to access the Data Cursor.iPlot1.DataCursor[Index].Style := ipcsDeltaY;

CBuilder(Windows/Linux)Index = iPlot1.AddDataCursor();

And then use the Index value returned to access the Data Cursor...iPlot1.DataCursor[Index].Style = ipcsDeltaY;

The tool bar button "Show Cursor" shows or hides all cursors at once. You can programmatically control the visible property of individual cursors if youwish. Since the Plot Components are object oriented, you can add as many X-Axes, Y-Axes, Channels, Limits, Labels, and Data Cursors as you wish. (Note:currently only one tool bar, one legend, and one DataView object are currently supported at this time ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: How do I set the Y-Axis scale to look like below:0.1, 1, 10, 100, 1,000, 10,000, 100,000, 1,000,000, 10,000,000, 100,000,000,1,000,000,000, 10,000,000,000

A: To do this will depend on the size of the component. Our scales are designed to automatically create labels that are "human readable" and follow nicelooking, round numbers.

You will need to configure the Y-Axis as follows (Note: you can do this through the property editor as well).

Visual Basic Example

Private Sub Command1_Click() With iPlotX1.YAxis(0) .Min = 0.1 .Span = 10000000000.9 .ScaleType = ipstLog10 .DesiredStart = 0.1 .LabelSeparation = 0.25 End WithEnd Sub

If you are looking for the labels to have digit groupings (i.e. the thousands separator ","), this is not currently supported but will be added in a later servicepack of our Version 3.x release. Currently, you can configure the scale to use scientific notation (e.g. 1.00E+010).

iPlotX1.YAxis(0).LabelsFormatStyle = iptfExponent

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: When I keep clicking on the ZoomIn or ZoomOut, the Y-Axis keeps incrementing/decrementing the scales like there is no limit. How do I set theZoomIn and ZoomOut to a certain limit?

A: You would need to use the OnYAxisSpanChange and/or OnXAxisSpanChange events. In these events, you would evaluate what new span the user wasattempting to make, and would then restrict the values as you see fit. For example, to restrict the scale from zooming out past values between -100 and 100,do the following (create a blank VB project and drop down an iPlotX component).

Private Sub Form_Load() 'This feature controls how far the user can scroll the axes with the mouse, but does not affect the zooming feature iPlotX1.YAxis(0).ScrollMinMaxEnabled = True iPlotX1.YAxis(0).ScrollMin = -100 iPlotX1.YAxis(0).ScrollMax = 100End Sub

Private Sub iPlotX1_OnYAxisSpanChange(ByVal Index As Long, ByVal OldValue As Double, ByVal NewValue As Double) 'If the span is too big, simply set the Min and Span to the maximum allowable values that we desire If NewValue > 100 Then iPlotX1.YAxis(Index).Span = 200 iPlotX1.YAxis(Index).Min = -100 End IfEnd Sub

You can of course setup the Y-Axis using the Property editor instead of using the code in the Form_Load event as shown above.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Iocomp Components – Plot Pack Manual Page 311 of 336

Page 324: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

Q: I am facing a problem of displaying values in Data Cursor from a log base 10 Y axis in antilog values. How do I go about displaying antilogvalues for my data cursor from the Log base 10 Y-Axis?

A: Here, we don't have a built-in conversion for you. However, you can dynamically replace what we display in the Data Cursor with your own values. Thisallows you to take the value we give you, calculate the antilog value, and then display that value to the user. You will be utilizing theOnDataCursorCustomizeHint event...

Option Explicit

Private Sub Form_Load() Dim x As Long

'Setup Y-Axis for Log10 scale iPlotX1.YAxis(0).ScaleType = ipstLog10 iPlotX1.YAxis(0).Span = 10

'Add some data For x = 0 To 100 iPlotX1.Channel(0).AddXY x, Rnd(1) * 9 + 1 Next xEnd Sub

Private Sub iPlotX1_OnDataCursorCustomizeHint(ByVal Index As Long, AText As String) Dim XValueString As String Dim XValue As Long Dim YValueString As String Dim SeparatorPos As Long

'Get Position of "," character in Tooltip String AText should be something like "10, 5.2" Where 10 is the X value and 5.2 is the Y Value SeparatorPos = InStr(AText, ",")

'Separate X and Y Values XValueString = Mid(AText, 1, SeparatorPos - 1) YValueString = Mid(AText, SeparatorPos + 1, Len(AText) - SeparatorPos)

'Convert YValue from Log10 to Linear YValueString = CStr(10 ^ CDbl(YValueString))

'Reconstruct Tooltip String AText = XValueString & "," & YValueStringEnd Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: In the iPlotX chart print feature. How do I change the background color property to some other color, such as white background, beforeprinting it to the B/W laser printer without affecting the current chart?

A: To modify the chart before printing (such as modifying colors, etc), use the OnBeforePrint and OnAfterPrint events. The OnBeforePrint event will firejust before the chart is sent to the printer. This gives you the opportunity to make changes to any and all colors in the component, and then the OnAfterPrintevent will the fire after the chart is sent to the printer allowing you to set the color scheme back as you desire.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: For the Channel Title under Legend >Column Titles, I have enabled Visible. But how do I change the title text just like any other title property?

A: These channel titles indicate whether the data in that column represent the Channel Title, X-Axis Title, Y-Axis Title, Channel Running Y Max, ChannelRunning Y Min, or the Channel Running Y Mean value. These are fixed titles and cannot be changed.

Having said that, you can change any "fixed" string in the Plot Pack using our Translation Feature. Generally, this is used to translate all "fixed" strings inthe Plot Pack to another language, but you can translate just a few strings, such as the titles in the legend, to the titles of your choice. Note that the translationfeature translates entire strings, not substrings, and affects that same string throughout the entire component.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I am using iPlotX component and my problem is that how to display current system clock time by using AddYElapsedTime function on the X-axis?

A: You will need to configure the X-Axis to use Date Time Mode. This sets-up the X-Axis to interpret values in Microsoft Date/Time format. (See our PlotPack manual for an explanation of Date/Time format) Open our property editor, and goto the X-Axis Tab. Click on the Labels tab. Choose "Date/Time"from the Format Style combo box to enable Date Time Mode. In the Date Time Format combo box, either choose one of the pre-defined format strings orenter your own custom string. The default is "hh:nn:ss" which will show hours in 24-hour format, minutes, and seconds.

Also, be sure to reconfigure the default span for the X-Axis when in Date/Time mode. By default, the span of the X-Axis is 100. In Date/Time mode, thiscorresponds to a span of 100 days! Use the "..." button next to the Span edit box to use our built-in Date/Time calculator.

If you are wishing to setup the X-Axis through code (assuming you are using VB)...

iPlotX1.XAxis(0).LabelsFormatStyle = iptfDateTimeiPlotX1.XAxis(0).DateTimeFormat = "hh:nn:ss"iPlotX1.XAxis(0).Span = "0.5" 'Sets span to 12 hours

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: What would be a way to restrict the ZoomBox reset method to only one of the two dimensions as per the X-Axis?

A: Use the OnBeforeZoomBox Event and cancel the zoom, and use the left and right coordinates in pixel to position method to do the zoom as per theexample below.

Private Sub iPlotX1_OnBeforeZoomBox(Left As Long, Top As Long, Right As Long, Bottom As Long, Cancel As Boolean) Cancel = True iPlotX1.XAxis(0).Min = iPlotX1.XAxis(0).PixelsToPosition(Left) iPlotX1.XAxis(0).Span = iPlotX1.XAxis(0).PixelsToPosition(Right) - iPlotX1.XAxis(0).PixelsToPosition(Left)End Sub

Page 312 of 336 Iocomp Components – Plot Pack Manual

Page 325: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Appendix N - Frequently Asked Questions

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: When printing the image of the iPlotX component it has very thick Trace lines although the TraceLineWidth is set to 1?

A: For some printer drivers, you need to set the line width to 0 to get the same effect with the screen. For the screen, setting the line width to 0 or 1 looks thesame. So for a default, you should always use a line width of 0 for your application.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I want the X and Y axes to intersect at the origin?

A: Set X an Y axes CartesianStyle to Master.

iPlotX1.XAxis(0).CartesianStyle = ipcsMasteriPlotX1.YAxis(0).CartesianStyle = ipcsMaster

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I want to display 500 value on the screen, and when I receive 500 value I want to restart the drawing from X = 0. The Problem being is that atrace line is drawn horizontally across the graph from X = 499 to X = 0, completely distorting the graph as shown in Figure N.1. How can I removethis trace line?

A: Use two or more channels to view the incoming data, this is to remove the distorted line from the graph as seen in Figure N.2.

Figure N.1Example Showing the wrong way of adding Data

Figure N.2Example Showing the right way of adding Data

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: I am having problems, I would like to be able to set the intervals of my major ticks in the X-Axis (Time "mm/dd hh:mm"). To explained better,currently I allow users to set the Span (i.e 10 min) but also I want to allow him/her to set the Major Ticks (i.e 2 min) so the X-Axis will be plotted asfollow: 05/28 10:00 05/28 10:02 05/28 10:04 05/28 10:06 05/28 10:08 05/28 10:10 I 'he already tried Setting the Desired Increment, LabelSeparation, etc without any success. Can I do this at all or not??

A: There are three properties that control the X-Axis spacing for DateTime formats. These are the DesiredIncrement, LabelSeparation, and LabalMinLength.The correct settings for the desired look is to decrease LabelSeparation and increase LabelsMinLength along with the DesiredIncrement as shown in FigureN.3.

iPlotX1.XAxis(0).LabelSeparation = 0.5 iPlotX1.XAxis(0).LabelsMinLength = 11

Figure N.3Example of

DateTime Span of10 Min.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Q: Why does the text not rotate when I set the rotation angle?

A: Only True-Type fonts support rotation. If you use a non True-Type font like "MS Sans Serif", the text will not rotate. Use a font like "Times New Roman"or "Arial"

Iocomp Components – Plot Pack Manual Page 313 of 336

Page 326: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Index

1-2-5 Rule, 3, 33, 35, 36, 40, 91, 92, 94, 204, 205, 3052-Dimensional, 289-292, 294, 295Add,

Annotation, 60Channels (Property Editor), 191Data, 79-86, 87-90DataArray, 109Data-Cursor, 55FAQ - Add Items to Popup Menu, 300FAQ - Add Text Annotation, 300FAQ - Data Cursor, 311Image-Annotation, 63ImageListCustom Bitmaps (Property Editor), 188Labels, 49Layout Viewer Plot Object, 76Limit Band Elements, 73Limit, 74Table-Columns, 50Table-Rows, 50Tables (Property Editor), 212Tables, 50Translations (Property Editor), 189 UserCanAddRemoveChannels, 8Variant Arrays, 289-296AddAnnotation, 60-70

AddBandElement, 73, 201, 202AddChannel, 175AddColumn, 50-52Adding Data

AddDataArray, 15, 109, 189, 291, 293, 296AddDataCursor, 55, 311AddDataView, 310AddEmpty, 85-87AddHighLow, 23-25, 81AddNull, 85, 87AddXEmpty, 86, 87,AddXNull, 85, 87-90AddXY, 79-86, 161, 172AddXYArray, 84, 289-292, 294, 306AddXYArrays, 84, 168, 290, 292, 294, 295AddYArray, 84, 290, 293, 295AddYElapsedSeconds, 83, 300AddYElapsedTime, 83, 84, 312AddYNow, 84, 302AddDataArray, 15, 109, 189, 291, 293, 296

AddDataCursor, 55, 311AddDataView, 310AddEmpty, 85-87AddLabel, 49 AddHighLow, 23-25, 81AddLimit, 71-73AddNull, 85, 87AddRow, 50-52AddTable, 50-52AddTranslation, 99AddXAxis, 151, 152AddXEmpty, 86, 87AddXNull, 85, 87-90AddXY, 79-86, 161, 172AddXYArray, 84, 289-292, 294, 306AddXYArrays, 84, 168, 290, 292, 294, 295AddYArray, 84, 290, 293, 295AddYAxis, 151, 152AddYElapsedSeconds, 83, 300AddYElapsedTime, 83, 84, 312AddYNow, 84, 302Aliasing, 58Align, 39, 95, 96, 208

Page 314 of 336 Iocomp Components – Plot Pack Manual

Page 327: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Alignment, 10, 38, 48-50, 184, 203, 208AlignRefAxisName, 38-39Analog, 1, 4, 177, 196Annotation, 8, 12-13, 60-70, 77, 108, 119, 122, 132, 134, 137, 143, 154-156, 185, 188, 190, 298-300AnnotationDefaultBrushColor, 13AnnotationDefaultBrushStlye, 13AnnotationDefaultFont, 13AnnotationDefaultFontColor, 13AnnotationDefaultPenColor, 13AnnotationDefaultPenStlye, 13AnnotationDefaultPenWidth, 13AnnotationIndex, 300AnsiString, 126, 128, 130Antilog, 312API, 14, 60, 63, 276, 299, 301, 304, 306, 309AppWizard, 224, 235Array, 15, 83-84, 109, 289-296Arrow Keys, 105, 307, 309, 310ASP, 109-111, 170, 171, 289, See VBScriptAsynchronous, 14, 15, 79, 164, 189, 197ATL, 299Attributes, 10, 48, 190, 193, 198, 203, 211, 212Auto-generated, 228Auto-Scale, 37, 94Auto-Scaled, 94Auto-Scroll, 37, 94AutoConnect, 174AutoFrameRate, 9, 10, 160, 161, 178, 185, 301, 304, 305AutoLabel, 40, 91, 92Automated, 3, 15, 32, 91, 149AutoScale, 3, 15, 33, 35, 36, 40, 91, 93, 94, 204, 205AutoScrolling, 15AutoSize, 51Average, See MeanAxes, See AxisAxes-Mode, 105AxesControl, 29, 105AxesControlEnabled, 29, 105AxesControlMouseStyle, 29, 105AxesControlWheelStyle, 29, 105Axis, 8, 32-41, 66, 76-77, 96, 98, 104-105, 126, 159, 148, 203-209, 298-313BackGroundColor, 10, 29, 187, 210, 213, 215BackGroundGradientDirection, 10BackGroundGradientEnabled, 10BackGroundGradientStartColor, 10BackGroundGradientStopColor, 10, 11BackGroundTransparent, 11, 29, 210, 215Band, 45, 71-74, 154, 201, 202Bandwidth, 177BandX, 72, 201, 202BandY, 72, 201, 202Bar, 17, 27-28, 194BarBrushColor, 21BarBrushStyle, 21BarEnabled, 27, 28BarPenColor, 21BarPenStyle, 21BarPenWidth, 21BarReference, 17, 21BarVisible, 21BarWidth, 21, 27, 28Base, 5, 14, 16, 17, 34, 92, 177, 180, 204, 312Base-10, 34Baseline, 16Bearish, 25, 196BearishColor, 196BeginUpdate, 113, 160, 161, 185, 186, 301, 302, 304Beta, 306, 309Beveled, 186Binary, 20, 107Binding, 1, 168Bitmap, 8, 45, 60, 63, 64, 70, 109, 110, 188BMP, 109, 110, 113

Iocomp Components – Plot Pack Manual Page 315 of 336

Page 328: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Boolean, 137-140, 145, 164, 289, 300, 303, 312Border, 9, 30, 67, 186, 214, 215BorderStyle, 9, 186Borland C++ Builder, 263-268, 294-296Borland Delphi, 257-262, 294-296Borland Kylix, 257-268, 294-296Bottom-Left, 10, 190, 194-196, 202Bottom-Right, 10, 190, 194-196, 202BottomLeft, 187BottomRight, 187Browser, 110, 170-172, 175, 176, 275, 276Brush, 13, 22, 159, 190, 194-196BrushColor, 61, 67, 69Brushes, 165BrushStyle, 61, 67, 69bsBDiagonal, 159, 190, 194-196, 202bsClear, 159, 190, 194-196, 202bsCross, 159, 190, 194-196, 202bsDiagCross, 72, 159, 190, 194-196, 202bsFDiagonal, 72, 159, 190, 194-196, 202bsHorizontal, 159, 190, 194-196, 202bsSolid, 73, 159, 190, 194-196, 202bsVertical, 159, 190, 194-196, 202Buffer, 12, 15, 16, 20, 108, 109, 111, 164-166, 170, 177, 189, 191, 197, 300, 305Buffering, 161Buffers, 3Build, 164, 258, 264Bullish, 25, 196BullishColor, 196C:\Windows\System32, 236C:\Winnt\System32, 236CAB, 171Cache, 160, 186, 207, 302, 305, 308Calculate, 21, 59, 83, 86, 91, 198-200, 206, 287, 307, 312Calendar, 299Canceling, 45, 145CandleStick, 14, 21, 23, 25, 195, 196Capability, 11, 22, 37, 94, 174, 182, 214, 307Capacity, 20, 165Caption, 9, 48-49, 56, 111, 200, 203, 211, 223, 234, 244, 250, 256, 262, 267CaptionValueX, 200Capture, 181, 305Cartesian, 29, 41, 98, 154, 209, 210Cartesian-Axes, See CartesianCartesianChildRefAxisName, 98, 209, 210CartesianChildRefValue, 98, 209, 210CartesianStyle, 41, 98, 210, 313Case-sensitive, 189CCOM, 237, 240, 241CComModule, 83, 89, 153, 162, 169, 238CDate, 23-25, 81, 305, 306Center-point, 67, 68, 70Centered, 60, 63, 67, 68, 70, 98, 188, 203, 209Certificate, 171Channel, 15-28, 61, 96, 108, 158, 159, 164-165, 179, 199, 289, 290-292, 294-296Channel-Fill, 155ChannelCount, 158, 308ChannelIndex, 120, 123, 275ChannelName, 6, 56, 61, 67-70, 145, 158, 199, 300ChannelNameMaxWidth, 44, 210ChannelTitle, 43, 158ChannelTitleTextString, 158Child, 41, 98, 209, 210ChildRefAxisName, 41ChildRefValue, 41Children, 98Circle, 16, 187, 193CLASSID, 80, 83, 90, 163, 171-173, 277ClassWizard, 227, 228ClearAllData, 300ClearAllElements, 74Client, 80, 83, 90, 111, 163, 170, 171, 174, 276ClientRect, 203

Page 316 of 336 Iocomp Components – Plot Pack Manual

Page 329: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Clients, 171Clip, 8, 61, 66, 185ClipAnnotationsToAxes, 8Clipboard, 45, 104, 110, 113, 185, 214Clipped, See ClipClipToAxes, 61, 66Close,

Candlestick 23, 25, 195HighLow 23-24, 81, 195Log 108-109

Coding, 37, 168, 174ColeFont, 141, 142COleSafeArray, 291-293Column, 6, 8, 42-44, 50, 51, 107, 158, 210-212, 289-292, 294, 295, 312ColumnSpacing, 210, 212ColumnTitlesFont, 211, 212ColumnTitlesVisible, 44, 211, 212Com, 99, 171, 246, 251, 300, 305, 309, 310Compact, 20, 21, 110, 164, 166, 192, 302Compatibility, 48, 186, 191, 203Compatible, 110Compile, 63, 289Compiler, 1, 18, 55, 82, 161, 258, 264, 278, 287, 289, 306Completing, 76Complex, 1, 37, 112, 167, 299Component Editor, See EditorComponentHandle, 309ComponentRect, 299Compression, 20, 110Conditionals, 2Connect, 174, 176, 197Constants, 1, 278Content-Type, 80, 83, 90, 163, 173Context-Sensitive, 34, 99, 137-140, 199, 200Continue, 8, 144, 185, 224, 228, 235, 303Continuous, 3, 4, 15, 160, 177, 304Control-Images, 63Control-Panel, 178Conversion, 156, 298, 299, 312Conversions, 62, 289Convert, 11, 39, 55, 167, 208, 249, 254, 255, 298, 308, 309, 312Converted, 62, 109, 156, 167, 177, 305-306Coordinate

Annotations, 60-62, 68Data Point, 14, 19, 21, 79, 84, 86

Copy, 8, 34, 45, 104, 110, 112, 113, 157, 170, 171, 185, 206, 207, 214, 276CopyToClipboard, 3, 110, 113CopyToClipBoardFormat, 8, 45, 110, 113Count, 20, 42, 43, 51, 52, 159, 209, 211, 212Counter, 80, 83, 84, 173Coupling, 179Cpp, 82, 83, 89, 152, 153, 169, 231, 238, 239, 241CPU, 9, 101-103, 301, 304Create, See Add MethodsCRect, 299Cropped, 63, 188Cross, 16, 58, 108, 109, 170, 193, 198, 309Cross-hair, 58, 198Cross-platform, 108, 109, 170CSharp, 251Cubic, 14, 102, 193Cursor, 34, 39, 42, 45-46, 53-59, 75, 78, 104-105, 115-117, 130, 154, 157, 164, 182-184, 191, 198-202, 206, 208, 214, 301, 309-312CursorActive, 46, 157CursorDateTimeFormat, 58CursorFormatStyle, 58CursorMinLength, 58CursorMinLengthAutoAdjust, 58CursorPrecision, 58CursorPrecisionStyle, 58Cursors, 3, 6, 29, 39, 45, 46, 53-55, 57, 104, 156, 184, 198-200, 206, 208, 214, 309-311CursorScaler, 39, 55, 57, 58, 198, 200, 208CursorStyle, 57, 58, 201, 202CursorUseDefaultFormat, 58

Iocomp Components – Plot Pack Manual Page 317 of 336

Page 330: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

CursorXValue, 56CursorYValue, 56Curve-Fitting, 3, 103Curves, 101, 103Custom, 12, 30, 33, 40, 58, 75, 112, 188, 216, 217, 220, 227, 237, 247, 253, 259, 265, 288, 301, 304, 309, 310, 312Customization, 13, 56Customize, 16, 40, 46, 56, 245, 251, 301Customizing, 15, 40, 53, 55, 200Dash, 14, 190, 192, 194, 202Dash-dot-dot, 190, 192, 194, 202Dashed, 14, 31, 180, 202Data,

Bar, 17, 27-28, 194CandleStick, 14, 21, 23, 25, 195, 196Cursor, 34, 39, 42, 45-46, 53-59, 75, 78, 104-105, 115-117, 130, 154, 157, 164, 182-184, 191, 198-202, 206, 208, 214, 301, 309-312HighLow, 81, 195Markers, 3, 14, 16, 21-22, 26, 27, 42-44, 101, 113, 154, 158-159, 180, 190-194, 207, 211, 306Memory, 16, 20-22, 82, 161, 164-167, 192, 304Point 1, 9, 14-17, 20-27, 29, 42, 44-45, 53-54, 58, 60, 73, 79, 82, 84-90, 94-96, 101-104, 108-109, 114, 122, 125, 156, 159-161, 164-168, 174,176, 189, 191-199, 207-208, 211, 214, 289, 290-296, 298, 300-303, 305-306Style 16, 20-22, 164, 192, 302Trace, 3, 11, 14-16, 21-26, 53-54, 81, 85-87, 101-103, 141-143, 154-155, 158, 180, 191-193, 306, 313

Data Point 1, 9, 14-17, 20-27, 29, 42, 44-45, 53-54, 58, 60, 73, 79, 82, 84-90, 94-96, 101-104, 108-109, 114, 122, 125, 156, 159-161, 164-168, 174, 176,189, 191-199, 207-208, 211, 214, 289, 290-296, 298, 300-303, 305-306Data-Style, 166Data-View, 147DataAlignment, 51DataAlignmentMargin, 51DataArray, 84, 294DataBarBrushColor, 22, 27DataBarBrushStyle, 22DataBarPenColor, 22, 27DataBarPenStyle, 22DataBarPenWidth, 22DataBarReference, 22, 28DataBarVisible, 22DataBarWidth, 22, 28Database, 167, 171Database-Linking, 171Databases, 167DataBlockBegin, 177DataBlockClear, 177DataBlockEnd, 177, 182DataClose, 81, 195DataCursor, 5-8, 55-59, 105, 120, 123, 130, 133, 135, 138, 169, 272-275, 310, 311DataCursorPopUp, 138DataCursorStatus, 57DataCursorXValue, 57DataCursorYValue, 57DataEmpty, 86DataFileColumnSeparator, 8, 20DataFileFormat, 20DataFont, 212DataFontColor, 51DataHigh, 195DataIndex, 120, 123, 275DataLow, 195DataMarkerBrushColor, 22, 26DataMarkerBrushStyle, 22DataMarkerCharacter, 22, 27DataMarkerPenColor, 22, 26DataMarkerPenStyle, 22DataMarkerPenWidth, 22DataMarkerShow, 16, 21, 22, 193DataMarkerShowing, 22DataMarkerSize, 22DataMarkerStyle, 16, 21, 22, 27, 193DataNull, 87DataOpen, 195DataPointIndex, 300DataPointSize, 164DataPointXValue, 85DataPointYValue, 85

Page 318 of 336 Iocomp Components – Plot Pack Manual

Page 331: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Dataset, 21, 160, 192Datasets, 16DataStyle, 22-28, 81, 302DataTraceLineColor, 22, 25DataTraceLineStyle, 22, 26DataTraceLineWidth, 22, 25DataView, 6, 8, 11, 14-16, 18, 22, 29-31, 34, 37-38, 42-43, 45, 48-49, 57, 59-62, 68, 71, 74-78, 94-95, 98, 104-105, 113, 121, 124, 133, 135, 138, 141-143,148, 151-154, 156, 185-186, 191, 197-199, 207, 209, 214-217, 298-299, 304, 308, 310-311DataViewZHorz, 148, 151-153DataViewZVert, 148, 151-153, 299DataX, 51, 52, 85, 86, 120, 123, 159, 298, 300DataY, 24, 51, 52, 81, 85, 86, 159, 298, 300Date, 19, 22, 33, 81, 83, 84, 91, 107, 167, 176, 198, 206, 287, 288, 298, 299, 305, 306, 312Date-Time, See DateTimeDateSeparator, 288DateTime, 22, 84, 163, 167, 206, 207, 287, 288, 298, 305, 306, 313DateTimeFormat, 23-25, 81, 206, 287, 288, 299, 312DateTimeFormatString, 298, 299DateTimeValue, 306DCOM, 174DCOM95, 309DCOM98, 309Deactivate, 20, 186Deactivated, 189, 197Decimal, 8, 33, 58, 205, 206, 278, 287Declaration, 239Decreased, 105Default,

Annotations, 13, 190Axis Formatting 34, 205Cursor Formatting 34Legend Formatting 34

Define, 60, 71, 156Defined, 40, 306, 312Definition, 62, 156Definitions, 156Ddegree, 102, 193DeleteAnnotation, 60DeleteColumn, 50DeleteLabel, 49DeleteRow, 50DeleteTranslation, 99Delta, 200DeltaX, 54, 200DeltaY, 54, 200Dependencies, 309Deployment, 309Deprecated, 186Design-Time, 3, 8, 9, 12, 19, 20, 48, 50, 63, 70, 75, 99, 171, 174, 175, 226, 237, 299, 301Designer, 38DesiredIncrement, 33, 92, 203, 204, 305, 313DesiredStart, 33, 93, 203, 288, 305, 311Development Environment,

ASP, 170, 289, See VBScriptBorland C++ Builder, 263-268, 294-296Borland Delphi, 257-262, 294-296Borland Kylix, 257-268, 294-296Internet Explorer, 171-173, 288-290VBA, 172, 289, See Visual Basic 6VBScript, 172, 289, See Visual Basic 6 and Internet ExplorerVisual Basic 6, 218-223, 288-290Visual C#.NET, 251-258Visual C++ 6, 224-244, 291-293Visual VB.NET, 245-250

DeviceCapabilities, 301Devices, 105Dfm, 65, 66Diagonal, 190, 194-196, 202Diagram, 87, 94, 112, 147, 148, 150Dialog-Based, 224, 235Diamond, 16, 193Differential, 14, 18, 103, 193Digit, 22, 206, 288, 311

Iocomp Components – Plot Pack Manual Page 319 of 336

Page 332: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Digital, 1, 4, 14, 17, 18, 21, 42, 171, 177, 192, 196, 197Digital-Highs, 14Digital-Lows, 14DigitalEnabled, 17, 196Digitally, 171DigitalReferenceHigh, 17, 196, 197DigitalReferenceLow, 17, 196, 197DigitalReferenceStyle, 18, 197Digits, 22, 32, 36, 58, 205, 206, 307Dimension, 84, 172, 289-296Dimensional, 84, 186, 289-295Dimensions, 60, 84, 188, 289-291, 312Direction, 10, 95, 104, 187DisableLayoutManager, 147, 151-153, 299Discontinuous, 4Disp, 1, 5, 11, 79, 82, 88, 152, 162, 168, 169, 224Distorted, 113, 313Distribution, 164, 174DoButtonClickCopy, 46, 157DoButtonClickCursor, 46, 157DoButtonClickEdit, 46, 157DoButtonClickPause, 46, 157DoButtonClickPrint, 46, 157DoButtonClickResume, 46, 157DoButtonClickSave, 46, 157DoButtonClickScrollAxesMode, 46, 157, 310DoButtonClickSelect, 46, 157DoButtonClickZoomAxesMode, 46, 157, 310DoButtonClickZoomBox, 46, 157, 303DoButtonClickZoomIn, 46, 157, 214, 310DoButtonClickZoomOut, 46, 157, 214, 310Dot, 14, 190, 192, 194, 202, 216Dotted, 30, 31, 202, 309Double-Click, 56, 219-220, 229, 233, 238, 241, 243, 255, 257, 259-261, 265, 267, 308Double-Precision, 21DoubleFormatXValue, 167Doubles, 22, 164, 306, 307, 309Drag-and-Drop, 191Drawing, 3, 4, 10, 11, 14-16, 21, 22, 29, 86, 147, 148, 159, 180, 190-192, 194, 196, 198, 202, 209, 213, 278, 305, 313Draws, 21, 53, 94, 101-103, 161, 193DrawStartIndex, 298DrawStopIndex, 298Driver, 11, 112, 298, 299, 301, 313Dual-Line, 57, 201, 202DWORD, 291-293Dynamic, 32, 73, 109, 110, 289Dynamically, 8, 32, 36, 37, 99, 149, 167, 168, 299, 312Edges, 9, 10, 37, 150, 186, 199, 203, 209, 210, 212, 302Edit, 8, 29, 37, 45, 56, 104, 105, 157, 185, 214, 224, 229, 233, 235, 240, 243, 258, 259, 264, 265, 312Editor, 8, 13, 63, 99, 105-106, 185EditorFormStyle, 8, 144Editors, 70, 75, 185Efficient, 82, 161Efficiently, 42Elapsed, 9, 19, 83, 160, 176, 178, 186, 198, 287, 300ElapsedStartTime, 83Element, 9, 73-74, 84, 186, 201, 202, 210, 212, 289-295Ellipse, 10, 60-62, 66, 69, 155Embedding, 171EMF, 109, 110, 113Empty, 20, 21, 56, 57, 85-87, 109Enabled, 5, 8, 10-12, 15, 16, 20, 29, 34, 37, 40, 41, 45, 94, 97, 104-106, 160, 174, 179, 187, 191, 194, 196, 199, 204, 207, 208, 210, 212-215, 269-271, 300,308, 312EnableLayoutManager, 147, 151-153, 299Encode, 109, 110, 306End-user, 8, 33, 62, 74, 104, 106, 120-125EndUpdate, 113, 160, 161, 186, 301, 304Enumerate, 1, 2, 10, 168, 169EOF, 167Equation, 102, 193, 304Error, 15, 105, 164, 287Evaluate, 182, 311Evaluation, 9, 258, 264, 301, 309

Page 320 of 336 Iocomp Components – Plot Pack Manual

Page 333: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Events, 59, 66, 114-146, 272-275Exceed, 20, 50, 165, 210Excel, 107, 287Exception, 5, 15, 78, 84, 95, 103, 193, 290, 292, 294Exclude, 86Execute, 49, 55, 60, 74, 83, 112, 147, 158, 223, 234, 244, 250, 256, 262, 267, 302Exit, 177, 276Expand, 95Explicit, 303, 307, 308, 312Explorer, 80, 83, 90, 163, 171-173, 275-277, 289Exponent, 3Exponential, 33, 206Exporting, 109-110Exports, 189Expression, 307Extended, 21, 164, 215External, 9, 15, 45, 53, 107-110, 112, 157, 164, 178, 302Extrapolate, 2Factor, 6, 37, 39, 45, 46, 55, 91, 214, 309FAQ, 300Fast-Draw, See FastDrawFastDraw, 15, 25, 26FastDrawEnabled, 25, 26Field, 42, 78, 176FIFO, 16, 165, 166, 191Filename, 12, 107-110, 189, 197, 276Fill, 3-4, 11, 14, 16, 21, 29, 67, 68, 72, 74, 101, 154, 155, 159, 180, 187, 191, 192, 196, 201, 202, 301, 304Fill-Region, 201, 202FillColor, 196Filled, 10, 21, 25, 29, 50, 63, 71-73, 108, 109, 154, 187, 189, 197, 201, 202Filled-Band, 72, 73FillEnabled, 196FillReference, 16, 196FillStyle, 72, 73, 196, 202Financial, 23, 25FINISH, 224, 235FirstDataPointIndex, 298FirstDataPointXValue, 298FirstDataPointYValue, 298Fixed-Interval, 302Flat, 46, 47, 214FlatBorder, 46FlatButtons, 46Flicker, 113Floating, 8, 22, 40, 167, 175, 287, 306, 307Floating-Point, 287, 306Flushed, 189, 197Focus, 59, 105, 132-136, 143, 307, 310Fonts, 60, 63, 110, 113, 141-142, 299, 313ForceStacking, 37, 209Format, 3, 8, 19-20, 33-36, 39, 45, 55, 58, 81, 84, 91, 94, 109-110, 113, 167, 176, 181, 185, 198, 205-208, 278, 287-288, 299, 305-306, 309, 312Formula, 287, 305Frame, 9, 10, 100, 160, 177, 178, 181, 182, 185, 186, 301, 304Frame-Rate, 178, 301Frames, 9, 177, 301, 304, 305FrameTime, 160, 186Frequency, 39, 55, 177, 183, 198, 200, 208FrontPage, 171Full-Feature, 22, 23, 25-28GetBytesJPEG, 111, 170GetName, 120-125, 127, 129, 132-140, 143, 145, 152GetNow, 287, 306GetSnapShotPicture, 113GetXAxisIndexByName, 7GetXMax, 207GetXMin, 207GetYAxisIndexByName, 7GetYInterpolated, 85GetYMax, 86, 207, 211GetYMean, 86, 211GetYMin, 86, 207, 211GIF, 110Global, 169, 288, 303

Iocomp Components – Plot Pack Manual Page 321 of 336

Page 334: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

GotFocus, 134Gradient, 10, 11, 187Graph, 3-4, 14, 41, 101, 159, 301-304, 313Graphic, 109, 110, 113Grid, 29-31, 38, 50, 98, 151-154, 180, 204, 209, 213, 215-217, 305Grid-lines, 204GridBackGroundTransparent, 213GridLineColor, 30GridLineMajorStyle, 30, 215GridLineMinorStyle, 30, 216GridLinesColor, 213GridLineShowBottom, 30GridLineShowLeft, 30GridLineShowRight, 30GridLineShowTop, 30GridLineShowXMajors, 30, 215GridLineShowXMinors, 30, 215GridLineShowYMajors, 30, 215GridLineShowYMinors, 30, 215GridLinesShow, 213GridLinesVisible, 30, 38GridLineXMajorColor, 30GridLineXMajorCustom, 30, 141-143GridLineXMajorStyle, 30GridLineXMajorWidth, 30, 141-143GridLineXMinorColor, 30GridLineXMinorCustom, 30GridLineXMinorStyle, 30GridLineXMinorWidth, 30GridLineYMajorColor, 30GridLineYMajorCustom, 30, 141-143GridLineYMajorStyle, 30GridLineYMajorWidth, 30, 141-143GridLineYMinorColor, 30GridLineYMinorCustom, 30GridLineYMinorStyle, 30GridLineYMinorWidth, 30GridShow, 5, 6, 30, 169GridXAxisName, 30, 215, 216GridYAxisName, 30, 38, 151-153, 215, 216GUI, 307Headers, 48, 231, 238, 239Height, 12, 17, 36, 50, 60, 61, 67, 68, 80, 83, 90, 111, 143, 145, 149, 163, 170, 171, 173, 191, 195, 203, 212, 269-271, 301Help, 1, 14, 81, 99, 188, 223, 234, 244, 250, 256, 262Hexadecimal, 278HideControl, 178HideControlPanels, 178Hierarchy, 5, 177HighLow, 81, 195HighLowBarColor, 23-25, 195HighLowBarWidth, 23-25, 81, 195HighLowBearishColor, 25HighLowBullishColor, 25HighLowCloseColor, 195HighLowCloseHeight, 24, 81, 195HighLowCloseShow, 23, 195HighLowCloseWidth, 24, 81, 195HighLowEnabled, 23-25, 81, 195HighLowOpenColor, 195HighLowOpenHeight, 81, 195HighLowOpenShow, 23, 24, 195HighLowOpenWidth, 81, 195HighLowShadowColor, 25HighLowStyle, 23, 25, 195Highs, 14, 17, 18Hint, 12, 53, 55, 56, 104, 130, 184, 188, 198-200, 214HintHideOnRelease, 56, 199HintOrientationSide, 56, 199HintPosition, 199Hints, 12, 56, 188, 309HintsHidePause, 12, 188HintShow, 56, 199HintsPause, 12, 188

Page 322 of 336 Iocomp Components – Plot Pack Manual

Page 335: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

HintsShow, 12, 188Historical, 164, 207, 305History, 15Horizontal, 3, 16, 30, 36, 48, 49, 57, 71, 103, 147-149, 151-153, 180, 181, 183, 190, 193-196, 198-200, 202, 204, 205, 215, 269-271, 304Horizontally, 32, 67, 68, 98, 180, 215, 223, 234, 244, 250, 256, 262, 267, 313Horz, 180HTML, 80, 83, 90, 163, 170, 171, 173, 234, 244, 250, 256, 262, 277iahCenter, 49, 203iahLeft, 51, 203iahRight, 51, 203ibsLowered, 186ibsNone, 186ibsRaised, 186Icon, 104, 214, 219, 246, 252, 257, 263Icons, 1IDE, 255, 258, 263, 264iDispatch, 1, 6, 11, 80, 83, 89, 153, 162, 168, 169, 235ifdBottomLeftTopRight, 10ifdBottomRightTopLeft, 10ifdBottomTop, 10ifdCircleIn, 10ifdCircleOut, 10IFDEF, 2ifdLeftRight, 10ifdRectangleIn, 10ifdRectangleOut, 10ifdRightLeft, 10ifdTopBottom, 10ifdTopLeftBottomRight, 10ifdTopRightBottomLeft, 10IFontDisp, 211IIS, 111, 170ImageIndex, 60, 61, 64-66, 70ImageList, 64ImageListAdd, 64ImageListClear, 64-66ImageListIndex, 60, 61, 64-66, 70ImageListLoadFromResourceID, 65ImageListLoadFromResourceName, 65, 66Images, 12, 60, 63, 64, 70, 109, 110, 171, 188Import, 83, 89, 153, 162, 168, 169, 238, 239Includes, 1, 2, 8, 154, 164Index,

Accessing Sub-Objects 6, Get By Name, 6-7 Return from Add Sub-Object Method 168

Indexes, 7, 298Indicator, 22, 42INF, 171Infinity, 60, 68, 193Initialization, 299InnerMargin, 209Input, 4, 5, 33, 80, 83, 90, 105, 163, 173, 174, 204Insert, 168-169, 220, 225-226, 229, 236, 237, 240, 253, 259, 265, 298Inserted, 87Install, 165, 171, 309Installer, 275, 276, 309InstallShield, 309Instance, 107Instantiate, 170Instruct, 30, 33, 95, 174, 197, 203Inteface, 153Integrate, 53, 167, 172, 234, 244, 277Intelligent, 3Intellisense, 221, 222, 230, 232, 241, 242, 248, 249, 254, 255InterDev, 171Interfaces, 8, 53, 107, 157, 168-169, 279-286, 305Interfere, 151-153Interfering, 184Interlacing, 110International, 8Internationalization, 13Internet Explorer, 171-173, 288-290

Iocomp Components – Plot Pack Manual Page 323 of 336

Page 336: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Interpolated, 53, 54, 58, 85, 102, 198Interpolation, 3, 14, 21, 58, 101-103, 192, 193InterpolationStyle, 53, 101-103Interval, 20-22, 84, 164, 166, 188, 192, 290, 293, 295, 300, 302, 306, 313Invalid, 57, 58Invalidate, 9Inverse, 55, 57, 200InverseDeltaX, 39, 55, 200, 208Invisible, 215, 305IO-Card, 305iopcxvsElapsedSeconds, 19, 176, 198iopcxvsElapsedTime, 176, 198iopcxvsOPCServerTimeStamp, 176, 198iopcxvsSystemTimeStamp, 176, 198iosBottomRight, 200iosTopLeft, 200ipacsBoth, 215ipacsXAxis, 215ipacsYAxis, 215ipafsAuto, 96, 208ipafsMax, 96, 208ipafsMin, 95, 208ipafsNone, 96, 208ipasEllipse, 60, 69ipasImage, 60, 65, 66, 70ipasLine, 60, 67ipasLineX, 60, 68ipasLineY, 60, 68ipasRectangle, 60, 67, 145ipasText, 60, 67, 300ipasTextRectangle, 60, 68ipcsChild, 98, 209, 210ipcsDeltaX, 5, 6, 57, 58, 169, 198ipcsDeltaY, 57, 58, 198, 311ipcsInverseDeltaX, 57, 58, 198ipcsMaster, 41, 98, 209, 313ipcsNone, 209ipcsValueX, 57, 58, 198ipcsValueXY, 56-58, 198ipcsValueY, 57, 58, 198ipdfcsComma, 107ipdfcsTab, 107ipdffCompactInterval, 20ipdpsEmpty, 56, 57ipdpsNull, 56, 57ipdpsValid, 56, 57ipdrPercent, 18, 197ipdrScale, 18, 197ipdsFullFeature, 23-28, 81ipdsValid, 57ipfsStayOnTop, 144ipglsDash, 216ipglsDot, 216ipglsSolid, 216iphlsCandleStick, 25, 195iphlsOpenClose, 195IPictureDisp, 113ipistCubicSpline, 102, 193ipistDifferential, 103, 193ipistDifferentialTerminated, 103, 193ipistPolynomial, 102, 193ipistRational, 102, 193ipistStraightLine, 53, 101, 193iplcncsFont, 210iplcncsXAxisFontColor, 210iplcncsYAxisFontColor, 210iPlotAnnotation, 2iPlotAxis, 2iPlotDataCursor, 2iPlotDataView, 2iPlotLabel, 2iPlotLegend, 2iPlotLibrary, 5, 6, 80, 83, 89, 111, 153, 162, 163, 169-171, 238, 239, 308

Page 324 of 336 Iocomp Components – Plot Pack Manual

Page 337: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

iPlotLimit, 2iPlotTable 2, 231iPlotToolBar, 2iplsBandX, 72, 201, 202iplsBandY, 72, 201, 202iplsDash, 26, 158, 192iplsDashDot, 26, 158, 192iplsDashDotDot, 26, 158, 192iplsDot, 26, 158, 192iplsLineX, 71, 201, 202iplsLineY, 71, 201, 202iplsPolyBandX, 73, 201, 202iplsPolyBandY, 73, 201, 202iplsSolid, 26, 158, 192ipmsCharacter, 16, 27, 193ipmsCircle, 16, 27, 159, 193ipmsCross, 16, 27, 159, 193ipmsDiamond, 16, 27, 159, 193ipmsHorizontalLine, 16, 193ipmsPlus, 16, 27, 159, 168, 193ipmsSquare, 16, 27, 159, 193ipmsTriangleDown, 16, 27, 159, 193ipmsTriangleLeft, 16, 27, 159, 193ipmsTriangleRight, 16, 27, 159, 193ipmsTriangleUp, 16, 27, 159, 193ipmsVerticalLine, 16, 193iprtDataView, 61ipsFixedDecimalPoints, 205, 206ipsSignificantDigits, 206ipstLinear, 204ipstLog10, 204, 311, 312iptfDateTime, 23-25, 81, 167, 206, 287, 312iptfExponent, 206, 311iptfPrefix, 206iptfPrice32nds, 206iptfThousands, 206iptfValue, 206iptsExpandCollapse, 95, 207iptsExpandCollapseFast, 95, 207iptsScaleMax, 94, 207iptsScaleMin, 95, 207iptsScaleMinMax, 94, 207iptsScrollPage, 95, 207iptsScrollSmooth, 94, 95, 207ipttMajor, 41iTypes, 2iUnknown, 80, 83, 89, 153, 162, 169, 239Javascript, 272-275JPEG, 8, 45, 109-111, 113, 170JPG, See JPEGJulian, 288, 299Justification, 48Kernel, 164Keyboard, 9, 29, 33, 104, 105, 118, 119, 204, 304, 307, 309, 310Keys, 105, 118, 119, 299, 309KHZ, 177Kylix, 66, 258, 264, 278, 301LabalMinLength, 313Labels,

Annotation 60, 67-68, 300Axis 40, 58, 81, 205, 209, 287, 299, 305-306 Object 9-10, 48-49, 147, 191, 203

LabelFont, 37, 149, 209LabelSeparation, 35, 36, 205, 311, 313LabelsFont, 35, 36, 41, 141-143, 205, 210LabelsFontColor, 98LabelsFormatStyle, 23-25, 81, 167, 206, 287, 311, 312LabelsMargin, 35, 205, 305LabelsMinLength, 36, 205, 305, 313LabelsMinLengthAutoAdjust, 36, 205, 305LabelsPrecision, 205, 206LabelsPrecisionStyle, 205, 206Landscape, 11, 112, 179, 187

Iocomp Components – Plot Pack Manual Page 325 of 336

Page 338: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

LastDataPointIndex, 298LastDataPointXValue, 298LastDataPointYValue, 298Layer, 29, 71, 154, 155, 191, 202, 210, 216, 269-271Layering, 29, 71, 154Layout, 3, 32, 33, 35-38, 42, 43, 45, 48, 75-78, 105, 147-153, 190, 191, 209, 213, 287, 299, 304LCD, 112Leading, 65, 66, 189, 206, 288Left-Click, 78Left-Justified, 203Legend, 3, 11, 14, 34, 42-44, 53, 75-76, 78, 105-106, 120-121, 123-124, 133, 136, 139, 141-143, 147, 148, 151-153, 158-159, 169, 191, 199, 207, 209-212,299, 308-312Legends, 310Letters, 288License, 172, 174, 276, 277, 299LicenseKey, 299Licenses, 174, 275, 276LicenseString, 299LicenseString, AllocSysString, 299Licensing, 172, 174, 275-277Limitation, 22, 50, 160, 164Limited, 50, 164, 192Limits, 3, 6, 29, 71-74, 106, 154, 165, 167, 201, 311Line,

Annotation 60, 62, 66, 67-68Data Cursor 56, 58-59, 198, 309, Grid 29-31, 38, 50, 98, 154, 180, 204, 209, 213, 215-217, 305Limit 74, 104, 131, 154, 201-202Trace 14, 16, 21-22, 24-25, 53-54, 81, 85-87, 101, 103, 107-108, 154, 158, 180, 192-193, 306, 313

Line1Position, 71, 72, 74, 131, 201, 202Line2Position, 72, 74, 131, 201, 202Linear, 3, 34, 91, 204, 214, 310, 312Linearly-Interpolated, 53LineStyle, 71, 202LineWidth, 71, 202LineX, 61, 62, 66, 68, 71, 201LineY, 61, 62, 66, 68, 71, 201Linking, 171, 174Linux, 1-4, 6, 12, 52, 63, 65, 66, 80, 85, 89, 110, 114-145, 152, 153, 160, 164, 165, 257, 258, 262-264, 294-296, 311LoadAnnotationsFromFile, 108, 144LoadDataFromFile, 107-109, 144Loaded, 64, 99, 144Loading, 107-109, 167LoadPropertiesFromFile, 107, 108, 144, 189, 197Loads, 161, 189Lock, 105, 300Log, 8, 12, 20, 34, 92, 107-109, 189, 197, 214, 300, 312Log10, 92, 310, 312LogActivate, 108, 109, 300Logarithmic, 3, 34, 204, 214LogBufferSize, 20, 108, 109, 189, 197LogDeactivate, 108, 109, 300LogFileName, 12, 108, 109, 189, 197, 300Logging, 3, 15, 20, 108, 109, 189, 197, 300Logic, 18, 196, 197LongDayNames, 288LongMonthNames, 288Loss, Less 110Lower-Right, 69, 188LPK, 12, 172, 275-277lpk_tool.exe, 276LPKPath, 172, 277Major, 1, 30, 31, 33, 35, 36, 38, 91-95, 126, 128, 130, 179, 181, 203-205, 209, 215-217, 305, 307, 310, 313MajorLength, 209Majors, 31, 215, 216Margin, 5, 9, 11, 36, 37, 48, 112, 149, 150, 186, 187, 203, 205, 209, 210, 212MarginBottom, 9, 48, 49MarginLeft, 9, 48, 49MarginRight, 9, 48, 49Margins, 36, 49, 112, 149, 179, 187MarginTop, 9, 48, 49MarkerBrushColor, 21MarkerBrushStyle, 21

Page 326 of 336 Iocomp Components – Plot Pack Manual

Page 339: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

MarkerCharacter, 21MarkerPenColor, 21MarkerPenStyle, 21MarkerPenWidth, 21Markers, 3, 14, 16, 21-22, 26, 27, 42-44, 101, 113, 154, 158-159, 180, 190-194, 207, 211, 306MarkersAllowIndividual, 16, 21, 26, 27, 193MarkersBrushColor, 27, 159, 190, 194MarkersBrushStyle, 159, 190, 194MarkersFont, 27MarkerShow, 21MarkerSize, 21MarkersPenColor, 27, 159, 193, 194MarkersPenStyle, 159, 190, 194MarkersPenWidth, 27, 159, 190, 194MarkersSize, 26, 27, 159, 193MarkersStyle, 16, 27, 159, 168, 193MarkersTurnOffLimit, 16MarkerStyle, 21MarkersVisible, 16, 26, 27, 193, 300, 306Master, 33, 41, 98, 204, 209, 313MasterUIInput, 33, 204, 307Max,

Channel 42, 86, 95-96, 161, 164-166, 192Data Markers 193Framerate 9, 301Legend and Table 44, 50, 210-212Number of Points 20-22, 32, 165Plot Axis Scale 32, 91-92, 208, 311Scope Axis Scale 181

MaxDataPoints, 164Maximize, 76Maximum, See MaxMaxValue, 32mbLeft, 117mbMiddle, 117mbRight, 117Mean 20, 42, 86, 211, 312Memory, 15-16, 20-22, 82, 160-161, 164-167, 192, 304MemoryUsed, 165Menu,

Cursor 56, 200Popup 8, 29, 37, 56, 59, 105-106, 139-142, 191, 199, 204, 210, 212, 214-215, 300, 309

MenuItemCaption, 56MenuItemCaptionDeltaX, 56, 200MenuItemCaptionDeltaY, 56, 200MenuItemCaptionInverseDeltaX, 56MenuItemCaptionValueX, 56MenuItemCaptionValueXY, 56, 200MenuItemCaptionValueY, 56, 200MenuItemVisible, 56MenuItemVisibleDeltaX, 56MenuItemVisibleDeltaY, 56, 200MenuItemVisibleInverseDeltaX, 56, 200MenuItemVisibleValueX, 56, 200MenuItemVisibleValueXY, 56, 200MenuItemVisibleValueY, 56, 200Menus, 99, 105, 106Message, 228, 232, 239, 240, 242, 301Messages, Window, 8, 144, 301Metafile, 45, 109, 110, 113, 226, 237MFC, 1, 224, 228, 229, 235, 240, 299Middle, 117Min,

Plot Axis Scale 32, 81Legend 270Channel 86, 95, 207

Min-Max, 156Minimum, 20, 23, 32, 35, 36, 42, 86, 93, 161, 203, 205, 211, 220, 227, 238, 247, 253, 259, 265, 305Minor, 30, 31, 209, 215-217, 305MinorCount, 30, 209MinorLength, 209Minute, 22, 84, 91, 287, 288Modal, 8, 185

Iocomp Components – Plot Pack Manual Page 327 of 336

Page 340: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Modally, 301Mode, 11, 16-18, 22, 45, 58, 94, 95, 104, 105, 109, 157, 170, 196, 197, 214, 287, 302, 303, 309, 312Modules, 165Mouse-Wheel, 105Movable, 62Move,

Annotation 61-62, 66, 104Cursor 199, Limit Lines 71, 104Object Layer 29, 71, 154-155, 191, 202, 210, 216Object ZOrder 75-76, 78, 147-148Select Tool 104Scope Reference 180, 182-183

MSDN, 234, 244Multiplier, 39, 55, 180, 208Name, 6-7Namespace, 83, 89, 153, 162, 168, 169NameString, 7Naming, 2, 229, 240, 248, 253NeedPacketsNow, 177Negative, 60, 68, 154, 177, 182NetBios, 175Network, 19, 84, 107, 110, 112, 167, 171, 175, 179, 187NewMin, 127, 129Newsgroup, 301NewSpan, 127, 129NewTrackingData, 97NewValue, 126-129, 131, 222, 233, 243, 261, 267, 272-275, 311NULL, 20, 21, 56, 57, 85-90, 107, 109, 112, 137-140, 299Nulls, 21, 192Nyquist, 177OCX, 309Offset, 179-181, 302OldMin, 127, 129OldSpan, 127, 129OLE, 3, 174, 305, 306OnAfterLoadProperties, 114, 144, 275OnAfterPrint, 114, 141, 142, 275, 298, 299, 312OnAnnotationCoordinatesChange, 66, 114, 143, 275OnAnnotationCoordinatesChangeFinished, 66, 114, 143, 275OnBeforeLoadProperties, 114, 144, 275OnBeforeNewOPCData, 114, 145OnBeforePrint, 114, 141, 142, 275, 298, 299, 301, 312OnBeforeZoomBox, 45, 114, 145, 303, 308, 312OnClick, 66, 80, 83, 90, 114, 119-125, 163, 172, 173, 220, 229, 241, 260, 265, 275OnClickAnnotation, 66, 114, 119OnClickDataCursor, 59, 114, 120OnClickDataPoint, 114, 120, 275OnClickDataView, 114, 121OnClickLegend, 114, 121OnClickLimit, 114, 121OnClickXAxis, 114, 122OnClickYAxis, 114, 122OnCursorChange, 59, 199OnDataCursor, 130OnDataCursorChange, 114, 130, 275OnDataCursorCustomizeHint, 56, 59, 114, 130, 312OnDblClick, 114, 115, 122-125, 275, 308OnDblClickAnnotation, 114, 122OnDblClickDataCursor, 59, 114, 123OnDblClickDataPoint, 114, 123OnDblClickDataView, 114, 124OnDblClickLegend, 114, 124OnDblClickLimit, 114, 124OnDblClickXAxis, 114, 125OnDblClickYAxis, 114, 125OnDoubleClick, 115OnGotFocusAnnotation, 114, 132OnGotFocusDataCursor, 59, 114, 133OnGotFocusDataView, 114, 133OnGotFocusLegend, 114, 133, 275, 310OnGotFocusXAxis, 114, 134OnGotFocusYAxis, 114, 134

Page 328 of 336 Iocomp Components – Plot Pack Manual

Page 341: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

OnKeyDown, 114, 118, 307OnKeyPress, 114, 118OnKeyUp, 114, 119, 310OnLimitLine1PositionChange, 74, 114, 131, 275OnLimitLine2PositionChange, 74, 114, 131, 275OnLostFocusAnnotation, 114, 134OnLostFocusDataCursor, 59, 114, 135OnLostFocusDataView, 114, 135OnLostFocusLegend, 114, 136, 275OnLostFocusXAxis, 114, 136OnLostFocusYAxis, 114, 136OnMouseDown, 114, 115, 119-125, 275OnMouseMove, 114, 116, 275OnMouseUp, 114, 117, 119-125, 275, 303, 309OnNewOPCData, 114, 146OnPopup, 309OnPopupMenuAnnotation, 114, 137OnPopupMenuDataCursor, 59, 114, 138OnPopupMenuDataView, 114, 138OnPopupMenuLegend, 114, 139, 275OnPopupMenuLimit, 114, 139OnPopupMenuXAxis, 114, 140, 300, 309OnPopupMenuYAxis, 114, 140, 300OnPositionChange, 146OnXAxisCustomizeLabel, 40, 114, 126OnXAxisMinChange, 114, 126, 222, 223, 232-234, 242-244, 249, 250, 255, 256, 261, 262, 267, 275, 307OnXAxisMinSpanChange, 114, 127OnXAxisSpanChange, 114, 127, 275, 311OnYAxisCustomizeLabel, 114, 128OnYAxisMinChange, 114, 128, 275OnYAxisMinSpanChange, 114, 129OnYAxisSpanChange, 114, 129, 275, 311OPC, 3, 11, 19, 145, 146, 174-176, 197, 198OPCActivate, 19, 174, 176OPCComputerName, 19OPCDeactivate, 174, 176OPCItemName, 19OPCServerName, 19OPCUpdateRate, 19OPCXValueSource, 19Open,

Candlestick 23, 25, 195Files 107-109, 144HighLow 23-24, 81, 195Log 108-109

Open-Close, 23, 24OpenBar, 195OpenClose, See Open-CloseOptimizations, 160Optimize, 3-4, 160Orientation, 3, 11, 55, 56, 112, 156, 179, 184, 187, 199, 204, 209OriginalString, 99Oscilloscope, 177Outer, 9, 11, 30, 37, 150, 186, 209OuterMargin, 209OuterMarginBottom, 9, 150, 186, 210, 212OuterMarginLeft, 9, 150, 186, 210, 212OuterMarginRight, 9, 150, 186, 210, 212OuterMarginTop, 9, 150, 186, 210, 212Overflow, 305Overhead, 16, 86, 165, 305Overlap, 16, 98, 154, 191, 302Overload, 167Overloaded, 306Overridden, 198Override, 92, 204, 210, 212-216, 304, 305, 309Overwritten, 165Package, 112, 174, 258, 264, 309Packet, 177, 302Paint, 3, 9, 196, 301, 305Painted, 9, 40, 126, 128, 130, 147Painting, 9, 103, 113, 161, 191, 202, 210, 216, 301, 304, 305Palette, 218-219, 229, 257, 263, 278

Iocomp Components – Plot Pack Manual Page 329 of 336

Page 342: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Panels, 175, 178Parabola, 41Parallel, 72Parameter, 20, 23, 45, 50, 81, 109, 126, 128, 149, 171, 178, 204, 289, 306Path, 108, 109, 189, 197, 236Pattern, 14Pause, 45, 97, 104, 105, 157, 188, 204, 214, 301PCI, 167Peak-Peak, 54, 183Peak-to-Peak, See Peak-PeakPen, 13, 22, 159, 165, 180, 190, 192-194, 198, 202Penalty, 82, 84, 161PenColor, 61, 67-69PenStyle, 61, 67, 68PenWidth, 61, 67, 68Percent, 18, 20, 57, 62, 147-149, 151-153, 156, 179, 181, 198, 199, 203, 209, 213, 298Percentage, 35, 37, 149, 156, 181, 197, 205, 209, 210, 212PercentToPosition, 156, 298Performance, 58, 82, 84, 86, 160, 161, 165, 167, 174, 178, 186, 204, 301, 305Period, 54, 183Permissions, 15Perpendicular, 41, 53, 60, 68, 71-73, 103, 193, 201, 202, 209, 210Persist, 104Perspective, 104Physically, 50Picture, 3, 44, 64, 113, 231Pixel, 36, 58, 62, 63, 149, 150, 156, 160, 188, 298, 308, 309, 312Pixels, 9, 58, 62, 71, 150, 156, 160, 186, 193, 209, 210, 212, 298, 304PixelsToPosition, 145, 156, 298, 308, 309, 312PixelsXToPosition, 156PixelsXToPositionPercent, 156PixelsXToPositon, 62PixelsYToPosition, 62, 156PixelsYToPositionPercent, 156Platforms, 63, 110Plot, See Adding DataPlot Objects,

Annotation, 60-70Axis, 32-41Channel, 14-28Data Cursor, 53-59Data View, 29-31Label, 48-49Legend, 42-44Limit, 71-74Table, 50-52ToolBar, 45-47

PlotLayout, 156PNG, 110Pointer, 12, 26, 27, 40, 57, 58, 182-184, 188, 198, 237, 240, 241, 300, 301Pointer1Position, 57, 59, 130, 198, 310Pointer2Position, 57, 59, 130, 198PointerPenWidth, 58Pointers, 57, 306Point, See Data PointpoLandacape, 112poLandscape, 179, 187Poly, 73, 74, 154PolyBand, 74PolyBandX, 73, 201, 202PolyBandY, 73, 201, 202Polynomial, 14, 102, 193Pop-Up, 8, 76, 300poPortrait, 112, 179, 187Popup, 56, 106, 137-140, 191, 199, 204, 210, 212, 214, 215PopupEnabled, 8, 29, 37, 56, 105, 106, 191, 199, 204, 210, 212, 214, 215, 269-271Portrait, 11, 179, 187PositionPercentToPixelsX, 156PositionPercentToPixelsY, 156PositionToPercent, 156, 298PositionToPixels, 156, 298, 309PositionXToPixels, 62, 156PositionYToPixels, 62, 156

Page 330 of 336 Iocomp Components – Plot Pack Manual

Page 343: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

PostCapture, 181Power, 161Practical, 50PreCapture, 181Precise, 85Precision, 6, 21, 22, 32, 58, 166, 205-207, 307PrecisionStyle, 206Preferences, 8Prefix, 3, 33, 206, 309Price32nds, 33, 92, 206Print, 11, 45, 104, 112, 113, 141, 157, 164, 179, 187, 214, 298, 301, 306, 312PrintChart, 187PrintDisplay, 179PrintDocumentName, 11, 112, 179Printer, 8, 11, 45, 104, 112, 113, 141, 179, 187, 214, 298, 299, 301, 312, 313Printing, See PrinterPrintMarginBottom, 11, 112PrintMarginLeft, 11, 112PrintMarginRight, 11, 112PrintMarginTop, 11, 112PrintOrientation, 11, 112, 179, 187Printout, See PrinterPrintShowDialog, 11, 45, 112, 179, 187Priority, 161, 304, 305Process, 3, 20, 71, 79, 95, 101, 156, 161, 164, 174, 305, 309Processing, 4, 160, 167, 301Processor, 95, 160, 161, 177, 304, 305Progressive, 110Property Editor, See EditorpsClear, 159, 190, 194, 202psDash, 159, 190, 194, 202psDashDot, 159, 190, 194, 202psDashDotDot, 159, 190, 194, 202psDot, 159, 190, 194, 202psInsideFrame, 190, 194, 202psSolid, 71, 159, 190, 194, 202QT, 60, 63, 299RAM, See MemoryRational, 14, 102, 193Re-Dimension, 289, 290Real-Time, 4, 15, 32, 83, 84, 108, 109, 160, 161, 171Record, 167-168Recorder, 3Recordset, 167Rectangle, 3, 10, 60-62, 66-68, 75, 187Rectangular, 21, 145Redraw, 191, 301Reference, DataView 61-62, 77Referenced, 6, 18, 61, 62, 201, 202References, 57, 61, 201, 202ReferenceStyle, 18Referencing, 6, 157, 199, 202, 210REFRESH, 20, 86, 211, 301, 304Regedit, exe 299Region, 8, 45, 201, 202Regional, 206Register, 171, 309Registered, 226, 237Registration, 309Registry, 299Regsvr32, 309Release, 76, 78, 99, 157, 165, 171, 199, 311Reload, 15, 107Remove, 8, 49, 50, 55, 60, 63, 74, 106, 185, 188, 189, 191, 212, 245, 251, 276, 313RemoveAllAnnotations, 60RemoveAllColumns, 50RemoveAllDataCursors, 55RemoveAllLabels, 9, 49RemoveAllLimits, 74RemoveAllRows, 50RemoveAllTranslations, 99, 100Removed, 9, 48, 165, 174Removes, 189, 191, 212

Iocomp Components – Plot Pack Manual Page 331 of 336

Page 344: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Removing, 50, 55, 74, 106Render, 48Rendered, 156Reorder, 191Repaint, 9, 160, 161, 178, 185, 186, 301, 304, 307RepaintAll, 9Repainted, 160, 178, 186Repainting, 160, 178, 186, 301, 304, 305Reporting, 109, 110, 112Reserved, 9, 20, 147, 165Reset, 12, 83, 104, 113, 302, 310, 312ResetElapsedStartTime, 19, 83, 176, 198ResetFirstAlign, 208Reseting, 308Resize, 32, 62, 66, 78, 110, 226, 237Resizing, See ResizeResolution, 302, 307Resolutions, 161Resource, 64-66, 165, 238, 304Response, 111, 170, 207RestoreValuesOnResume, 204Resume, 45, 97, 104-105, 113, 157, 161, 204, 214, 301, 302Reverse, 33, 77, 98, 204, 304ReverseScale, 33, 204Reversible, 3Reversing, See ReverseRGB, 109, 110Right-Click, See Context-Sensitive and PopupRight-Justified, 203Ring, 3, 15, 16, 20, 164-166, 191, 300RingBuffer, 16RingBufferSize, 165, 166, 191Rotate, 33, 60, 63, 149, 191, 299, 313Rotated, 32, 60, 62, 63, 299Rotating, 77Rotation, 60, 63, 67, 68, 149, 313Rows, 50, 212, 289-292, 294, 295RowsMax, 50, 212RowSpacing, 212Rubber-Bands, 45RunningXMax, 207RunningXMin, 207RunningYMax, 86, 95, 207RunningYMean, 86RunningYMin, 86, 95, 207Samples, 177-178, 306SamplesPerSecond, 178Sampling, 177Save, 12, 20, 45, 104, 107, 108, 113, 157, 164, 189, 197, 214, 276SaveAnnotationsToFile, 108, 144SaveDataToFile, 107, 144SaveImageToBitmap, 110SaveImageToJPEG, 110SaveImageToMetaFile, 110SavePropertiesToFile, 107, 108, 189, 197SaveToDataFile, 8, 107Scalar, 208Scale, 3, 18, 32-37, 39, 55, 91-96, 196-198, 201-210, 212-214, 287, 298, 302-305, 310-312Scaled, 94, 180, 307ScaleLinesColor, 98Scaler, 39, 55, 180Scales, 3, 32-34, 36, 37, 40, 91, 93, 94, 149, 204, 214, 310, 311ScaleType, 204, 214, 311, 312Scaling, 15, 32, 91, 94, 303, 305, 307Scheme, 113, 312Scientific, 311Scope, 1, 177, 178, 180, 182-184Screen, 3, 9, 14, 45, 53, 75, 79, 99, 101, 103, 141, 142, 156, 160, 161, 168, 191, 193, 201, 298, 301, 304, 313SCRIPT, 80, 83, 90, 163, 170, 172, 173, 272-275Scripts, 171Scroll,

Annotations, 60-61, 66Axis Manually, 32, 29, 32, 33, 34, 37, 40-41, 45-46, 98, 104-106, 157, 204-205, 208, 213-214, 302-304, 307, 309-310

Page 332 of 336 Iocomp Components – Plot Pack Manual

Page 345: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Axis Automatic, 15, 30, 32, 33, 37, 41, 79, 91, 93-98, 160, 204-205, 207-208, 301, 304, 307Detect, 128-129, 130-131Data View, 30, 105, 214-215Legend, 43, 210Table, 50, 212Scope Display, 180

Scrollable, 104ScrollMax, 208, 310, 311ScrollMin, 208, 310, 311ScrollMinMaxEnable, 310ScrollMinMaxEnabled, 208, 311Scrolls, 32, 66, 105, 160, 215, 304, 309ScrollSmooth, 302Section, 30, 38, 171, 172, 182, 203, 239, 258, 264, 276, 277, 289Sections, 94, 164, 209, 300Securities, 33, 206Security, 171Segment, 15, 25, 26, 103SelectActive, 46, 157Selected, 20, 45, 62, 75, 100, 104, 105, 137-140, 188, 189, 191, 210, 212, 276, 278, 301, 307-309SelectedItemBackGroundColor, 210Separately, 24Separator, 8, 112, 171, 206, 288, 311SeparatorPos, 312Server, 19, 84, 107, 111, 145, 146, 170, 171, 174-176, 197, 198, 276, 277Service, 84, 165, 277, 311SetColor, 230, 232, 234SetMin, 5, 169, 304SetSpan, 169, 304Shadow, 196ShadowColor, 196Shift, 29, 105, 115-119, 275, 307, 310Shortcuts, 234, 244, 250, 256ShortDayNames, 288ShortMonthNames, 288ShowAxesModeButtons, 46ShowColumnLine, 211ShowColumnMarker, 211ShowColumnXAxisTitle, 211ShowColumnXValue, 211ShowColumnYAxisTitle, 211ShowColumnYMax, 211ShowColumnYMean, 211ShowColumnYMin, 211ShowColumnYValue, 211ShowCopyButton, 46ShowCursorButton, 46ShowEditButton, 5, 6, 46, 106, 169ShowFocusRect, 61ShowPauseButton, 46ShowPrintButton, 46ShowResumeButton, 46ShowSaveButton, 46ShowSelectButton, 46ShowZoomBoxButton, 46ShowZoomInOutButtons, 46Sizable, 60, 62Size,

Annotation, 60-63, 66-69Axis, 32, 35-39Bar, 22, 27-28CandleStick, 25, 81, 195DataMarker, 22HighLow, 23-24, 81, 195Legend, 41, 43Trace 21, 22, 25, 141-142, 192, 313

Sizing, 45, 78, 94, 95Slope, 17, 21, 181, 182SmallButtons, 46Smooth, 94-96Smoothly, 93, 94Snapshot, 107, 109, 110Solid, 10, 14, 30, 31, 190, 192, 194-196, 202, 216

Iocomp Components – Plot Pack Manual Page 333 of 336

Page 346: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Source, 1, 19, 83, 84, 109, 172, 174-176, 182, 198, 227, 238, 310Spaced, 21, 192, 306Span, 7, 23-25, 27, 32-33, 45, 81, 94-96, 98, 105, 127, 129, 169, 179, 181, 185, 198, 203, 204, 206-208, 220, 227, 238, 247, 253, 259, 265, 287, 300, 302,304, 307, 309-313Speed, 1, 3, 14, 15, 20, 80, 82, 83, 89, 95, 153, 160-162, 167-169, 176, 304, 305Speeds, 191, 192Spline, 14, 102, 193Spread-Sheet, 289-292, 294, 295Spreadsheet, 50Square, 16, 193, 309ssAlt, 115, 116, 118, 119ssCtrl, 115, 116, 118, 119ssLeft, 115, 116ssShift, 115, 116, 118, 119Stack, 30, 32, 37-38, 66, 76, 147, 149-153, 185, 191, 209, 215, 310Stacking, See StackStackingEndsMargin, 37, 149, 151-153, 209StartPercent, 147-149, 151-153, 209, 215, 269-271Statistics, 20, 164Stats, See StatisticsStatus, 20, 56, 57, 86, 303Stay, on-top 8, 185Stock, 81StopPercent, 147-149, 151-153, 209, 215, 269-271Stopping, 147, 148, 209, 213Stops, 11, 113, 301Storage, 21, 22, 108, 164, 166, 167Store, 16, 20, 22, 40, 161, 164, 165, 205, 236, 277, 302, 307Storing, 22, 107, 161, 164, 191, 302Stream, 107, 108, 111, 160, 170, 171, 178, 186, 189, 197Streamed, 63, 107, 108Stretched, 63, 112Swapping, 77, 167Switch, 91, 298, 304, 306Symbol, 14, 21, 78, 171, 287Sync, 164Synchronize, 15, 33, 84, 189, 204, 300, 307Synchronous, 14, 15, 79, 189, 197, 290-294, 296Table, 50Tables, 6, 50-52, 147Tabs, 34, 203, 215, 216, 257, 263Tabular, 50Tag, 171, 175, 275, 277Terminated, 14, 103TextHorzAlignment, 60, 61TextHorzMargin, 60, 61TextRectangle, 61, 62, 66TextRotation, 61TextVertAlignment, 60, 61TextVertMargin, 60, 61TFont, 212TFontStyles, 142, 143Threads, 9, 304Tick-List, 40Tick-List-Custom, 40TickListAdd, 40, 41TickListClear, 40TickListCustom, 40, 41Ticks, 30, 33, 35, 36, 38, 91, 92, 163, 203-205, 209, 215, 216, 305, 307, 313Time,

Adding Data 83-84Axis Scale Formatting, 33DateTime, 22, 84, 163, 167, 206, 207, 287, 288, 298, 305, 306, 313Scope TimeBase, 177-178, 180-181

TimeBase, 177-178, 180-181Timer, 8, 9, 83, 84, 300, 302, 304, 305TimeSeparator, 288Timestamp, 302Tips, 99, 113Title,

Chart 9-10, 48Legend, 42-44Table, 50-51

Page 334 of 336 Iocomp Components – Plot Pack Manual

Page 347: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

TitleAlignment, 51TitleAlignmentMargin, 51TitleFont, 9, 10, 48, 205TitleFontColor, 10, 51TitleMargin, 9, 48, 205Titles, 42, 44, 50, 99, 158, 211, 212, 312TitleShow, 205TitleText, 9, 48, 179, 191, 203TitleVisible, 9tlb, 83, 89, 153, 162, 168, 169, 236, 238TMouseButton, 115, 117Tool-Tips, 99ToolBar, 3, 5, 11, 37, 45-47, 62, 74-75, 78, 105, 106, 109-111, 147-148, 151-153, 157, 169, 170, 191, 213-214, 237, 299, 303, 309-310Tooltip, 312, See Hint and TipsTrace, 3, 11, 14-16, 21-26, 53-54, 81, 85-87, 101-103, 141-143, 154-155, 158, 180, 191-193, 306, 313Trace-Line, See TraceTraceLineColor, 21TraceLineStyle, 21, 158, 192TraceLineWidth, 21, 25, 141-143, 168, 192, 313TraceVisible, 14, 23-25, 27, 28, 101, 192, 306Tracking, 14, 15, 24, 32, 37, 45, 91, 93-97, 104, 105, 191, 204, 207, 208, 214, 301-304, 307, 308TrackingAlignFirstStyle, 95, 96, 208TrackingEnabled, 15, 94, 96, 97, 205, 207, 208, 301, 303TrackingScrollCompressMax, 96, 208TrackingStyle, 94-96, 207Transferring, 64Translate, 13, 99-100, 189, 312Translation, See TranslateTranslationCount, 99Translations, See TranslateTransparent, 11, 31, 50, 63, 69, 188, 210, 213, 215TRect, 145Trend, 29, 87Triangle-Wave, 19Trigger, 9, 10, 177, 181-182, 302, 306Triggered, See TriggerTriggering, See TriggerTrue-Type, See TrueTypeTrueType, 60, 63, 110, 113, 299, 313TShiftState, 115-119Tuning, 32, 160TurnOffCursor, 46Tutorial, 11, 75, 174, 218, 224, 235, 245, 251, 257, 263, 275TypeLib, 111, 170UI, 6, 8, 33, 59, 106, 161, 204, 210, 212-214Unit, 2, 156, 177Units, 32, 36, 39, 55, 57, 62, 108, 109, 112, 149, 156, 174, 194, 198, 201, 208Unsynchronized, 79Update, 9, 45, 100, 160, 161, 171, 174, 176, 186, 197, 207, 226, 237, 301, 302, 304, 310Updated, 95, 160, 174, 302, 310UpdateFrameRate, 9, 10, 160, 178, 185, 186, 301, 305UpdateRate, 174, 176, 197UpdateResumeValues, 45, 308Usage, 22, 160, 161, 164, 304UserCanEditObjects, 8, 56, 105, 106UserCanMove, 61, 62, 66, 74UserCanSize, 61, 62, 66UserSelected, 307, 310UUID, 111, 170Variants, 84, 172, 289VBA, 1, 5, 51, 151, 172, 289, See Visual Basic 6VBScript, 1, 5, 12, 80, 83, 90, 111, 151, 163, 170, 172, 173, 289, See Visual Basic 6 and Internet ExplorerVCL, 2, 3, 48, 60, 63, 164, 258, 263, 264Vertical, 3, 16-18, 21, 36, 57, 61, 62, 71, 72, 103, 147-149, 151-153, 179, 183, 190, 193-196, 198-200, 202, 204, 215, 304, 309Vertically, 32, 67, 68, 98, 215Viewable, 34, 95, 298Viewer, 75Viewing, 38, 95, 113, 304Views, 29, 30, 304Virtual, 22, 161, 165Visible, 5-6, 9, 14, 38, VisibleInLegend, 14, 191Visual Basic 6, 218-223, 288-290

Iocomp Components – Plot Pack Manual Page 335 of 336

Page 348: Plot Pack Manual - ComponentSource · 2017-02-20 · Plot Pack Manual Version 3.0.4 Version 3.0.4 [August 28, 2003] Authors Patrick Carroll, Joe Castoro Technical Reviewers Todd Oster

Index

Visual C#.NET, 251-258Visual C++ 6, 224-244, 291-293Visual VB.NET, 245-250 Voltage, 179Volts, See VoltageVoltsPerDivision, 179Waveform, 177Web, 109-111, 170-172, 275-277, 310Wheel, 29, 105, 215WidthToPixels, 156WinHelp, 250, 256WndProc, 144Word-Wrap, 44, 210Wrap, 42, 44, 210, 211, 298WrapColAutoCountEnabled, 42WrapColDesiredCount, 42WrapColumns, 42, 43Wrapper, 168, 169, 228, 231WrapRowDesiredCount, 42X-Axis, 1, See AxisX-Coordinate, 19, 61, 62, 84, 119, 122, 176, 198, 289-292, 294, 295X-Data, 198, 291, 292X-Interval, 84, 302X-Major, 30, 215, 216X-Majors, 215, 216X-Max, 20X-Mean, 20X-Min, 20X-Minor, 30, 216X-Minors, 215, 216X-Values, 3, 21, 57, 62, 95, 302, 304, 305XAxisMajorTickSpan, 307XAxisName, 5, 6, 159, 169, 191, 201, 202, 302XAxisTitle, 211XAxisTrackingEnabled, 15, 96, 191, 301, 303XData, 79, 80, 82-85, 88-90, 97, 120, 123, 153, 162, 163, 169, 172, 173, 290, 292, 294, 295XDataArray, 290, 292, 294, 295xfm, 65, 66XInterval, 84, 290, 293, 295XValueString, 312XYAxesReverse, 32, 98, 149, 304Y-Axis, See AxisY-Coordinate, 14, 61, 62, 84, 289-292, 294-296Y-Data, 198, 291-293Y-Major, 30, 217Y-Majors, 215, 216Y-Max, 20, 42, 211Y-Maximum, 211Y-Mean, 20, 42, 211Y-Min, 20, 42, 211Y-Minor, 30, 217Y-Minors, 215, 216Y-Position, 17Y-Value, 15, 17, 20, 21, 24, 42, 57, 58, 62, 81, 86, 103, 174, 193, 207, 211, 306Y-Values, 3, 18, 56, 57, 62YAxisAutoScale, 302YAxisName, 159, 191, 201, 202, 302YAxisTitle, 211YAxisTrackingEnabled, 15, 96, 191, 301Z-Order, 147, 148Zoom, 8, 29, 32, 34, 36-37, 45, 46, 104-105, 145, 157, 164, 205, 214, 215, 302-304, 307-312Zoom-To-Fit, 302ZoomBox, 303, 312ZoomBoxActive, 46, 157, 303ZoomCount, 303Zoomed, 45, 104, 105, 214, 303ZoomIn, 46, 309-311ZoomInOutFactor, 45, 46, 104, 214, 309ZoomOut, 46, 310, 311ZoomRect, 145ZoomToFit, 34, 302-304, 310ZOrder, 147, 148, 150-153, 269-271, 299

Page 336 of 336 Iocomp Components – Plot Pack Manual