User’s Guide ™ Formula One for Java ® Powerful spreadsheet application for end users. Robust development tool for Java developers and Webmasters. Version 7.0 Tidestone Technologies, Inc. Information in this document is subject to change without notice. Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Tidestone Technologies, Inc. This program is not fault-tolerant and is not designed, manufactured or intended for use or resale in the online control of nuclear facilities, aircraft navigation or communication system, air traffic control, direct life support machines or weapons systems in which the failure of the Program could lead directly to death, personal injury or severe physical or environmental damage. 1999 Tidestone Technologies, Inc. All rights reserved. Formula One is a registered trademark and Tidestone Technologies, First Impression, and VisualSpeller are trademarks of Tidestone Technologies, Inc. Java, 100% Pure Java, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Microsoft, MS, MS-DOS, and Windows are registered trademarks and Microsoft Access and Microsoft Excel are trademarks of Microsoft Corporation in the USA and other countries. TrueType is a registered trademark of Apple Computer, Inc. Visual Cafe for Java is a registered trademark of Symantec Corporation. JBuilder is a registered trademark of Inprise Corp. All other product names are trademarks of their respective companies. The Tidestone License Agreement, included with the product, specifies the permitted and prohibited uses of the product. Any unauthorized reproduction or use of the product, or breach of the terms and conditions of the License Agreement, is forbidden. The Tidestone License Agreement sets forth the only warranties applicable to the product and documentation. All warranty disclaimers and exclusions set forth therein apply to the information contained in this document. Published by Tidestone Technologies, Inc. 12980 Metcalf Avenue, Suite 300 Overland Park, Kansas 66213 phone 913-851-2200 toll-free 1-800-884-8665 fax 913-851-1390 www.tidestone.com www.f1j.com Printed in the United States of America 99/700.8 iii Contents Preface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . New and Enhanced Features in Version 7.0 . . . . . . . . . . . . . . . xiii xiii xiv xiv xv Part I Installation Guide Chapter 1 Installing Formula One for Java . . . . . . . . . . . . . . . . . . . . . . . . . Obtaining Formula One for Java . . . . . . . . . . . . . . . . . . . . . . . . . Licensing Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Formula One for Java Files . . . . . . . . . . . . . . . . . . . . . . . . . . . Before You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Platforms and Development Environments Tested . . . . . . . . . System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing Formula One for Java . . . . . . . . . . . . . . . . . . . . . . . . . Part II The Workbook Designer Chapter 2 Introducing the Workbook Designer . . . . . . . . . . . . . . . . . . . . . . 9 The Workbook Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Understanding Workbooks, Worksheets, and Views . . . . . . . . . 10 Running the Workbook Designer . . . . . . . . . . . . . . . . . . . . . . . 11 Using the Workbook Designer Menus . . . . . . . . . . . . . . . . . . . 12 File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 View Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Insert Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Format Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Tools Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3 4 4 4 5 5 5 5 iv Formula One for Java User’s Guide Using the Workbook Designer Toolbars . . . . . . . . . . . . . . . . . . Standard Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Drawing and Forms Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . Formatting Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Parts of the Workbook Designer . . . . . . . . . . . . . . . Setting Up the Color Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 17 18 19 21 22 22 Chapter 3 Workbook Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manipulating Workbooks and Worksheets . . . . . . . . . . . . . . . . Selecting Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inserting Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appending Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inserting Multiple Worksheets . . . . . . . . . . . . . . . . . . . . . . . Naming Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Worksheet Index List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Multiple Selected Worksheets . . . . . . . . . . . . Displaying Items on Worksheets . . . . . . . . . . . . . . . . . . . . . . Controlling Worksheet Usage . . . . . . . . . . . . . . . . . . . . . . . . Deleting Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selecting Items in Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . The Active Cell and Ranges of Cells . . . . . . . . . . . . . . . . . . . Selecting Cells with the Mouse . . . . . . . . . . . . . . . . . . . . . . . Navigating and Selecting Cells Using the Keyboard . . . . . . Selecting Rows and Columns . . . . . . . . . . . . . . . . . . . . . . . . Selecting Row and Column Headings . . . . . . . . . . . . . . . . . . Selecting Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . Entering and Changing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . Saving Workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opening and Saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Mouse with Worksheets . . . . . . . . . . . . . . . . . . . . . . 25 26 26 27 28 28 29 29 30 30 31 33 34 34 34 35 35 36 36 36 37 37 38 Chapter 4 Working With Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Types of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Enter Constant Values . . . . . . . . . . . . . . . . . . . . . . . . . Numbers as Constant Values . . . . . . . . . . . . . . . . . . . . . . . . . Dates and Times as Constant Values . . . . . . . . . . . . . . . . . . . Text as Constant Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical and Error Values as Constant Values . . . . . . . . . . . . 41 42 42 43 43 43 44 Contents Chapter 5 v How to Enter Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numbers in Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Text in Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical Values in Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . Operators in Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Worksheet Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Formula Evaluation Rules . . . . . . . . . . . . . . . . . . . Ways to Enter Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Formula Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Edit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Entering Multi-Line Data . . . . . . . . . . . . . . . . . . . . . . . . . . . Understanding Cell References . . . . . . . . . . . . . . . . . . . . . . . . . Entering Cell References . . . . . . . . . . . . . . . . . . . . . . . . . . . . Absolute and Relative References . . . . . . . . . . . . . . . . . . . . . Using Relative and Absolute References . . . . . . . . . . . . . . . References to Other Worksheets . . . . . . . . . . . . . . . . . . . . . . References to Other Workbooks . . . . . . . . . . . . . . . . . . . . . . Using Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Autofill Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Autofill Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Validating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Validation Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Identifying Formulas on Worksheets . . . . . . . . . . . . . . . . . . . . Type Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . View Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Locking Cells and Hiding Formulas . . . . . . . . . . . . . . . . . . . . . Calculating Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Automatic Recalculation . . . . . . . . . . . . . . . . . . . . . . Solving Circular References . . . . . . . . . . . . . . . . . . . . . . . . . Setting Calculation Precision . . . . . . . . . . . . . . . . . . . . . . . . . Understanding Worksheet Errors . . . . . . . . . . . . . . . . . . . . . . . 44 44 45 45 46 47 47 48 48 48 49 49 50 50 51 52 53 54 54 55 56 57 57 57 58 58 60 60 61 61 62 Formatting Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Number Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Built-in Number Formats . . . . . . . . . . . . . . . . . . . . . . . . Creating Custom Number Formats . . . . . . . . . . . . . . . . . . . . . . Formatting Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Aligning Cell Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 64 64 67 72 73 vi Formula One for Java User’s Guide Changing Row Height and Column Width . . . . . . . . . . . . . . . . Setting Default Row Height and Column Width . . . . . . . . . . Sizing Rows and Columns Using Menu Commands . . . . . . . Sizing Rows and Columns Using Click and Drag . . . . . . . . . Freezing Panes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applying Colors to Worksheets and Cells . . . . . . . . . . . . . . . . Setting the Worksheet Background Color . . . . . . . . . . . . . . . Setting Cell Fill Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Cell Borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Formatting Row and Column Headings . . . . . . . . . . . . . . . . . . Sizing Row and Column Headings . . . . . . . . . . . . . . . . . . . . Setting Row and Column Heading Text . . . . . . . . . . . . . . . . Copying Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Formatting to Maximize Memory . . . . . . . . . . . . . . . . . . . . . . . 73 73 74 76 77 78 78 79 80 81 81 82 83 84 Chapter 6 Editing Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving, Copying, and Pasting . . . . . . . . . . . . . . . . . . . . . . . . . Using Dragging to Move, Copy, and Paste . . . . . . . . . . . . . . Using The Toolbar to Move, Copy, and Paste . . . . . . . . . . . Using Menu Commands to Move, Copy, and Paste . . . . . . . Finding and Replacing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . Inserting Cells, Rows, and Columns . . . . . . . . . . . . . . . . . . . . . Clearing and Deleting Cells, Rows, and Columns . . . . . . . . . . Sorting Data in Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 86 86 88 89 90 93 93 94 Chapter 7 Working With Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . Creating Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selecting Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Graphical Object Options . . . . . . . . . . . . . . . . . . . . Specifying Line Options . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Arrow Options . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Fill Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Dropdown List Box Options . . . . . . . . . . . . . . . Specifying Check Box Options . . . . . . . . . . . . . . . . . . . . . . Specifying Button Options . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Polygon Options . . . . . . . . . . . . . . . . . . . . . . . . Specifying Picture Options . . . . . . . . . . . . . . . . . . . . . . . . . 97 98 98 99 99 100 101 102 102 104 106 107 107 Contents vii Identifying and Naming Graphical Objects . . . . . . . . . . . . . . Identifying Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . Naming Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . Moving, Sizing, and Arranging Graphical Objects . . . . . . . . . Moving Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . Sizing Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . Arranging Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . Deleting Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . Graphical Objects and Microsoft Excel . . . . . . . . . . . . . . . . . 108 108 109 109 109 110 110 111 111 Chapter 8 Printing Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Printing Worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Worksheet Print Options . . . . . . . . . . . . . . . . . . Specifying Print Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Print Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Page Breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Page Print Options . . . . . . . . . . . . . . . . . . . . . . . . Specifying Sheet Print Options . . . . . . . . . . . . . . . . . . . . . . . . Specifying Margin Print Options . . . . . . . . . . . . . . . . . . . . . . Specifying Headers and Footers . . . . . . . . . . . . . . . . . . . . . . . Formatting Codes for Headers and Footers . . . . . . . . . . . . . 113 114 114 116 116 117 118 119 120 121 121 Part III Charting Chapter 9 Getting Started With Charts . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the Chart Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of Chart Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Chart Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding or Editing a Chart Title . . . . . . . . . . . . . . . . . . . . . . Aligning Chart Title Text . . . . . . . . . . . . . . . . . . . . . . . . . . Other Title Formatting Options . . . . . . . . . . . . . . . . . . . . . . About Chart Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding or Moving a Legend . . . . . . . . . . . . . . . . . . . . . . . . Sizing a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the Legend Text . . . . . . . . . . . . . . . . . . . . . . . . . Other Legend Formatting Options . . . . . . . . . . . . . . . . . . . . Resizing and Moving a Chart . . . . . . . . . . . . . . . . . . . . . . . . . 125 126 126 127 129 129 130 130 131 131 132 132 132 132 viii Formula One for Java User’s Guide Printing a Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deleting a Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 133 Chapter 10 Chart Concepts and Techniques . . . . . . . . . . . . . . . . . . . . . . . Chart Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selecting Chart Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving Chart Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sizing Chart Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Context Menu to Edit Charts . . . . . . . . . . . . . . . . . The Effect of Selection on the Context Menu . . . . . . . . . . . Problems With Clicking for the Context Menu . . . . . . . . . . Charting Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working With Chart Data Ranges . . . . . . . . . . . . . . . . . . . . . . Anatomy of a Data Range . . . . . . . . . . . . . . . . . . . . . . . . . . Editing Cells in the Data Range . . . . . . . . . . . . . . . . . . . . . Headings in the Data Range . . . . . . . . . . . . . . . . . . . . . . . . Series and Categories in the Data Range . . . . . . . . . . . . . . . How Each Chart Type Displays Series and Categories . . . . Resetting Chart Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 136 138 141 141 142 142 142 143 145 145 146 147 147 149 149 Chapter 11 Guide to Individual Chart Types . . . . . . . . . . . . . . . . . . . . . . . About Area Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Area Charts . . . . . . . . . . . . . . . . . . . . About Bubble Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Bubble Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sizing All the Bubbles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Labeling Bubbles by Size . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Bubble Charts . . . . . . . . . . . . . . . . . . About Column and Bar Charts . . . . . . . . . . . . . . . . . . . . . . . . Setting Bar Spacing Options . . . . . . . . . . . . . . . . . . . . . . . . Showing Bars as Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Combination Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Combination Charts . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Combination Charts . . . . . . . . . . . . . . About Doughnut Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sizing the Doughnut’s Hole . . . . . . . . . . . . . . . . . . . . . . . . Changing the Start Angle of the Slices . . . . . . . . . . . . . . . . Exploding the Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Doughnut Charts . . . . . . . . . . . . . . . . 151 152 152 153 153 155 156 156 158 158 160 160 161 162 163 163 164 164 165 Contents ix About Line Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding High-Low Lines to Line Charts . . . . . . . . . . . . . . . Adding Drop Lines to Line Charts . . . . . . . . . . . . . . . . . . . Adding Open-Close Bars to Line Charts . . . . . . . . . . . . . . . Special Notes About Line Charts . . . . . . . . . . . . . . . . . . . . About Pie Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the Sizes of the Pies . . . . . . . . . . . . . . . . . . . . . . Changing the Start Angle of the Slices . . . . . . . . . . . . . . . . Exploding the Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Pie Charts . . . . . . . . . . . . . . . . . . . . . . About Step Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Step Charts . . . . . . . . . . . . . . . . . . . . . About Stock Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Types of Stock Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating High-Low Charts . . . . . . . . . . . . . . . . . . . . . . . . . Creating Open-High-Low-Close Charts . . . . . . . . . . . . . . . Creating Volume Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . About XY (Scatter) Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating XY Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About XY Charts . . . . . . . . . . . . . . . . . . . . . 166 166 166 167 168 169 169 170 170 171 171 171 172 173 173 174 174 175 176 177 Chapter 12 Data Display in Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Data Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Chart Series Into Categories . . . . . . . . . . . . . . . . . . Changing the Chart’s Data Source . . . . . . . . . . . . . . . . . . . . . Changing the Entire Chart’s Data Source . . . . . . . . . . . . . . Changing Chart’s Data Source for Series and Headings . . . Changing the Order of Chart Series . . . . . . . . . . . . . . . . . . . . Stacking Series of Data Points . . . . . . . . . . . . . . . . . . . . . . . . Special Notes About Stacking Series . . . . . . . . . . . . . . . . . Plotting Data Points as Percentages of the Category . . . . . . . Special Notes About Plotting Series as Percentages . . . . . . 179 180 180 181 182 183 184 186 187 188 188 190 Chapter 13 Axes in Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Category and Value Axes . . . . . . . . . . . . . . . . . . . . . . . About Axis Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Axis Scale Settings . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Axis Scale Settings . . . . . . . . . . . . . . . . . . . . . . . Hiding an Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 192 193 193 194 196 x Formula One for Java User’s Guide About Axis Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editing Axis Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Axis Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Ticks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Grid Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Showing and Hiding Grid Lines . . . . . . . . . . . . . . . . . . . . . About Grid Line Colors and Line Styles . . . . . . . . . . . . . . . About Axis Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Axis Intersection’s Effect on Axis Labels . . . . . . . . . . . . . . Reversing the Order of Categories or Values . . . . . . . . . . . . . About Logarithmic Value Axes . . . . . . . . . . . . . . . . . . . . . . . . About Second Y Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Second Y Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . Working With Second Y Axes . . . . . . . . . . . . . . . . . . . . . . About Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the Number of Studies for a Chart . . . . . . . . . . . . . Displaying a Series in a Study . . . . . . . . . . . . . . . . . . . . . . . Assigning Length Ratios to the Main Chart and Studies . . . Hiding the X Axis for a Main Chart or Study . . . . . . . . . . . Changing Axis Settings for the Entire Chart . . . . . . . . . . . . . . 196 196 197 199 201 201 202 202 203 203 204 205 205 206 206 207 208 208 208 209 Chapter 14 Text and Numbers in Charts . . . . . . . . . . . . . . . . . . . . . . . . . . Editing Text and Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . About Axis Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Data Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Data Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editing Data Label Text . . . . . . . . . . . . . . . . . . . . . . . . . . . Aligning Data Label Text . . . . . . . . . . . . . . . . . . . . . . . . . . Repositioning Data Labels . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Data Label Lines . . . . . . . . . . . . . . . . . . . . . . . . Changing Number Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . The Number Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Fonts, Font Styles, and Font Colors . . . . . . . . . . . . The Font Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Fonts for the Entire Chart . . . . . . . . . . . . . . . . . . . . 211 212 213 214 214 215 216 217 218 218 219 219 220 220 Chapter 15 Colors in Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Changing Line Styles and Colors . . . . . . . . . . . . . . . . . . . . . . 222 The Line Style Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Contents Changing Fill Colors, Patterns, and Gradients . . . . . . . . . . . . The Fill Area Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Markers tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatically Varying Data Point Colors . . . . . . . . . . . . . . . . Special Notes About Varying Data Point Colors . . . . . . . . xi 223 224 225 226 227 228 Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Tidestone v P R E F A C E Overview Computer spreadsheets — tools that help us understand, model, and manipulate relationships between sets of numerical data — further empower us by providing the ability to manipulate, extrapolate, interpret, graph, and display numeric data with the speed and convenience of the computer. Formula One for Java unites all of the powerful utility and familiar interface of the computer spreadsheet with the speed, power, and the universal presence of the Internet. Designed for use in Java development environments, Formula One for Java provides the tools you need to design, create, and distribute custom spreadsheets over the Internet as part of your application, applet, or JavaBean. Using Formula One for Java you may also embed high-quality spreadsheets in your Web pages with just a few lines of HTML code. Formula One for Java may also be used as a standalone worksheet application. About This Manual This manual, the Formula One for Java User’s Guide, describes how to use the graphical user interface of Formula One for Java. The complete documentation for Formula One for Java consists of three separate manuals: 1. Formula One for Java User’s Guide A basic guide to using electronic spreadsheets in general and using Formula One for Java on a desktop or over a network as an end user. 2. Formula One for Java Technical Guide An outline of technical specifications and procedures for developers who want to include Formula One for Java in their applications, applets, or JavaBeans. The Technical Guide includes more advanced concepts and uses, such as attaching workbooks and views using Java. 3. Formula One for Java Function Reference A complete reference of the 325 functions available for use within Formula One for Java. vi Formula One for Java User’s Guide Using This Manual To effectively use this manual, you should be familiar with the basic operational features and interface characteristics of your operating system and with the basic concepts and applications of Java. If you have never used Java before, we suggest that you read related Java documentation before continuing. For the most part, this manual assumes you are using a Windows operating environment. Keyboard keys and some graphical user interface elements might vary depending upon your operating environment. This document along with other useful information about Formula One for Java is also available online at www.tidestone.com. Documentation Conventions Throughout this documentation, typographic conventions are used to define elements and references to Formula One for Java items. Recognizing these conventions will help you understand and use the documentation. Convention example Description ➤ To install Formula One for Java: A series of numbered instructions is preceded by an introductory line. The introductory line begins with an arrowhead. 1. Select the cells you want to format. Numbered instructions provide step-by-step directions for performing tasks. Perform the instructions in the order they are presented. workbook In general sections, italic text is used for the first occurrence of a new term. fontname In reference sections, italic text indicates variable or argument information you must supply. =B1+C3 Letter Gothic font is used for examples of cell entries. F1J7Swing.jar File names are presented in bold type. Format > Sheet > Properties Choose the Properties option on the Sheet submenu of the Format menu. CTRL + L Type L while holding down the CTRL key. Preface vii New and Enhanced Features in Version 7.0 New Features Java 2 support. Formula One for Java includes support for Java™ 2 SDK v 1.2 (J2SDK). Swing. Formula One 7.0 includes support for Java’s Swing user interface classes. Java 2D support. Formula One for Java 7.0 takes advantage of the Java 2D classes of the Java 2 JDK, enabling users and developers to draw lines of varying weights and styles, use different patterns and gradients for background fills, rotate text, superimpose graphics, and leverage more printing options. Model/View/Controller architecture. Formula One 7.0 includes a new API that enables developers to unbundle the model (workbook) from the view (GUI). 2D charting. Formula One for Java includes 2D charting for use in conjunction with Formula One spreadsheets to graphically display spreadsheet data. The charts offer Excel compatibility and include column, bar, high-low (or stack type), line, pie, area, step, combination, XY (scatter), bubble, doughnut, and “Studies,” a chart type that enables multiple sets of data to share the same category axis, but plot on separate value axes. Multiple undos and redos. Formula One for Java’s standalone application enables users to perform multiple (up to 100) undos and redos through the keyboard or a mouse and pull-down menu command. InfoBus. Formula One for Java plugs into the InfoBus architecture enabling it to share data with other software that supports InfoBus. Pluggable recalculation engine. Formula One for Java allows developers to replace the standard Formula One for Java calculation engine with optional specialized recalculation engines. Each specialized recalculation engine’s performance is tailored to a different type of application and carries different size footprints and capabilities, allowing users and developers to determine which engine works best for their application. Add-in worksheet functions. Developers have the ability to write custom functions for use in Formula One for Java worksheets. Thread pooling. In Formula One for Java, groups are now independent of threads, allowing for more efficient resource sharing among groups. Modular JAR files. Formula One for Java offers a pre-determined set of JAR files. This way, developers and web builders only need to deploy the Formula One for Java JAR files utilized in an application, significantly reducing download times. viii Formula One for Java User’s Guide Enhanced Features Read/Write Excel Files. Formula One for Java 7.0 adds support for Excel 97 and Excel 2000 formats and retains the ability to create, import, and export Excel version 5 and 7 files. More functions. Formula One for Java provides 325 of Excel’s 329 functions. This feature is aided by 7.0’s added support of array formulas, which output multiple numbers to a range of cells. The added functions, including many new statistical analysis, engineering, and financial operations, were created to appeal to specialized end users such as accountants and engineers. Extended date range. Formula One for Java supports dates through December 31, 9999. Enlarged workbook capacity. Formula One for Java now supports more than a billion rows and 32,768 columns per worksheet. Workbooks may have up to 32,768 sheets. Performance. Formula One for Java’s enhanced performance matches or exceeds the power of traditional desktop spreadsheet applications. Enhanced performance is most apparent in the functionality of its completely rewritten calculation engine, cell-tocell copying, reading and writing spreadsheets, and printing features. 1 P A R T 1 Installation Guide Tidestone 3 C H A P T E R 1 Installing Formula One for Java This chapter provides information about obtaining, preparing to install, licensing and installing Formula One for Java. This chapter also demonstrates how to change class path settings on your system to recognize the software and run applications. This chapter covers the following topics: ■ “Obtaining Formula One for Java” on page 4 ■ “Before You Install . . .” on page 5 ■ “Installing Formula One for Java” on page 5 4 Formula One for Java User’s Guide Obtaining Formula One for Java You can obtain Formula One for Java by purchasing the CD software and documentation package or by downloading the software over the Internet from the Tidestone Technologies website at www.tidestone.com. You can also find licensing, pricing, technical support, and other information about Formula One for Java at this site. Licensing Requirements Though you can license Formula One for Java for use on a single computer (as a user or developer), how Formula One for Java is licensed is usually based on how an application that contains Formula One for Java is deployed after development. Additional licensing information is available online at the Tidestone Technologies website at www.tidestone.com, by e-mail [email protected], or by calling the Tidestone sales department at (800) 884-8665. Formula One for Java Files The CD package and the Internet download packet include the following basic set of files. The Formula One for Java installer copies these files to your system. File Description F1J7Swing.jar Formula One for Java classes stored in a compressed JAR format. F1JSplit.class Class file required to separate F1J7Swing.jar into its component JAR files. Servlets/Directory Includes F1JwriteURL.class, write servlet source, and readme files required to use the writeURL method. usersguide.pdf User’s Guide in PDF format techguide.pdf Technical Guide in PDF format functionref.pdf Function Reference in PDF format jh.jar Java Help JAR file. Contains the JavaHelp system. F1Help.jar Formula One for Java documentation in JavaHelp format. API Help/Directory API Help in HTML format. Directory of HTML files that comprise the API documentation generated by the Javadoc tool. The PDF files for the User’s Guide, Function Reference, and Technical Guide and API Guide files are also available for download from www.tidestone.com. Chapter 1 Installing Formula One for Java 5 Before You Install . . . Platforms and Development Environments Tested Formula One for Java has been extensively tested and is known to run reliably in Windows 95, Windows 98, Windows NT 4.0, and Solaris 2.6 System Requirements To run Formula One for Java, you must have the appropriate Java SDK installed on your system. When installing Formula One for Java, if you want the Designer Help to be available from the Workbook Designer Help menu, you must install JavaHelp classes either by including them in your Class Path settings or by including the jh.jar and F1Help.jar files in the command line when running from the command prompt. Installing Formula One for Java For Windows 95, 98, and NT, the installation program and associated files are contained in a self-extracting executable program. For other platforms, the installation program and files are contained in a JAR file that you must uncompress before installing the software. ➤ To install Formula One for Java in Windows 95/98/NT: 1. Locate the file F1J7Setup.exe on the CD or from the files you downloaded and double-click on the file to run the installer. 2. Read and follow the instructions that appear in the installation program windows to identify the components you want to install, and select a directory and folder to hold the program files. The installation program creates a folder named F1Java containing all the program files and subdirectories. After installation, you can access the Designer, ReadMe file, and Uninstall program by choosing Start > Programs > Formula One. ➤ To install Formula One for Java on all other platforms: 1. Open a command prompt. 2. Change to the directory containing the f1jsetup.jar file. 3. Execute the following command to uncompress the JAR file: jar -xf f1jsetup.jar 4. Execute the following command to install Formula One for Java: jre -cp f1jsetup 5. Follow the instructions in the installation wizard to complete the installation process. Tidestone 7 P A R T 2 The Workbook Designer Tidestone 9 C H A P T E R 2 Introducing the Workbook Designer The Workbook Designer is Formula One for Java’s graphical user interface. It is the tool that allows users to create worksheets, enter data and formulas on them, format them, and print them. This chapter covers the following topics that give you basic information about the Workbook Designer. ■ “The Workbook Designer” on page 10 ■ “Understanding Workbooks, Worksheets, and Views” on page 10 ■ “Running the Workbook Designer” on page 11 ■ “Using the Workbook Designer Menus” on page 12 ■ “Using the Workbook Designer Toolbars” on page 17 This chapter also covers the following advanced topics that give more detailed information about using the Workbook Designer. ■ “Displaying Parts of the Workbook Designer” on page 21 ■ “Setting Up the Color Palette” on page 22 ■ “Setting Preferences” on page 22 10 Formula One for Java User’s Guide The Workbook Designer The Workbook Designer, shown in the following illustration, appears and behaves much like a commercial spreadsheet application. It is useful in different ways: you can use it when you are designing an application or you can launch it from your application during run time. You can also create Formula One for Java worksheets using the standalone version. Standard toolbar Drawing and Forms toolbar Formula bar Menu bar Formatting toolbar Worksheet Understanding Workbooks, Worksheets, and Views When you open or create a file in Formula One for Java, you also open or create a workbook. Workbooks store data, formulas, workbook formatting information, and workbook-specific information such as printing and calculation attributes. You can open multiple workbooks simultaneously. Formulas in one workbook can refer to cells in other workbooks. A workbook is a collection of individual worksheets. Worksheets allow you to show and analyze data. You can manipulate data on several worksheets simultaneously and base calculations on data from multiple worksheets stored within the same workbook. You use worksheets to separate information into groups based on how you want to use the information stored in the workbook. Say you have a database that includes yearend sales figures. You want to break down the figures into quarterly time periods to present to your manager. You could do one of three things: Chapter 2 Introducing the Workbook Designer 11 1.Keep all the figures on the same worksheet with the database; 2.Create a new workbook for each quarter; or 3.Create a new worksheet for each quarter within the same workbook. Unless your database is very simple and small, keeping the figures in one worksheet creates a large, cumbersome worksheet, making it difficult to display or distribute the data. Splitting the data into separate workbooks takes up more memory and makes data access less convenient. Storing the data in the same workbook separated into four worksheets plus the master database makes the most sense — data is more easily displayed and distributed, takes up less memory, and is more easily accessed. Running the Workbook Designer You can launch the Workbook Designer using a GUI or the command prompt. ➤ To run the Workbook Designer in Windows 95/98/NT: ■ Locate and double-click on the F1J7.exe file. or ■ Click Start > Programs > Formula One for Java > Formula One for Java. or ■ Follow the directions under Any Platform, below. ➤ To run the Workbook Designer on Solaris Machines: A shell script is included with the installer, which launches the Workbook Designer. 1. At the command prompt, switch to the installation directory. 2. Execute the following command: ./f1j7 ➤ To run the Workbook Designer on any platform from a command prompt: 1. Switch to the directory that contains Formula One for Java 7. 2. Execute the following command: java -classpath c:\F1J7Swing.jar com.f1j.swing.designer.Designer or 3. Execute the following command to include the JavaHelp documentation: java -classpath c:\F1J7Swing.jar;jh.jar;F1help.jar com.f1j.swing.designer.Designer Note The Any Platform from a Command Prompt instructions assume that a supported Java Virtual Machine (JVM) is installed. 12 Formula One for Java User’s Guide Using the Workbook Designer Menus The following tables highlight the commands available on the Workbook Designer menu bar and provide a brief description of each command. File Menu Command Description New Creates a new workbook file. Open Opens a workbook file from disk. You can open files saved in Formula One 3.x and newer format (.VTS files), Excel format (.XLS file), and tabbed text (.TXT). Close Closes the current workbook file. Prompts you to save any unsaved changes. Save Save As Saves the current workbook. Workbook Files can be saved in Formula One formats 3.x, 4.x, 5.x, 6.x, 7.x (.VTS files), Excel Versions 5, 7, Excel 97, Excel 2000 formats (.XLS files), tabbed text, or values-only tabbed text (.TXT). Page Setup Displays the Page Setup dialog box. This dialog box allows you to define header and footer text, page margins, page print order, page orientation and size, page centering, page numbering, worksheet-related print options, and scale. Print Area > Set Print Area Defines the currently selected range in the active worksheet as the Print_Area user-defined name. Print Area >Clear Print Area Cancels the above action. Print Titles > Set Print Titles Defines the currently selected range in the active worksheet as the Print_Titles user-defined name. Print Titles >Clear Print Titles Cancels the above action. Print Allows you to select print options and print the active worksheet. Exit Exits the Workbook Designer. Edit Menu Command Description Undo Nullifies the last action performed with the mouse or keyboard in Formula One for Java. (up to 100 undos). Redo Re-performs the nullified action (up to 100 redos). Cut Removes the selected object or the contents of the selected cells and places it on the clipboard. Copy Copies the selected object or the contents of the selected cells to the clipboard. Paste Pastes the contents of the clipboard into the selected cells. Chapter 2 Introducing the Workbook Designer 13 Command Description Paste Special Pastes the formats, values, or formulas of copied cells into the selected cells. In addition, Paste Special controls how data copied from a different application is pasted. Copy Cell Format Copies the current cell’s formatting and applies the formatting to the next cell or range of cells selected. Polygon Points Toggles between normal polygon editing and polygon point editing. Select All Objects Selects all of the graphical objects on the active worksheet. Sort Displays the Sort dialog box. This dialog box allows you to set the sorting method and sort keys for data sorting. Fill > Down Places a copy of the data from the cells in the top row of the selected range into every cell below in the selected range. Existing data in the selected cells is replaced with the new data. Fill > Right Places a copy of the data in the cells in the leftmost column of the selected range into every cell to the right in the selected range. Existing data in the selected cells is replaced with the new data. Clear > All Clears formats and values from the selected cells. Clear > Formats Clears cell formats from the selected cells; leaves the data intact. Clear > Contents Clears values from the selected cells; leaves the formatting intact. Delete > Options Deletes the selected cells or objects. Options allow you to designate which cells adjacent to the deleted cells are shifted to fill the space left by the vacated cells and to choose to delete an entire row or column of cells. Delete Sheet Removes the selected worksheets. Find Searches in selected cells or the active worksheet for the characters you specify and selects the first cell that contains those characters. If only one cell is selected, searches the entire worksheet. Replace Searches in selected cells or the active worksheet for the characters you specify and replaces them with your specified replacement characters. If only one cell is selected, searches the entire worksheet. Goto Displays the Goto dialog box, which allows you to specify a cell to display in the worksheet window. The specified cell is then made the active cell. Preferences Displays the Preferences dialog box where you may choose a Look and Feel and set the number of undos. View Menu Command Description Formula Bar Toggles the display of the Formula Bar. Toolbars > Standard Toggles the display of the Main Toolbar. 14 Formula One for Java User’s Guide Command Description Toolbars > Formatting Toggles the display of the Formatting Toolbar. Toolbars > Drawing and Forms Toggles the display of the Drawing and Forms Toolbar. Zoom > Percentage Magnifies or shrinks the current view to the percentage indicated. Insert Menu Command Description Cells Inserts cells at the location of the current selection. Options allow you to choose which cells adjacent to the insertion are shifted to make room for the new cells and to choose to insert entire rows or columns of cells. Rows Inserts a new row above the selected cell or row. You can insert multiple rows by highlighting the number of rows you want to insert prior to executing this command. Columns Inserts a new column to the left of the selected cell or column. You can insert multiple Columns by highlighting the number of columns you want to insert prior to executing this command. Worksheet Inserts a new worksheet before the active worksheet and makes the new worksheet the active one. If more than one worksheet is selected, this command inserts the same number of worksheets as the number selected. This command fails if non-contiguous sheets are selected. You can also insert a new worksheet after the current worksheet while keeping the current worksheet active by pressing the Control key and clicking Insert > Worksheet. Page Break Places a horizontal page break adjacent to the top edge of the active cell and a vertical page break adjacent to the left edge of the active cell. If a row or column is selected, a page break is placed above the selected row or to the left of the selected column. Name Displays the Defined Name dialog box, which allows you to replace cell and range references with user-defined cell names. You can also name constants and formulas. Chart Allows you to insert a chart that plots the data in the selected cells. Picture Allows you to draw a frame into which you may later insert a picture file. Drawing Object > Arc Selects the Arc tool which allows you to draw arcs. Drawing Object > Line Selects the Line tool which allows you to draw lines. Drawing Object > Oval Selects the Oval tool which allows you to draw ovals. Drawing Object > Polygon Selects the Polygon tool which allows you to draw polygons. Chapter 2 Introducing the Workbook Designer 15 Command Description Drawing Object > Rectangle Selects the Rectangle tool which allows you to draw rectangles. Forms Object > Button Selects the Button tool which allows you to draw buttons. Forms Object > Checkbox Selects the Check Box tool which allows you to draw check boxes. Forms Object > Dropdown Listbox Selects the Drop Down List Box tool which allows you to draw drop-down list boxes. Cancel Insert Object Allows you to deselect a graphical object tool. Command Description Cells Displays the Format Cells dialog box, which allows you to set cell formatting such as numeric display, alignment, fonts, borders, fill patterns, protection, and validation. Row > Height Displays the Row Height dialog box, which allows you to set the height of the selected rows, specify default row heights, and specify automatic row height. Row > Hide Hides the selected rows. This does not delete them from the worksheet. Row > Unhide Shows the hidden rows in a selection. Row > Default Height Displays the Default Row Height dialog box which allows you to define a default height for rows. Column > Width Displays the Column Width dialog box, which allows you to set the width of the selected columns, specify default column widths, and specify automatic column width. Column > Autofit Selection Adjusts the width of the column to accommodate the size of the longest text string or value in the selected cell or range. Column > Hide Hides the selected columns. This does not delete them from the worksheet. Column > Unhide Shows the hidden columns in a selection. Column > Default Width Displays the Default Column Width dialog box, which allows you to define a default width of columns. Sheet > Properties Displays the Format Sheet dialog box, which allows you to set viewing, editing, selection, color, and other properties for the active worksheet. Sheet > Enable Protection Enables protection for protected cells in the worksheet. A check next to this command means that protection is enabled. Select the command again to disable protection. Freeze Panes Freezes or unfreezes the rows above the top selected row and the columns left of the leftmost selected column. Frozen columns and rows do not scroll and cannot be edited. Choose this command again to unfreeze the cells. Format Menu 16 Formula One for Java User’s Guide Command Description Default Font Displays the Default Font dialog box, which allows you to set the default font and the font size used to display data in worksheets. The default font affects the widths of worksheet columns and heights of worksheet rows. Object Displays the Format Object dialog box, which displays the appropriate tabbed pages for the selected object. Bring to Front Places the selected object(s) in front of other objects in the worksheet. Send to Back Places the selected object(s) behind other objects in the worksheet. Tools Menu Command Description Recalc Recalculates all open cells, worksheets, and workbooks. Options Displays the Options dialog box, which allows you to set general, calculation, and color options. Window Menu Command Description New Window Opens another view of the currently active workbook. All changes made in either view display in both views. Cascade Arranges all of the open workbooks in a cascade from the upper left to the lower right in the order opened, with the lower right workbook active. Tile Arranges all of the open workbooks into equally sized windows within the Workbook Designer (like floor tiles) with the lower right workbook active. Tile Vertical Arranges all of the open workbooks into equally sized side-by-side windows within the Workbook Designer, with the far right workbook active. Tile Horizontal Arranges all of the open workbooks into equally sized stacked windows within the Workbook Designer with the bottom workbook active. [workbook name] The names of all the open workbooks are listed as menu options. Clicking a workbook makes it active. Windows... Opens the Windows dialog, which lists all the open workbooks. Select a workbook and click Activate to make it active, or click Close to close it. Chapter 2 Introducing the Workbook Designer 17 Help Menu Command Description Contents and Index Displays Formula One for Java Designer Help. About Formula One for Java Displays the About Formula One for Java dialog box which includes the version number, copyright, and other legal information. Using the Workbook Designer Toolbars Formula One for Java has three toolbars: Standard, Drawing and Forms, and Formatting. You can display or hide the toolbars by toggling options in the View > Toolbars menu. The toolbar buttons described in the following tables provide easy access to some of the most common Formula One for Java menu commands. Standard Toolbar Use the buttons on the Standard Toolbar to perform basic workbook functions such as opening, saving, and printing workbooks. Button Name Description New button Creates a new workbook file. Open button Opens an existing workbook file from disk. Save button Opens the save dialog. Print button Opens the print dialog. Find button Opens the find dialog. Cut button Cuts a selection to the clipboard. Copy button Copies a selection to the clipboard. Paste button Pastes items and data from the clipboard into the selected cells. Copy Format button Copies the format of the selected cells. 18 Formula One for Java User’s Guide Button Name Description Undo button Nullifies last action (up to 100 undos). Redo button Re-performs the nullified action (up to 100 redos). Ascending Sort button Sorts a one-column range from lowest to highest value. Places text in alphabetical order. Places numbers before text. For multi-column ranges, sorts the leftmost column in the same way while keeping row data intact. Descending Sort button Sorts a one-column range from highest to lowest value. Places text in reverse alphabetical order. Places text before numbers. For multi-column ranges, sorts the leftmost column in the same way while keeping row data intact Drawing and Forms button Toggles the display of the Drawing and Forms Toolbar. Help button Opens Formula One for Java Designer help. Drawing and Forms Toolbar Use the buttons on the Drawing and Forms Toolbar to create graphical objects and interactive objects for forms. Button Name Description Insert Chart button Draws a chart in the area you designate based on the selected cells. Insert Picture button Inserts a picture object in the area you designate. Arc button Draws arcs. Line button Draws lines. Oval button Draws ovals and circles. Chapter 2 Introducing the Workbook Designer Button Name Description Polygon button Draws polygons. Rectangle button Draws rectangles and squares. Button button Draws push buttons. Check Box button Draws check boxes. List Box button Draws drop down list boxes. Polygon Point Editing button Toggles between normal polygon editing and polygon point editing. 19 Formatting Toolbar Use the buttons on the Formatting Toolbar to quickly and easily format selected worksheet data. Note The Formatting Toolbar also provides two drop down lists that allow you to select and change fonts and font sizes. Button Name Description Bold button Changes the formatting of the contents of the selected cells based on the status of the reference cell (the first cell you click on when selecting a range of cells). If the reference cell is bold, clicking the bold button unbolds the contents of the selected cells. If the reference cell is not bold, the bold button bolds the contents of the selected cells. Italic button Changes the formatting of the contents of the selected cells based on the status of the reference cell (the first cell you click on when selecting a range of cells.) If the reference cell contents are italicized, clicking the italic button removes the italics from the contents of the selected cells. If the reference cell contents are not italicized, the italic button italicizes the contents of the selected cells. 20 Formula One for Java User’s Guide Button Name Description Underline button Changes the formatting of the contents of the selected cells based on the status of the reference cell (the first cell you click on when selecting a range of cells.) If the reference cell contents are underlined, clicking the underline button removes the underlining of the contents of the selected cells. If the refence cell contents are not underlined, the underline button underlines the contents of the selected cells. Font Color button Displays the color palette so you can select a font color for the selected range of cells. Fill Color button Displays the color palette so you can select a background color for the selected range of cells. Left Align button Left aligns the contents of the selected range of cells. Center Align button Centers the contents of the selected range of cells. Right Align button Right aligns the contents of the selected range of cells. Center Across button Displays the data in the rightmost cell that contains data centered over the area of the remaining selected cells to the right in the same row. Common Fixed and Displays a list of common fixed and general data formats General Formats button to apply to the selected cells. Currency button Displays a list of common currency formats to apply to the selected cells. Percentage Format button Displays a list of common percentage formats to apply to the selected cells. Fraction Format button Displays a list of common fraction formats to apply to the selected cells. Date and Time Format button Displays a list of common date and time formats to apply to the selected cells. Chapter 2 Introducing the Workbook Designer 21 Displaying Parts of the Workbook Designer Formula One for Java lets you decide how you want to display certain aspects of the Workbook Designer. You may display or hide the Formula Bar, the cell reference in the Formula Bar, the worksheet tabs, type markers, and the border around the workbook. You may also move the worksheet tabs. Note The View menu also allows you to hide and display parts of the Workbook Designer. See “View Menu” on page 13. ➤ To change the Workbook Designer display: 1. Select Tools > Options and click the General tab, if necessary. The General tab of the Options dialog box appears, as shown below. 2. Select a location for worksheet tabs from the drop-down menu. You can place the tabs at the top or bottom of the worksheet or choose Off to hide them. 3. Check the Formula Bar check box to display the Formula Bar, which shows formulas and/or values that appear in cells. 4. Check the Cell Reference in Formula Bar check box to display the cell reference within the Formula Bar. The Cell Reference indicates which cell contains the formula or value displayed in the Formula Bar. 5. Check the Type Markers check box to display the type markers — colored borders around cells that indicate cell data type. A green type marker indicates values; a red type marker indicates formulas; a blue marker indicates an empty cell to which formatting has been applied. 6. Check the Border check box to display a border around the workbook. 7. Press Apply to apply the changes you’ve made and leave the dialog box open. Press OK to apply the changes and close the dialog box. 22 Formula One for Java User’s Guide Setting Up the Color Palette When you install Formula One for Java, you get a color palette with 56 pre-set default colors. You can use the default colors as they are, or you can change them. The palette colors use the RGB color format, which allows you to change the appearance of the color by increasing and decreasing the amount of red, green, and blue in the color. ➤ To change the colors on the Color Palette: 1. Select Tools > Options and click the Color Palette tab. The Color Palette tab of the Options dialog box appears, as shown below. Click on a color to change its settings. Adjust the color using the slider bars or by entering a different color value. Click here to return all colors to their default settings. To return a color to its default setting, select it, then click here. 2. Click on the color you want to change. 3. Move the slider bars for the red, green, and blue scroll bars to increase or decrease the color values. The values can range from 0 to 255. You may also type the number values in the text boxes. The appearance of the selected palette color will change as you change the red, green, and blue scroll bar values. 4. Press Apply to apply the changes to the color and leave the dialog box open. Press OK to apply the changes and close the dialog box. Setting Preferences Look and Feel In the Look and Feel options window, you may choose Metal (the default Look and Feel, used throughout the User’s Guide), CDE (Common Desktop Environment) Motif, or Windows as the desktop look and feel. Chapter 2 Introducing the Workbook Designer Preferences The Options window allows you to set the number of undos to any value between 0 and 100. Setting the value to 0 turns Undo off, which optimizes Formula One for Java’s speed and memory usage. The default value is 3. Choose Look and Feel in the Edit > Preferences window The default setting is “Metal.” Click on the desired Look and Feel to change. Choose Undo Limits (up to 100) in the Edit > Preferences > Other window. The default is 3. Set to 0 to optimize performance and memory usage. 23 Tidestone 25 C H A P T E R 3 Workbook Fundamentals This chapter discusses the basic concepts that you need to know in order to use the Workbook Designer, including: ■ “Manipulating Workbooks and Worksheets” on page 26 ■ “Selecting Items in Worksheets” on page 34 ■ “Entering and Changing Data” on page 36 ■ “Saving Workbooks” on page 37 ■ “Using the Mouse with Worksheets” on page 38 26 Formula One for Java User’s Guide Manipulating Workbooks and Worksheets Once you create a Formula One for Java workbook, you can add, insert, delete, name, and select the worksheets contained in your workbook. For more specific information about working with workbooks and worksheets, refer to “Understanding Workbooks, Worksheets, and Views” on page 10. The following illustration shows a workbook with three worksheets. Each worksheet’s name is displayed on a separate tab. Drag the splitter bar to shrink or enlarge tab space. Selecting Worksheets Typically, you perform most of your work in one worksheet at a time in the active worksheet. When you have multiple worksheets in a workbook, you can use the mouse to click on a worksheet’s tab to make it the active worksheet. The tab is highlighted and moves on top of the other tabs. You can save time and effort by performing some tasks on several worksheets at once. For example, if you want all three worksheets in your workbook to use the same data used as column or row titles in a chart, you can select all three worksheets and enter the titles on the active worksheet. The data for the titles is automatically entered in the other selected worksheets as well. ➤ To select multiple worksheets in the Workbook Designer: ■ Use one of the following key/mouse combinations, depending on whether you want to select adjacent or non-adjacent worksheets: Action Result CTRL-Click on worksheet tab Selects or deselects non-adjacent worksheets. Any other selected worksheets remain selected. SHIFT-Click on worksheet tab Selects all adjacent worksheets between the active worksheet and the worksheet you clicked on. All other worksheets are deselected. Chapter 3 Workbook Fundamentals 27 The following illustration shows various groupings of selected worksheets. Sheet4 is the active worksheet. All other worksheets are deselected. If you hold down the Shift key and select Sheet1, all worksheets between the active worksheet (Sheet4) and Sheet1 are selected. If you select all but one worksheet, and then make one of the selected worksheets active by selecting it, all the other worksheets remain selected. If you hold down the Control key and select Sheet3, it is deselected, but the other worksheets remain selected. Inserting Worksheets By default, a workbook contains only one worksheet. You may insert up to 32,767 additional worksheets. ➤ To add worksheets using the Workbook Designer: 1. Click on the Workbook to which you want to add worksheets. 2. Select Insert > Worksheet. A new worksheet is inserted in the workbook. It becomes the active worksheet. Its tab appears to the left of the tab for the originally selected worksheet, as shown in the following illustrations. Before adding a worksheet. After adding a worksheet. 28 Formula One for Java User’s Guide Appending Worksheets Formula One for Java also allows you to append a worksheet — insert a new worksheet while keeping the current worksheet active. ➤ To append worksheets using the Workbook Designer: 1. Click on the Workbook component to which you want to add worksheets. 2. Select Insert > Worksheet while holding down the control key. A new worksheet is appended to the workbook. The originally selected worksheet (Sheet1 in the illustration) remains the active worksheet. The appended worksheet’s tab appears to the right of the tab for the originally selected worksheet. Before appending a worksheet. After appending a worksheet. The new worksheet is added to the right of the original worksheet. The original worksheet remains active. Inserting Multiple Worksheets The directions below describe how to insert more than one worksheet at a time into the workbook. The resulting number and position of the tabs of the inserted worksheets depends on number and position of the tabs of the worksheets in the workbook prior to inserting multiple worksheets. ➤ To insert more than one worksheet at a time: 1. Select the number of worksheet tabs corresponding to the number of worksheets you want to insert immediately to the right of where you want to insert the new worksheet tabs. For example, to insert two worksheets, select two worksheets. 2. Select Insert > Worksheet. The following illustration shows this process: Since Sheet2 and Sheet1 are selected, two new worksheets are inserted to the left of Sheet2. Notice that the newly inserted worksheets are given the next available worksheet names, regardless of their position in the worksheet index list. Chapter 3 Workbook Fundamentals 29 Naming Worksheets Formula One for Java provides a default name for each worksheet. You can change the names to more meaningfully describe the worksheets’ contents. Double-click the worksheet tab to display the Sheet Name dialog box. Type a new name in the Sheet Name dialog box. ➤ To name a worksheet in the Workbook Designer: 1. Double-click the worksheet tab. 2. Type a name for the worksheet in the Sheet Name text box. 3. Click OK. or 1. Select Format > Sheet > Properties. 2. Click the General tab. 3. Enter the name in the Sheet Name text box. 4. Click OK Worksheet Index List Each workbook maintains an indexed list of the worksheets it contains. Worksheets are indexed from left to right beginning with 0. As you add worksheets, the index is adjusted so the leftmost worksheet is always index 0. Most methods reference worksheets by index rather than name. It is important to remember that the worksheet index is different from the name that appears on the worksheet tab. Notice in the illustration under “Inserting Worksheets” that the inserted worksheet is given the next available name “Sheet2.” However, Sheet2 is index 0 and Sheet1 is index 1. 30 Formula One for Java User’s Guide Working with Multiple Selected Worksheets When you have multiple worksheets selected, you can think of them as a group of worksheets. Some actions you perform affect all worksheets in the group. Other actions effect only the active worksheet. In the Workbook Designer, the following actions affect all selected worksheets: ■ changing cell selection ■ entering values via the formula bar ■ inserting rows, columns, or ranges of cells ■ deleting rows, columns, or ranges of cells ■ clearing rows, columns, or ranges of cells ■ setting Top Left/Row/Column header text ■ setting column width ■ setting row height ■ moving and copying with the mouse Displaying Items on Worksheets The Workbook Designer allows you to determine how formulas and zero values are displayed. It lets you zoom in or out on the worksheet cells and determine whether certain parts of the Workbook Designer are displayed. You may display or hide horizontal and vertical scroll bars, gridlines, and row and column headings. ➤ To control how worksheets display data and Workbook Designer elements: 1. Select the worksheet or worksheets. 2. Choose the Format > Sheet > Properties option and click the View tab. 3. Check the Formulas box to display formulas in workbook cells. In the View Formulas mode, number formatting is changed to general and displayed leftaligned. Uncheck the Formulas box to display the computed values and formatting in workbook cells. . Chapter 3 Workbook Fundamentals 31 4. Check the Gridlines box to display the worksheet gridlines. Uncheck it to display the worksheet without gridlines. 5. Check the Zero Values box to display zeroes in cells when they are entered as values or calculated by formulas. Uncheck it to leave cells with zero values blank. 6. Check the Row Heading box to display the row headings. Uncheck it to hide row headings. 7. Check the Column Heading box to display the column headings. Uncheck it to hide column headings. 8. Choose settings for the Horizontal and Vertical Scrollbars in the Scrollbars dropdown list boxes. On means scroll bars are displayed; Off means they are hidden; and Automatic means they are displayed only when the workbook is active (when it has the input focus). 9. Enter the scale to display the workbook cells and headings in the View Scale box. You may enter values from 10 to 400. The View Scale setting corresponds to the setting in the View > Zoom menu. 10.Set the limits of the range reference in the Sheet Limits box. You may enter a range reference for a sheet with a single row and column (A1:A1) to a sheet with more than a billion (1,076,741,824) rows and up to 32,768 columns (A1:AVLH1073741824). 11. Click OK Controlling Worksheet Usage Sometimes you may want to keep users from taking certain actions like moving data from place to place, changing the worksheet layout, or selecting cells or objects. For each worksheet, you may choose whether to allow users to: ■ use the Arrow, Delete, and Tab keys, ■ enter or edit data in cells, ■ move the active cell using the Enter key, ■ resize rows and columns, ■ fill or move cell ranges by dragging, ■ change row and column headings, ■ enter formulas, ■ select cells and/or objects, ■ select cell-by-cell or row-by-row, and ■ see the active cell. 32 Formula One for Java User’s Guide ➤ To control user access to editing tasks for the selected worksheet(s): 1. Choose the Format > Sheet > Properties option and click the Edit tab. 2. Check or uncheck the appropriate boxes to allow or deny users use of the Arrow keys, the Delete key, and the Tab key. 3. Check the Enable In-Cell Editing box to allow users to enter data in cells. (See Note, below.) Checking this box allows users to double-click a cell or press F2 to cause the cursor to appear in the cell itself instead of in the Formula Bar. 4. Check the Enter Moves Down box to move the active cell down one cell after a user presses Enter. To leave the active cell in place after a user presses Enter, leave this box unchecked. 5. Check or uncheck the appropriate boxes to allow or forbid users to resize rows and columns, to fill or move ranges by dragging, to edit row or column headings, and to enter formulas. (If the Enter Formulas box is unchecked, Formula One for Java will beep whenever any cell entry starts with an equals sign.) 6. Click OK. Note When the Enable In-Cell Editing box is unchecked, users will still be able to enter data in cells when the Formula Bar is displayed. To deny users editing access, either hide the Formula Bar or lock the cells. See “Locking Cells and Hiding Formulas” on page 58. Chapter 3 Workbook Fundamentals 33 ➤ To control user access to selecting tasks for the selected worksheet(s): 1. Choose the Format > Sheet > Properties option and click the Selection tab. 2. Check Allow Selections to allow users to select cells and graphical objects (if the Allow Object Selections box is also checked). To disallow all selections, both of cells and graphical objects, uncheck this box. 3. Check Allow Object Selections to allow users to select objects. (In order for this to work, the Allow Selections box must be checked.) To deny users the ability to select objects, uncheck this box. 4. Check Row Mode to select the entire row any time a user selects a cell. 5. Choose a setting for the Show Selections drop-down list box. On means users see which cell or object is selected. Off means users will not see what is selected. (Users may still enter data, change the selection within a formula with the mouse, and navigate the worksheet using arrow keys, but they won’t be able to see what they selected or use the mouse to navigate within the worksheet.) Automatic means users see the selection only when the workbook has the focus. 6. Click OK. Deleting Worksheets ➤ To delete a worksheet in the Workbook Designer: 1. Select the worksheet you want to delete. 2. Select Edit > Delete Sheet. 3. Formula One for Java displays a dialog box with the message, “Are you sure you want to delete the selected sheet(s)?” 4. Click OK to delete the sheet. 34 Formula One for Java User’s Guide Selecting Items in Worksheets Selecting means making a part or parts of the worksheet active. You can select cells, groups of cells, rows, columns, graphical objects, column and row headings. In general, you must select a cell or object before changing anything about it. The Active Cell and Ranges of Cells When you open the Workbook Designer, the cell in the upper left corner has a dark border around it, marking it as the active cell. Formula One for Java always places data entered in the active cell. When you select a cell by clicking on it with the mouse or by navigating to it using the keyboard, you make that cell active. The active cell can be part of a selection of cells. When more than one cell is selected, the selection is called a range of cells. The active cell can move within the range. You may select more than one range of cells (non-adjacent) on a worksheet. Many operations require one or more cells to be selected. The following illustration shows three types of cell selections. Active cell (single cell selection) Single range selection Multiple range selection Selecting Cells with the Mouse ■ To select a single cell, left-click on it. ■ To select a range of cells, click and hold the left mouse button and drag through the range you want to select. When a range is selected, it becomes highlighted. ■ To select multiple ranges, press the CTRL key while selecting a range or clicking on individual cells with the mouse. Any previously selected ranges remain selected. Chapter 3 Workbook Fundamentals 35 Once you select a range or multiple ranges, you can move the active cell within the range without deselecting the range or ranges by using the ENTER, SHIFT + ENTER, TAB, or SHIFT + TAB keys. Navigating and Selecting Cells Using the Keyboard You can use the keyboard to select individual cells (this is sometimes referred to as moving the active cell) or to select ranges of cells. You can also navigate within a worksheet using the keyboard. Keyboard Navigation Key Description Up Arrow Moves active cell up one row. Down Arrow Moves active cell down one row. Left Arrow Moves active cell left one column. Right Arrow Moves active cell right one column. CTRL + Up/Down/Left/Right Moves active cell to the edge of the next range of cells containing data. If there is no additional data in the direction in which you are moving, moves active cell to the edge of the worksheet. Page Up Moves active cell up one screen. Page Down Moves active cell down one screen. CTRL Page Up Moves active cell left one screen. CTRL Page Down Moves active cell right one screen. Home Moves active cell to first column of current row. End Moves active cell to last column of current row that contains data. CTRL Home Moves active cell to row 1 column 1. CTRL End Moves active cell to last row and column that contains data. Selecting Cells To select a range of cells, use the SHIFT key in combination with the above movement keys. For example, to select a range of cells to the right of the active cell adding one cell at a time, hold down SHIFT while pressing the Right Arrow key. To select all the cells to the right of the active cell in the row, hold down SHIFT, CNTRL and press the Right Arrow Key. You can then press the Down Arrow key to select all the cells below the active cell in the worksheet. You must use the mouse to select multiple ranges (two or more non-adjacent ranges). Selecting Rows and Columns You can use the mouse to select entire rows and columns in a worksheet at run time or in the Workbook Designer. To select a row or column, position the pointer on the header of the row or column you want to select. When you click the header, the row or column is selected. 36 Formula One for Java User’s Guide You can also select rows by activating row mode under Format > Sheet > Properties > Selection and clicking on any cell. You can select all rows and columns in the worksheet by clicking in the top left corner. Click here to select all rows and columns. Selecting Row and Column Headings Select all row or column headings to globally apply formatting by pressing CTRL+Shift and clicking a heading area. To select all column headings, click in the column heading area. To select all row headings, click in the row heading area. To select all headings (both columns and rows), continue to hold down CTRL+Shift and click on both row and column heading areas. Selecting Graphical Objects You must use the mouse to select graphical objects you draw with the toolbar buttons. To select a graphical object, hold down the CTRL key and click inside the object. The object’s selection handles appear when it is selected. For more information on selecting graphical objects, see “Selecting Graphical Objects” on page 99 and “Selecting Chart Elements” on page 138. Entering and Changing Data When working in the Workbook Designer you can enter, edit, and delete data in the worksheet cells. The following table lists action keys that allow you to enter, edit, and delete data, enter and exit the edit mode, and recalculate the workbook. Chapter 3 Workbook Fundamentals 37 Key Description Exceptions ENTER Accepts the current entry and activates the next cell down. When a range is selected, accepts the current entry and activates next cell in the current selection. When Enter Moves Down is deselected, accepts the current entry and keeps the same cell active. SHIFT + ENTER Accepts the current entry and activates the next cell up. When a range is selected, accepts the current entry and activates the previous cell in the selection. When Enter Moves Down is deselected, accepts the current entry and keeps the same cell active. TAB Accepts the current entry and activates the When Enable Tab Key is cell horizontally to the right. deselected, inserts a tab character in the active cell. SHIFT +TAB Accepts the current entry and activates the When Enable Tab Key is cell horizontally to the left. deselected, inserts a tab character in the active cell. F2 Initiates cell edit mode. Pressing F2 again When Enable In-Cell Editing (while cell edit mode is initiated) displays in deselected, disallows cell the Cell Text dialog box, which allows you edit mode. to enter multi-line data in a single cell. F9 Recalculates workbook. none DEL Clears current selection. If Enable Delete Key is deselected, disallows use of delete key. Escape Cancels current data entry or editing operation. none Saving Workbooks When you save a workbook, Formula One saves the current view settings. When a view is attached to a workbook, the view settings are retrieved from the workbook. Opening and Saving Formula One for Java reads and writes several file formats. The following table lists Formula One for Java compatible file formats and associated file name extensions. Format File Extension Description Formula One for Java .vts Formula One 3.x, 4.x, 5.x, 6.x and 7.x formats. Excel 5.0, 7.0, 97, and 2000 .xls Microsoft Excel 5.0, 7.0, 97, and 2000 formats. Tabbed-Text Tab-delimited text file including number formatting information. .txt 38 Formula One for Java User’s Guide Format File Extension Description Tabbed-Text values only .txt Tab-delimited text without formatting information. HTML .htm/.html hypertext markup language. HTML data only .htm/.html hypertext markup language without formatting information. Since Formula One for Java has features not supported by Excel, files saved in the VTS file format cannot be read by Excel. In the XLS format each record represents a unique feature or property of the workbook. The VTS file format uses a significantly more efficient method of storing records. If your file contains features not supported by Excel, saving the workbook as an XLS file removes these features. Likewise, Excel contains features not supported by Formula One for Java. Unsupported features are ignored when Formula One for Java loads an Excel worksheet or workbook. Important If you load an Excel file that contains features not supported by Formula One for Java those features are ignored. If you then write the imported file from Formula One for Java as an Excel file those features are lost. Formula One for Java cannot read password-protected Excel files. If you intend to read files from Excel, do not password-protect them. Using the Mouse with Worksheets The mouse is used primarily to select items in a worksheet at run time. The following table lists the mouse actions you can perform in a worksheet. Action Description Click on a cell Moves the active cell to the pointer position. Click in row or column headings Selects entire row or column. Click in top left corner Selects entire worksheet. Double-click Invokes edit mode. Double-click in row or column headings Displays a dialog box that allows you to enter a label for the column or row heading. Double-click in top left corner Displays a dialog box that allows you to enter a label for the top left corner. Double-click in worksheet tabs Displays a dialog box that allows you to enter a new name for the worksheet. Click and drag Selects a range. If other ranges are selected, the previously selected ranges are unselected. CTRL + click and drag Selects a range. If other ranges are selected, they remain selected. Chapter 3 Workbook Fundamentals 39 Action Description SHIFT + click and drag Extends the current selection. CTRL + SHIFT click on row headings, column headings, or top left corner Selects all the row headings, all the column headings, or top left corner of the worksheet. Holding down CTRL +SHIFT while clicking Row Headings, Column Headings, and Top Left Corner selects them all. Drag a range’s copy handle Copies the range into the cells you drag across. Drag a range’s border Moves the range to a new location. CTRL + click on a chart, picture, drawing or forms object Selects the object. CTRL + click on cells Selects one or more ranges. Holding down the CTRL key allows you to select multiple ranges. ALT + click and drag a selected object Repositions an object and aligns object sides with the cell grid. ALT + click and drag an object’s selection Resizes an object and aligns object sides with the handles cell grid. Right-click on a chart Brings up the chart context menu. Tidestone 41 C H A P T E R 4 Working With Data Entering and manipulating data in cells is the basis for nearly all work performed in a workbook. You can enter virtually any type of data in a cell. You can also enter formulas to calculate and evaluate data that appears in other cells. This chapter covers the following topics that give you basic information about entering data. ■ “Types of Data” on page 42 ■ “How to Enter Constant Values” on page 42 ■ “How to Enter Formulas” on page 44 ■ “Ways to Enter Data” on page 48 ■ “Understanding Cell References” on page 49 This chapter also covers the following advanced topics that give more detailed information and explain special techniques for working with data. ■ “Using Names” on page 54 ■ “Using Autofill Lists” on page 54 ■ “Validating Data” on page 56 ■ “Identifying Formulas on Worksheets” on page 57 ■ “Locking Cells and Hiding Formulas” on page 58 ■ “Calculating Worksheets” on page 60 ■ “Understanding Worksheet Errors” on page 62 42 Formula One for Java User’s Guide Types of Data Cells can contain two types of data: constant values and formulas. ■ Constant values are data that you enter that is not calculated or evaluated. Constant values are usually numbers (including dates and times) or text. These are examples of constant values: ■ First Quarter $14.32 4/16/98 43% 7.58E-01 3/4 Jones, Felicia TRUE 4,762 Miles of highway 0.121435236 4:30 PM Formulas are special entries in cells that tell Formula One for Java to do a particular calculation or comparison. Cells that contain formulas display values that are the results of the calculation. Formulas are always preceded by an equal sign. They can contain constant values, cell references, names, functions, and operators. These are examples of formulas: =1+2*3-4 =B12 / 4 * B13 =SUM(1,2,3,4,5) =AVERAGE(C2:C9) How to Enter Constant Values Constant values are data that is not calculated or evaluated. That is, Formula One for Java does not change the number or text you enter. However, sometimes the way you enter a constant value makes Formula One for Java interpret that value in a certain way. This is because of number formats. Number formats are patterns that Formula One for Java uses for displaying numbers. A date format, for example, might require Formula One for Java to display the data as 3 sets of 2 numbers divided by slashes. Any date with that format follows that pattern. For more information on number formats, see “About Number Formats” on page 64. Formula One for Java automatically applies some of its built-in number formats based on how you enter the constant value. The following sections describe how to enter different types of constant values to get the results you want. Chapter 4 Working With Data 43 Numbers as Constant Values Numeric entries can (of course) contain the numeric characters 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0. They can also contain commas to separate thousands, periods for decimal points, and the following special characters: +, -, (, ), /, $, %, E, and e. ■ ■ Negative numbers can be preceded by a minus sign or enclosed in parentheses. Fractions can be entered using the slash. If the fractional value contains a leading integer (e.g., 1 1/3) it can be entered directly. If there is no leading integer, the fraction should be preceded by a zero (e.g., 0 2/3). ■ Currency can be entered using a leading dollar sign. ■ Percentages can be entered using a trailing percent sign. ■ Long numbers that are larger than the cell in which they are entered are converted to scientific notation unless a specific format is applied. Dates and Times as Constant Values Formula One for Java automatically recognizes numeric entries that use slashes, hyphens, certain text strings, and colons as dates and times. When you enter a date or time as a value in a cell, Formula One for Java automatically applies a date or time format to that value. Formula One for Java automatically recognizes data entered in the following ways as dates and/or times and applies the indicated format to that data. Entered Format Assigned 3/15/94 mm/dd/yy 15-Mar-94 d-mmm-yy 15-Mar d-mmm Mar-94 mmm-yy 9:55 PM h:mm AM/PM 9:55:33 PM h:mm:ss AM/PM 21:55 h:mm 21:55:33 h:mm:ss 3/15/94 21:55 mm/dd/yy h:mm Text as Constant Values Text is any set of characters that Formula One for Java does not recognize as a number, date, or time. Text that is wider than a cell ordinarily spills over into the cell immediately to the right, if that cell is empty. You can specify that text should wrap within the cell by enabling word wrap in your alignment format settings. For information, see “Aligning Cell Data” on page 73. 44 Formula One for Java User’s Guide If you want numbers to be treated as text in a worksheet, precede the number with a tick mark (’). Logical and Error Values as Constant Values Logical values are the words TRUE and FALSE. Error values are messages Formula One for Java gives you when a formula you entered can’t be computed. For a list of the error messages and what they mean, see “Understanding Worksheet Errors” on page 62. Logical and error values are usually not entered directly in cells; they are usually the result of a formula. However, entering these values can be useful for testing formulas. How to Enter Formulas Formulas are the basic building blocks for analyzing and calculating worksheet data. A formula is a special entry in a cell that tells Formula One for Java to do a particular calculation or comparison. Cells that contain formulas display or return values that are the results of the calculation. The returned values can be numbers, logical values (TRUE and FALSE), or text. Formulas consist of strings containing numbers, text, logical values, mathematical operators, worksheet functions, cell references, and names. A formula can contain as many as 1024 characters. ➤ To enter a formula in a cell: ■ Begin the entry with an equal sign (=). Formula One for Java recognizes cell contents beginning with equal signs as formulas. Numbers in Formulas Usually you can enter a number in a formula by simply typing the number. Number formats do not apply to numbers within formulas, so the rules for entering numbers in formulas are different than the rules for entering numbers as constant values. ■ ■ ■ ■ ■ ■ Thousands should be entered without the comma separator, because the comma will be interpreted as separating two range references (see “Operators in Formulas” on page 46). Negative numbers are entered using the negative sign (-). Do not use parentheses: the formula interprets parentheses as separators, not as negators. Fractions can be entered by using a slash for the fraction separator (3/4 is evaluated as .75). Percentages can be entered using the percent sign (34% is evaluated as .34). Scientific notation can be used for very large or very small numbers (34E+09 is evaluated as 34,000,000,000). Exponents can be entered using the caret sign (3^4 is evaluated as three to the fourth power, or 81). Chapter 4 Working With Data ■ 45 Dates and times may be entered in two ways: as serial numbers, or in one of the conventional formats (e.g., m/d/yy) enclosed in quotation marks. Dates and times entered in this way are considered text, but Formula One for Java recognizes them as dates and internally converts them to their serial number values. For example, “10/10/94”-“10/1/94” is interpreted as 9. Text in Formulas Formulas can manipulate text just as they manipulate numbers. Text in formulas must be enclosed in quotation marks. Without the quotation marks, the formula will return the #NAME? error. If a number is encountered when text is expected, the number is converted to text. “Quarter ”&3 is interpreted as Quarter 3. If text is encountered when a number is expected, the text is converted to a number (1 + “3” is interpreted as 4). If the text cannot be converted to a valid number (1 + “banana”), the formula will return the #VALUE! error. You can use the < and > characters in formulas to determine if a text string is alphabetized before or after another text string. Concatenation in Formulas You may use the ampersand (&) character to concatenate text strings when a text argument from two different sources is required. For example, in the spreadsheet below, cell A3 uses concatenation to create the text first quarter. Cell A3 uses the ampersand to concatenate text in cell A1 with other text. Logical Values in Formulas The logical value TRUE converts to 1, while FALSE converts to 0. If a number is encountered when a logical value is expected, 0 is evaluated as FALSE and all other numbers are evaluated as TRUE. If text is encountered when a logical value is expected, “TRUE” is evaluated as TRUE, “FALSE” is evaluated as FALSE, and all other text returns the #VALUE! error. 46 Formula One for Java User’s Guide Operators in Formulas The following mathematical operators let you specify the type of calculation or evaluation to be performed in the formula. Operator Type Arithmetic Operator Description + Addition - Subtraction / Division * Multiplication % Percentage ^ Exponentiation Text & Concatenation Comparison = Equal to > Greater than < Less than >= Greater than or equal to <= Less then or equal to <> Not equal to Reference :, .., . , Range. Produces a reference that includes all the cells between the two references (e.g., A1:A5 includes cells A1, A2, A3, A4, and A5). Union. Produces one reference that includes the two references (e.g., A1:A10,C1:C10). Operator Precedence in Formulas When more than one of the operators appears in a formula, Formula One for Java uses a specific order of precedence to calculate the formula. The operators listed first in the following table are evaluated before the operators below them. Operator ( ) : .. Description Parentheses . Range , Union - Negation (when used in front of a constant or variable) % Percentage ^ Exponentiation * / Multiplication and Division Chapter 4 Working With Data Operator + Description Addition and Subtraction (when used between two constants or variables) - & = 47 Text concatenation < > <= >= <> Comparison When two or more operators on the same line in the table above appear in a formula, Formula One for Java evaluates them from left to right. Use parentheses to change the order of evaluation. The following example illustrates how the result of a formula can be altered by adding parentheses to change the order of precedence. Formula Result =1+2*37 75 =(1+2)*37 111 Worksheet Functions Functions are a particular kind of formula that let you perform complex calculations with very little work. Formula One for Java contains a set of built-in worksheet functions. Refer to the companion manual, “Formula One for Java Function Reference,” for additional information about functions. Changing Formula Evaluation Rules In general, Formula One for Java evaluates formulas the way Microsoft Excel does. The Lotus 1-2-3 spreadsheet program evaluates formulas in a slightly different way. Lotus 1-2-3’s rules always interpret the logical value TRUE as 1, FALSE as 0. Also, text in cells referred to by formulas and in function arguments is always evaluated as 0 (zero). You can use Lotus 1-2-3’s evaluation rules instead of Microsoft Excel’s on any worksheet. You can even have different worksheets in the same workbook use different evaluation rules. ➤ To use Lotus 1-2-3 evaluation rules: 1. Select the worksheet(s) whose formulas you want to evaluate using Lotus 1-2-3 rules. 2. Choose Format > Sheet > Properties and click the General tab. 3. Check the Lotus Style Formula Evaluation check box. 4. Click OK. 48 Formula One for Java User’s Guide Ways to Enter Data You can enter constant values and formulas into worksheet cells in several ways. Using the Formula Bar The formula bar is an empty text box at the top of the workbook. You can enter data into the active cell on a worksheet by typing the data into the formula bar and pressing ENTER. The cell reference indicator, a gray box to the left of the formula bar, shows the address of the active cell. The data entered in the formula bar will go in this cell. The formula bar is a text box for entering cell data. The cell reference indicator displays the address of the active cell. The formula bar appears by default in the Workbook Designer. You can display or hide the formula bar and cell reference indicator. ➤ To control the display of the formula bar and cell reference indicator: ■ Select View > Formula Bar to toggle the display of the formula bar and cell reference indicator. Using Edit Mode If you click on a cell with data in it, or navigate to a cell with the ENTER, TAB, or arrow keys, anything you type in that cell will replace the current cell contents. If you don’t want to replace data that was previously entered, you may use Formula One for Java’s edit mode. ➤ To enter edit mode: 1. Make the cell you want to edit active. 2. Use any of the following three ways to enter edit mode: Click in the Formula Bar. Double-click on the cell. Press F2. Once you are in edit mode, you may use the arrow keys to move around in the text just as you would in a word processing program. Chapter 4 Working With Data 49 Entering Multi-Line Data A single cell can contain multiple lines of data and up to 255 characters. To enter more than one line of data, you need to specify carriage return/line feeds to indicate line breaks. ➤ To enter multi-line data: 1. When the cursor is displayed in a cell, press F2 to enter edit mode. 2. Press F2 again. The Cell Text dialog box is displayed for cell data entry, as shown below. 3. Enter a line of data. 4. To enter a line feed, press RETURN. 5. Click OK to accept the entry and return to normal worksheet editing. The following illustration shows the results of a multi-line entry. The multi-line entry is placed in cell A1. Row 1 and column A have been resized so the entry is not cropped. You can also enter multi-line row and column headings. See “Setting Row and Column Heading Text” on page 82 for more information. Understanding Cell References A reference is a cell’s address. It identifies a cell or range of cells by referring to the column letter and row number of the cell(s). For example, A1 refers to the cell at the intersection of column A and row 1. The reference tells Formula One for Java to use the contents of the referenced cell(s) in the formula. If a formula requires a number, you can substitute a reference to a cell that contains a number. 50 Formula One for Java User’s Guide You specify a range of cells by placing a colon (:) between two cell references. For example, A1:C3 refers to the range anchored by cells A1 and C3. The range includes all cells in columns A, B, and C of rows 1, 2, and 3. The range reference A1:C3 refers to all the grayed cells in this worksheet. Entering Cell References You can enter cell references in formulas in three ways: ■ Type in the cell or range address. ■ Type in the name of a named cell or range. For information on defining names, see “Using Names” on page 54. ■ Use the mouse to click and drag on cells and ranges. Formula One for Java automatically enters a relative reference identifying the cell(s) you select. Absolute and Relative References There are two types of cell references: relative and absolute. ■ Relative references point to a cell based on its position relative to the current cell. When the cell containing the reference is moved or copied, the reference is adjusted to point to a new cell with the same relative offset as the originally referenced cell. For example, suppose the formula =B1+B2+B3 is located in cell A1. When you copy the formula and paste it down two rows into cell A3, the formula will be adjusted down two rows, to =B3+B4+B5. Relative references will be adjusted whenever you cut or copy and paste a formula or when you use the Edit > Fill commands to fill a range with a copy of a formula. ■ Absolute references point to a cell at an exact location. When a cell containing a formula with absolute references is moved or copied, the reference does not change. Absolute references have a dollar sign ($) in front of the row number and/or column letter. References that are part absolute and part relative are called mixed references. The following table lists the reference types. Reference Type A1 Relative reference pointing to cell A1. $A$1 Absolute reference pointing to cell A1. Chapter 4 Working With Data Reference Type $A1 Absolute column reference, relative row reference pointing to cell A1. A$1 Relative column reference, absolute row reference pointing to cell A1. 51 Using Relative and Absolute References You can copy and paste absolute, relative, and mixed references to create worksheets that are easy to update and that are smaller than worksheets where each formula is created separately. For example, in the following worksheet, the values in column A need to be multiplied by the percentages in row 1. To do these calculations, you could enter the formula =A2*B1 in cell B2, =A3*B1 in cell B3, =A4*B1 in cell B4, etc. Besides the fact that this would require a lot of typing, this solution would require Formula One for Java to keep nine separate formulas in memory. A better way to do it would be to enter the formula =$A2*B$1 in cell B2, and use the worksheet’s Edit > Fill command to fill cells B2 through D4 with copies of that formula. When the formula is copied in this manner, its relative references change, but the absolute references stay the same. Enter the formula... Edit > Fill > Down to fill column B... Edit > Fill > Right to fill columns C and D. 52 Formula One for Java User’s Guide The resulting worksheet calculates all the figures using multiple copies of that one formula. Only one formula must be kept in memory. If you change the percentages in row 1 or the figures in column A, the calculations in the worksheet will automatically change because of the absolute references to those cells. This makes the worksheet easy to update. References to Other Worksheets You can reference cells in other worksheets in the same workbook by placing an exclamation mark between the sheet name and the reference. The sheet name is the name found on the worksheet tab. For example, Data!A1 refers to the top left cell in a sheet called Data. Sheet names with spaces. If the sheet name contains spaces, you must enclose the name in single quotes: ‘1994 sales’!B17. Cells on two worksheets. You can make a reference to cells on two different worksheets by placing a colon between the two sheet names. For example, Sheet1:Sheet2!A1 refers to two cells: cell A1 in Sheet1 and cell A1 in Sheet2. Order of sheet names. References to more than one worksheet must list the worksheets in the order in which they appear in the workbook. References to cells in both Able and Baker must list Able first. Chapter 4 Working With Data 53 References to Other Workbooks References that point to cells on worksheets in other workbooks are called external references. An external reference is created by placing the workbook name in brackets, followed by the worksheet name, an exclamation point, and finally a cell or range reference. [Sales]1998!A1 Brackets enclose the workbook name. An exclamation mark follows the worksheet name. The workbook name must appear between brackets. You do not have to enter the VTS or XLS extension. The cell or range reference appears last. The worksheet name, taken from the worksheet tab, appears between the closing bracket and the exclamation mark. External references will work only if both workbooks are open in the Workbook Designer. If the referenced workbook is not open when you create the external reference, an Invalid Formula Syntax error message will appear. The following are examples of external references using absolute, relative, and mixed references. Reference Type [Sales]1987!A1 Relative reference pointing to cell A1 in a worksheet titled 1987 of a workbook titled Sales. [FY91]January!$A$1 Absolute reference pointing to cell A1 in a worksheet titled January of a workbook titled FY91. [Q1]Sheet1:Sheet2!$A1 Absolute column reference, relative row reference pointing to cell A1 in the first and second worksheets of a workbook titled Q1. [Store1]Sheet1:Sheet4!A1:F1 Relative row and column reference pointing to the range A1 to F1 in the first four worksheets of a workbook titled Store1. Paths in External References After you enter an external reference, Formula One for Java will change the format of the reference to show the absolute path to the workbook you referenced. For example, say you entered this reference to a workbook named September in the Payroll directory on your C drive: [September]Payroll!C2:C420 After you enter that reference, if you return to the cell where the reference was entered, you will note that Formula One for Java has changed it to: ‘[C:\Payroll\September.vts]Payroll’!C2:C420 54 Formula One for Java User’s Guide This absolute path is recorded in the worksheet. If you later move the September workbook, the external reference should still work, as long as you open September.vts in the Workbook Designer at the same time as the workbook that references it. Using Names User-defined names are an easy way to identify a cell, a range of cells, a value, or a formula. For example, the formula =Sales-Expenses is much clearer than =A10-A6. When you create a name for a range of cells, you can use that name (without quotation marks) in formulas. You can also use names to identify constants and formula expressions. For example, you might define the name LtSp as 186000. You could then use the name LtSp in all your formulas. ➤ To define names: 1. If you are naming a range, select it. 2. Select Insert > Name. The Defined Name dialog, shown below, will appear. Enter the name of the range, formula, or constant here. Do not use spaces in the name. Click here to add a new name. Click here to delete the selected name. All the user-defined names in the workbook appear here. If you selected a cell or range, its reference appears here. You may edit it. You may also enter a formula or constant value that you want to name. 3. When you are finished, click OK. Do not use the names Print_Area or Print_Titles. Formula One for Java reserves those names for its own use. Using Autofill Lists If you frequently use lists of names, months, or days of the week in your worksheet, you can let Formula One for Java do some of the work for you by using the autofill feature. Formula One for Java’s default autofill lists contain frequently used series of text such as months of the year and days of the week. When you enter one of the elements in Chapter 4 Working With Data 55 these lists and drag the copy handle, Formula One for Java enters the rest of the data from the list as needed to fill the range you mark. When Formula One for Java recognizes this text as part of an autofill list, and . . . you drag the copy handle to this position... the cells in the marked range are automatically filled with items from the list. Once Formula One for Java has recognized the text as an item from an autofill list, pressing TAB puts the next list item into the next cell to the right. Pressing ENTER puts the next list item into the next cell below. Creating Autofill Lists You can add custom autofill lists that include frequently used series of text. Note Autofill lists must contain text values in order to work properly. You can create an autofill list that contains numbers, but Formula One for Java will not recognize those numbers as members of an autofill list and will not automatically fill the range with them. ➤ To add a new autofill list: 1. Select Tools > Options. 2. Click on the Auto Fill tab, shown below. Select the autofill list whose entries you want to edit. To create a new list, choose (New List). After entering the new list items in the Current List box, click here to create the new list. Click here to delete the displayed list. Enter or edit the autofill list items here, separating items with semicolons. 3. Click Apply to see your changes or OK to accept your changes. Caution Formula One for Java saves this autofill list information only during the current working session in the current workbook. When you close the workbook, the autofill list information is not saved. 56 Formula One for Java User’s Guide Validating Data You can limit data entry by specifying a validation rule for a cell. A validation rule consists of a formula to test the cell entry against and text to display if the validation fails. The formula must return either TRUE or FALSE. If the formula returns TRUE, the value is entered. If the formula returns FALSE, the value is not entered and the validation text is displayed in an error dialog box. For example, you can limit the range of values a user can enter in a cell by creating a rule that fails if the user enters a number less than 100 and displays the message “Enter a value greater than 100.” You can use relative references in validation rules. These references are considered to be relative to the active cell. This allows a validation rule to be properly applied to an entire range. Note Microsoft Excel’s validation rules are incompatible with Formula One for Java’s. Any validation rules will be deleted if you export a Formula One for Java file to Excel and vice versa. ➤ To create a validation rule: 1. Select the cell(s) for which you want to create a validation rule. 2. Select Format > Cells to display the Format Cells dialog box. 3. Select the Validation tab, shown below. Enter the validation formula here. It must return the logical values TRUE or FALSE. Do not enter the equals sign. Enter the text to display if the data fails the validation test. Since new validation rules have no effect on the cell’s current contents, the sample cells displayed here will not change. 4. Click OK to accept your changes. Chapter 4 Working With Data 57 This message will appear when the data entered in cell A1 fails the validation rule. The Validation Formula The validation formula must be a worksheet formula that evaluates to TRUE or FALSE. Following are several examples of validation formulas. SUM(A6:A7)>A5 AND(A6>1,A6<100) IF(A7>1,A7<100,A7>0) OR(ISLOGICAL(A7),A7=1,A7=0) Note Validation rules are only checked if data is entered by typing it in and pressing ENTER. Any other way of entering data, such as selecting a value from a check box, bypasses validation. Identifying Formulas on Worksheets Formula One for Java gives you two tools to help you identify cells that contain formulas: type markers and view options. Type Markers Type markers are colored borders around cells that identify the type of data in the cell. By default, type markers are not displayed. Type marker color Data in cell Green Values Red Formulas and functions Blue Empty, formatted cells ➤ To display type markers: 1. Choose Tools > Options and click the General tab, if necessary. 2. Check the Type Markers box, then click OK. 58 Formula One for Java User’s Guide View Options By default, the workbook designer displays the results of formula calculations in the cells where formulas are entered. You may choose to display the formula instead. ➤ To display formulas instead of the results of the formulas: 1. Select the worksheet(s) on which you want to see formulas. 2. Choose Format > Sheet > Properties and click the View tab, if necessary. 3. Check the Formulas check box, then click OK. When you choose to view formulas, Formula One for Java automatically doubles the column widths of the worksheet(s) to provide space for the formulas. It also left-aligns all cells on that worksheet and displays all numbers in the General format. Unchecking the Formulas check box will shrink the columns back to their original size and return the alignment and formatting to their original settings. Locking Cells and Hiding Formulas Locking cells prevents users from entering data or formulas into those cells. You can lock all the cells in the worksheet, or you can choose which cells you want to lock. Locking cells is a two-step process: First you choose which cells you want to be locked and which unlocked. Then you choose to enable cell protection. The cells will not be shielded from edits until you lock them AND enable the protection. You may change the protection features on your worksheet by locking/unlocking individual cells or by enabling/disabling the protection. By default, worksheet cells are locked and protection is disabled. In addition to locking cells, you can hide cell formulas from appearing in the formula bar. ➤ To lock and unlock cells and/or hide formulas in a worksheet: 1. Select the cells you want to lock or unlock. 2. Select Format > Cells and click the Protection tab, shown below. Chapter 4 Working With Data 59 Check this box to lock the selected cells when protection is enabled. Check this box to keep formulas in the selected cell(s) from appearing in the formula bar when those cells are made active. This option only works when protection is enabled. Since locking and hiding have no effect on how the cell contents appear, the sample cells displayed here will not change. 3. Click OK. 4. Enable protection. See below. ➤ To enable and disable cell protection on a worksheet: ■ Select Format > Sheet > Enable Protection. A check by the Enable Protection menu item means that locked cells cannot be entered or changed. It also means that cells designated Hidden that contain formulas will not display those formulas in the formula bar. A user who attempts to enter data in a locked cell will see this dialog box. When a locked cell is selected, the ENTER, SHIFT-ENTER, TAB, and SHIFT-TAB keys advance the selection to the next unlocked cell. Note The Enable In-Cell Editing check box on the Edit tab in the Format Sheet dialog box also controls whether or not users can enter data in cells. For more information, see “Controlling Worksheet Usage” on page 31. 60 Formula One for Java User’s Guide Calculating Worksheets Formula One for Java calculates cells in natural order, which means that all dependencies are calculated before their dependents. This ensures that the formulas return correct results. When a worksheet is edited, Formula One for Java adjusts formula references so they point to the correct cells, then determines the natural order of the formulas. When data or a formula in a cell changes or when cells are added or deleted, all the formulas on all the worksheets in the workbook are recalculated in order to ensure that data is always valid. Setting Automatic Recalculation By default, automatic recalculation is enabled. With this setting, Formula One for Java recalculates the worksheet each time a cell is changed and system processing is idle. For moderately-sized worksheets, recalculation operations happen in a fraction of a second. But for large worksheets or situations where many cells are changed by code, this reorganization and recalculation process can slow system processing. In these situations, it is sometimes desirable to disable automatic recalculation while your code operates on the worksheet. When the operation is finished, automatic recalculation can be enabled and the worksheet can be updated. ➤ To change automatic recalculation: 1. Select Tools > Options. 2. Select the Calculation tab, shown below. Uncheck this check box to disable automatic recalculation. 3. Click OK. Chapter 4 Working With Data 61 Solving Circular References Sometimes a formula refers to its own cell, either directly or indirectly. This is called a circular reference. To solve a formula that contains a circular reference, iteration must be used. Iteration is the process of repeatedly calculating a worksheet until a specific condition is met. Formula One for Java supports iteration through settings specified in the Calculation tab of the Options dialog box. The following example includes a circular reference: Suppose your small business has 10,000 shares of stock owned by four shareholders. You decide to let a fifth shareholder enter your partnership. In return for his investment, you give him 10 percent of the company. How many more shares will the company have to issue to give the new investor 10% of the company? The following illustration shows the results of this example as it appears in a worksheet. he formulas in B2 and B3 create a circular reference. the formula text the results of the formulas ➤ To control the number of times a circular reference is calculated: 1. Select Tools > Options and click the Calculation tab. 2. Click the Iteration check box to limit iteration for calculating circular references. 3. In the Maximum Iterations text box, type the maximum number of iterations you want Formula One for Java to execute. 4. In the Maximum Change text box, type the maximum change between iterations. The smaller the number, the more accurate your answer is. 5. Click OK. Setting Calculation Precision Formula One for Java’s calculation engine calculates formulas and functions to a high degree of precision. Some of the numbers on your worksheets may be calculated out to many more decimal places than you want. You can specify the number of decimal places to round calculated and constant values so that Formula One for Java doesn’t store data you don’t need. You set precision by applying number formats to cells, then telling Formula One for Java to truncate values in the formatted cells to the precision specified by the format. For information on number formats, see “About Number Formats” on page 64. 62 Formula One for Java User’s Guide When you set precision, you set it for all cells that have number formats applied to them in all worksheets in the workbook. You can’t set precision for some worksheets in a workbook and not others. ➤ To set calculation precision: 1. Apply number formats containing the desired number of decimal places to the cells whose precision you want to specify. 2. Select Tools > Options and click the Calculation tab. 3. Check the Precision as Displayed checkbox. 4. The system will display the message “Precision as Displayed will permanently change data accuracy. Continue?” 5. Click OK to accept or Cancel to dismiss the dialog without setting precision. Important If you set Precision as Displayed on a workbook that already has values and formulas entered in it, Formula One for Java will round off the constant and calculated values to the specified precision. Once this rounding has taken place, it can’t be undone — the data is lost. Understanding Worksheet Errors When a formula cannot be properly calculated, an error is returned in the cell. The following table lists the errors that can be generated and their causes. Error Cause #DIV/0! Divide by zero. May be caused by a reference to a blank cell or a cell containing zero. #FORMULA! Formula cannot be calculated. May be caused when opening a workbook from another file format. #N/A No value is available. May be caused by inappropriate values in the formula or by a reference to a cell containing the #N/A value. #NAME? Name is not recognized. May be caused because a user-defined name is not defined, a function name is misspelled, or you are using an add-in function whose JAR file is not in your class path. #NULL! Null intersection. An intersection of two ranges that do not intersect was specified. #NUM! Number problem. May be caused by inappropriate numbers in functions, an iteration that cannot solve for a value, or a formula that results in a number too large or too small to represent. #REF! Reference error. May be caused by referring to a cell whose data was deleted. #VALUE! Wrong data type. May be caused by entering text where a number was expected or by supplying a range to an operator or function that was expecting a single value. 63 C H A P T E R 5 Formatting Worksheets Formatting means changing how information looks on a worksheet. The most frequent kind of formatting is number formatting, which lets you specify that the number 4.75 should appear as 475%, as $4.75, or even as 1/4/00. Formatting also includes topics like cell width and height, cell colors and outlines, fonts and text alignment, etc. Formula One for Java supports a rich set of data and worksheet formatting capabilities. This chapter covers the following topics: ■ “About Number Formats” on page 64 ■ “Using Built-in Number Formats” on page 64 ■ “Creating Custom Number Formats” on page 67 ■ “Formatting Fonts” on page 72 ■ “Aligning Cell Data” on page 73 ■ “Changing Row Height and Column Width” on page 73 ■ “Freezing Panes” on page 77 ■ “Applying Colors to Worksheets and Cells” on page 78 ■ “Formatting Row and Column Headings” on page 81 ■ “Copying Formats” on page 83 ■ “Formatting to Maximize Memory” on page 84 64 Formula One for Java User’s Guide About Number Formats Number formats are patterns that Formula One for Java uses for displaying numbers. A date format, for example, might require Formula One for Java to display the data as 3 sets of 2 numbers divided by slashes, for example, 11/11/98. Any date with that format follows that pattern. Formula One for Java comes with a set of built-in number formats for the basic forms numbers take, such as currency, dates, times, percent values, fractions, and scientific notation. For a list of the built-in number formats, see “Built-in Number Formats, by Category” on page 65. When you create a worksheet for the first time, by default all cells have the General format applied to them, which means numbers are displayed basically as you enter them. As you begin entering numeric values in the worksheet, Formula One for Java automatically applies some of its built-in number formats based on the characters and numbers you enter and the order you enter them in. For example, if you enter 2/15/64, the slashes and the arrangement of the numbers tell Formula One for Java that this is a date, and the m/d/yy date format is applied. For more information, see “How to Enter Constant Values” on page 42. If Formula One for Java did not automatically apply the number format you wanted, or if you want to change to a different number format, you can apply a built-in number format to the cell. For information, see “Using Built-in Number Formats” on page 64. If you don’t find the number format you want in the list of built-in number formats, you may create your own number format. For information, see “Creating Custom Number Formats” on page 67. Using Built-in Number Formats ➤ To apply number formats: 1. Select the cell(s) for which you want to change the number format. 2. Select Format > Cells and select the Number tab, shown below. Chapter 5 Formatting Worksheets 65 3. Select the category from the Category list. The number formats in that category will appear in the Number Format list box. 4. Choose one of the number formats in the Number Format list box. You may also type in the name of the number format in the Number Format text box. 5. Click OK. Built-in Number Formats, by Category The following tables show the built-in number formats for a US English locale by category. They also show the result of applying the number format to data appropriate for its category. Number 3 -3 .3 General 3 -3 .3 0 3 -3 0 3.00 -3.00 0.30 3 -3 0 3.00 -3.00 0.30 0.00 #,##0 #,##0.00 Currency 3 -3 .3 $#,##0_);($#,##0) $3 ($3) $0 $#,##0_);[Red]($#,##0) $3 ($3) in red $0 $#,##0.00_);($#,##0.00) $3.00 ($3.00) $0.30 $#,##0.00_);[Red]($#,##0.00) $3.00 ($3.00) in red $0.30 3 (3) 0 #,##0_);(#,##0) 66 Formula One for Java User’s Guide Currency 3 -3 .3 #,##0_);[Red](#,##0) 3 (3) in red 0 #,##0.00_);(#,##0.00) 3.00 (3.00) 0.30 #,##0.00_);[Red](#,##0.00) 3.00 (3.00) in red 0.30 _(* #,##0_);(* #,##0);_(* "-"_);_(@_) 3 _(* #,##0.00_);(* #,##0.00);_(* "-"??_);_(@_) 3.00 _($* #,##0_);($* #,##0);_($* "-"_);_(@_) $ 3 _($* #,##0.00_);($* #,##0.00);_($* "-"??_);_(@_) $ 3.00 Date 04/18/95 m/d/yy 04/18/95 d-mmm-yy 18-Apr-95 d-mmm 18-Apr mmm-yy Apr-95 Time 12:02:02 h:mm AM/PM 12:02 PM h:mm:ss AM/PM 12:02:02 PM h:mm 12:02 PM h:mm:ss 12:02:02 m/d/yy h:mm 1/0/1900 12:02 PM mm:ss 02:02 [h]:mm:ss 12:02:02 mm:ss.0 Percent 02:02.0 3 -3 .3 300% -300% 30% 300.00% -300.00% 30.00% Fraction 3 -3 .3 # ?/? 3 -3 2/7 # ??/?? 3 -3 3/10 Scientific 3 -3 .3 0.00E+00 3.00E+00 -3.00E+00 3.00E-01 ##0.0E+0 300.0E-2 -300.0E-2 300.0E-3 0% 0.00% ( 3) ( 3.00) ($ 0 0.30 3) $ 0 ($ 3.00) $ 0.30 Chapter 5 Formatting Worksheets Text 3 -3 .3 @ 3 -3 .3 67 Numbers formatted with @, the text number format, are left-aligned. Creating Custom Number Formats If none of the built-in number formats has what you need, you can define custom number formats. Each custom number format can have as many as four sections: one for positive numbers, one for negative numbers, one for zeros, and one for text. Each section is optional; the sections are separated by semicolons. The following example shows a custom number format. #,###;(#,###);0;"Error: Entry must be numeric" ➤ To define a custom number format: 1. Select the cells for which you want to create the custom number format. 2. Select Format > Cells and select the Number tab, if necessary. 3. Select a category for the custom number format from the Category list. 4. In the Number Format text box, type a custom number format built from the custom number format characters described below. 5. Click OK. Custom Number Format Symbols The following table lists the number format symbols you can use in a custom number format string. Format Symbol Description General Displays the number in General format. 0 Digit placeholder. If the number contains fewer digits than the format contains placeholders, the number is padded with 0’s. If there are more digits to the right of the decimal than there are placeholders, the decimal portion is rounded to the number of places specified by the placeholders. If there are more digits to the left of the decimal than there are placeholders, the extra digits are retained. # Digit placeholder. This placeholder functions the same as the 0 placeholder except the number is not padded with 0’s if the number contains fewer digits than the format contains placeholders. ? Digit placeholder. This placeholder functions the same as the 0 placeholder except that spaces are used to pad the digits. 68 Formula One for Java User’s Guide Format Symbol Description . (period) Decimal point. Determines how many digits (0’s or #’s) are displayed on either side of the decimal point. If the format contains only #’s left of the decimal point, numbers less than 1 begin with a decimal point. If the format contains 0’s left of the decimal point, numbers less than 1 begin with a 0 left of the decimal point. % Displays the number as a percentage. The number is multiplied by 100 and the % character is appended. , (comma) Thousands separator. If the format contains commas separated by #'s or 0's, the number is displayed with commas separating thousands. A comma following a placeholder scales the number by a thousand. For example, the format 0 scales the number by 1000 (10,000 would be displayed as 10). E- E+ e- e+ Displays the number as scientific notation. If the format contains a scientific notation symbol to the left of a 0 or # placeholder, the number is displayed in scientific notation and an E or an e is added. The number of 0 and # placeholders to the right of the decimal determines the number of digits in the exponent. E- and e- place a minus sign by negative exponents. E+ and e+ place a minus sign by negative exponents and a plus sign by positive exponents. $ - + / ( ) : space Displays that character. To display a character other than those listed, precede the character with a back slash (\) or enclose the character in double quotation marks (" "). You can also use the slash (/) for fraction formats. \ Displays the next character. The backslash is not displayed. You can also display a character or string of characters by surrounding the characters with double quotation marks (" "). The backslash is inserted automatically for the following characters: ! ^ & ‘ (left quote) ’(right quote) ~ { } = < > * (asterisk) Repeats the next character until the width of the column is filled. You cannot have more than one asterisk in each format section. _ (underline) Skips the width of the next character. For example, to make negative numbers surrounded by parentheses align with positive numbers, you can include the format _) after positive numbers to skip the width of the parenthesis. "text" Displays the text inside the quotation marks. @ Text placeholder. If the cell contains text, the text replaces the @ format character. m Month number. Displays the month as digits without leading zeros (e.g., 1-12). When used with h or hh formats, represents minutes. Chapter 5 Formatting Worksheets 69 Format Symbol Description mm Month number. Displays the month as digits with leading zeros (e.g., 0112). When used with the h or hh formats, represents minutes. mmm Month abbreviation. Displays the month as a three-letter abbreviation (e.g., Jan-Dec). mmmm Month name. Displays the month as a full name (e.g., JanuaryDecember). mmmmm Month abbreviation. Displays the first letter of the month’s name (e.g., JD). d Day number. Displays the day as digits with no leading zero (e.g., 1-2). dd Day number. Displays the day as digits with leading zeros (e.g., 01-02). ddd Day abbreviation. Displays the day as an abbreviation (e.g., Sun-Sat). dddd Day name. Displays the day as a full name (e.g., Sunday-Saturday). yy Year number. Displays the year as a two-digit number (e.g., 00-99). yyyy Year number. Displays the year as a four-digit number (e.g., 1900-2078). g If you are using a Japanese locale, this displays the era symbol as a Latin letter. gg If you are using a Japanese locale, this displays the first character of an era name. ggg If you are using a Japanese locale, this displays the full era name. e If you are using a Japanese locale, this displays the full era year. ee If you are using a Japanese locale, this displays the full era year with a leading 0. h Hour number. Displays the hour as a number without leading zeros (e.g., 1-23). If the format contains one of the AM or PM formats, the hour is based on a 12-hour clock. Otherwise, it is based on a 24-hour clock. hh Hour number. Displays the hour as a number with leading zeros (e.g., 0123). If the format contains one of the AM or PM formats, the hour is based on a 12-hour clock. Otherwise, it is based on a 24-hour clock. m Minute number. Displays the minute as a number without leading zeros (e.g., 0-59) when it appears immediately after the h or hh symbol. Otherwise, it is interpreted as a month number. mm Minute number. Displays the minute as a number with leading zeros (e.g., 00-59) when it appears immediately after the h or hh symbol. Otherwise, it is interpreted as a month number. s Second number without leading zeros (e.g., 0-59). 70 Formula One for Java User’s Guide Format Symbol Description ss Second number with leading zeros (e.g., 00-59). AM/PM, am/pm, A/P, a/p 12-hour time. Displays time using a 12-hour clock. Displays AM, am, A, or a for times between midnight and noon; displays PM, pm, P, or p for times between noon and midnight. [h] Total number of hours. [m] Total number of minutes. [s] Total number of seconds. s.0, s.00, s.000 Second number, including fractional part, without leading zeros. ss.0, ss.00, ss.000 Second number, including fractional part, with leading zeros. [Black] Displays cell text in black. [Blue] Displays cell text in blue. [Cyan] Displays cell text in cyan. [Green] Displays cell text in green. [Magenta] Displays cell text in magenta. [Red] Displays cell text in red. [White] Displays cell text in white. [Yellow] Displays cell text in yellow. [Colorn] Displays cell text using the corresponding color in the color palette. n is a color in the color palette. [conditional value] Using the conditional value brackets [ ], you can designate a different condition for each of the four format sections (positive numbers, negative numbers, zeros, and text). For example, you might want positive numbers displayed in black, negative numbers in red, and zeros in blue. The following string formats a number for these conditions: [>0][Black]General; [<0][Red]General; [Blue]General Chapter 5 Formatting Worksheets Example Custom Number Formats The following table shows some examples of custom number formats and numbers displayed using the custom number formats. Format Cell Data Display #.## 123.456 123.46 0.2 .2 #.0# #,##0"CR";#,##0"DR";0 123.456 123.46 123 123.0 1234.567 1,235CR 0 0 -123.45 123DR #, 10000 10 "Sales="0.0 123.45 Sales=123.5 -123.45 -Sales=123.5 "X="0.0;"x="-0.0 -12.34 x=-12.3 $* #,##0.00;$* -#,##0.00 1234.567 $ 1,234.57 -12.34 $ -12.34 000-00-0000 123456789 123-45-6789 "Cust. No." 0000 1234 Cust. No. 1234 ;;; Anything (Not Displayed) "The End" 123.45 The End -123.45 -The End text text m-d-yy 2/3/94 2-3-94 mm dd yy 2/3/94 02 03 94 mmm d, yy 2/3/94 Feb 3, 94 mmmm d, yyyy 2/3/94 February 3, 1994 d mmmm yyyy 2/3/94 3 February 1994 hh"h" mm"m" 1:32 AM 01h 32m h.mm AM/PM 14:56 2.56 PM hhmm "hours" 3:15 0315 hours 71 72 Formula One for Java User’s Guide Formatting Fonts The Workbook Designer gives you a fast, easy way to apply different fonts, font sizes, styles, and colors to the text in cells. ➤ To change the font, font size, style, and/or color of text in a cell or cells: 1. Select the cell or cells. 2. Choose the Format > Cells option and click the Font tab, if necessary. The Format Cells Font tab appears, as illustrated below. The fonts installed on your system will appear here. Click Automatic to set the text to your system’s window text color. These style settings may not be available for all fonts. Text in the active cell appears here. The appearance of the sample text changes as you choose different formatting options. 3. Choose a font by clicking on the options in the Fonts list box. 4. Choose a font style by clicking on the options in the Font Style list box. 5. Choose a font size by clicking on the options in the Size list box. 6. To make the text in the selected cell(s) appear with strikeout lines through it, check the Strikeout box. To underline the text in the selected cell(s), check the Underline box. 7. Choose a color for the text by clicking on that color in the color palette. 8. Click OK. Note To change the color of the text in the selected cell(s), you can also use the Font Color button on the Formatting toolbar. Chapter 5 Formatting Worksheets 73 Aligning Cell Data Formula One for Java allows you to specify how data is aligned within a cell. The standard alignment places text along the left edge of the cell and numbers along the right edge of the cell. Logical and error values are centered. ➤ To align data in cells: 1. Select the cells in which you want to align the contents. 2. Select Format > Cells and select the Alignment tab, shown below. 3. Specify the horizontal and vertical alignment of data in the selected cells using the Horizontal and Vertical lists. 4. Check the Wrap Text check box to wrap long strings of data to multiple lines of data within the cell. 5. Click OK. Changing Row Height and Column Width You can set the width of columns and the height of rows using menu commands or click and drag actions. Setting Default Row Height and Column Width Formula One for Java provides menu commands that allow you to define the default row height and default column width for your entire worksheet. This section describes how to define these default settings. 74 Formula One for Java User’s Guide ➤ To define the default row height of a worksheet: 1. Select Format > Row > Default Height to display the Default Row Height dialog box, shown below. To instruct Formula One for Java to automatically adjust the height of rows based on the values in the selected cells, select the Auto option button. 2. Select the Custom option button to define the default height of rows. 3. Enter a custom setting for the row height in the Custom text box. 4. Select inches or centimeters from the Units drop-down list. 5. Click OK. ➤ To define the default column width of a worksheet: 1. Select Format > Column > Default Width to display the Default Column Width dialog box, shown in the following illustration. The column width can be based on number of characters, centimeters, or inches. 2. Enter a default width for columns 3. Select a unit from the Units drop-down list. 4. Click OK. Sizing Rows and Columns Using Menu Commands You can set the width of selected columns and the height of selected rows using menu commands. This section describes the commands that allow you to perform these functions. ➤ To set the row height of a selection: 1. Select the cell(s) for which you want to set the height. 2. Select Format > Row > Height to display the Row Height dialog box, shown below. Chapter 5 Formatting Worksheets 75 For Formula One for Java to automatically adjust the height of rows based on the values in the selected cells, click here. Click here to display the Default Row Height dialog box. Click here to use the default settings. 3. Select the Custom option button to define a custom row height for the selected rows. 4. Enter a custom setting for the row height in the Custom text box. 5. Select inches or centimeters from the Units drop-down list. 6. Click OK. ➤ To set the column width of a selection: 1. Select the cell(s) for which you want to set the width. 2. Select Format > Column > Width to display the Column Width dialog box, shown below. To use default settings, click here. Click here to display the Default Row Height dialog box. The column width can be based on number of characters, centimeters, or inches. 3. Enter a custom width for the selected columns. 4. Select a unit from the Units drop-down list. 5. Click OK. ➤ To widen a column to match the width of text in that column: 1. Select the cell that contains the text that you want the column width to match. You may also select an entire column to make the column width match the longest text in that column. 2. Select Format > Column > Autofit Selection. Formula One for Java automatically widens the column to fit the text in the selection. 76 Formula One for Java User’s Guide Sizing Rows and Columns Using Click and Drag When you position the pointer on the right edge of a column heading or the bottom edge of a row heading, the pointer changes to a double arrow to indicate that the row or column can be resized. Click and drag to resize the column or row. When the double arrow appears, click and drag to widen column A. You can select multiple rows or columns and resize them simultaneously by clicking and dragging, as shown below. Select multiple columns... ...drag the doublearrow... ...and all four columns are simultaneously sized. Automatically Sizing Rows and Columns You can automatically adjust the height of all cells in a row to accommodate the largest font size in the row. You can also automatically adjust the width of all cells in a column to accommodate the largest entry in that column. You can automatically size a selected group of columns or rows to match the size of an existing row or column. Chapter 5 Formatting Worksheets 77 ➤ To automatically size a row or column: ■ Double-click on the double-arrow over the bottom border of the row header. Double-click on the double-arrow over the right border of the column header. ➤ To match a row or column’s size to another row or column’s size: 1. Select the row(s) or column(s) you want to resize and the row or column whose size you want to match. 2. Click the right border of the column header whose size you want to match. Click the bottom border of the row header whose size you want to match. 3. The selected row(s) or column(s) are resized to match the size of the row or column you clicked. Freezing Panes You can freeze rows and columns in a worksheet so that when you scroll through your worksheet, the designated columns and rows are always visible. Frozen rows or columns are called panes. The following illustration shows a worksheet with frozen panes. Column A is frozen in this worksheet. When you scroll the worksheet horizontally, column A does not move. After scrolling, column D is displayed next to column A. Before horizontal scrolling After horizontal scrolling You cannot edit data in frozen panes. You must perform any data editing in these panes prior to freezing. If you try to select a cell in a frozen row or column, the entire row or column is selected, just as if you had selected a row or column heading. Data in frozen rows and columns cannot be edited. When you try to select a cell in a frozen row or column, the entire row or column is selected. 78 Formula One for Java User’s Guide ➤ To freeze horizontal panes: 1. Select a cell in column A in the row below where you want to freeze the panes. 2. Select Format > Freeze Panes. All rows between the active cell and the top of the worksheet are frozen. ➤ To freeze vertical panes: 1. Select a cell in row 1 in the column to the right of where you want to freeze the panes. 2. Select Format > Freeze Panes. All columns between the active cell and the left edge of the worksheet are frozen. ➤ To unfreeze panes: ■ Select Format > Freeze Panes again to uncheck the menu command. Applying Colors to Worksheets and Cells You can apply colors to the worksheet as a whole, to individual cells in the worksheet, and to the borders of cells and ranges. You can also apply patterns to cells. The following sections describe how to apply colors to worksheets and cells. Note All color dialogs in Formula One for Java use the same color palette. You can change the colors that appear in the color palette. For information, see “Setting Up the Color Palette” on page 22. Setting the Worksheet Background Color The Workbook Designer allows you to define a background color for a worksheet. When you do this, all cells in the worksheet will have the same background color. You may also define an extra color, which is used to fill the area around the worksheet when a user scrolls to the right or bottom edge of the worksheet. Note You may change the colors of individual cells using the Format Cells option. If colors have been applied to individual cells using the Format Cells option, those colors remain even after you change the worksheet background color. For information, see “Setting Cell Fill Colors” on page 79. ➤ To define a background and extra color for your worksheet(s): 1. Select a worksheet or worksheets. 2. Choose the Format > Sheet > Properties option. Click the Color tab, shown below. Chapter 5 Formatting Worksheets 79 Click here to make the worksheet background the same color as your system’s window background color. Click here to make the extra color the same color as your system’s default control color. 3. Choose background and extra colors by clicking on the color in the color palette. 4. Click OK. Setting Cell Fill Colors You can fill individual cells or ranges of cells with different colors from the color palette. ➤ To fill a cell or range of cells with colors: 1. Select the cell or range of cells. 2. Select Format > Cells to display the Format Cells dialog box. Click on the Fill tab, shown below. Click here to apply the worksheet background color to the selected cell(s). The Automatic buttons apply your system’s window background color to the fill or pattern of the selected cell(s). This sample shows how the selected cell(s) look with the color or pattern applied. The active cell is in the upper left corner, along with the cells to its right and below it. 3. Click Solid to apply a solid color from the Fill Color palette to the selected cell(s). 80 Formula One for Java User’s Guide 4. Click Pattern and choose a pattern from the drop-down list to apply a pattern to the selected cell(s). The pattern will be made up of a color from the Fill Color palette and another color from the Pattern Color palette. 5. Click OK. Note To change the fill color of the selected cell(s), you can also use the Fill Color button on the Formatting toolbar. Setting Cell Borders You can apply borders to the top, bottom, left, and right sides of a cell. You may also select a range of cells and place borders on different locations of the cells in that range. ➤ To add borders to cells: 1. Select the cells you want to add borders to. 2. Select Format > Cells and select the Borders tab from the Format Cells dialog box. The following illustration shows an example of the Borders tab. Click Automatic to return to the default color. Click here to apply the same border to the top, left, right, and bottom of your selection. The box is dimmed when different borders apply to the different locations. The Horizontal and Vertical boxes apply line styles and colors to horizontal or vertical cell borders in the interior of your selection. These four cells show how the selected cells will look when you press Apply or OK. This thick contrasting bar shows a location where no style/color can be applied (usually on the interior of single-cell selections), where more than one style/color has been applied, or where a style/color and no style/color both apply. Note the box in the Border frame is correspondingly dimmed for the Horizontal location. 3. Select a line style from the Style frame. 4. Select a border color from the color palette. Chapter 5 Formatting Worksheets 81 5. Click in the appropriate boxes in the Border frame to specify the location of the borders. The border location you choose will have the line style and/or border color you selected, as shown in the sample. 6. Click Apply to apply the changes and leave the dialog box open; click OK to apply the changes and close the dialog box. Formatting Row and Column Headings In addition to formatting worksheet cells, you can format many aspects of row and column headings. Worksheet headings comprise three areas: the row headings, column headings, and the box in the top left corner of the worksheet where the row and column headings intersect. Top left corner Column headings Row headings Sizing Row and Column Headings You can set the size of row and column headings and the top left corner. ➤ To change the height of column headings: ■ Click and drag the bottom edge of the top left corner. ➤ To change the width of row headings: ■ Click and drag the right edge of the top left corner. When the pointer is placed on an edge of the top left corner, it appears as a double arrow. A guide follows the pointer as you click and drag the header border. The guide indicates the placement of the header border when you release the mouse button. When you resize column headings, you also set the height of the top left corner. Likewise, when you resize row headings, you set the width of the top left corner. 82 Formula One for Java User’s Guide Setting Row and Column Heading Text Like other column and row heading attributes, the text displayed in headings cells can be changed. ➤ To change the text for a row or column heading: 1. Double-click the heading you want to change. The Header Text dialog appears, as shown below. When you double-click a heading, the Header Text dialog box appears. Enter the heading text. Press ENTER to start a new line of text. 2. Enter one or more lines of text to serve as the heading name. 3. Click OK. The heading text is displayed, as shown below. Chapter 5 Formatting Worksheets 83 Copying Formats You may copy the formatting that has been applied to a cell and paste that formatting to another cell. Formula One for Java pastes all the formatting that can be set in the Format Cells dialog, including number formatting, alignment, fonts, borders, fill colors, cell protection, and validation rules. ➤ To copy cell formats from cell to cell using the Format Painter: 1. Select the cell(s) whose formatting you want to copy. 2. Choose Edit > Copy Cell Format or click the Copy Format button. 3. Select the cell(s) where you want to paste the formatting. Formula One for Java will format the selected cells with the copied formats. Note Unlike most copy-and-paste operations, you don’t have to explicitly choose to paste the formats when you use the Format Painter. Selecting the new cells tells Formula One for Java that you want to paste the formats onto those cells. Copying and pasting more than one cell format Select two cells with different formats. Click the Copy Format button. Select different cells. The format copied from the lefthand cell is pasted into the lefthand cells of the new selection. The format copied from the righthand cell is pasted into the righthand cells. ➤ To copy cell formats from cell to cell using Copy and Paste: 1. Select the cell(s) whose formatting you want to copy. 2. Choose Edit > Copy. 3. Select the cell(s) where you want to paste the formatting. 4. Choose Edit > Paste Special. 5. When the Paste Special dialog appears, uncheck all of the check boxes except for Formats. Then click OK. Formula One for Java will format the selected cells with the copied formats. 84 Formula One for Java User’s Guide Formatting to Maximize Memory If you select a row or column and apply a format to it, that format is applied to all cells in the selected row or column. Formatting empty rows or columns does not use memory because the format is merely attached to the row or column itself. However, formatting individual empty cells or ranges is different. If you format a range of empty cells, a group of formatted, empty cells is created. Each new formatted, empty cell consumes memory. Formatting entire rows and columns instead of individual cells and ranges will save memory. 85 C H A P T E R 6 Editing Worksheets Formula One for Java provides a variety of ways to edit data in worksheets. This chapter covers the following topics: ■ “Moving, Copying, and Pasting” on page 86 ■ “Finding and Replacing Data” on page 90 ■ “Inserting Cells, Rows, and Columns” on page 93 ■ “Clearing and Deleting Cells, Rows, and Columns” on page 93 ■ “Sorting Data in Worksheets” on page 94 86 Formula One for Java User’s Guide Moving, Copying, and Pasting You can copy, move, and paste data within and between worksheets and workbooks. When you copy data from a cell in a worksheet, you copy more than just text. Information stored in a worksheet includes many different types of data, including: ■ ■ ■ Formulas. The result of the formula establishes the value in a cell. Formulas are displayed in the formula bar when the cell is active. Values. The number or text displayed in a cell. Formats. How the cells and values are displayed, such as color settings or currency formatting applied to a number. Using the Clipboards Formula One for Java’s own internal clipboard allows you to copy freely between worksheets and workbooks and maintain all types of data. However, when you copy between Formula One for Java and other software packages using the system clipboard, which stores only text and formatting information, you may lose cell reference and other data. Pasting Ranges If you select a paste-to range, rather than a cell, as a paste area, Formula One for Java behaves differently based on the size of the range selected. If you select a paste-to range smaller than the copied range, only the cells that fit are pasted — no cells are pasted outside the selected paste-to range. If you select a paste-to range larger than the copied cells, Formula One for Java pastes multiple copies of the copied range in a tile pattern to fill in the copy-to range. Using Dragging to Move, Copy, and Paste This section discusses how to: ■ copy a selection of cells to the right or down using dragging ■ drag-and-drop a selection to copy or move it Chapter 6 Editing Worksheets 87 Using Dragging to Copy Copy data in the active cell to the right or down by dragging the copy handle of the active cell. The copy handle is the small square in the lower right corner of the active cell. When you copy data using the copy handle, the pointer changes to a crosshair. The following illustrations show how to copy by dragging. Click on and drag the copy handle that appears in the lower right corner of the active cell. The content of the active cell (whether it’s text, a number value, a formula, etc.) is copied to the selected cells. If you select more than one cell and drag the copy handle . . . . . . the content of the selected cells is automatically filled into the range of cells you drag over. You can also copy a selected range in a worksheet. If an autofill list is defined for the data in the range, the data is copied using the autofill list, as shown in the following illustration. For more information on autofill lists, see “Using Autofill Lists” on page 54. In this illustration, the cells below the range are filled with the data from the autofill list when the copy handle is dragged downward. The copy handle was dragged to cell A7. Note You cannot drag to copy cells and ranges if the Fill Ranges by Dragging checkbox is unchecked on the Edit tab of the Format Sheet dialog. For more information, see “Controlling Worksheet Usage” on page 31. Using Drag-and-Drop to Move or Copy The following steps describe how to move or copy a selection using Formula One for Java’s drag-and-drop. 88 Formula One for Java User’s Guide ➤ To move or copy a selection using drag-and-drop: 1. Select the cells that contain the data or object you want to move or copy. 2. Position the pointer on the border of the selection. 3. Move the selection by holding down the mouse button and dragging-anddropping the selection to the new location. You can also copy the selection by holding down the CTRL key and dragging-and-dropping the selection to the new location. An outline of the selection moves as you drag the pointer. Original selection Note that the cursor changes when over border of selection. When you drag-and-drop a selection border, the entire highlighted area moves to the new location. 4. When the pointer is at the new location, release the mouse button. A copy of the original selection remains in place if you hold down the CTRL key. Note You cannot drag and drop to copy cells and ranges if the Move Ranges by Dragging checkbox is unchecked on the Edit tab of the Format Sheet dialog. For more information, see “Controlling Worksheet Usage” on page 31. Using The Toolbar to Move, Copy, and Paste ➤ To move or copy cell data using the toolbar: 1. Select the cells that you want to cut or copy. 2. Click on the cut or the copy 3. Select the new location. 4. Click on the paste button. button. Chapter 6 Editing Worksheets 89 ➤ To copy formatting from a cell or range and apply that formatting to another cell or range: 1. Select the cells whose format you want to copy. 2. Click on the copy format button. 3. Click on the cell or cell range where you want to apply the formatting. Using Menu Commands to Move, Copy, and Paste Use menu commands to handle copying and moving if the original and the new locations are far apart on the same worksheet or you are moving selections between workbooks, worksheets, or applications. Also use menu commands when you don’t want to paste all cell attributes to the new location. Using menu commands, Formula One for Java also allows you to choose whether to paste formulas, values, and formats. Formula One for Java allows you to copy formatting from a cell or range and apply that formatting to another cell or range. This section describes how to use menu commands to: ■ move or copy data from cell(s) to cell(s) ■ copy formatting from cell(s) to cell(s) ■ paste individual attributes of a selection to another location. ➤ To move or copy all attributes of a selection: 1. Select the cells that you want to cut or copy. 2. Select Edit > Cut to cut the selection; Edit > Copy to copy the selection. 3. Select the upper left cell of the range in which you want to move or paste the selection. 4. Select Edit > Paste. The selection that was copied or cut is pasted with all cell attributes. 90 Formula One for Java User’s Guide ➤ To paste formulas, values, and/or formats: 1. Select the cells that you want to cut or copy. 2. Select Edit > Cut to cut the selection; Edit > Copy to copy the selection. 3. Select the upper left cell of the area or highlight a range where you want to paste the copied cell formulas, values, and/or formats. 4. Select Edit > Paste Special. 5. The Paste Special dialog box is displayed as shown in the following illustration: Check the check boxes for the attributes you want to paste. You may check more than one. 6. Click in the checkboxes for the attributes you want to paste. 7. Click OK. ➤ To copy only the formatting of a selection and apply it to a cell or range: 1. Select the cells that contain the formatting that you want to apply. 2. Select Edit > Copy Cell Format. 3. Select the cell or range to which you want to apply the formatting. The formatting is applied. Finding and Replacing Data Formula One for Java allows you to find and replace data within the active worksheet. If you wish to locate a particular string of data in a worksheet, formula, or value, you can use the Find dialog box. If you wish to search for data in Formula One for Java worksheet and replace it with other data, you have the option of using the Replace dialog box. Note Formula One for Java only finds or replaces strings (values, text, and formulas). You cannot find or replace cell formatting. Chapter 6 Editing Worksheets 91 ➤ To display the Find dialog box in the Workbook Designer: 1. Invoke the Workbook Designer. 2. Choose Edit > Find. The Find dialog box appears. ➤ To display the Replace dialog box in the Workbook Designer: 1. Invoke the Workbook Designer. 2. Choose Edit > Replace or click on Replace with the Find dialog box open. The Replace dialog box appears. 3. The notes in the following table describe each text box and button in the find and replace dialog boxes and explain their use. Find What text box This is the search string you want to find or find and replace. Replace With text box Enter the search string you wish to locate. You may enter values, text, or formulas. Enter the information you want in the replacement string. This is the replacement string You may enter values, text, or formulas. you want to replace the search string. 92 Formula One for Java User’s Guide Find Next button Clicking this button makes the cell that contains the next matching text string the active cell. After using the mouse to This button finds the next occurrence of the search string click the button once, you may use ALT + F or the space bar instead of clicking on the button to find other occurrences of in the Find What text box. your text string. Close button This button closes the dialog box. Replace button Initially, this button adds the Replace With text box and Replace All button. Replace All button This button allows you to replace all occurrences of the search string with the replacement string. Search drop down list The dialog box will also close if you press Enter before clicking the Find Next button. Click the Replace button or ALT+R or SPACEBAR to replace each occurrence of the search string with the replacement string. Click this button or press ALT+A to replace all occurrences of the search string with the replacement string. ■ This list allows you to choose to search by rows or by columns. ■ Look In drop down list This list allows you to choose to search in values only or formulas only. Match Case button Matches upper and lowercase letters Find Entire Cells Only button Only finds cells that contain the entire text string and nothing else. ■ ■ By Rows. Setting Search to By Rows means rows are searched successively by row from the active cell to the bottom of the spreadsheet, then from the top row to the active cell. By Columns. Setting Search to By Columns means columns are searched successively by column from the active cell to the rightmost column, then from the leftmost column to the active cell. Values. Setting Look In to Values means only search strings in values (not the text of formulas) will be found. Formulas. Setting Look in to Formulas means only search strings found in the text of formulas are searched for the matching text string. Click this button to find only strings with matching upper and lowercase letters. A search for Fin will not find fin. Click this button to find only cells that contain the entire search string, no more, no less. A search for Fin will not find Finland. Chapter 6 Editing Worksheets 93 Note You can view and load other worksheets and workbooks while the Find/Replace dialog boxes are active, but the Find and Replace functions only operate on the worksheet that was active at the time Find or Replace was invoked. Inserting Cells, Rows, and Columns ➤ To insert cells: 1. Select a range of cells in the location and size of the range that you want to insert. The cells selected will be moved directly above, below, to the left, or to the right of the new cells. 2. Select Insert > Cells to display the Insert dialog box. 3. Select an Insert option button to specify where you want the displaced rows, columns, or cells to shift. 4. Click OK. ➤ To insert rows or columns: 1. Select the number of rows or columns you want to add. 2. Select Insert > Rows to insert rows. Select Insert > Columns to insert columns. Rows are added directly below the selected rows. Columns are added immediately to the right of the selected columns. Clearing and Deleting Cells, Rows, and Columns Deleting cells removes the cells and shifts the surrounding data to fill the space. Clearing cells leaves the cells in place but deletes any data or formatting in them. ➤ To delete cells: 1. Select the cells, rows, or columns you want to delete. 2. Select Edit > Delete to display the Delete dialog box. 3. Select a Delete option button to specify a direction you want the surrounding rows, columns, or cells to shift. 4. Click OK. 94 Formula One for Java User’s Guide ➤ To clear cells: 1. Select the cells, rows, or columns you want to clear. 2. Choose one of the following, depending on what you want to clear from the cells: Select Edit > Clear > Contents to clear the values and formulas, but leave the formats. Select Edit > Clear > Formats to clear the cell formats, but leave the values and formulas. Select Edit > Clear > All to clear the formulas, values, and formats. 3. Click OK. Sorting Data in Worksheets You can sort data in a worksheet and specify the keys by which the data is sorted. ➤ To sort data: 1. Select the cells that you want to sort. 2. Choose Edit > Sort. 3. The Sort dialog box is displayed as shown in the following illustration: Use this dropdown list to select the key for which you want to specify a key reference. Data is first sorted by Key 1, Key 2, Key 3, and so on. Use this dropdown list to specify the column or row to use for sorting with the Key specified in the Key dropdown list. 4. Select the Rows option button to specify that the selection be sorted by rows. Alternatively, select the Columns option button to specify that the selection be sorted by columns. 5. To specify the first row or column you want to sort by, select Key 1 from the Keys list. 6. Select the row or column you want the selection to be sorted by from the Reference list. 7. Select the Ascending or Descending option button to specify an ascending or Descending sort order. Chapter 6 Editing Worksheets 95 8. To specify the second row or column you want to sort by, select Key 2 from the Keys list, then repeat steps 6 and 7. You may specify as many sort keys as there are rows or columns in your selection. 9. Click OK. Note Worksheets treat each cell as independent data, not as part of individual “records” as a database does. This is true even if your data was imported from a database where data was stored in records. If you have data stored in record form that you import into a worksheet and want to sort by record, be sure to select all of the data in the records before using the sort feature. Sort Example The following example shows how to use two sort keys to determine the sort order of multi-column data. Original data This data, originally organized by date, is sorted with the following keys: Key 1 Column 1 Ascending Key 2 Column 2 Descending Sorted data The resulting sort shows the data sorted by the first key, column 1. When two items in column 1 are the same, the system goes to the second sort key, column 2, to determine the order to arrange the data. Tidestone 97 C H A P T E R 7 Working With Graphical Objects Formula One for Java provides the ability to create graphical objects in a worksheet. You can create arcs, lines, ovals, polygons, rectangles, push buttons, check boxes, and dropdown list boxes. You can also insert pictures. As with other worksheet elements, Formula One for Java provides a wide range of options for formatting and manipulating the appearance of the graphical objects you create. This chapter discusses the following topics: ■ “Creating Graphical Objects” on page 98 ■ “Selecting Graphical Objects” on page 99 ■ “Specifying Graphical Object Options” on page 99 ■ “Identifying and Naming Graphical Objects” on page 108 ■ “Moving, Sizing, and Arranging Graphical Objects” on page 109 ■ “Deleting Graphical Objects” on page 111 ■ “Graphical Objects and Microsoft Excel” on page 111 Charts are a special form of graphical object. Creating and formatting charts is discussed in several chapters beginning with “Getting Started With Charts” on page 125. 98 Formula One for Java User’s Guide Creating Graphical Objects The Workbook Designer toolbar contains tools that allow you to create and edit graphical objects. You may also use the Insert menu. Creating polygons is different than creating other graphical objects. See “Creating Polygons” on page 98. ➤ To create a graphical object: 1. In the Drawing toolbar, click the button for the graphical object you want to create. Or use menu commands: Choose Insert > Drawing Object and click the name of the object. Choose Insert > Forms Object and choose the name of the object. Choose Insert > Picture Object to draw a picture placeholder. 2. The pointer appears as a small crosshair when positioned in the worksheet. Position it at the point where you want to begin drawing. 3. Click and drag to create the graphical object. An outline of the graphical object you are creating appears and moves as you drag the mouse. 4. Release the mouse button to set the graphical object in place. After choosing one of the Insert menu options for drawing objects, you may choose not to draw the object by pressing CTRL + E or choosing Insert > Cancel Insert Object. Note When creating a graphical object, press ALT while you click and drag to align the graphical object to the cell grid. Creating Polygons Creating polygons is slightly different than creating other graphical objects because you must specify the shape of the polygon as you create it. ➤ To create a polygon: 1. In the Drawing toolbar, click the Polygon button. Or choose Insert > Drawing Object > Polygon. 2. The pointer appears as a small crosshair when positioned in the worksheet. Position it where you want one of the points of the polygon to be. 3. To create straight lines, click on each corner of the polygon in turn. An outline of the polygon appears as you click and move the mouse. 4. To create curved lines, click and drag. An outline of the polygon appears as you drag the mouse. You may combine straight and curved lines by clicking without dragging and clicking with dragging. 5. To finish, click on the starting point of the polygon or double-click anywhere in the worksheet. Formula One for Java closes up the polygon and selects it. Chapter 7 Working With Graphical Objects 99 Selecting Graphical Objects Selecting graphical objects is as simple as pointing and clicking. You must select an object before you can format, move, or size it. When you draw a new graphical object, Formula One for Java automatically selects it so you can format it immediately. ➤ To select a graphical object: 1. Position the pointer on the graphical object you want to select. The pointer appears as an arrow when positioned on a graphical object. 2. Hold down the CTRL key and click the graphical object. When the graphical object is selected, selection handles appear at the edges of the bounding box that surrounds the graphical object. Unselected oval Selected oval To select multiple graphical objects, press CTRL + SHIFT as you select the graphical objects. You can also select Edit > Select All Objects to select all the graphical objects in an active worksheet. Specifying Graphical Object Options Many elements of graphical objects can be formatted using the Format Object dialog box. The following options are discussed in this section: ■ “Specifying Line Options” on page 100 ■ “Specifying Arrow Options” on page 101 ■ “Specifying Fill Options” on page 102 ■ “Specifying Dropdown List Box Options” on page 102 ■ “Specifying Check Box Options” on page 104 ■ “Specifying Button Options” on page 106 ■ “Specifying Polygon Options” on page 107 ■ “Specifying Picture Options” on page 107 100 Formula One for Java User’s Guide Specifying Line Options The Format Object dialog box allows you to choose a color for lines and for the outlines of arcs, polygons, ovals, and rectangles. ➤ To choose a color for lines and graphical object outlines: 1. Select the line, arc, polygon, oval, or rectangle you want to change. 2. Select Format > Object to display the Format Object dialog box. 3. Click the Line Style tab, shown below. Click here to apply the color set by your operating system for line objects Click here to hide the line. Click here to make a solid (non-dash) line of the color selected in the palette. Click here to make a dashed line of the color selected in the palette. Choose the style of dashes from the drop-down listbox. If you chose the Solid or Dash option, you may choose a color for your line by clicking on a color in the palette. A sample line showing the color, dash option, and weight you chose appears here. If you chose the Solid or Dash option, you can make the line a specific weight by typing in a value. Or choose a value by clicking the up and down buttons. The higher the line weight, the thicker the line. 4. Click Apply to view your changes or OK to accept your changes. Chapter 7 Working With Graphical Objects Specifying Arrow Options The Format Object dialog box allows you to put arrowheads on the last-drawn endpoint of line graphical objects. You may also choose the style and size of arrowheads. ➤ To add an arrow to a line and specify the arrow size and style: 1. Select the line you want to add an arrow to. 2. Select Format > Object to display the Format Object dialog box. 3. Click the Arrows tab, shown below. Choose an arrow style: hollow filled Choose the length and width of the arrow. 4. Click Apply to see your changes or OK to accept them. Formula One for Java will put the arrow with the formatting you chose on the lastdrawn endpoint of the selected line. The arrow color corresponds to the line color. 101 102 Formula One for Java User’s Guide Specifying Fill Options After you create an arc, oval, polygon, or rectangle, the Format Object dialog box allows you to fill that object with the color, pattern, or gradient fill of your choice. ➤ To set a fill for an arc, oval, polygon, or rectangle: 1. Select the arc, oval, polygon, or rectangle. 2. Select Format > Object to display the Format Object dialog box. 3. Click the Fill tab, shown below. These frame titles change depending on whether Solid, Pattern, or Gradient is selected. Click here to fill the object with the preset system color. Click here to let the color of the object below the selected one show through. Click here to fill the selected object with the color in the lefthand palette. Click here to fill the selected object with the pattern you choose in the drop-down box. Choose a background color from the lefthand palette and a pattern color from the righthand palette. A sample of the fill color, pattern, or gradient you selected will appear here. Click here to fill the selected object with the gradient you choose from the drop-down box. Choose the starting color from the lefthand palette and the ending color from the righthand palette. 4. Click Apply to see your changes or OK to accept them. Specifying Dropdown List Box Options Dropdown list boxes let you give the user a particular set of values to choose from. The selected value then appears in a cell linked to the list box. List boxes can be used to establish a value required in one or more of the workbook’s formulas. For example, a workbook that calculates a mortgage payment schedule might include a behind-the-scenes worksheet that calculates payments based on the interest rate of your choice. A front-end worksheet might include a dropdown list box that lets users choose the interest rate, as well as cells displaying the calculated payments. When you add a dropdown list box to your worksheet, you can set or change the cell it references, specify whether text or a value should appear in the cell, and define the list of selections from which you can choose in the list. You must type the list of Chapter 7 Working With Graphical Objects 103 selections into a dialog box; you cannot make the list box display the contents of a range of cells on the worksheet. For users to choose an item in a dropdown list box, the list box itself cannot be selected and the pointer must be in normal worksheet editing mode. When you link a cell to a list box, from then on the contents of that cell are controlled by the list box. The list box will overwrite any formula you enter in that cell. You may, however, enter one of the list box values in the referenced cell, and that value will then display in the list box. For example, if you enter 0 in the cell, a list box that references that cell displays its first item. ➤ To set or edit dropdown list box items: 1. Select a dropdown list box. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Options tab, shown below. Enter a reference to any cell in any worksheet in the workbook. This cell will display the results of the dropdown list box selection. Enter or edit the list of items contained by the dropdown list box. Separate the items with semicolons. When this is checked, the dropdown list box item will appear in its assigned cell exactly as it appears in this dialog box. When this is not checked, the system will return 0 when the first list box item is selected, 1 when the second item is selected, etc. 4. Click OK. The following illustration shows the results. 104 Formula One for Java User’s Guide When you select “South” in the list box, the text for South is displayed in cell D2. Specifying Check Box Options Check boxes let you solicit a yes/no response from the user. The user’s choice appears as a TRUE or FALSE entry in a cell linked to the check box. Check boxes can be used to turn on or off certain workbook formula calculations. For example, a budgeting workbook might contain a behind-the-scenes worksheet that calculates future monthly costs based on the household’s current budget. There could be two sets of formulas: basic ones and ones that adjust for inflation. A front-end worksheet could include a check box called Adjust for Inflation. When the user checks that box, the inflation formula set is used; when the user leaves the box unchecked, the other formula set is used. When you add a check box to your worksheet, you can specify its caption and the cell to link it to on the worksheet. To set the value of a check box, the check box itself cannot be selected and the pointer must be in normal worksheet editing mode. When you link a cell to a check box, from then on the contents of that cell are controlled by the check box. The check box will overwrite any formula you enter in that cell. You may, however, enter TRUE or any number in the referenced cell to check the check box. Enter FALSE or 0 in the referenced cell to un-check the check box. Chapter 7 Working With Graphical Objects 105 ➤ To edit check box options: 1. Select a check box. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Options tab, shown below. This text will appear on the check box object. Enter a reference to any cell in any worksheet in the workbook. This cell will display TRUE when the check box is checked, FALSE when the check box is unchecked. 4. Click Apply or OK. The following illustration shows the results. When “Compound Interest” is checked, TRUE is returned in cell C1. 106 Formula One for Java User’s Guide Specifying Button Options Buttons let you link snippets of Java code to the worksheet in order to perform a specific task. For example, you might create Java code that displays a custom dialog box when the button is pressed. Or a button might be coded to print the worksheet, change to a different worksheet, etc. Buttons require custom Java code except in the situation described in “Using Buttons to Link to URLs in Applets” on page 106. In the Workbook Designer, you can set the text displayed on the button. ➤ To edit button text: 1. Select the button. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Options tab, shown below. This text will appear on the button. 4. Click OK. Using Buttons to Link to URLs in Applets Buttons require custom Java code except in one situation: When the button appears on a worksheet displayed as part of an applet in a browser, you can enter a URL in the button name text box and the browser will link to that URL when the button is pressed. Note that this only works with applets. ➤ To link a button on a worksheet in an applet to a URL: 1. Select the button. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Name tab, shown below. Enter the URL. 4. Click OK. Chapter 7 Working With Graphical Objects 107 Specifying Polygon Options You can edit polygons in either of two editing modes: normal and polygon point editing. ■ ■ Normal polygon editing allows you to resize and move polygons. You cannot change the shape of the polygon in this mode. Polygon point editing allows you to reposition polygon points, thus changing the shape of the polygon. To use normal polygon editing, click the polygon and click and drag the selection handles. If you want to use polygon point editing, click the polygon point editing tool and click and drag the selection handles of the polygon. You may also select the polygon and choose Edit > Polygon Points. The following illustration shows a selected polygon when normal polygon editing and polygon point editing modes are enabled. When normal polygon editing mode is enabled, the selection handles appear at the edges of the bounding box that surrounds the polygon. In this mode, the polygon can be resized and moved. When polygon point editing mode is enabled, a selection handle appears at each point along the border of the polygon. In this mode, the polygon points can be repositioned and the polygon can be moved. ➤ To reshape a polygon: 1. Select the polygon to be reshaped. 2. Make certain that polygon point editing is enabled. When polygon point editing is enabled, selection handles appear at each point along the border of the selected polygon. 3. Position the pointer on the polygon point that you want to move. 4. Click the point and drag the mouse. An outline of the lines adjoining the point move as you drag the polygon point. 5. Release the mouse button to place the point at its new location. Specifying Picture Options When you insert a picture using the Insert > Picture Object menu command, you are really inserting a placeholder for the picture. The picture placeholder looks like a rectangle. To insert the picture into the placeholder you’ve drawn, you have to tell Formula One for Java the name of the picture file you want to insert. You may insert pictures of file types JPG or JPEG and GIF. You must know the file’s URL in order to insert it. 108 Formula One for Java User’s Guide ➤ To insert a picture file in a picture object: 1. Select the picture object. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Options tab, shown below. 4. Enter the URL identifier for the picture you want to insert. 5. Click OK. The image contained in the file of the name you entered will appear in the picture placeholder. The image will be scaled to fit the dimensions of the placeholder. If the shape of the placeholder doesn’t correspond to the shape of the image, the image may be stretched out of proportion. You may resize the image by dragging its selection handles. Identifying and Naming Graphical Objects When you create a graphical object, Formula One for Java assigns the graphical object an identification number. Many methods require a graphical object identification number to tell Formula One for Java which graphical object to operate on. Identifying Graphical Objects ➤ To determine a graphical object’s identification number: 1. Select the graphical object. 2. Select Format > Object to display the Format Object dialog box. 3. Select the Name tab, shown below. The Name tab displays the identification number for the selected graphical object. Chapter 7 Working With Graphical Objects 109 4. Click OK. Formula One for Java maintains a list of graphical objects in each worksheet within a workbook. The order of the graphical objects in that list is determined by the order in which graphical objects are drawn in the worksheet. Formula One for Java places new graphical objects on top of older ones. The farther to the back a graphical object is placed or drawn, the higher the graphical object is placed in a worksheet’s object list; the closer to the front a graphical object is placed or drawn, the lower the graphical object is placed in the list. Note When you use the Format > Bring To Front and Format > Send To Back commands, you alter the order of the graphical object list maintained by the worksheet. Naming Graphical Objects Graphical objects can be named after they are created. Graphical object names do not take the place of graphical object identification numbers. Rather, graphical object names are used as a supplement to identification numbers, making it easier to track and manipulate graphical objects. ➤ To name a graphical object: 1. Select the graphical object you want to name. 2. Select Format > Object to display the Format Object dialog box. 3. Click the Name tab. 4. Enter the name to assign to the graphical object in the Name for Object text box. 5. Click OK. Moving, Sizing, and Arranging Graphical Objects After creating a graphical object, you can change its position and size. You may move a graphical object to a different position on the worksheet, and you may move it in front of or in back of other graphical objects. Note Graphical objects are anchored to the cells upon which they appear. If you shrink or expand the row height or column width of any of the cells behind a graphical object, the object will shrink or expand accordingly. Moving Graphical Objects ➤ To move a graphical object: 1. Select the graphical object. 2. Position the pointer anywhere in the area occupied by the graphical object. The pointer appears as an arrow. 110 Formula One for Java User’s Guide 3. Click and drag to move the graphical object. An outline of the graphical object moves with the pointer as you drag the mouse. 4. Release the mouse to set the graphical object at its new position. Note When moving or resizing a graphical object, you can align it to the worksheet grid by pressing ALT as you click and drag. Sizing Graphical Objects ➤ To size a graphical object: 1. Select the graphical object. 2. Position the pointer on one of the selection handles. The pointer appears as a twoheaded arrow, indicating the direction in which the graphical object can be resized. 3. Click and drag to resize the graphical object. An outline of the graphical object moves with the pointer as you drag the mouse. 4. Release the mouse to set the graphical object at its new size. Note When moving or resizing a graphical object, you can align it to the worksheet grid by pressing ALT as you click and drag. Arranging Graphical Objects When you have multiple graphical objects on a worksheet, they appear to be drawn on the same plane. However, when two graphical objects overlap, the later-drawn object covers the previously drawn object. You can change the order of graphical object layering in a worksheet by sending a graphical object behind other graphical objects or bringing a graphical object to the front of other graphical objects. All graphical objects appear in front of the cells on the worksheet. You cannot place cells in front of graphical objects. ➤ To arrange overlapping graphical objects: 1. Select the graphical object you want to move. 2. Select Format > Bring to Front or Format > Send to Back to move the graphical object in the direction you specify. Note The Bring to Front and Send to Back commands allow you to move a graphical object to the front or back of all other graphical objects. You cannot move an object behind another object but in front of a third object. Chapter 7 Working With Graphical Objects 111 Deleting Graphical Objects ➤ To delete a graphical object or objects: 1. Select the object or objects. 2. Press DELETE, choose Edit > Delete Object, or choose Edit > Cut. The object or objects are deleted. Graphical Objects and Microsoft Excel Formula One for Java’s control objects (buttons, check boxes, and dropdown list boxes) are incompatible with Microsoft Excel’s. Control objects in a file will be deleted if you import the file from Excel to Formula One for Java or export the file from Formula One for Java to Excel. Formula One for Java’s picture objects are also incompatible with Microsoft Excel’s. Files containing picture objects in either application can be opened in the other application, but the picture objects will be deleted. Formula One for Java’s drawing objects (arcs, lines, ovals, rectangles, and polygons) are compatible with Microsoft Excel. However, some of the fill patterns and line widths may not appear as you originally set them when you export a file from Formula One for Java to Excel. Tidestone 113 C H A P T E R 8 Printing Worksheets Formula One for Java provides several options for printing worksheets and setting printing specifications. This chapter covers: ■ “Printing Worksheets” on page 114 ■ “Overview of Worksheet Print Options” on page 114 ■ “Specifying Print Areas” on page 116 ■ “Specifying Print Titles” on page 116 ■ “Specifying Page Breaks” on page 117 ■ “Specifying Page Print Options” on page 118 ■ “Specifying Sheet Print Options” on page 119 ■ “Specifying Margin Print Options” on page 120 ■ “Specifying Headers and Footers” on page 121 114 Formula One for Java User’s Guide Printing Worksheets ➤ To print the active worksheet: 1. Select File > Print or press the Print button to display the standard Print dialog box for your operating environment. 2. Make any necessary adjustments to the settings and click OK. The worksheet will be printed with its current print option settings. See “Overview of Worksheet Print Options” on page 114 for information on changing those settings. Overview of Worksheet Print Options Formula One for Java’s many printing options are available in several menus and dialog boxes. The quick guide below will help you determine where to look for information about the print option you want to set. Quick Guide to Print Options The print options are listed in alphabetical order. Print option How to set that option Black and white printing ■ Select File > Page Setup and click the Sheet tab. ■ Check No Color, then click OK. Center the printout on the page ■ Select File > Page Setup and click the Margins “Specifying Margin tab. Print Options” on page 120 Choose values in the Center frame, then click OK. Color printing ■ Select File > Page Setup and click the Sheet tab. ■ Un-check No Color, then click OK. ■ Select File > Page Setup and click the Headers & Footers tab. ■ Enter codes in the Footer frame, then click OK. ■ Select File > Page Setup and click the Sheet tab. ■ Check or uncheck Grid Lines, then click OK. ■ Select File > Page Setup and click the Headers & Footers tab. ■ Enter codes in the Header frame, then click OK. Footer Grid lines, print or hide Header ■ For more information “Specifying Sheet Print Options” on page 119 “Specifying Sheet Print Options” on page 119 “Specifying Headers and Footers” on page 121 “Specifying Sheet Print Options” on page 119 “Specifying Headers and Footers” on page 121 Chapter 8 Printing Worksheets Print option How to set that option Margins ■ ■ 115 For more information Select File > Page Setup and click the Margins “Specifying Margin tab. Print Options” on page 120 Choose values in the Margins frame, then click OK. ■ Select the cell below and to the right of where you want the page break. ■ Select Insert > Page Break. Page numbering, add a page number ■ Select File > Page Setup and click the Headers & Footers tab. ■ Enter page number and other formatting codes in the Header or Footer frame, then click OK. Page numbering, choose the starting number ■ Select File > Page Setup and click the Page tab. “Specifying Page Print Options” on page 118 Choose values in the Page Numbering frame, then click OK. Page order ■ Select File > Page Setup and click the Sheet tab. ■ Choose values in the Page Order frame, then click OK. ■ Select File > Page Setup and click the Page tab. “Specifying Page Print Options” on page 118 Choose the paper size and click OK. Page breaks Paper size ■ ■ Print area Print orientation “Specifying Page Breaks” on page 117 “Specifying Headers and Footers” on page 121 “Specifying Sheet Print Options” on page 119 ■ Select the cells you want to appear on the printout. ■ Select File > Print Area > Set Print Area. ■ Select File > Page Setup and click the Page tab. “Specifying Page Print Options” on page 118 Choose Portrait or Landscape and click OK. ■ “Specifying Print Areas” on page 116 ■ Select the row(s) or column(s) that should appear as print titles. ■ Select File > Print Titles > Set Print Titles. Row and/or column headings, print or hide ■ Select File > Page Setup and click the Sheet tab. ■ Check or uncheck Row Heading and/or Column Heading, then click OK. Scaling ■ Select File > Page Setup and click the Page tab. “Specifying Page Print Options” on page 118 Choose values in the Scaling frame, then click OK. Print titles ■ “Specifying Print Titles” on page 116 “Specifying Sheet Print Options” on page 119 116 Formula One for Java User’s Guide Specifying Print Areas Formula One for Java prints all the data on the active worksheet unless you specify the range(s) you want to print by setting the print area. ➤ To set the print area: 1. Select the range or ranges to print. You can select multiple ranges to print; the ranges do not have to be adjacent. For example, a print area could be comprised of two ranges, A1:D4 and F5:I8. 2. Select File > Print Area > Set Print Area. The print area is set. ➤ To remove a previously set print area: ■ Select File > Print Area > Clear Print Area. All data on the worksheet will appear on any printout. Specifying Print Titles You can specify that a particular row(s) or column(s) appear as titles on each page of your worksheet. If you select a row, it is printed at the top of each page. If you select a column, it is printed at the left edge of each page. You can select multiple rows or columns, but they must be adjacent. You cannot select both rows and columns to be print titles. It must be either rows or columns. Print titles may be separate ranges from print areas or they may overlap. No matter what size or shape the print area, if you set print titles, the print title cells will appear above or to the left of the print area cells. You can have the worksheet row and column headings (that is, the gray boxes that contain the row and column letters and numbers) appear as titles on printed copies by changing the settings in the Sheet Print Options dialog box. For information, see “Specifying Sheet Print Options” on page 119. ➤ To set print titles: 1. Select the rows or columns to use as print titles. You must select the entire row. 2. Select File > Print Titles > Set Print Titles. The print titles are set. ➤ To remove previously set print titles: ■ Select File > Print Titles > Clear Print Titles. No titles will appear on any printouts. Chapter 8 Printing Worksheets 117 Specifying Page Breaks In the Workbook Designer, you can specify both horizontal and vertical page breaks in a worksheet. Page breaks are always placed along the border of the active cell. ■ Horizontal (row) page breaks are placed along the top edge of the active cell. ■ Vertical (column) page breaks are placed along the left edge of the active cell. ➤ To set page breaks: 1. Select the cell below and/or to the right of where you want the page to break. 2. Select Insert > Page Break. ➤ To remove page breaks: 1. To remove a horizontal page break, select a cell below the break. To remove a vertical page break, select a cell to the right of the break. 2. Select Insert > Remove Page Break. 118 Formula One for Java User’s Guide Specifying Page Print Options The Page tab of the Page Setup dialog box allows you to set print options for the active worksheet. This tab allows you to: ■ choose portrait or landscape orientation ■ fit your work on a certain number of printed pages ■ choose a paper size ■ restart page numbering ➤ To set the page print options for the active worksheet: 1. Select File > Page Setup, then click on the Page tab, shown below. Choose the portrait or landscape printing orientation. To print the worksheet larger or smaller than actual size, enter the size percentage value (it must be between 10 and 400). To force the printout to fit onto a certain number of pages wide, enter the number of pages here. To force the printout to fit onto a certain number of pages tall, enter the number of pages here. Choose from the variety of paper size options. To start worksheet page numbering at a number other than 1, click here. Enter the page number you want to appear on the first page of the printout. Subsequent pages will be numbered sequentially after this number. 2. Click Apply to view your changes or OK to accept them. Chapter 8 Printing Worksheets Specifying Sheet Print Options The Sheet tab of the Page Setup dialog box allows you to set print options for your worksheet. This tab allows you to: ■ specify whether grid lines, colors, or row and column headings appear on the printout ■ indicate page order for printing ➤ To set the sheet print options for the active worksheet: 1. Select File > Page Setup, then click on the Sheet tab, shown below. Check this box to print gridlines, or uncheck it to hide them. Check this box to print colors as black and white, or uncheck it to enable color printing. Check this box to print the row headings, or uncheck it to hide them. Check this box to print the column headings, or uncheck it to hide them. Click here to specify that all the data in the uppermost rows should print before data in the lower rows. Click here to specify that all the data in the leftmost columns should print before the data in columns farther out. 2. Click Apply to view your changes or OK to accept them. 119 120 Formula One for Java User’s Guide Specifying Margin Print Options The Margins tab of the Page Setup dialog box allows you to set margins for your worksheet in the units of your choice. It also allows you to center your worksheet horizontally or vertically. ➤ To set margins and page centering for the active worksheet: 1. Select File > Page Setup, then click the Margins tab, shown below. Enter the distance between the top edge of the page and the header. Enter the distance between the bottom edge of the page and the footer. Choose the units of measure. To center the worksheet horizontally and/or vertically, check one or both of these checkboxes. 2. Click Apply to see your changes or OK to accept your changes. Note When you enter margin lengths, be aware that if the header or footer margin is larger than the top or bottom margin, the header or footer will overwrite the worksheet data on the page. Chapter 8 Printing Worksheets 121 Specifying Headers and Footers The Headers & Footers tab of the Page Setup dialog box allows you to create headers and footers, which are lines of text printed at the top and bottom of each page. You type in the header and footer text. You can use special content codes to insert worksheet-specific information like page numbers, the name of the workbook, the current date and time, etc. You can also use formatting codes to format and align the text. ➤ To create headers and/or footers for the active worksheet: 1. Select File > Page Setup and click the Headers & Footers tab, shown below. The default header code prints the worksheet name. The default footer code prints the page number. 2. Enter text and formatting codes in the Header and Footer boxes. See below for information on special formatting codes. 3. When you finish, click OK. Formatting Codes for Headers and Footers Formatting codes allow you to format and align the header and/or footer text and to insert worksheet-specific information. There are three types of formatting codes: alignment codes, font codes, and worksheet codes. They must be entered in that order. If you put the codes in the wrong order, Formula One for Java may ignore some of them. Enter codes in upper or lower case and separate them with a space. 122 Formula One for Java User’s Guide The following tables list the special formatting codes. Alignment Codes Description &L Left-aligns the characters that follow. &C Centers the characters that follow. &R Right-aligns the characters that follow. By default, headers and footers are centered unless you use the &L or &R code. Font Codes Description &B Use a bold font. &I Use an italic font. &U Underline the text. &S Strike out the text. &"fontname" Use the specified font. &nn Use the specified font size (must be a two-digit number) Worksheet Codes Description &D Prints the current date. &T Prints the current time. &F Prints the workbook name. &A Prints the worksheet name. &P Prints the page number. &P+number Prints the page number plus number. &P-number Prints the page number minus number. && Prints an ampersand. &N Prints the total number of pages in the document. 123 P A R T 3 Charting Tidestone 125 C H A P T E R 9 Getting Started With Charts This chapter explains how to create charts, do basic chart formatting, print, and delete charts. If your chart is simple, this may be the only charting chapter you need to read. The following topics are covered. ■ “Creating a Chart” on page 126 ■ “Changing the Chart Type” on page 126 ■ “About Chart Titles” on page 129 ■ “About Chart Legends” on page 131 ■ “Resizing and Moving a Chart” on page 132 ■ “Printing a Chart” on page 133 ■ “Deleting a Chart” on page 133 Other basic charting topics not documented in this chapter can be found at: ■ “Chart Concepts and Techniques” on page 135, which gives more advanced information about how the charting software works ■ “Guide to Individual Chart Types” on page 151, which describes each chart type in detail 126 Formula One for Java User’s Guide Creating a Chart ➤ To create a chart: 1. Select the cells on the worksheet that contain the data you want to chart. These cells are called the data range. It may contain numbers and headings. Headings must appear in the top row and/or the left column of the selection. These headings will automatically appear as labels on the chart. Sample chart data For more information about the data range, see “Working With Chart Data Ranges” on page 145. 2. Select Insert > Chart or click the Chart button: 3. Draw the chart onto the worksheet by clicking and dragging from the chart’s upper left corner to its lower right corner, as if you were drawing a rectangle. You can change the chart’s size and position later. 4. Formula One for Java creates a column chart that shows the data you selected. The column chart is the default chart type; you can change it later. The chart’s legend appears at the right side. Default chart created from the sample chart data above. Note how column and row headings appear on the chart’s axis and legend. Changing the Chart Type The chart type determines what it will look like: whether the data is displayed as columns, lines, pie slices, etc. ➤ To change the chart type: 1. Click anywhere on the worksheet to deselect the chart object. 2. Right-click on the chart to bring up the context menu. 3. Choose Chart Type. Chapter 9 Getting Started With Charts 127 4. The Chart Type dialog appears, as shown below. Formula One for Java’s chart types are listed here. Choose one. 5. Click Apply to see what your data looks like in the chart type you chose, or OK to finalize your choice. List of Chart Types Area charts show each cell’s data as a point on a horizontal line that is the upper boundary of an area that reaches down to the X axis. Use area charts to represent accumulation of value over a period of time. An area chart focuses on the magnitude of change rather than the rate of change. For information, see “About Area Charts” on page 152. Bar charts show each cell’s data as a horizontal bar. Bar charts compare items to each other and are particularly effective at showing large changes from one category to another. They are equivalent to column charts turned on their side. For information, see “About Column and Bar Charts” on page 158. Bubble charts show two groups of numbers as a series of XY coordinates. In addition, a third set of numbers indicates the size of each data point, or bubble. Bubble charts can be used to show the relatedness of data as well as the relative importance of each data point. They are like XY (Scatter) charts with an added third dimension. For information, see “About Bubble Charts” on page 153. 128 Formula One for Java User’s Guide Column charts show each cell’s data as a vertical column. Column charts compare items to each other and are particularly effective at showing large changes from one category to another. For information, see “About Column and Bar Charts” on page 158. Combination charts let you display different types of data in different ways on the same chart. You may combine columns, lines, areas, and steps. Use them to visually highlight the differences between different sets of data. For information, see “About Combination Charts” on page 160. Doughnut charts show each cell’s data as a slice of a doughnut. The chart may contain one or more doughnuts, arranged one inside the other. Doughnut charts show the relationship of parts to the whole of several sets of data. For information, see “About Doughnut Charts” on page 163. Line charts show each cell’s data as a point on a line. They illuminate trends or changes in data over a period of time. They emphasize time flow and rate of change rather than amount of change. For information, see “About Line Charts” on page 166. Pie charts show each cell’s data as a slice of a pie. The chart may contain one or more pies. Pie charts show the relationship of parts to the whole. For information, see “About Pie Charts” on page 169. Step charts show each cell’s data as a stair step in a series of stair steps. Like area charts, they show data accumulation, only they illustrate changes between data points as distinct stair steps rather than as continuous points. Use them to compare items that do not show trends. For information, see “About Step Charts” on page 171. XY (Scatter) charts plot two groups of numbers as a series of XY coordinates. XY charts show the relationship between two sets of data. If the data points form the shape of a line, the two sets of data are related. For information, see “About XY (Scatter) Charts” on page 175. Chapter 9 Getting Started With Charts 129 About Chart Titles Unlike the axis labels and legend text, the chart’s title is not taken from the data range on the worksheet. Instead, you enter it in a dialog box. After you enter a chart title, the title element appears on the chart. The title element is the text and space contained within this set of selection handles. Adding or Editing a Chart Title ➤ To add or edit a chart title: 1. Right-click on the chart to bring up the context menu. 2. Choose Title. The Format Title dialog appears. 3. Choose the Options tab. The dialog box shown below appears. Enter the text of the title. To enter more than one line of title text, press ENTER. 4. Click Apply to see your changes or OK to accept your changes. The title appears above your chart. Formula One for Java will automatically wrap the text of the title if it is too long to fit in the space. 130 Formula One for Java User’s Guide Aligning Chart Title Text After you enter a multi-line title, you can adjust the alignment of the text within the title’s selection handles. ➤ To adjust the title text alignment: 1. Right-click on the chart to bring up the context menu. 2. Choose Title. The Format Title dialog appears. 3. Choose the Alignment tab, shown below. Align the text horizontally within its selection handles. Align the text vertically within its selection handles. 4. Click Apply to see your changes or OK to accept your changes. Other Title Formatting Options To make this change... See this section Change the font “Changing Fonts, Font Styles, and Font Colors” on page 219 Move the title “Moving Chart Elements” on page 141 Add a background color “Changing Fill Colors, Patterns, and Gradients” on page 223 Add an outline “Changing Line Styles and Colors” on page 222 Chapter 9 Getting Started With Charts 131 About Chart Legends A chart legend appears by default when you first create a chart. For most charts, legends show the names and colors of each series of data. The legend text is taken from the chart’s data range. Chart legend Adding or Moving a Legend ➤ To add or move a legend: 1. Right-click on the chart to bring up the context menu. 2. Choose Legend. The Format Legend dialog box will appear. 3. Choose the Options tab, shown below. Un-check this box to remove the legend. Choose a position for the legend. When you select Bottom or Top, the legend text will usually be automatically arranged in two or more columns. 4. Click Apply to see your changes or OK to accept your changes. You may also move a legend by clicking and dragging. For information, see “Moving Chart Elements” on page 141. 132 Formula One for Java User’s Guide Sizing a Legend You may size the legend by selecting it and dragging its selection handles. Making a legend longer adds extra space between the lines of text. Making it shorter cuts off lines of text. Making a legend wider will arrange the legend text in multiple columns. Shrinking the legend too far may cut off some of the legend’s text. By dragging the legend’s selection handles, you can change its line spacing and number of columns. Changing the Legend Text By default, the legend text is taken from the chart’s data range. You cannot select the legend text and edit it directly in the legend. Instead, you change the text in the cells on the chart’s data range that correspond to the legend entries. The legend will automatically be updated to reflect the data range changes. For information, see “Headings in the Data Range” on page 147 and “Editing Cells in the Data Range” on page 146. There are other, more complicated ways to automatically change what appears in the legend. For information, see “Changing Chart’s Data Source for Series and Headings” on page 184 and “Automatically Varying Data Point Colors” on page 227. Other Legend Formatting Options To make this change... See this section Change the legend font “Changing Fonts, Font Styles, and Font Colors” on page 219 Add a background color “Changing Fill Colors, Patterns, and Gradients” on page 223 Change the outline color “Changing Line Styles and Colors” on page 222 Resizing and Moving a Chart ➤ To change the size or position of a chart: 1. Select the entire chart by holding down CTRL and clicking on the chart. Selection handles will appear on the outside border of the chart. 2. Drag the selection handles to change the size or shape of the chart. 3. Hold down CTRL and drag on the body of the chart to move the chart to a new position. You can also move the pointer to the edge of the chart until it turns into a four-arrow cursor, then drag. Chapter 9 Getting Started With Charts 133 Note Like other graphical objects, chart objects are anchored to the cells upon which they appear. If you shrink or expand the row height or column width of any of the cells behind the chart, the chart will shrink or expand accordingly. For information on... See this section How resizing affects the chart’s elements “Sizing Chart Elements” on page 141 Automatic chart layout settings “Resetting Chart Formatting” on page 149 Printing a Chart To print a chart, print the worksheet that the chart appears on. You cannot print a chart separate from its worksheet. For more information, see “Printing Worksheets” on page 113. Deleting a Chart ➤ To delete a chart: 1. Select the entire chart by pressing CTRL while clicking on the chart. Selection handles will appear on the outside border of the chart. 2. Press the DELETE key or choose Edit > Clear > All. The chart will disappear from the worksheet. Tidestone 135 C H A P T E R 1 0 Chart Concepts and Techniques This chapter explains the basic concepts and techniques of charting. The following topics are covered. ■ “Chart Elements” on page 136, which defines and describes the different chart elements ■ “Selecting Chart Elements” on page 138 ■ “Moving Chart Elements” on page 141 ■ “Sizing Chart Elements” on page 141 ■ “Using the Context Menu to Edit Charts” on page 142 ■ “Charting Dialog Boxes” on page 143, which is a list of all the charting dialogs and their tabs, along with explanations of what you can do with each tab ■ “Working With Chart Data Ranges” on page 145 ■ “Resetting Chart Formatting” on page 149 Other basic charting topics not documented in this chapter can be found at: ■ “Getting Started With Charts” on page 125, which explains how to create charts and do basic chart formatting ■ “Guide to Individual Chart Types” on page 151, which describes each chart type in detail 136 Formula One for Java User’s Guide Chart Elements title plot data point legend The three bars representing Internet sales form a series. The darker bars representing In-store sales form another series. January, February, and March are categories. The title is a text box you can place anywhere on the chart. The plot is the area on the chart that displays the data in the chart type you choose. A data point is one piece of data appearing on the chart. For most chart types, each data point shows the value of the contents of one cell in the data range linked to the chart. A chart’s legend shows what kind of data is represented in the chart. By default, the text that appears in the legend is taken from the chart’s data range. Series are sets of related data. A chart can have one or more series. Each chart type displays series differently. Often (but not always), series correspond to rows of data in the data range. Categories are “bins” into which the data from each series is sorted. Often (but not always), categories correspond to columns of data in the data range. For information on series and categories, see “Headings in the Data Range” on page 147 and “How Each Chart Type Displays Series and Categories” on page 149. Chapter 10 Chart Concepts and Techniques 137 Y axis marker axis labels grid line drop line Y axis title data label tick X axis X axis title X axis labels The Y axis is vertical on most charts (except for bar charts, where the Y axis is horizontal). Because it displays values, the Y axis is also called the value axis. On XY and bubble charts, both the X and Y axes are value axes. The X axis is horizontal on most charts (except for bar charts, where the X axis is vertical). On most charts, the X axis is called the category axis because it displays category names. Axis labels are words or numbers that mark the different portions of the axis. Value axis labels are computed based on the data displayed in the chart. Category axis labels are taken from the category headings entered in the chart’s data range. Axis titles are words or phrases that describe the entire axis. Markers identify data points. You can put markers on all data points in a series or on only selected data points. Grid lines are horizontal or vertical lines that extend from the axis ticks. Drop lines are lines leading from a data point to the category axis. On large or complex charts, drop lines help show which category a data point belongs to. Drop lines are only available on line chart types. Data labels identify individual data points. Data labels are a good way to emphasize or explain a particular piece of data on the chart. Data labels can display the data point’s category, its value, or text you enter yourself. Ticks are short lines that mark off an axis into segments of equal size. On value axes, axis labels are displayed on ticks. On category axes, axis labels are displayed between ticks. 138 Formula One for Java User’s Guide label line highest price attained for that period high-low line open-close bar showing gain open-close bar showing loss lowest price attained for that period study showing volume data Label lines are lines leading from a data point to its data label. High-low lines are used on stock charts to show the range of prices the stock commanded over a period of time. High-low lines are available only on line chart types. Open-close bars are used on stock charts to show the stock’s price at market opening and closing. You can color the bars differently to show whether the stock gained or lost. Studies are sub-charts that display below the main chart in the same plot area. Studies share the same X axis and usually show similar data on a different scale. Stock charts frequently display studies that show the volume of stocks traded. You can display one or more studies on any chart that has axes. Selecting Chart Elements Like most graphical user interface software tools, Formula One for Java requires that you select a chart element or the chart itself before you perform an action on the chart or chart element. To move, size, or delete the chart itself, select the chart. To move or change aspects of individual chart elements, select the chart element. Only one chart element can be selected at one time. Note If the chart is selected, you are not allowed to select any of the chart elements. Deselect the chart by clicking anywhere on the worksheet, off the chart. Then click on the chart element of your choice. Chapter 10 Chart Concepts and Techniques 139 Quick Guide to Selecting Chart Elements This quick guide lists the selectable chart elements in alphabetical order, explains how to select them, and shows what they look like when selected. Axis Click on the axis, axis labels, axis title, or tick. A selected axis has three selection handles Chart A selected chart has eight selection handles. CTRL + click on any part of the chart. Data label (individual) A selected data label has eight selection handles. Click the label. If the series is selected, click again to select just the label. Data labels (series of) Each data label in a selected series of labels has two selection handles. Click a label in the series. Data point Click the data point. If the entire series is selected, click again. Each chart type displays selected data points differently. On a line or XY series On a bubble series On a pie or doughnut series On a column or bar series Drop lines Click the line. Grid lines Click one of the grid lines. You cannot select individual grid lines. High-low lines Click one of the high-low lines. You cannot select individual high-low lines. Selected drop lines each have one selection handle in the center of the line. Selected grid lines each have two selection handles. Selected high-low lines each have one selection handle in the center of the line. 140 Formula One for Java User’s Guide Label lines Click the line. Legend Click the legend. Open-close bars Click the bar. Plot Click anywhere in the plot area, but not on any particular element. If another element is selected, move the cursor away from it and click again. Series Click an item in the series. If a data point is selected, click a different item in the series. A selected label line has three selection handles. You must select label lines one at a time. A selected legend has eight selection handles Selected open-close bars have four selection handles. To tell whether you have selected the down bars or the up bars, see if the values in the chart’s data range are ascending or descending. A selected plot has eight selection handles. Each chart type displays selected series differently. A selected line or XY series A selected bubble series. A selected pie or doughnut series A selected column or bar series Selected area or step series are surrounded by selection handles. Title Click the title. A selected title has eight selection handles. Chapter 10 Chart Concepts and Techniques 141 Moving Chart Elements Most of the chart elements are automatically put in their positions by Formula One for Java. However, you may move the following chart elements by selecting them and dragging them to the new location. Chart element Notes on moving Chart You cannot move the chart off of the worksheet. For more information on moving charts, see “Resizing and Moving a Chart” on page 132. Data labels (individual) Data labels can overlap the plot, but the title and legend will overlap the data label. You can create a manual data label and then drag it away from its data point. You can use this feature to label an entire series or an entire pie, for example, or to create a note at the bottom of the chart. For more information, see “About Data Labels” on page 214. Legend The legend can overlap the title, plot, and data labels. Plot The title, legend, and data labels can all overlap the plot. Title The title can overlap the plot and data labels, but the legend will overlap the title. Sizing Chart Elements Because most of the chart elements are automatically sized by Formula One for Java, you cannot resize them. However, you may size the following chart elements by selecting them and dragging one of the element’s selection handles. Chart element Notes on sizing Chart The plot, title, legend, and data labels will shrink or expand as you shrink or expand the chart, but these elements will retain their relative positioning. For more information on moving charts, see “Resizing and Moving a Chart” on page 132. Legend Enlarging the legend adds extra space between the lines of text. Shrinking the legend too far may cut off some of the legend’s text. Plot The data plotted on the grid will shrink or expand as you shrink or expand the plot. On very large charts, Formula One for Java displays all the ticks, grid lines, and axis labels as specified in the Axis Format dialog box. However, on smaller charts, Formula One for Java may drop elements that don’t fit. For more information, see “Disappearing Axis Labels?” on page 198. 142 Formula One for Java User’s Guide Using the Context Menu to Edit Charts The chart context menu appears when you right-click on an area of the chart. You use the context menu to invoke dialog boxes that let you edit different aspects of a chart’s appearance. The top menu item of the context menu changes depending on which chart element was selected when you right-clicked. The bottom five menu items are always available on the context menu. To dismiss the context menu without choosing any of the menu options, click in another area of the chart. The Effect of Selection on the Context Menu The Chart Type, Chart, Plot, Legend, and Title menu options are always available on the context menu. Other menu options appear on the menu depending on which chart element is selected. The following table shows which chart elements you can select in order to invoke different menu options. Selected chart element Menu option available Axis Format Axis Data label(s) Format Data Labels Data point(s) Format Data Point Drop lines Format Drop Lines Grid lines Format Grid Lines High-low lines Format High-Low Lines Label lines Format Label Lines Open-Close bars Format Open-Close Bars For information on how to select different chart elements, see “Selecting Chart Elements” on page 138. Problems With Clicking for the Context Menu Since selecting requires a click of the mouse and invoking the menu requires another click, it can be tricky to get the menu option you want. For example, if you want the Format Series menu option, you must select a series, then right-click on the series to invoke the menu. Often the second click changes your selection to a data point, and the Format Data Point option becomes available instead of the Format Series option. You can solve this problem by right-clicking to select the chart element you want. The element will be selected and the menu will appear at the same time. Chapter 10 Chart Concepts and Techniques 143 Charting Dialog Boxes Formula One for Java’s charting dialog boxes are listed here in alphabetical order, as well as the tabs that appear on each dialog and what information you can edit using that tab. Format Axis dialog Line Style tab Set a line style for the axis and set a color for the axis and its ticks. Scale tab Set how often ticks, labels, and grid lines appear. Set the maximum and minimum values for a value axis. Reverse the order of categories or values. Set axis intersection. Create a logarithmic axis. Font tab Set the font, font size, color, and style for axis labels and titles. Number tab Apply a number format to the axis labels. Options tab Create an axis title. Set display options for adjacent axes and for major and minor grids and ticks. Format Chart dialog Fill Area tab Set a background fill color, pattern, or gradient for the entire chart. Line Style tab Set a line style and color for the outline of the chart. Font tab Set the font, font size, color, and style for all the text on the chart. Title tab Enter the text of the chart title. Plot tab Set special characteristics for different types of charts. Legend tab Display or hide the legend and position a visible legend on the chart. Options tab Automatically reposition the chart’s plot, title, and legend. Remove all formatting from a chart. Format Data Labels dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the data label(s). Line Style tab Set a line style and color for the outline of the data label(s). Font tab Set the font, font size, color, and style for the data label(s). Number tab Apply a number format to the data label(s). Alignment tab Align the data label(s) within the selection box(es). Options tab Align the data label selection box(es) to the corresponding data point(s). Enter data label text. Format Data Point dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the data point. 144 Formula One for Java User’s Guide Format Data Point dialog Line Style tab Set a line style and color for the outline of the data point. Markers tab Set a size, style, and foreground and background colors for markers. This tab is available only for line and XY charts and for combination charts with a line series. Data Labels tab Create a data label for the selected data point. Format Drop Lines dialog Line Style tab Set a line style and color for the drop lines. Format Grid Lines dialog Line Style tab Set a line style and color for the grid lines. Format High-Low Lines dialog Line Style tab Set a line style and color for the high-low lines. Format Label Lines dialog Line Style tab Set a line style and color for the label line(s). Format Legend dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the legend. Line Style tab Set a line style and color for the outline of the legend. Font tab Set the font, font size, color, and style for the text in the legend. Options tab Display or hide the legend. Position the legend on the chart. Format Open-Close Bars dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the open or close bars. Line Style tab Set a line style and color for the outline of the open or close bars. Format Plot dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the legend. Line Style tab Set a line style and color for the outline of the legend. Axes tab Create studies. Set display options for adjacent axes and for major and minor grids and ticks for one or more of the chart’s axes. Set ratios for size of chart and studies. This tab is not available for pie and doughnut charts. Data Labels tab Create data labels for all the data points in the chart. Options tab Set special characteristics for different types of charts. Chapter 10 Chart Concepts and Techniques 145 Format Series dialog Fill Area tab Set a fill color, pattern, or gradient for the background of all the data points in the series. This tab is not available for line series. Line Style tab Set a line style and color for the outline of all the data points in the series. Markers tab Set a size, style, and foreground and background colors for markers. This tab is available only for line and XY charts and for combination charts with a line series. Data Labels tab Create data labels for all the data points in the series. Options tab Rearrange the chart’s series. Plot the series on the second Y axis or on a study. For combination charts, assign a series type. For pie and doughnut charts, explode the slices. Format Title dialog Fill Area tab Set a fill color, pattern, or gradient for the background of the title. Line Style tab Set a line style and color for the outline of the title. Font tab Set the font, font size, color, and style for the text in the title. Alignment tab Align the title text horizontally and vertically within its selection handles. Options tab Enter the text of the chart title. Working With Chart Data Ranges To create a chart, first select a range of cells on a Formula One for Java worksheet. That range, called the data range, is linked to the chart. You may later redefine what data is linked to that chart. For information on how Formula One for Java interprets the data in a chart’s data range, see “Anatomy of a Data Range” on page 145, “Headings in the Data Range” on page 147, and “Editing Cells in the Data Range” on page 146. For information on redefining the data that was originally linked to the chart, see “Changing the Chart’s Data Source” on page 182. Note Bubble, XY, and stock charts require the data in the data range to be organized in a specified arrangement, otherwise the chart will not display the data properly. For more information on bubble charts, see “About Bubble Charts” on page 153. For more information on XY charts, see “About XY (Scatter) Charts” on page 175. For more information on stock charts, see “About Stock Charts” on page 172. Anatomy of a Data Range The data range can contain headings, data, and a spaceholder cell. Headings are text cells that are used as names for categories and series on the chart. You do not have to enter headings, but if you do, they may only appear in the top row and/or left-hand column of the data range. 146 Formula One for Java User’s Guide Data are number cells that are used as data points on the chart. Numbers may fill the entire data range if you choose not to enter headings. The spaceholder cell is an empty cell in the top left corner of the data range. Use the spaceholder cell only when the top row AND left-hand column of the data range contain headings. The spaceholder cell tells Formula One for Java to use the data in the first column as headings. If the upper left-hand cell contains text or numbers, the cells in the leftmost column will be considered data cells and will be plotted on the chart. The spaceholder cell tells Formula One for Java to use the first column as headings, not data. Headings may appear only in the first row and/or in the left-hand column. Data cells should contain only numbers. If any cell in a non-heading row or column contains text, that text will be plotted as 0 on the chart. If any cell in a non-headings row or column is empty, no data point will appear on the chart and the space reserved for that data point will be blank. Note You create this kind of data range when you set up the chart for the first time. After creating the chart, you may change the cells or ranges linked to each heading, to each range, or to the entire chart. See “Changing the Chart’s Data Source” on page 182. Editing Cells in the Data Range When you change the contents of a cell in the data range, the chart is automatically updated. When the selected value is changed in the chart’s data range... ...the chart is updated to reflect that change. Chapter 10 Chart Concepts and Techniques 147 Headings in the Data Range By default, category headings in the data range are used as axis labels on the X (category) axis. Series headings in the data range are used as series labels in the chart’s legend. To change the category axis label text, change the contents of the heading cell. Similarly, to change the text of the chart’s legend, change the contents of the heading cell. Series headings appear on the legend. Category headings appear as axis labels on the category axis. When the data range has no headings, Formula One for Java draws a chart that uses numbers for category and series names. By default, each category name will be a number starting at 1 and Series 1, Series 2, etc. will appear in the legend. Entering Heading Cells Data range heading cells must contain text. If you want your heading to be a number, either enclose it in quotation marks or precede it by a tick mark ('). Headings may only be entered in the top row and/or left-hand column of the data range. Text entered in other cells of the data range is plotted as a zero value on the chart. If you enter headings in both the top row and left-hand column, you must leave the top-left cell in the range blank. Note Pie charts, doughnut charts, and charts with varied data point colors display category headings, not series headings, in the legend. For more information, see “About Pie Charts” on page 169, “About Doughnut Charts” on page 163, or “Automatically Varying Data Point Colors” on page 227. Series and Categories in the Data Range By default, the number of rows and columns in the data range determines how the chart defines categories and series. Formula One for Java will follow the default guidelines the first time it draws a chart based on the data range you select. Later, you 148 Formula One for Java User’s Guide can change these default settings (see “Different Ways to Define Series and Categories” below). ■ ■ ■ If there are more rows than columns, by default each row becomes a series and each column becomes a category. If there are more columns than rows, by default each column becomes a series and each row becomes a category. If there are an equal number of rows and columns, by default each row becomes a series and each column becomes a category. A rule of thumb: the charting software always tries to minimize the number of series on a chart. It counts the number of rows and columns in the data range and assigns series to the smaller of the two counts. As noted above, if the row and column counts are equal, then by default each row becomes a series. Note Pie and doughnut chart types use series and category data differently than the other chart types. For more information on pie charts, see “About Pie Charts” on page 169. For more information on doughnut charts, see “About Doughnut Charts” on page 163. Different Ways to Define Series and Categories ■ ■ Change series to categories in order to reverse the way series and categories are defined on the chart. For information on how to do this, see “Changing Chart Series Into Categories” on page 181. Change the data source to tell Formula One for Java exactly which cells to use as which series data points. The data cells don’t have to be contiguous. You may also redefine which cells are used as which headings. You may even disconnect the chart from the worksheet and enter the data and headings yourself, in a dialog box. For information, see “Changing the Chart’s Data Source” on page 182. Chapter 10 Chart Concepts and Techniques 149 How Each Chart Type Displays Series and Categories For most chart types, chart data is organized into series and categories that correspond to rows and columns on the data range. Each chart type displays series and categories differently. Chart type A series is displayed as... A category is displayed as... Area A colored area A point where the upper bounding lines bend Bar Bars of the same color A group of bars, one from each series Bubble Bubbles of the same color A bubble Column Columns of the same color A group of columns, one from each series One of four options: Combination One of four options: A group of columns, one from each series Columns of the same color A point where the lines bend A line A point where the upper bounding lines bend An area A set of platforms A colored “staircase” Doughnut A doughnut Doughnut slices of the same color Line A colored line A point where the lines bend Pie A pie Pie slices of the same color Step A colored “staircase” A set of platforms, one from each staircase XY A colored line A point where the line bends For information on how to enter and identify series and categories in the chart’s data range, see “Working With Chart Data Ranges” on page 145. Resetting Chart Formatting You can use the Undo and Redo toolbar buttons and menu options (on the Edit menu) to reverse chart formatting actions. You can also use two special options for resetting a chart’s layout to its defaults and for removing all formatting that has been applied to a chart. Note If you choose to reset the entire chart to its default formatting settings, Formula One for Java will delete any formatting you have applied to that chart. To bring back your formatting, use the Edit > Undo command or click the Undo button. 150 Formula One for Java User’s Guide ➤ To reset formatting for a chart: 1. Choose the Format Chart menu option from the context menu. 2. Click the Options tab, shown below. . These options affect the chart’s layout and formatting settings. 3. Check the Automatic Layout check box to return moved and/or sized chart elements to appropriate sizes and positions for the chart size and shape. The title will move to the center of the top of the chart, the legend will be sized appropriately and placed at the location shown in the Options tab of the Format Legend dialog box, and the plot will be moved and sized to take up the remaining space. Automatic Layout is automatically checked if you choose one of the Auto Position options on the Options tab of the Format Legend dialog. Click Apply to see your changes or OK to accept your changes. 4. Check the Reset entire chart to defaults check box to remove all formatting that has been applied to a chart. When you check this box, your chart will be converted to a column chart with no title or legend, like the one shown below. A chart after being reset to its defaults. 5. Formula One for Java will confirm that you want to do this by displaying the message “Resetting the chart will cause all formatting to be lost. Continue?” Click OK to reset the chart and lose all formatting or Cancel to leave the chart as it is. 151 C H A P T E R 1 1 Guide to Individual Chart Types This chapter describes each chart type and explains issues related to that particular chart type. The following topics are covered. ■ “About Area Charts,” page 152 ■ “About Bubble Charts,” page 153 ■ “About Column and Bar Charts,” page 158 ■ “About Combination Charts,” page 160 ■ “About Doughnut Charts,” page 163 ■ “About Line Charts,” page 166 ■ “About Pie Charts,” page 169 ■ “About Step Charts,” page 171 ■ “About Stock Charts,” page 172 ■ “About XY (Scatter) Charts,” page 175 Other basic charting topics not documented in this chapter can be found at: ■ “Getting Started With Charts” on page 125, which explains how to create charts and do basic chart formatting ■ “Chart Concepts and Techniques” on page 135, which gives more advanced information about how the charting software works. 152 Formula One for Java User’s Guide About Area Charts Area charts show each piece of chart data as a point on a horizontal line that is the upper boundary of an area that reaches down to the X axis. Use area charts to emphasize the relative importance of values over a period of time. An area chart focuses on the magnitude of change rather than the rate of change. This area chart shows the total number of drivers of both sexes in different age groups. The series are stacked to show the individual and aggregate data. A series of data appears as a colored area on an area chart. Each series has its own color. Categories are represented by points where the upper bounding lines bend. Special Notes About Area Charts Selecting data points. You can’t select individual data points in area charts; you may only select the whole area. Edge of the plot is visible. Since the data points for each category are plotted in the center of that category’s portion of the axis, an empty strip of the chart’s plot will be visible on both sides of the chart. Hidden data points. Depending on the chart’s data, it’s possible to inadvertently hide some or all of the data points of one series behind another series. You can fix this problem in several ways: ■ Rearrange the order of the series. For information, see “Changing the Order of Chart Series” on page 186. ■ Stack the series. For information, see “Stacking Series of Data Points” on page 187. ■ Display each data point as a percent of the category total. For information, see “Plotting Data Points as Percentages of the Category” on page 188. Chapter 11 Guide to Individual Chart Types 153 About Bubble Charts Bubble charts show two groups of numbers as a series of XY coordinates. A third set of numbers indicates the size of each data point, or bubble. Bubble charts show the relatedness of three different sets of values. This chart shows the five states in which the highest number of fatal automobile accidents occurred in 1996. Grid lines extend from both value axes in this chart. Each bubble must have three pieces of data related to it: its X coordinate, its Y coordinate, and its bubble size. Bubbles in one series are all the same color. You may have more than one series of bubbles on a chart. Bubble charts should be used when you want to compare three sets of data for each series. If one or more of the three sets of data falls into categories in which you have one entry per category (for example, a statistic that happens every year or for every age group), that data is better served appearing as categories on a different type of chart. Creating Bubble Charts Because the data for bubble charts is complex and can be arranged in various configurations, Formula One for Java cannot create bubble charts automatically. It needs user input to define how to interpret the data. To create a bubble chart, you first create a “mock” chart using a sample data range. Then you bring up the Chart Data tab to redefine how the data should be used in the chart. 154 Formula One for Java User’s Guide ➤ To create a bubble chart: 1. Set up the worksheet so that there are three sets of values for each bubble (the X axis value, the Y axis value, and the bubble size). You can set up your data range in any arrangement, even with non-contiguous cells. This is how the worksheet was set up for the example chart. 2. To create the chart, select the cells in the chart’s data range. (Since you will later define which cells should represent which areas, it doesn’t matter which cells you select.) Click on the Chart button and draw the chart onto the worksheet. For more information, see “Creating a Chart” on page 126. 3. Change the chart type to Bubble, as explained in “Changing the Chart Type” on page 126. The chart that appears will probably look odd, but you will fix it in the next steps. 4. CTRL + click on the chart to select it, then choose Format > Object. The Chart Data tab of the Format Object dialog will appear. 5. For a bubble chart like the one in the example, which has only one color of bubble and therefore only one series, delete all but one series by selecting unwanted series and clicking the Delete button. 6. Select a series. Fill in the Name text box with the name you want to appear for this color of bubble on the chart legend. You can enter the text of the name or a cell reference pointing to the cell that contains the name. Fill in the X Values, Y Values, and Sizes text boxes with range references that refer to the appropriate ranges on the worksheet. (These range references should include only numeric data, not heading or other text cells.) For more information about options for filling in the Chart Data tab, see “Changing the Chart’s Data Source” on page 182. Here is how the Chart Data tab was filled in for the example chart. Chapter 11 Guide to Individual Chart Types 155 7. For a bubble chart with more than one series, repeat step 6 for each series on the chart. 8. Click Apply to view your changes or OK to accept your changes. 9. Finish formatting the chart using the context menu options. Sizing All the Bubbles Formula One for Java sizes the bubbles proportionally. To set the starting point for sizing bubbles, Formula One for Java uses an internally computed default size. You can increase or decrease this default size to increase or decrease the size of all of the bubbles on the chart. Default bubble size of 100 Bubble size of 50 Bubble size of 300 156 Formula One for Java User’s Guide ➤ To change the relative sizes of all the bubbles on the chart: 1. Select the Format Plot option from the context menu. 2. Click on the Options tab. 3. In the Bubble frame, enter a value from 0 to 300, representing a percentage of the default bubble size. 4. Click Apply to see your changes or OK to accept your changes. Labeling Bubbles by Size A special data label formatting option for bubble charts allows you to display the bubble sizes in data labels. ➤ To display data labels showing bubble sizes on a bubble chart series: 1. Select the series. 2. Select the Format Series option from the context menu. 3. Click on the Data Labels tab. 4. In the Type frame, select Show Bubble Sizes. 5. Click Apply to see your changes or OK to accept your changes. Note The Data Labels tab also appears on the Format Plot and Format Data Point dialogs. This allows you to apply data labels showing bubble sizes to all the series on the plot or to just one selected data point. For more information, see “About Data Labels” on page 214. Special Notes About Bubble Charts Overlapping bubbles. If two or more data points have similar X and Y values, the bubbles may overlap, or one may be hidden behind another. The third bubble is barely visible behind the large bubble. When the chart’s data source rows are rearranged, the third bubble is drawn on top of the large bubble. If the overlapping bubbles are two different colors, they are from two different series. You can fix the overlap by rearranging the order of the chart series. For information, see “Changing the Order of Chart Series” on page 186. If the overlapping bubbles are the same color, they are from the same series. You can fix the overlap by rearranging the order of the rows in the chart’s data source on the worksheet. Formula One for Java draws the bubbles in the order in which they appear on the worksheet, with the data in the higher worksheet rows drawn first and the data Chapter 11 Guide to Individual Chart Types 157 in the lower rows drawn on top of the earlier data. You can copy and paste the rows so that the data for the hidden bubble now appears in the bottom row. The hidden bubble should automatically appear on top of the other bubbles. For information on copying and pasting worksheet cells, see “Moving, Copying, and Pasting” on page 86. Bubbles extending off the plot. If the bubble size of a bubble located near the edge of the plot is large, part of that bubble may extend off the edge of the plot, as shown below. You can fix this problem by adjusting the axis scale in the Scale tab of the Format Axis dialog. For more information about adjusting axis scale, see “Changing Axis Scale Settings” on page 194. Changing the axis scale of the Y axis keeps the bubble from extending off the top edge of the plot. 158 Formula One for Java User’s Guide About Column and Bar Charts Column charts show each cell’s data as a vertical column. Column charts are particularly effective at showing large changes from one category to another. This column chart shows adults’ average earnings in 1996 by the amount of education attained. Data labels showing the value of each data point are displayed at the base of each column. Bar charts show each cell’s data as a horizontal bar. They are equivalent to column charts turned on their side. This bar chart shows the number of people in poverty by age and year. The bars within the categories overlap slightly because the bar gap ratio was set at a negative number. Setting Bar Spacing Options Formula One for Java groups bars on bar and column charts together by category. Each bar displayed in a particular category represents a data point from one series. By default, the bars from different series touch one another within a category, but there is space between categories, as shown in the example bar and column charts above. Chapter 11 Guide to Individual Chart Types 159 You can change the spacing of the bars on any bar or column chart by using the X Gap Ratio and Bar Gap Ratio options. X Gap Ratio is the amount of space between categories of bars. By default it is set at 100, meaning that the space between categories is 100% of the width of a bar. You may set it as large as 500, which would be five times larger than the default amount of space, or as small as 0, which would mean the bars in adjacent categories would touch. Bar Gap Ratio is the amount of space between the bars in a category. By default it is set at 0, meaning there is no space between the bars. Negative Bar Gap Ratio values mean the bars will overlap, while positive values add space between the bars. You may set it as large as 100, which would make the width of the space equal to the width of the bars, or as small as 0, which would superimpose the bars in a category one on top of the other. Default bar spacing options: X gap ratio of 100, Bar Gap Ratio of 0. X gap ratio of 300, Bar Gap Ratio of 0. X gap ratio of 100, Bar Gap Ratio of 100. X gap ratio of 0, Bar Gap Ratio of 0. X gap ratio of 100, Bar Gap Ratio of -50. ➤ To set bar spacing for a bar or column chart: 1. Choose the Plot option from the context menu. 2. Click on the Options tab. 3. Enter a number between 1 and 500 for the X Gap Ratio. Enter a number between -100 and 100 for the Bar Gap Ratio. 4. Click Apply to see your changes or OK to accept them. 160 Formula One for Java User’s Guide Showing Bars as Lines For charts that display a lot of data in a limited amount of space, you may want to display a line instead of a bar. ➤ To display bars as lines on a bar or column chart: 1. Select the series you want to display as lines. 2. Choose the Format Series option from the context menu. Click the Options tab. 3. Check the Show Bar As Line option. 4. Click Apply to see your changes or OK to accept them. About Combination Charts Combination charts let you display different types of data in different ways on the same chart. You may display columns, lines, areas, and steps all on the same combination chart. Use them to visually highlight the differences between different sets of data. This chart shows how kindergarten enrollment increased as home values decreased in Sizemore county. The series of data points representing average home values was plotted on the second Y axis. Chapter 11 Guide to Individual Chart Types 161 Combination charts are a good choice if you want to make a chart with a study that shows data in a different way than the main chart. For example, the main chart below is a line chart showing stock information, while the study is a column chart showing volume of trading. This combination chart is formatted as a stock chart. The four series on the main chart show price information for the stock. They are line series with the lines made transparent and high-low lines and markers applied. The column series on the study shows volume information. Creating Combination Charts You create a combination chart just as you would any other chart: Select a data range, click the chart button, and draw the chart on the worksheet. For instructions, see “Creating a Chart” on page 126. Next, change the chart type to Combination in the Chart Type dialog. For instructions, see “Changing the Chart Type” on page 126. After you change the chart type, the chart looks like the default column chart you had before, with all the data points displayed as columns. This is because column is the default type for displaying data on combination charts. You have to tell Formula One for Java which types of charts you want to combine on the chart. You do this by selecting a chart type for each series on the chart. 162 Formula One for Java User’s Guide ➤ To select a chart type for a combination chart series: 1. Select a series that you want to display in a different chart type than column. For information on selecting series, see “Selecting Chart Elements” on page 138. 2. Choose Format Series from the context menu. Click on the Options tab, shown below. The four types of series available on combination charts are shown here. Choose the type you want to apply to the selected series. 3. Click Apply to see your changes or OK to accept them. 4. Do the same for the other chart series whose types you want to change. Special Notes About Combination Charts Hidden data points. Depending on the chart’s data, it’s possible to inadvertently hide some or all of the data points of one series behind another series. You can fix this problem in several ways: ■ Rearrange the order of the series. For information, see “Changing the Order of Chart Series” on page 186. ■ Stack the series. For information, see “Stacking Series of Data Points” on page 187. ■ Display each data point as a percent of the category total. For information, see “Plotting Data Points as Percentages of the Category” on page 188. Formatting options. The different chart types available on combination charts each have their own characteristics and possibilities. For information, see the documentation on individual chart types: “About Area Charts” on page 152, “About Column and Bar Charts” on page 158, “About Line Charts” on page 166, and “About Step Charts” on page 171. Chapter 11 Guide to Individual Chart Types 163 About Doughnut Charts Doughnut charts show each cell’s data as a slice of a doughnut. The chart may contain one or more doughnuts, arranged one inside the other. Doughnut charts let you show the relationship of parts of several sets of data to the whole. Each ring of the doughnut represents all of the people in the indicated age group. The ring sections show the disability status of a portion of those people. The labels on the doughnuts are data labels that were edited and then dragged and dropped into position. Each doughnut shows a series of data. Slices of the same color belong to the same category. Note that this is the opposite of the way Formula One for Java interprets series and category data on most charts. This means that doughnut chart legends show category labels, not series labels. Formula One for Java determines the order of the doughnuts by adding the total value of the data points in each doughnut. The doughnut with the largest total goes on the outside, with the progressively smaller doughnuts nested inside the largest, in the order of their total value. Formula One for Java displays the doughnut slices clockwise in the same order as they appear in the chart’s data source. Sizing the Doughnut’s Hole By default, the width of the hole in the center of the doughnut is half the width of the largest doughnut. You may change the size of the doughnut’s hole by entering a percentage of the total doughnut width. Doughnut hole is 50% of doughnut width. Doughnut hole is 10% of doughnut width. Doughnut hole is 90% of doughnut width. 164 Formula One for Java User’s Guide ➤ To change the size of the doughnut’s hole: 1. Choose the Format Plot option from the context menu. 2. Click on the Options tab. 3. In the Pie/Doughnut frame, enter a value between 10 and 90 in the Doughnut Hole text box. 4. Click Apply to see your changes or OK to accept them. Changing the Start Angle of the Slices Formula One for Java displays the doughnut slices clockwise in the same order as they appear in the chart’s data source. By default, the edge of the first slice starts at 0°, or the 12 o’clock position. You can change the position of that starting edge. All doughnuts on the chart must have the same starting position. The start angle is expressed in degrees, where 180° is the 6 o’clock position. Start angle is 0° Start angle is 90° ➤ To change the start angle of the doughnuts’ slices: 1. Choose Format Plot from the context menu. 2. Click the Options tab. 3. In the Pie/Doughnut frame, enter a value between 0 and 360, which represents the number of degrees. 4. Click Apply to view your changes or OK to accept your changes. Exploding the Slices You may display the doughnut slices adjacent to one another, as shown in the previous examples, or you may display the doughnut as if cut into pieces, with its slices pulled apart. This is called exploding the slices. You may do this for one or all of the doughnuts on the chart. Explosion percent is 0 Explosion percent is 10 Explosion percent is 30 As you can see in these examples, exploded doughnut slices are smaller than unexploded slices. They shrink because the doughnut’s outside circumference must remain the same size to ensure that it fits on the chart plot. You cannot pull out just one doughnut slice. Chapter 11 Guide to Individual Chart Types 165 ➤ To explode the doughnut slices: 1. Select the doughnut you want to explode. 2. Choose Format Series from the context menu, and click the Options tab. 3. In the Pie/Doughnut frame, enter a value between 0 and 100 in the Explosion Percent text box. The value is the distance the slices are pushed away from the doughnut’s center, expressed as a percentage of the doughnut diameter. 4. Click Apply to see your changes or OK to accept your changes. Special Notes About Doughnut Charts Labeling doughnuts. While Formula One for Java has no automatic option for labeling each doughnut, you can create a data label for a doughnut slice, edit it to display the name you want, then drag it to a new position on the doughnut. You should try to make it clear that the label applies to the entire doughnut. For more information, see “About Data Labels” on page 214. The Use Weighting check box. While this check box is available in the Pie/Doughnut frame of the Options tab of the Format Plot dialog, it has no effect on doughnut charts. For an explanation of its effect on pie charts, see “Changing the Sizes of the Pies” on page 169. The Vary Colors option. On the Options tab of the Plot dialog, the Vary Colors option is automatically selected for doughnut charts. This makes each slice of the doughnuts a different color. If you uncheck the Vary Colors checkbox, each doughnut will appear as a different solid color, with the slices delineated by lines. For more information on the Vary Colors option, see “Automatically Varying Data Point Colors” on page 227. 166 Formula One for Java User’s Guide About Line Charts Line charts show changes in data with a fluctuating line. Each cell’s data is a point. A series of data points is connected by a line. Line charts are effective at showing trends or changes in data over a period of time. They emphasize time flow and rate of change rather than amount of change. Line charts show values along the vertical Y axis and categories along the horizontal X axis. Each data point in a line chart is delineated by a marker. This line chart shows the estimated age of first marriage of men and women by year. The text of the two data labels was edited to apply to the entire series, and label lines were added. Adding High-Low Lines to Line Charts High-low lines link the highest data point of all series in a category to the lowest data point of all series in a category. High-low lines are often used on stock charts to show the highest and lowest price of the stock. Formula One for Java draws high-low lines on all categories of a chart. After displaying high-low lines, you may select them and change the line color and/or style. For information, see “Changing Line Styles and Colors” on page 222. ➤ To add high-low lines to a line chart: 1. Choose Format Plot from the context menu, and click the Options tab. 2. In the Stock frame, check the High-Low Lines box. 3. Click Apply to see your changes or OK to accept your changes. Adding Drop Lines to Line Charts Drop lines begin at the highest data points on the chart and drop all the way down to the X axis. Drop lines can help link the data point to its category on series with many categories. They are often used on stock charts. Formula One for Java draws drop lines on all categories and all series of the chart. After displaying drop lines, you may select them and change the line color and/or style. For information, see “Changing Line Styles and Colors” on page 222. Chapter 11 Guide to Individual Chart Types 167 A line chart with drop lines, no markers, and transparent lines looks the same as a column chart with one series displayed with the Show Bar As Line option turned on. Both show lines descending from data points to the X axis. The difference is, drop lines descend from the highest data point of all the series displayed on the chart, while the Show Bar As Line option applies to a particular series of data points. Choose between the two options based on whether you want to use a line or column chart and on how many series you want to display. For more information on the Show Bar As Line option, see “Showing Bars as Lines” on page 160. ➤ To add drop lines to a line chart: 1. Choose Format Plot from the context menu, and click the Options tab. 2. In the Stock frame, check the Drop Lines box. 3. Click Apply to see your changes or OK to accept your changes. Adding Open-Close Bars to Line Charts Open-close bars link the data points in the first series displayed on the chart to the data points in the last series. Open-close bars are often used on stock charts to show the prices at which the stock opened and closed the trading period. Formula One for Java draws open-close bars on all categories. Note Open-close bars will display properly only if the series of data points representing the open and close are the first and last series on the chart. If your data range is not set up like this, you can change the order of the chart series in the Options tab of the Format Series dialog. For more information on changing series order, see “Changing the Order of Chart Series” on page 186. ➤ To add open-close bars to a line chart: 1. Choose Format Plot from the context menu, and click the Options tab. 2. In the Stock frame, check the Open-Close Bars box. 3. Click Apply to see your changes or OK to accept your changes. Formatting Open-Close Bars After displaying open-close bars, you may change their fill and line color. You can color the bars and their outlines differently depending on whether the value of the data point in the first series was higher or lower than the data point in the last series. On a stock chart, the two colors would indicate periods when the opening price was higher and periods when it was lower than the closing price. You also may change the width of the open-close bars. 168 Formula One for Java User’s Guide ➤ To change open-close bar fill and line colors: 1. Select the open-close bars. Formula One for Java allows you to select “open” bars separately from “close” bars, so that you can color them differently. For more information, see “Selecting Chart Elements” on page 138. 2. Choose Format Open-Close Bars from the context menu. The Format Open-Close Bars dialog appears. 3. Choose a fill color, pattern, or gradient from the Fill tab. For more information, see “Changing Fill Colors, Patterns, and Gradients” on page 223. 4. Choose an outline style and color from the Line tab. For more information, see “Changing Line Styles and Colors” on page 222. ➤ To change the width of open-close bars: 1. Select Format Plot from the context menu and click on the Options tab. 2. Change the value in the X Gap Ratio text box. For more information, see “Setting Bar Spacing Options” on page 158. 3. Click Apply or OK. Special Notes About Line Charts Stacking series. Stacked series on a line chart don’t look any different than un-stacked series. There is no visual cue to let the viewer know that the data points on the lines at the top of the chart represent the sum of that data point and all data points below it. These charts show the same data, only the series are un-stacked in the first chart and stacked in the second. Stacking series on line charts should be done with care to avoid misleading the viewer. For information on how to stack series, see “Stacking Series of Data Points” on page 187. Plotting series as percentages. When you plot data in line charts as percentages, the top line on the chart appears flat against the upper boundary of the chart plot. This is correct because the top series represents 100% of all the data points in the chart. For information on plotting data as percentages, see “Plotting Data Points as Percentages of the Category” on page 188. Chapter 11 Guide to Individual Chart Types 169 About Pie Charts Pie charts show each cell’s data as a slice of a pie. The chart may contain one or more pies. Pie charts show the relationship of parts to the whole. This pie chart divides the total number of children in the United States 1998 and 1960 into groups based on which adult(s) they lived with. The legend’s background and outline were both set to Transparent. Each pie shows a series of data; slices of the same color belong to the same category. Note that this is the opposite of the way Formula One for Java interprets series and category data on most charts. This means that pie chart legends show category labels, not series labels. Formula One for Java displays the pie slices clockwise in the same order as they appear in the chart’s data source. Changing the Sizes of the Pies By default, the size of the pies is determined by the total value of the data points in each pie. All data points in each pie are summed; the pie with the largest total is the largest pie, with the remaining pies sized proportionally smaller. If you don’t want to display the pies sized proportionally, you may choose to display all the pies the same size. ➤ To change the sizes of the pies: 1. Choose the Format Plot option from the context menu. 2. Click on the Options tab. 3. In the Pie/Doughnut frame, uncheck the Use Weighting check box to make all the pies the same size. Check the box to make the pies sized proportionally based on their total value. 4. Click Apply to see your changes or OK to accept your changes. 170 Formula One for Java User’s Guide Changing the Start Angle of the Slices Formula One for Java displays the pie slices clockwise in the same order as they appear in the chart’s data source. By default, the edge of the first slice starts at 0°, or the 12 o’clock position. You can change the position of that starting edge. All pies on the chart must have the same starting position. The start angle is expressed in degrees, where 180° is the 6 o’clock position. Start angle is 0° Start angle is 90° ➤ To change the start angle of the pies’ slices: 1. Choose Format Plot from the context menu, and click the Options tab. 2. In the Pie/Doughnut frame, enter a value between 0 and 360, which represents the number of degrees. 3. Click Apply to view your changes or OK to accept your changes. Exploding the Slices You may display the pie slices adjacent to one another, as shown in the previous examples, or you may display the pie as if cut into pieces, with its slices pulled apart. This is called exploding the slices. You may do this for one or all of the pies on the chart. Explosion percent is 0 Explosion percent is 10 Explosion percent is 30 As you can see in these examples, exploded pie slices are smaller than un-exploded slices. They shrink because the pie’s outside circumference must remain the same size to ensure that it fits on the chart plot. You cannot pull out just one pie slice. ➤ To explode the pie slices: 1. Select the pie you want to explode. 2. Choose Format Series from the context menu, and click the Options tab. 3. In the Pie/Doughnut frame, enter a value between 0 and 100 in the Explosion Percent text box. The value is the distance the slices are pushed away from the pie’s center, expressed as a percentage of the pie diameter. 4. Click Apply to see your changes or OK to accept your changes. Chapter 11 Guide to Individual Chart Types 171 Special Notes About Pie Charts Changing the order of the pies. Since each pie represents a series, you can change the order of the pies by changing the order of the series. For information, see “Changing the Order of Chart Series” on page 186. Labeling pies. While Formula One for Java has no automatic option for labeling each pie, you can create a data label for a pie slice, edit it to display the name you want, then drag it to a new position next the pie. You should try to make it clear that the label applies to the entire pie. For more information, see “About Data Labels” on page 214. The Vary Colors option. On the Options tab of the Plot dialog, the Vary Colors option is automatically selected for pie charts. This makes each slice of the pies a different color. If you uncheck the Vary Colors checkbox, each pie will appear as a different solid color, with the slices delineated by lines. For more information, see “Automatically Varying Data Point Colors” on page 227. About Step Charts Step charts show each data point as a step in a series of stair steps. Like area charts, they show data accumulation, only they illustrate changes between data points as distinct stair steps rather than as continuous points. This step chart showing a decrease in average cholesterol levels over 30 years displays value data labels for each data point. Step charts are one of the chart types available on combination charts. Special Notes About Step Charts Selecting data points. You can’t select individual data points in step charts; you may only select the whole area or “staircase.” Hidden data points. Depending on the chart’s data, it’s possible to inadvertently hide some or all of the data points of one series behind another series. You can fix this problem in several ways: ■ Rearrange the order of the series. For information, see “Changing the Order of Chart Series” on page 186. 172 Formula One for Java User’s Guide ■ Stack the series. For information, see “Stacking Series of Data Points” on page 187. ■ Display each data point as a percent of the category total. For information, see “Plotting Data Points as Percentages of the Category” on page 188. About Stock Charts Stock charts show stock market data. There are many variations on stock charts, but most show the range of prices attained by a stock over a length of time. Stock charts often include studies that indicate the volume of trading over the same length of time. This stock chart shows the range in prices attained by a stock over a oneyear period. The main chart shows high-low lines. The study is a line chart showing volume information. Stock charts differ from the other chart types in that there is no chart type for stock charts. You can’t choose Stock from the Chart Type dialog. Instead, you create a line or column chart and apply stock chart formats to make the line or column chart display the stock market information appropriately. The conversion of a line chart to a stock chart The line chart has no stock chart formatting. The line chart has high-low lines and open-close bars applied. When the lines and markers of the line chart are made transparent, the stock chart appears. Chapter 11 Guide to Individual Chart Types 173 Types of Stock Charts High-Low Charts show the high and low price a stock attained for a particular period of time. The chart displays a series of vertical lines where the top of the line shows the high price, the bottom of the line the low price. For information, see “Creating High-Low Charts” on page 173. Open-High-Low-Close Charts show the high and low price a stock attained for a particular period of time as well as the opening and closing prices of the stock for the same period. The chart shows the same type of vertical lines displayed on a high-low chart. The opening and closing prices can be shown in two ways: by markers on the line, or by open-close bars superimposed on the high-low lines. For information, see “Creating Open-High-Low-Close Charts” on page 174. Volume Charts show the volume of trading, and often appear as studies below the main chart. Volume charts can be simple line charts, column charts, column charts in which the columns appear as lines, or line charts showing drop lines. For information, see “Creating Volume Charts” on page 174. Creating High-Low Charts ➤ To create a high-low chart: 1. Create the chart’s data range containing the high and low prices. While the data range can have any shape, it’s best to make one column of high prices and an adjacent column of low prices. 2. Select the data range and create the chart, as explained in “Creating a Chart” on page 126. 3. Change the chart type to Line, as explained in “Changing the Chart Type” on page 126. 4. Add the high-low bars, as explained in “Adding High-Low Lines to Line Charts” on page 166. 5. Select the first series and make the series line transparent, as explained in “Changing Line Styles and Colors” on page 222. Do the same with the other series. After you have the high-low formatting in place, you may make any other formatting changes to the chart that you would like. For information on your options, see “Adding High-Low Lines to Line Charts” on page 166. 174 Formula One for Java User’s Guide Creating Open-High-Low-Close Charts ➤ To create an open-high-low-close chart: 1. Create the chart’s data range containing the open, high, low, and close prices. While the data range can have any shape, you will have to make the fewest formatting changes if you enter open prices in the first column, high prices in the second column, low prices in the third column, and close prices in the fourth column. (See note below.) 2. Select the data range and create the chart, as explained in “Creating a Chart” on page 126. 3. Change the chart type to Line, as explained in “Changing the Chart Type” on page 126. 4. Add the high-low bars, as explained in “Adding High-Low Lines to Line Charts” on page 166. 5. If you want to mark the opening and closing prices with open-close bars, add open-close bars as explained in “Adding Open-Close Bars to Line Charts” on page 167. 6. If you want to mark the opening and closing prices with markers, select the series displaying the open prices and apply the marker style of your choice to it, as explained in “About Markers” on page 225. Do the same to add markers to the series displaying the close prices. 7. Select the first series and make the series line transparent, as explained in “Changing Line Styles and Colors” on page 222. Do the same with the other three series. After you have the open-high-low-close formatting in place, you may make any other formatting changes to the chart that you would like. For information on your options, see “Adding High-Low Lines to Line Charts” on page 166. Note Open-close bars will display properly only if the series of data points representing the open and close are the first and last series on the chart. If your data range is not set up like this, you can change the order of the chart series in the Options tab of the Format Series dialog. For more information, see “Changing the Order of Chart Series” on page 186. Creating Volume Charts Since volume charts come in many forms, there is no one set method for creating them. The following guidelines should help you create your own volume charts. ■ Volume charts as studies. Most volume charts appear as a study below the main chart. The basic procedure for creating studies is to enter the volume information in the chart’s data range, then assign the series that represents the volume numbers to the study axis. For more information, see “About Studies” on page 206. Chapter 11 Guide to Individual Chart Types ■ ■ ■ 175 Chart types for volume studies. When the volume chart is a study, you may want to display its data points in a different format than the main chart. For example, you may want the main chart to be a line chart displaying high-low lines while the study shows volume information in columns. To do this, change the chart type to Combination, then assign the different series to different chart types. For more information, see “About Combination Charts” on page 160. Volume charts showing lines. Creating volume charts showing lines is exactly the same as creating any other line chart. For information, see “About Line Charts” on page 166. Volume charts showing bars. Creating volume charts showing bars is exactly the same as creating any other column chart. For information, see “About Column and Bar Charts” on page 158. An especially useful feature of column charts when used as volume charts is the Show Bar As Line option, which lets you make extremely narrow bars. For information, see “Showing Bars as Lines” on page 160. About XY (Scatter) Charts XY (Scatter) charts plot two groups of numbers as one series of XY coordinates. XY charts show the relatedness of two sets of data. If the data points cluster or bunch in a certain configuration -- for example, if they tend to form the shape of a line -- that indicates that the two sets of data are correlated in some way. This XY chart compares the height and weight data from 23 teenagers. Some of the data points are hidden under others. On this chart all of the height data is above 4.75 feet and all of the weight data is above 90 lbs. The default minimum value for value axes is 0. To avoid leaving a large part of the plot empty, we raised the minimum value for both axes using the Axis Scale settings. Each marker represents a data point. Each data point must have two pieces of data related to it: its X coordinate and its Y coordinate. XY charts can have more than one series. Data points in one series all have the same marker style. By default, Formula One for Java connects the markers in a series with a line. XY charts should be used when you want to compare two sets of values for each series. If one of the two sets of data falls into categories in which you have one entry 176 Formula One for Java User’s Guide per category (for example, a statistic that happens every year or for every age group), that data is better served appearing as categories on a different type of chart. Creating XY Charts Because the data for XY charts can be arranged in various configurations, Formula One for Java cannot create XY charts automatically. It needs user input to define how the data should be used. To create an XY chart, you first create a “mock” chart using a sample data range. Then you bring up the Chart Data tab to redefine how the data should be used in the chart. ➤ To create an XY chart: 1. Set up the worksheet so that there are two sets of values for each data point (the X axis value and the Y axis value). You can set up your data range in any arrangement, even with non-contiguous cells. This is how the worksheet was set up for the example chart. 2. To create the chart, select the cells in the chart’s data range. (Since you will later define which cells should represent which areas, it doesn’t matter which cells you select.) Click on the Chart button and draw the chart onto the worksheet. For more information, see “Creating a Chart” on page 126. 3. Change the chart type to XY (Scatter), as explained in “Changing the Chart Type” on page 126. The chart that appears will probably look odd, but you will fix it in the next steps. 4. CTRL + click on the chart to select it, then choose Format > Object. The Chart Data tab of the Format Object dialog will appear. 5. For an XY chart like the one in the example, which has only one series, delete all but one series by selecting unwanted series and clicking the Delete button. 6. Select a series. Fill in the Name text box with the name you want to appear for this series on the chart legend. You can enter the text of the name or a cell reference pointing to the cell that contains the name. Fill in the X Values and Y Values text boxes with range references that refer to the appropriate ranges on the worksheet. (These range references should include only numeric data, not heading or other text cells.) For more information about options for filling in the Chart Data tab, see “Changing the Chart’s Data Source” on page 182. Here is how the Chart Data tab was filled in for the example chart. Chapter 11 Guide to Individual Chart Types 177 7. For an XY chart with more than one series, repeat step 6 for each series on the chart. 8. Click Apply to view your changes or OK to accept your changes. 9. Finish formatting the chart using the context menu options. Special Notes About XY Charts Line connecting the markers. By default, XY charts are drawn with a line connecting all of the markers in a series. You can remove the line by selecting the series of data points, choosing Format Series from the context menu, and clicking Transparent on the Line Style tab. For more information, see “Changing Line Styles and Colors” on page 222. Labeling the data points. You may label one or all of the data points in a series with automatic data labels that show either the X or Y values or with custom data labels you enter yourself. To label the data points with the X values, choose Category on the Data Labels tab. Strictly speaking, the X axis in this case is a value axis, not a category axis, but the Data Labels tab does not reflect this distinction. For more information, see “About Data Labels” on page 214. Tidestone 179 C H A P T E R 1 2 Data Display in Charts This chapter describes various ways to change how your chart data is displayed. The following topics are covered. ■ “About Data Points” on page 180 ■ “About Series” on page 180 ■ “Changing Chart Series Into Categories‚” p. 181. ■ “Changing the Chart’s Data Source‚” p. 182. ■ “Changing the Order of Chart Series‚” p. 186. ■ “Stacking Series of Data Points‚” p. 187. ■ “Plotting Data Points as Percentages of the Category‚” p. 188. Other topics related to data display but not documented in this chapter are: ■ “Working With Chart Data Ranges” on page 145, which explains basic information about how the chart interprets worksheet data. ■ “Guide to Individual Chart Types” on page 151, which shows data display options for each of the different chart types. 180 Formula One for Java User’s Guide About Data Points A data point is one piece of data on the chart. For most chart types, each data point shows the value of the contents of one cell in the data range linked to the chart. Each chart type displays data points differently. On all chart types, data points are organized into series. By default, all data points in a series are the same color. You can format data points individually or as a series. You can edit and format data points in various ways. For information on... See this section Selecting data points “Selecting Chart Elements” on page 138 Changing data point values “Editing Cells in the Data Range” on page 146 Labeling data points “About Data Labels” on page 214 Changing data point fill colors “Changing Fill Colors, Patterns, and Gradients” on page 223 “Automatically Varying Data Point Colors” on page 227 Changing data point outlines “Changing Line Styles and Colors” on page 222 Displaying data points as percentages of a total “Plotting Data Points as Percentages of the Category” on page 188 Working with a series of data points “About Series” on page 180 About Series Series are sets of data points. A chart can have one or more series consisting of related sets of data points. Each chart type displays series differently. Often (but not always), series correspond to rows of data in the data range. For information on how the charting software decides which cells to define as series, see “Series and Categories in the Data Range” on page 147. Much of the formatting you do on a chart applies to entire series of data points. For example, on a column chart with three series, you may want to change the color of the data points. You could change the colors of all the data points individually, but it’s faster to select entire series and change all the data point colors at once. For information on selecting series, see “Selecting Chart Elements” on page 138. Series are displayed on the chart in the order in which they appear on the data source. If you want to change the order in which the series are displayed on the chart, you don’t have to change the cells. Instead, you can change the series order on the chart. For information, see “Changing the Order of Chart Series” on page 186. Chapter 12 Data Display in Charts 181 You can edit and format series in various ways. For information on... See this section Selecting series “Selecting Chart Elements” on page 138 How series are defined “Series and Categories in the Data Range” on page 147 Changing how a chart’s series are “Changing Chart Series Into Categories” on page 181 defined “Changing the Chart’s Data Source” on page 182 Labeling series “About Data Labels” on page 214 Changing series fill colors “Changing Fill Colors, Patterns, and Gradients” on page 223 Changing series outlines “Changing Line Styles and Colors” on page 222 Stacking series “Stacking Series of Data Points” on page 187 Changing series order “Changing the Order of Chart Series” on page 186 Changing Chart Series Into Categories As explained in “Series and Categories in the Data Range” on page 147, Formula One for Java follows default guidelines for assigning the rows and columns in your data range to series and categories in your chart. If you don’t like the way Formula One for Java assigned your data to categories and series, you may change it. When you first create a chart from this data range, Formula One for Java makes each row into a series and each column into a category. You can edit the chart’s data range in order to show the same information, only what used to be series (Chocolate and Vanilla) are now categories. 182 Formula One for Java User’s Guide Note You may change a chart’s series into categories only if the chart’s data range consists of one contiguous data range. ➤ To change series into categories: 1. Select the chart object by holding down the CTRL key and clicking on the chart. 2. Choose the Format > Object menu option. The system will display the Chart Data tab. 3. Click on the Entire Data Range button. The system will display the Data Range dialog with the address of the current data range displayed in the text box. 4. Change the selection for the Series In: radio buttons. If Rows is selected, select Columns. If Columns is selected, select Rows. 5. Click OK to make the change and dismiss the Data Range dialog, then OK to dismiss the Format Object dialog. Changing the Chart’s Data Source You may change many aspects of how Formula One for Java interprets the data range for the chart. You may: ■ Change the data source for the entire chart by linking the chart to a different set of worksheet cells. ■ Change the category names, series names, or series data by linking different parts of the chart to different cells on the worksheet. ■ Make a chart from non-contiguous ranges of cells. ■ Add a series to the chart by linking it to worksheet cells not in the original data range. ■ Remove a series from the chart. ■ Disconnect the chart from the worksheet by entering new information for the data points and the headings. This documentation breaks down the different tasks for changing the chart’s data source into two main topics: “Changing the Entire Chart’s Data Source” on page 183 and “Changing Chart’s Data Source for Series and Headings” on page 184. Chapter 12 Data Display in Charts 183 Changing the Entire Chart’s Data Source ➤ To change the data source linked to the entire chart: 1. Select the chart object by holding down the CTRL key and clicking on the chart. 2. Choose the Format > Object menu option. The system will display the Chart Data tab. 3. Click the Entire Data Range button. The system will display the Chart Data dialog, shown below. This is the data range currently linked to the chart. These buttons indicate whether Formula One for Java defines series as rows or columns of the range shown above. 4. The dialog will display the address of the data range currently linked to the chart, unless the chart data source has already been edited and is no longer one contiguous range. In that case, the dialog will state “Data range formula is too complex to show.” Type in a different range reference that you want to attach to this chart. It can be an absolute or relative reference. For information on absolute and relative range references, see “Understanding Cell References” on page 49. 5. Choose whether you want rows or columns of the range you entered to become series data by clicking either the Rows or Columns button. 6. Press OK. Formula One for Java will re-parse the chart data using the data range and series information you entered. A sample of the chart using the new data range will appear in the Sample frame of the Format Object dialog. 184 Formula One for Java User’s Guide Changing Chart’s Data Source for Series and Headings ➤ To change the chart’s data source for series and headings: 1. Select the chart object by holding down the CTRL key and clicking on the chart. 2. Choose the Format > Object menu option. The system will display the Chart Data tab, shown below. The chart’s series are listed here. The data in these four text boxes applies to the series selected at left. The data in this text box applies to the entire chart. These buttons let you add and delete series. This sample shows what your chart will look like when the changes are made. Click here to enter a new data range for the entire chart. 3. The notes in the following table describe each text box and button on this dialog box and explain how to use it. When you are finished changing the chart’s data source, click Apply to view your changes or OK to accept your changes. Name text box This is the name of the selected series. X Values text box These are the data points’ X values for the selected series. You may enter: ■ A reference to a cell containing the name. ■ The name. Any text you enter will become the series name. You do not have to enclose it in quotation marks. Entering text here disconnects the series name from the worksheet. This text box is enabled only for XY and bubble charts. For more information, see “About Bubble Charts” on page 153 and “About XY (Scatter) Charts” on page 175. Chapter 12 Data Display in Charts Y Values text box These are the data points that correspond to the selected series. 185 You may enter: ■ A reference to cells containing the data point values. If the range reference contains fewer cells than the number of categories, the last categories will show 0 values for that series. If it contains more cells than the number of categories, that many more categories will be added to the chart. ■ An array constant containing the data point values. Enclose the array constant in curly brackets {}. Entering an array constant here disconnects the data points in this series from the worksheet. Sizes text box This text box is enabled only for bubble charts. For more These are the bubble sizes for information, see “About Bubble Charts” on page 153. the selected series. Categories text box These are the names of the categories on the chart. You may enter: ■ A reference to cells containing the category names. If the range reference contains fewer cells than the number of categories, the last categories will show numeric values for those category names. If it contains more cells than the number of categories, that many more categories will be added to the chart. ■ An array constant containing the category names. Enclose the array constant in curly brackets {}. Text values in array constants must be enclosed in quotation marks. Entering an array constant here disconnects the category names from the worksheet. Since bubble and XY charts have no categories, this text box is disabled for those chart types. Add button This button lets you add a series to the chart. Click this button to add a series to the chart. A new series will appear at the bottom of the series list. (Later, you may rearrange the series order in the Option tab of the Format Series dialog.) The series data points won’t appear on the chart until you set data point values in the Y Values text box. Similarly, the series name will default to Series# until you establish a name in the Name text box. Delete button Select the series you want to delete, then click this button. This button lets you remove a The series data points will be removed from the chart and the series name will be removed from the legend. series from the chart. Entire Data Range button This button lets you change the data range linked to the entire chart. For information, see “Changing the Entire Chart’s Data Source” on page 183. 186 Formula One for Java User’s Guide Changing the Order of Chart Series By default, charts display series in the order in which the series appear in the chart’s data range. Sometimes that order becomes inappropriate once the data is plotted on the chart, especially in area and step charts, where the first series can block the display of later series. To fix this problem, you may change the order of the series. Changing the series order also changes the order in which the legend displays the series names. The Store series is hidden behind the Warehouse series. Moving the Store series down makes it visible on the chart. Note that the order of the series in the legend has changed. A series plotted on a study will stay on that study even when you change the order of that series. Note You may also display hidden series by stacking them or displaying them as percentages of the category total. For information on stacking, see “Stacking Series of Data Points” on page 187. For information on displaying series as percentages, see “Plotting Data Points as Percentages of the Category” on page 188. ➤ To change the order of series on a chart: 1. Select any chart series. For information on how to select chart elements, see “Selecting Chart Elements” on page 138. 2. Choose the Format Series menu option and click on the Options tab, shown below. Chapter 12 Data Display in Charts 187 The chart’s series are listed here in their current order. Click here to move the selected series up one slot. Click here to move the selected series down one slot. Click here to restore the series to their original order. 3. Click Apply to see your changes or OK to accept your changes. Stacking Series of Data Points For area, bar, column, line, and step charts, by default each series of data is plotted starting from the X axis. This means the data points are shown on an equal footing with each other, each its own distance from the X axis. You may choose to stack series one on top of the other, so that the data points from one series are arranged on top of the data points of another series. Stacking is useful if you want to show each data point’s contribution to the total of all the data points in a category. Original chart Chart with stacked series Stacking this chart’s series puts the Prescription series on top of the Over-the-Counter series. Notice that the value axis (the Y axis) is automatically adjusted to account for the larger size of the stacked data points. 188 Formula One for Java User’s Guide ➤ To stack series: 1. Select the Format Plot menu option from the context menu. 2. Click on the Options tab. 3. In the Options frame, select the Stacked check box. 4. Click Apply to see your changes or OK to accept your changes. Special Notes About Stacking Series Stacking bar and column charts. By default, stacked series on bar and column charts are offset from one another, as shown in the example above. To line up all the stacked series one on top of the other, change the plot’s Bar Gap Ratio to -100. For information on Bar Gap Ratio, see “Setting Bar Spacing Options” on page 158. Stacking line charts. Since data points on line charts are not visually linked to the X axis, stacking series on line charts should be done with care to avoid misleading the viewer. For more information, see “Special Notes About Line Charts” on page 168. Preset value axes. When you stack series, Formula One for Java automatically adjusts the chart’s value axis, as shown above. However, if you have previously adjusted the value axis scale so that it is no longer automatically scaled, the settings you chose for that axis remain. If the Maximum value you set is not large enough to accommodate the now-stacked data points, some of them may go off the chart. For more information on scaling value axes, see “About Axis Scale” on page 193. Applies to all series and studies. When you stack series, you have to stack all of the series on a chart. You may not stack some series and leave others un-stacked. This also applies to charts with studies and second Y axes: If you stack the series on the main chart, multiple series displayed on the same study will be stacked as well. Plotting Data Points as Percentages of the Category For area, bar, column, line, and step charts, by default each series of data is plotted starting from the X axis. This means the data points are shown on an equal footing with each other, each its own distance from the X axis. You may choose to display each data point as a percentage of the total of all data points for that category. This means that the series will appear one on top of the other, and the total of all the series will fill the entire chart’s plot. The value axis will be adjusted to show values from 0 to 1. Chapter 12 Data Display in Charts 189 This area chart shows population numbers for men and women by age. It shows the total number of men separately from the total number of women. The same chart is displayed with the values as percentages of the total. This emphasizes the drastic decrease in the number of males in the 80+ category. This chart is useful for showing the distribution between males and females in the total population of each age group. Notice that the value axis displays percentage values. For comparison, the same chart is displayed with its series stacked. This chart emphasizes the total numbers of people (men and women) in each age group. The percentage breakdown is done by totalling all data points in a category, then finding the percentage of that total for each data point. While each category total will be different, each will be displayed as 100%. It is as if you took the data displayed in the third chart shown above and stretched it upwards so the upper bounding line were a straight line parallel to the X axis, while keeping the proportion of the two areas the same. The result is the second chart shown above. Series plotted as percentages automatically appear one on top of the other. You do not have to choose the Stacked option to achieve this effect. 190 Formula One for Java User’s Guide ➤ To plot data points as percentages of the category total: 1. Select the Format Plot menu option from the context menu. 2. Click on the Options tab. 3. In the Options frame, select the Percent check box. 4. Click Apply to see your changes or OK to accept your changes. Special Notes About Plotting Series as Percentages Chart types. As mentioned earlier, you may plot series as percentages on area, bar, column, line, and step charts. On bar and column charts, the series are offset from one another, as shown in the example for “Stacking Series of Data Points” on page 187. Appropriate types of data. This type of chart should only be used when the chart contains two or more series that contribute to a total. A chart with just one series displayed as a percent of total displays each data point as the total. Also, displaying series as percentages may be misleading on charts whose series add up to less than the total (for example, sales figures for quarters 1, 2, and 3 but not quarter 4), unless you note that these are percentages of part of the total. Percentages on the value axis labels. The value axis labels displayed on a chart plotted as percentages will show values from 0 to 1. You can change the number format of the axis labels to show percentage values with trailing percent signs. For more information, see “Changing Number Formats” on page 218. Preset value axes. When you plot series as percentages of the category totals, Formula One for Java automatically adjusts the chart’s value axis to display percentage values from 0 to1, as shown above. However, if you have previously adjusted the value axis scale so that it is no longer automatically scaled, the settings you chose for that axis remain. The data will display between the 0 and 1 values of the current value axis. If the Maximum value is large (in the hundreds or thousands), the chart data may not even appear on the chart, since the space between the 0 and 1 values on such an axis is tiny. In this case, it’s best to set the value axis scale to Automatic. For more information on scaling value axes, see “About Axis Scale” on page 193. Applies to all series and studies. When you plot series as percentages of the category totals, you do so for all of the series on a chart. You may not plot some series as percentages and plot others as values. This also applies to charts with studies and second Y axes: If you plot the series on the main chart as percentages, series displayed on studies will appear as percentages as well. 191 C H A P T E R 1 3 Axes in Charts This chapter shows how to format various aspects of chart axes. The following topics are covered. ■ “About Category and Value Axes” on page 192 ■ “About Axis Scale” on page 193 ■ “Hiding an Axis” on page 196 ■ “About Axis Labels” on page 196. ■ “About Ticks” on page 199 ■ “About Grid Lines” on page 201 ■ “About Axis Intersection” on page 202 ■ “Reversing the Order of Categories or Values” on page 203 ■ “About Logarithmic Value Axes” on page 204 ■ “About Second Y Axes” on page 205 ■ “About Studies” on page 206 ■ “Changing Axis Settings for the Entire Chart” on page 209 Other topics related to axes but not documented in this chapter are: ■ “About Axis Titles” on page 213 ■ “Changing Number Formats” on page 218, which explains how to apply number formats to axis labels ■ “Changing Line Styles and Colors” on page 222, which explains how to change the color or line style of the axis 192 Formula One for Java User’s Guide About Category and Value Axes All Formula One for Java charts except pie and doughnut charts have axes. Axes provide a fixed reference that let you compare different data points on the chart. Axes come in two types: category and value. value axis category axis Category axes show the names of the chart’s categories. Labels showing the category names appear between ticks. Value axes show numbers against which the data points are plotted. Labels showing the values appear for major axis divisions. A chart may have a value and a category axis or two category axes. The table below shows the axis types assigned to each chart type and their horizontal or vertical orientation. Chart type Horizontal Axis Vertical Axis Column Category Value Line Category Value Area Category Value Step Category Value Bar Value Category Combination Category Value XY (Scatter) Value Value Bubble Value Value Chapter 13 Axes in Charts 193 About Axis Scale The scale of an axis is the units into which the axis is divided. The units are marked by ticks, labels, and grid lines. When you change an axis’ scale, you change how the ticks, labels, and grid lines will display. The scale of a category axis is very simple: Each category is one unit. The axis is divided into the same number of units as categories. The only choices you have for category axis scale is whether and how often to display axis labels, ticks, and grid lines. The scale of a value axis is more complex because you have to choose minimum and maximum axis values and determine where the divisions between the maximum and minimum should fall. Category Axis Scale Grid lines Tick Axis label Value Axis Scale Maximum value Minor divisions are marked by minor grid lines (gray) Major divisions are marked by major grid lines (black) Tick Axis label Minimum value Value Axis Scale Settings When you create a new chart that uses axes, Formula One for Java automatically assigns a scale to that chart’s value axis by using an internal algorithm to configure four axis scale settings. All of these settings are based on the data in the chart. You can later change these settings. The settings are: Maximum is the highest value shown on the axis. When the axis is automatically scaled, Maximum is set at a value higher than the largest data point on the chart. Minimum is the lowest value shown on the axis. When the axis is automatically scaled, Minimum is set at a value lower than the smallest data point on the chart. Major divisions are the largest units into which the axis is divided. An axis ranging from 0 to 100 might have major divisions at every 10 units. Major divisions are marked by axis labels. You may also choose to mark major divisions with ticks and major grid lines. Minor divisions are sub-units of the major divisions. An axis with major divisions every 10 units might have minor divisions every 2 units. You may choose to mark minor divisions with minor grid lines. 194 Formula One for Java User’s Guide Changing Axis Scale Settings ➤ To change the scale settings of a category axis: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab, shown below. Enter the number of categories you want to appear between tick marks. To show a tick mark for each category, enter 1. Enter the number of categories that should appear between labels. Enter 1 to show a label for each category. 3. Click OK or Apply to see your changes. Chapter 13 Axes in Charts 195 ➤ To change the scale settings of a value axis: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab, shown below. To change the axis scale, un-check the Automatic box. Enter values in these four text boxes. See below. 3. In the Frequency frame, un-check the Automatic box to enable data entry for the four text boxes. 4. For Minimum and Maximum, enter the smallest and largest value that you want the axis to display. 5. Major Divisions shows the number of major divisions into which you want to divide the values that fall between Maximum and Minimum. For example, when Minimum is 10 and Maximum is 80, enter 7 to mark the axis every 10 units. 6. Minor Divisions shows the number of minor divisions into which you want to divide the values between each major division. For example, when the major divisions are 10 units large, enter 5 to mark the axis every 2 units. 7. Click Apply or OK. Note Setting axis scale options establishes where ticks and major and minor grid lines should appear on the chart, but it does not determine whether or not they are displayed. For information on how to display ticks, see “About Ticks” on page 199. For information on how to display grid lines, see “Showing and Hiding Grid Lines” on page 201. 196 Formula One for Java User’s Guide Hiding an Axis Hiding an axis removes all elements of the axis: the axis line, ticks, grid lines, axis labels, and the axis title. You may want to hide an axis if it gets in the way or if you don’t want the labels, tick marks, and other axis elements to interfere with the chart’s display. ➤ To hide an axis: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Options tab. 3. In the Show frame, un-check the Axis checkbox. 4. Click OK or Apply. Note To redisplay a hidden axis, select Plot from the context menu and click the Axes tab. Choose the axis you want to redisplay from the drop-down menu in the Select Axis frame, check the Axis checkbox in the Show frame, and click OK or Apply. About Axis Labels Axis labels are text that mark major divisions on a chart. Category axis labels show category names; value axis labels show values. Value axis labels Axis title Category axis labels Editing Axis Labels You cannot directly edit the axis label text — that is, you cannot click on a label and edit the text. However, Formula One for Java provides other ways to edit the label text. ■ Editing category axis labels. For category axes, you can edit the cell that contains the category axis label text in the worksheet data range attached to the chart. Any edits you make will immediately appear in the axis labels. You may also change the data range attached to the chart’s category axis labels, so that a different range of cells is used to define the categories. For more information about changing the chart’s data ranges, see “Changing Chart’s Data Source for Series and Headings” on page 184. Chapter 13 Axes in Charts ■ 197 Editing value axis labels. For value axes, Formula One for Java calculates the numbers that appear in the labels by dividing the difference between the axis’ maximum and minimum values by the number of major divisions. You can change the maximum, minimum, and number of major divisions in order to change the numbers that appear on the scale. This chart’s Y axis has a maximum of 15 and 3 major divisions. When the maximum is changed to 16 and the major divisions are changed to 4, the value axis labels change. You may change how the numeric data in the value axis labels is displayed by changing the labels’ number format. For more information, see “Changing Number Formats” on page 218. Displaying Axis Labels Axis labels are always displayed with the axis. You cannot hide axis labels without hiding the entire axis. For value axes, an axis label will appear at the top and bottom of the axis and for every major division. For category axes, the first category’s axis label always appears. You can set how often the remaining axis labels appear. ➤ To set the frequency of category axis labels: 1. Select the category axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. In the Number of categories between labels text box, enter 1 to display a label on every category, 2 to display a label on every other category, 3 to display a label on every third category, etc. 4. Click OK or Apply. 198 Formula One for Java User’s Guide Disappearing Axis Labels? On large charts, Formula One for Java displays all the axis labels as explained above. However, on smaller charts, Formula One for Java may drop axis labels that don’t fit. This is because axis labels’ font sizes remain the same when you shrink or expand the plot, so that the amount of space available for an axis label may be smaller than the label text. This chart is too small to display any but one category axis label and three value axis labels. When the same chart is expanded, more labels, tick marks, and grid lines appear on both axes. The chart is finally big enough to display all its axis labels. To fix this problem, try any or all of the following: ■ Widen the chart or the plot. ■ Apply a smaller font size and/or a different font style to the axis labels in the Font tab of the Format Axis dialog. See “Changing Fonts, Font Styles, and Font Colors” on page 219. ■ Display fewer value axis labels by reducing the number of major divisions in the Scale tab of the Format Axis dialog. See “Changing Axis Scale Settings” on page 194. ■ Shorten category axis label text by editing it in the worksheet data range attached to the chart. See “Editing Cells in the Data Range” on page 146. Chapter 13 Axes in Charts 199 About Ticks A tick is a short line on an axis. For category axes, ticks separate each category. For value axes, ticks mark the major divisions and show the exact point on an axis that the axis label defines. Ticks are always the same color and line style as the axis. ticks Ticks come in two types: major and minor. Major ticks separate the axis into major units. On category axes, major ticks are the only ticks available (you cannot show minor ticks on a category axis). On value axes, one major tick appears for every major axis division. Minor ticks subdivide the major tick units. They can only appear on value axes. One minor tick appears for every minor axis division. By default, major ticks appear for value axes. You can show or hide ticks for both value and category axes. The number of ticks displayed depends on the Major Divisions and Minor Divisions settings in the Scale tab of the Format Axis dialog. 200 Formula One for Java User’s Guide ➤ To show, hide, or choose the style of ticks: 1. Select the axis whose ticks you want to display or hide. 2. Choose Format Axis from the context menu and click the Options tab, shown below. For ticks that mark major divisions, choose the options here. For ticks that mark minor divisions, choose the options here. 3. Choose positioning options for both major and minor ticks. The options are: None for no ticks, Outside for ticks on the outside of the axis (between the axis and the axis labels), Inside for ticks in the plot area of the chart, and Cross for ticks that cross the axis. 4. In the Length text boxes, enter the length you want the ticks to be, in points. 5. Click OK or Apply. Note Since category axes have no minor divisions, they cannot display minor ticks. Checking anything but None in the Minor Ticks frame has no effect on category axes. Chapter 13 Axes in Charts 201 About Grid Lines Grid lines are lines that cross the chart plot to show axis divisions. Grid lines help viewers of the chart see what value is represented by an unlabeled data point. Especially for large or complicated charts, grid lines give valuable cues to the viewer. grid lines Grid lines come in two types: major and minor. Major grid lines separate the axis into major units. On category axes, major grid lines are the only grid lines available (you cannot show minor grid lines on a category axis.) On value axes, major grid lines are drawn for every major axis division. Minor grid lines separate the units delineated by major grid lines. Minor grid lines, which can only appear on value axes, appear for every minor axis division. By default, major grid lines appear for value axes. You can show or hide grid lines for both value and category axes. The number of grid lines that display depends on the Major Divisions and Minor Divisions settings in the Scale tab of the Format Axis dialog. Showing and Hiding Grid Lines ➤ To show or hide major or minor grid lines: 1. Select the axis whose grid lines you want to display or hide. Grid lines run perpendicular to the axis. 2. Choose Format Axis from the context menu and click the Options tab. 3. In the Show frame, check Major Grid or Minor Grid (or both) to display the grid lines. Un-check one or both to hide the grid lines. To discover how many grid lines will display, see the entries for Major Divisions and Minor Divisions on the Scale tab of the Format Axis dialog. 4. Click OK or Apply. Note Since category axes have no minor divisions, they cannot display minor grid lines. Checking the Minor Grid checkbox has no effect on category axes. 202 Formula One for Java User’s Guide About Grid Line Colors and Line Styles By default, major and minor grid lines are black, so you can’t tell the major grid lines from the minor ones. You can change the grid lines’ colors and line styles to differentiate them from each other or to make them less conspicuous on your chart. While major and minor grid lines may be different colors, all of the major grid lines on a chart must be the same color. All of the minor grid lines on a chart must likewise be the same color. For information on how to change the grid line colors and line styles, see “Changing Line Styles and Colors” on page 222. About Axis Intersection The two axes on a chart must intersect. By default, category axes intersect to the left of the first category, and value axes intersect at 0. If 0 does not appear on the value axis, it will intersect at the value closest to 0. You may choose to change the intersection in order to change the emphasis on certain chart values. Or you may want to change the intersection if you reversed the order of the axis categories or values and you don’t like the resulting change in the axis location. You can change the axis intersection in a variety of ways: ■ You can choose the value at which you want a value axis to intersect. ■ You can choose the category at which you want a category axis to intersect. ■ You can make an axis intersect at its maximum category or value. The default category and value axis intersections The value axis intersection is set at 15. The value axis intersection is set to maximum. ➤ To enter the value at which the value axis will intersect: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. In the Intersection frame, un-check the Automatic box to enable the Crosses At text box. Then enter the value in the Crosses At box. Chapter 13 Axes in Charts 203 4. Make sure the Adjacent axis intersects at maximum value check box is unchecked. 5. Click OK or Apply. ➤ To choose the category at which the category axis will intersect: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. In the Intersection/Frequency frame, enter a value in the Adjacent axis crosses at category number text box corresponding to the category to the left of which you want the axis to intersect. If your chart has four categories, enter 2 to place the axis intersection between the first two categories. 4. Make sure the Adjacent axis intersects at maximum category check box is unchecked. 5. Click OK or Apply. ➤ To make an axis intersect at its maximum category or value: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. For category axes, check the Adjacent axis intersects at maximum category checkbox. For value axes, check the Adjacent axis intersects at maximum value check box. 4. Click OK or Apply. Axis Intersection’s Effect on Axis Labels When you change the axis intersection of a chart to make the axes appear within the chart plot, the axis labels appear within the chart plot as well. For vertical axes, axis labels will always appear to the left of the axis, except when the axis intersects at the maximum value, in which case they will be outside of the plot area on the right of the axis. For horizontal axes, axis labels will always appear below the axis, except when the axis intersects at the maximum value, in which case they will be outside of the plot area, above the axis. Reversing the Order of Categories or Values You may choose to display the categories or values on an axis in reverse order. This may help emphasize a particular aspect of your chart or it may simply save you from having to edit the chart’s data range. 204 Formula One for Java User’s Guide The axis intersection may automatically change when you change the order of the categories or values. In this case, you may have to change the axis intersection to place the axis where you want it. Reversing the order of the values on the value axis of this chart automatically placed the category axis at the top of the chart. ➤ To reverse the order of categories or values on an axis: 1. Select the axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. For a value axis, check the Values in reverse order checkbox. For a category axis, check the Categories in reverse order checkbox. 4. Click OK or Apply. About Logarithmic Value Axes For certain types of data, a logarithmic value axis is the best choice to display the data. You may specify the log base. These two charts display the same data with a linear and a logarithmic axis. ➤ To make a value axis logarithmic: 1. Select the value axis. 2. Choose Format Axis from the context menu and click the Scale tab. 3. Check the Logarithmic box and enter a log base in the Log Base text box. 4. Click OK or Apply. Chapter 13 Axes in Charts 205 About Second Y Axes A second Y axis is a Y axis drawn on the right-hand side of a chart. It can show the same axis scale as the primary Y axis or a different scale. You can use a second Y axis with the same scale as the primary Y axis on a wide chart to help viewers interpret the data more easily. Primary Y axis Second Y axis You can use a second Y axis with a different scale than the primary Y axis to plot a series of data on a different scale. This lets you compare two dissimilar series of data on the same chart without overemphasizing the importance of the larger series. Creating Second Y Axes To create a second Y axis, you indicate which series should appear on the second Y axis. The second Y axis appears automatically. ➤ To plot a series on a second Y axis and automatically create the second Y axis: 1. Select the series. 2. Choose Format Series from the context menu and click the Options tab. 3. In the Options frame, in the Plot Series on Axis dropdown listbox, select Value (Y) Axis 2. 4. Click OK or Apply. 206 Formula One for Java User’s Guide Working With Second Y Axes A problem with plotting different series on different Y axes is that the chart itself doesn’t indicate which series corresponds to which Y axis. This can be quite confusing because the viewer can’t immediately identify the values of individual data points. Is the value of this data point just above 50 or just above 2500? To help alleviate this problem, try any or all of the following: ■ On one or more series, display data point labels showing data point values. See “About Data Labels” on page 214. ■ Assign a color to each axis, its axis labels, and grid lines. Then make the series the same color as its corresponding axis. See “Changing Line Styles and Colors” on page 222 and “Changing Fill Colors, Patterns, and Gradients” on page 223. ■ Make a note in the axis title or in the chart title indicating which series corresponds to which axis. See “About Axis Titles” on page 213 and “About Chart Titles” on page 129. About Studies A study is a separate chart shown below the main chart in the same plot area. Studies share the same X axis and usually show similar data on a different scale. Stock charts, which show the activity of a particular stock over a length of time, frequently display studies that show the volume of stocks traded during that same time period. Example stock chart The main chart shows one stock’s weekly high and low prices for a year. The study shows the volume of trading during that same time period. Studies are useful for comparing data on vastly different scales. Chapter 13 Axes in Charts 207 All charts that have axes can have studies. You may create one or many studies for a particular chart. Since studies share the same plot, characteristics of the plot such as fill area and line style must be the same for the main chart and the study. Similarly, since they share the same X axis, they must also share the same X axis grid lines, tick marks, axis labels, etc. However, since the two charts have separate Y axes, they may show different types of Y axis grid lines, tick marks, axis labels, etc. Unlike the main chart, studies cannot have second Y axes. Quick Guide to Creating Studies Task Description Set the number of studies (optional) ■ In the Axes tab of the Format Plot dialog, enter “Setting the Number of the sum of the number of studies you want to Studies for a Chart” on display plus 2 in the (Y) Axis Count text box. page 207 Indicate which series should appear on which study. ■ Select the series to display in a study. In the Options tab of the Format Series dialog, choose a study axis in the Plot Series on Axis dropdown listbox. “Displaying a Series in a Study” on page 208 Assign length ratios to main chart and study ■ Select the main chart’s Y axis. In the Options tab of the Format Axis dialog, enter the ratio for the main chart in the Length Ratio text box. Do the same for the study. “Assigning Length Ratios to the Main Chart and Studies” on page 208 Select the Y axis of the chart or study for which you want. to hide the X axis. In the Options tab of the Format Axis dialog, un-check the Adjacent (X) check box. “Hiding the X Axis for a Main Chart or Study” on page 208 ■ ■ ■ Hide one of the X axes (optional) ■ ■ For more information Setting the Number of Studies for a Chart To create a chart with studies, you may begin by establishing how many studies the chart has. You may also begin by assigning a data series to a study, which will automatically create a new study. Since the process of assigning a series to an as-yet nonexistent study automatically creates the study, establishing the number of studies first is optional. ➤ To set the number of studies in a chart: 1. Choose Format Plot from the context menu and click the Axes tab. 2. In the (Y) Axis Count text box, enter the sum of the number of studies you want on the chart, plus two. This is because the entry in this text box is for the total number of Y axes on the chart, including the main chart’s Y axis and its second Y axis. The first study is actually the third Y axis on the chart. So to create one study, enter 3. Two create two studies, enter 4. 3. Click OK or Apply. 208 Formula One for Java User’s Guide Displaying a Series in a Study Displaying a series in a study will remove that series of data points from the main chart and display it on a study below the main chart. You may display a series on a study that has already been created for a chart. You may also create a study by assigning a series to a study axis. Assigning the series to the as-yet nonexistent study axis automatically creates the study. ➤ To display one of a chart’s series in a study: 1. Select the series. 2. Choose Format Series from the context menu and click the Options tab. 3. In the Options frame, in the Plot Series on Axis dropdown listbox, select which study axis you want this series to appear on. Study Axis 1 refers to the first study. 4. Click OK or Apply. Assigning Length Ratios to the Main Chart and Studies The main chart and its study occupy the same plot area on the chart. You can determine how much of the plot area the main chart and each study take up by entering ratios for each. The fraction of the plot assigned to each Y axis is determined by dividing the axis’ length ratio by the total of all length ratios for all Y axes in the chart. By default, the main chart and each study all have a length ratio of 1. This means that the Y axes on the main chart and each study will all be equal in length. Length ratios of 4 for the main chart and 1 for the study mean the main chart’s Y axis will be 4 times as long as the study’s Y axis, and will take up 4/5 of the plot area. ➤ To assign a length ratio to the main chart or study: 1. Select the Y axis for the main chart or study. 2. Choose Format Axis from the context menu and click the Options tab. 3. In the Y Axis Options frame, enter a number in the Length Ratio text box. 4. Click OK or Apply. Hiding the X Axis for a Main Chart or Study Both the main chart and its studies share the same X axis. Since displaying the X axis on both charts duplicates information, one of the X axes is usually hidden when a chart has a study. ➤ To hide the X axis for a chart that has a study: 1. Select the Y axis for the main chart or study whose X axis you want to hide. 2. Choose Format Axis from the context menu and click the Options tab. 3. In the Y Axis Options frame, un-check the Adjacent (X) check box. 4. Click OK or Apply. Chapter 13 Axes in Charts 209 Changing Axis Settings for the Entire Chart Because charts have many axis settings, and because it’s time-consuming to bring up a different dialog box to make the same changes to different axes, Formula One for Java provides the Axes tab on the Format Plot dialog. This tab lets you change many axis settings for any axis on the chart. Specifically, the Axes tab lets you: ■ add and remove second Y axes ■ add and remove studies ■ show or hide the Y axis’ adjacent X axis ■ adjust the Y axis’ length ratio ■ show or hide the axis ■ show or hide the major and/or minor grid lines ■ show or hide ticks ■ change the length and position of ticks ➤ To change axis settings for one or more axes: 1. Choose Plot from the context menu and click the Axes tab. 2. In the Select Axis dropdown listbox, select the axis whose settings you want to change. 3. Make the changes, then click Apply. The changes you make will only apply to the axis shown in the Select Axis dropdown listbox. 4. Select a different axis from the Select Axis dropdown listbox, make other axis setting changes, and click Apply to view your changes. 5. When you are finished, click OK. Tidestone 211 C H A P T E R 1 4 Text and Numbers in Charts This chapter shows how to change the appearance of text and numbers in titles, labels, and legends in charts. The following topics are covered. ■ “Editing Text and Numbers” on page 212, which gives general guidelines on entering and editing text and numbers. It also includes a quick guide. ■ “About Axis Titles” on page 213 ■ “About Data Labels” on page 214 ■ “Changing Number Formats” on page 218 ■ “Changing Fonts, Font Styles, and Font Colors” on page 219 Other topics related to text and numbers but not documented in this chapter are: ■ “Changing the Legend Text” on page 132 ■ “Editing Axis Labels” on page 196 ■ “About Chart Titles” on page 129 212 Formula One for Java User’s Guide Editing Text and Numbers Editing text and numbers in charts is different depending on which chart element the text or numbers is attached to. ■ For some chart text and numbers, you select the chart element and make changes in a dialog box. ■ For some chart text and numbers, you change the data in the chart’s data range on the worksheet. The following quick guide shows the different types of chart text in alphabetical order and brief instructions for changing each of them. The quick guide also shows where to go to find more in-depth instructions. Quick Guide to Editing Chart Text and Numbers To edit the... You must... Axis titles ■ ■ ■ For more information... Select the axis. “About Axis Titles” on Choose Format Axis from the context page 213 menu. Change the Text value in the Options tab of the Format Axis dialog. Category axis labels Change the category names in the chart’s “Headings in the Data data range on the worksheet. Range” on page 147 Chart title ■ ■ ■ Data labels: number format ■ ■ ■ Data labels: on one data point ■ ■ ■ or ■ ■ Select the title. Choose Title from the context menu. Change the Text value in the Options tab of the Format Title dialog box. “About Chart Titles” on page 129. “Changing Number Select the data label(s). Choose the Format Data Labels menu Formats” on page 218 option. Choose a number format in the Number tab of the Format Data Labels dialog box. Select the data point. Choose the Format Data Point menu option. Choose an option in the Data Labels tab of the Format Data Point dialog box. “Displaying Data Labels” on page 214 “Editing Data Label Text” Double-click the label. on page 215 In the Options tab of the Format Data Labels dialog box, deselect the Automatic check box and change the text in the text box. Chapter 14 Text and Numbers in Charts To edit the... You must... Data labels: on all data points in the chart ■ Data labels: on one series ■ ■ ■ ■ Choose the Plot menu option. Choose an option in the Data Labels tab of the Format Plot dialog box. Change the series names in the chart’s data range on the worksheet. Value axis labels ■ ■ Value axis labels: number formats ■ ■ ■ For more information... “Displaying Data Labels” on page 214 Select the series. “Displaying Data Labels” Choose the Format Series menu option. on page 214 Choose an option in the Data Labels tab of the Format Series dialog box. Legend ■ 213 “Headings in the Data Range” on page 147 “Changing Axis Scale Select the axis. Choose Format Axis from the context Settings” on page 194 menu. Choose different settings in the Scale tab of the Format Axis dialog box. “Changing Number Select the axis. Choose Format Axis from the context Formats” on page 218 menu. Choose a number format in the Number tab of the Format Axis dialog box. About Axis Titles An axis title is a word or phrase that describes an entire axis. Titles generally define what kind of data is being shown on that axis. The text of axis titles always displays horizontally, even for vertical (Y) axes. Y axis title X axis title ➤ To add or edit an axis title: 1. Select the axis. 2. Choose the Format Axis menu option. The Format Axis dialog will appear. 3. Choose the Options tab. 4. Edit the text in the Text box, then click OK. 214 Formula One for Java User’s Guide Axis titles share font and color information with axis labels. You can’t make axis titles and axis labels look different. For information on changing the color or font of axis titles and labels, see “Changing Fonts, Font Styles, and Font Colors” on page 219. About Data Labels Data labels are text elements that describe individual data points. ■ ■ ■ ■ ■ Displaying data labels. You may display data labels for all data points in the chart, for all data points in a particular series, or for individual data points. For information, see “Displaying Data Labels” on page 214. Data label text. Formula One for Java creates the text for the data labels based on the data in the chart’s data range. After Formula One for Java creates this text, you may select it and edit it in the chart. For information, see “Editing Data Label Text” on page 215 Data label alignment. For data labels that have more than one line of text, you may choose from various text alignment options. For information, see “Aligning Data Label Text” on page 216 Data label positioning. You may change the position of the data labels relative to the data point. You may also select individual data labels and move them to any position on the chart. For information, see “Repositioning Data Labels” on page 217. Data label lines. You may link data labels to their data points by data label lines. For information, see “Displaying Data Label Lines” on page 218. For information on... See this section Changing data label fonts and colors “Changing Fonts, Font Styles, and Font Colors” on page 219 Changing data label fill colors “Changing Fill Colors, Patterns, and Gradients” on page 223 Changing data label outlines “Changing Line Styles and Colors” on page 222 Displaying Data Labels The first step in displaying data labels is deciding which data points you want to label. To label... Select... Choose menu option... Choose tab... All data points in the chart anything Format Plot Data Labels All data points in a series the series Format Series An individual data point the data point Format Data Point Data Labels Data Labels Chapter 14 Text and Numbers in Charts 215 The Data Labels Tab The Data Labels tab, shown below, lets you choose what type of text you want Formula One for Java to generate and display on the data label. You may edit this text later. Click here to remove the data label(s). Click here for data labels that display the value from the cell in the chart’s data range that applies to that data point. Click here for data labels that display the data point’s category name. For bubble charts, click here for labels that display each bubble’s size. For pie and doughnut charts, click here to display the category name and percent value of each slice. For pie and doughnut charts, click here to display the percent value of each slice. When you finish working with the Data Labels tab, click OK to accept the changes or Cancel to cancel your changes. Editing Data Label Text After you have displayed a data label, you may change the text of the data label in one of two ways: you may change the number format, or you may add to or change the label text. Changing the number format. For data labels that show numbers (that is, label types that display values, percentages, and bubble sizes), you may edit the number formats by selecting the label, choosing the Format Data Labels option, and clicking on the Number tab. For more information on number formats, see “Changing Number Formats” on page 218. Adding to or changing the label text. For any data labels, you may type in new or additional text to the text that is automatically displayed. See below. 216 Formula One for Java User’s Guide ➤ To edit the text of a data label: 1. Select the data label you want to change. For information on selecting data labels, see “Selecting Chart Elements” on page 138. 2. Double-click the selected data label. The Format Data Labels dialog will appear. Choose the Options tab, shown below. To edit text for the data label, first un-check Automatic. Enter the data label text here. You may change the position of the data label by choosing an option here. 3. Click Apply to see your changes or OK to accept your changes. Aligning Data Label Text You can align text in multi-line data labels horizontally and vertically within the selection handles. The following examples of selected data labels show how the alignment options change the text alignment within the selection handles. Horizontal alignment: center Vertical alignment: center Horizontal alignment: left Vertical alignment: top Horizontal alignment: right Vertical alignment: center Horizontal alignment: justify Vertical alignment: bottom Note The size of the label element is fixed by Formula One for Java. You may not change the size of labels by dragging the label selection handles. ➤ To align data label text: 1. Select the series of data labels to align all the text in the series. Select an individual data label to align its text. 2. Choose the Format Data Labels option and choose the Alignment tab, shown below. Chapter 14 Text and Numbers in Charts 217 Select from these options to align the text horizontally. Select from these options to align the text vertically. 3. Click Apply to see your changes or OK to accept your changes. Repositioning Data Labels After displaying data labels, you may change the position of the labels relative to the data point. You may reposition data labels for an entire series or you may reposition individual data labels. Note To reposition all of the data labels in the chart, reposition each series of data labels. ➤ To reposition a series of data labels: 1. Select the series of data labels by clicking on one of the labels. See “Selecting Chart Elements” on page 138 for more information about selecting series data labels. 2. Choose the Format Data Labels menu option and click the Options tab. 3. In the Position frame, choose a positioning option for the data labels. 4. Click Apply or OK to see your changes. ➤ To reposition an individual data label: ■ You may use the procedure outlined above to reposition an individual data label, only select the individual label instead of the entire series. ■ You may reposition any data label by dragging it to any position on the chart. 218 Formula One for Java User’s Guide Displaying Data Label Lines You may display lines leading from the data point to its label. If you reposition the data label, the label line will stretch like a rubber band. After displaying the lines, you may select them and change their color and style. For information, see “Changing Line Styles and Colors” on page 222. Data label lines are displayed for all data labels on the chart. You can’t display data label lines for some data labels and not for others. ➤ To display data label lines: 1. Choose the Plot option from the context menu. 2. Click on the Options tab. 3. In the Options frame, select the Show Label Lines check box. 4. Click Apply to see your changes or OK to accept them. Changing Number Formats Number formats are patterns that Formula One for Java uses for displaying numbers. A date format, for example, might require Formula One for Java to display the data as 3 sets of 2 numbers divided by slashes. Any date with that format follows that pattern. For more information, see “About Number Formats” on page 64. Numbers that appear in data labels and in value axis labels can have number formats applied to them. The first step in changing number formats in charts is to select the chart element that contains the numbers you want to change. To change number formats for... Select... Choose menu option... Choose tab... Data labels the label or series of labels Format Data Labels Number Axis labels the axis Format Axis Number Chapter 14 Text and Numbers in Charts 219 The Number Tab The Number tab, shown below, lets you change the axis or data label’s number format. This box lets you create a custom number format using Formula One for Java’s format symbols. The number formats are grouped into these categories. The number formats assigned to the category selected at left will appear here. Choose the All category to display all of the number formats here. When this box is checked, the labels use the number format assigned to the cells in the chart’s data range in the worksheet. You must un-check this box to apply a different number format in this dialog box. Any number formats you choose in the Number tab will apply to the chart only if you un-check the Linked to Current Datasource checkbox. When you are finished with this dialog box, press OK or Apply to see your changes. Note For an annotated list of Formula One for Java’s number formats, see “Built-in Number Formats, by Category” on page 65. For a list of Formula One for Java’s format symbols, see “Creating Custom Number Formats” on page 67. Changing Fonts, Font Styles, and Font Colors The first step in changing fonts, font styles, and font colors is to select the chart element that contains the text you want to change. To change fonts for... Select... Choose menu option... Choose tab... Axis labels the axis Format Axis Font Axis titles the axis Format Axis Font Chart title anything Title Font Data label (individual) the data label Format Data Labels Font Data labels (for a series) the series Format Data Labels Font Legend anything Legend Font Please note that the axis title and axis labels share the same font characteristics. You cannot make the axis title a different color, size, or font than the axis labels. 220 Formula One for Java User’s Guide The Font Tab The Font tab, shown below, lets you change the font and its style, size, and color. It also lets you add strikeout bars and underlines. The fonts installed on your system will appear here. Click Automatic to set the text to your system’s window text color. These style settings may not be available for all fonts. When you finish working with the Font tab, click OK to accept the changes or Cancel to cancel out your changes. Setting Fonts for the Entire Chart To set font characteristics for all the text that will appear in the chart (all titles, all labels, and the legend), select the Format Chart menu option and click the Font tab. The tab will appear as shown above. Make your changes and click OK. Caution The font settings you create in the Font tab of the Format Chart dialog apply to all text in the chart. Font settings on the Format Chart dialog will override any font settings you previously made to individual chart parts. 221 C H A P T E R 1 5 Colors in Charts This chapter shows how to change the colors of chart elements and their outlines. The following topics are covered. ■ “Changing Line Styles and Colors” on page 222 ■ “Changing Fill Colors, Patterns, and Gradients” on page 223 ■ “About Markers” on page 225 ■ “Automatically Varying Data Point Colors” on page 227 Other topics related to colors in charts but not documented in this chapter are: ■ “Changing Fonts, Font Styles, and Font Colors” on page 219 ■ “Setting Up the Color Palette” on page 22 222 Formula One for Java User’s Guide Changing Line Styles and Colors You can change the styles, colors, and widths of the lines, such as axes and grid lines, that appear on charts. You can also change the colors and widths of lines that are drawn around chart elements like the title and the legend. The first step in changing line styles and colors is deciding which lines you want to change. To change the style or color of... Select... Axis Chart outline Choose menu option... Choose tab... the axis Format Axis Line Style anything Format Chart Line Style Data label outline the data label(s) Format Data Labels Line Style Data point outline the data point(s) Format Data Point Line Style Drop lines the drop lines Format Drop Lines Line Style High-low lines the high-low lines Format High-Low Lines Line Style Legend outline anything Format Legend Line Style Major grid lines the major grid lines Format Grid Lines Line Style Minor grid lines the minor grid lines Format Grid Lines Line Style Open-close bars the open or close bars Format Open-Close Bars Line Style Plot outline anything Format Plot Line Style Title outline anything Format Title Line Style For information on selecting chart elements, see “Selecting Chart Elements” on page 138. Chapter 15 Colors in Charts 223 The Line Style Tab The Line Style tab, shown below, lets you change the width, style, and color of the line(s) you selected. Click here to apply the color set by your operating system for line objects Click here to hide the line. Click here to make a solid (non-dash) line of the color selected in the palette. Click here to make a dashed line of the color selected in the palette. Choose the style of dashes from the drop-down listbox. If you chose the Solid or Dash option, you may choose a color for your line by clicking on a color in the palette. A sample line showing the color, dash option, and weight you chose appears here. If you chose the Solid or Dash option, you can make the line a specific weight by typing in a value. Or choose a value by clicking the up and down buttons. The higher the line weight, the thicker the line. When you finish making changes, click Apply to see your changes or OK to accept your changes. Changing Fill Colors, Patterns, and Gradients You can change the color that fills many different chart elements. You can also fill chart elements with a two-color pattern or with a gradient, an effect in which one color fades into another color. The first step in changing a chart element’s fill color, pattern, or gradient is to decide which chart element’s fill color you want to change. To change the fill color, pattern, or gradient of... Select... Choose menu option... Choose tab... Chart anything Format Chart Fill Area Data label(s) the data label(s) Format Data Labels Fill Area A data point the data point Format Data Point Fill Area A series of data points the series Format Series Fill Area Legend anything Format Legend Fill Area Open-close bars the open or close bars Format Open-Close Bars Fill Area Plot anything Format Plot Fill Area Title anything Format Title Fill Area 224 Formula One for Java User’s Guide For information on selecting chart elements, see “Selecting Chart Elements” on page 138. For information on changing fill colors for markers, see “About Markers” on page 225. The Fill Area Tab The Fill Area tab, shown below, lets you change the color that fills the chart element(s) you selected. It also lets you fill that element with a pattern or a gradient. These frame titles change depending on whether Solid, Pattern, or Gradient is selected. Click here to fill the selected element with the preset system color. Click here to let the color of the element below the elected one show through. Click here to fill the selected element with the color in the lefthand palette. Click here to fill the selected element with the pattern you choose in the drop-down box. Choose a background color from the lefthand palette and a pattern color from the righthand palette. A sample of the fill color, pattern, or gradient you selected appears here. Click here to fill the selected element with the gradient you choose from the dropdown box. Choose the starting color from the lefthand palette and the ending color from the righthand palette. When you finish making changes, click Apply to see your changes or OK to accept your changes. Chapter 15 Colors in Charts 225 About Markers Markers are small symbols that appear directly on top of data points in line and XY charts and on line series in combination charts. You cannot display markers on any other chart types. Markers are often used on stock charts to show the stock’s opening and closing prices. markers You can choose from 10 different styles of markers. The styles are: Circle Square Diamond Standard Deviation Dow Jones Star Down Triangle Triangle Plus X You can display or hide markers. You can choose the style, size, and background and foreground colors of displayed markers. The first step in editing a marker is to decide which marker(s) you want to edit. To edit... Select... One marker the data point Format Data Point All markers for a series of data points the series Choose menu option... Choose tab... Format Series Markers Markers For information on selecting data points and series, see “Selecting Chart Elements” on page 138. 226 Formula One for Java User’s Guide The Markers tab The Markers tab, shown below, lets you edit markers. Automatic markers are diamonds 5 points wide with a black outline and white fill color. Enter a size for the marker, in points Choose the style of marker. To hide the marker(s), choose None. The foreground color is the color of the marker’s outline. The background color is the fill color for the marker. When you are finished editing markers, press Apply to see your changes or OK to accept your changes. Chapter 15 Colors in Charts 227 Automatically Varying Data Point Colors By default, Formula One for Java displays all of a series’ data points in the same color. This means that all data points on charts with a single series appear in the same color. You may automatically vary the colors of bars and lines on charts within one series so that each bar or each line between data points appears in a different color. When you make this change, the colors of the data points automatically change. The legend also changes to show the new colors and the category names instead of the series color and series name. A chart with colors assigned to series (the default). The same chart after automatically varying the data point colors. Note the legend now displays the new colors and the category names. This option only works for charts with one series. This option is only available on charts where series appear as bars and lines. That is, this option is available on column, line, and bar charts, on column and line series in combination charts, and on XY charts that display lines between the data points. The colors displayed on data points are the automatic system colors for charts. ➤ To automatically vary data point colors in a series: 1. Select the Format Plot menu option from the context menu. 2. Click on the Options tab. 3. In the Options frame, select the Vary Colors check box. 4. Click Apply to see your changes or OK to accept your changes. 228 Formula One for Java User’s Guide Special Notes About Varying Data Point Colors Other ways to change data point colors. You may select individual data points and change their colors. You may do this whether the series colors are varied or not. For more information about changing data point colors, see “Changing Fill Colors, Patterns, and Gradients” on page 223. Changing the chart type. If you choose the Vary Colors option and then change the chart type, the color change you made is ignored and the series will revert to the default colors. Adding a series. If you choose the Vary Colors option and then add a series to the chart, the color change you made will be ignored and each series will revert to its default color. Pie and doughnut charts. On pie and doughnut charts, Formula One for Java’s color default is exactly the opposite of the other charts’ color default: It automatically varies the series colors. This is because each series is plotted as one pie or doughnut on the chart. If one color applied to each series, each pie or doughnut would be all one color. Therefore, for pie and doughnut charts, changing the Vary Colors check box has exactly the opposite effect as described here. For more information, see “About Doughnut Charts” on page 163 and “About Pie Charts” on page 169. 229 Glossary active A cell(s) or other object selected and in a state to interact with a user. API Application Programming Interface. How a programmer accesses the behavior and state of classes and objects. applet A Java program distributed as an attachment in an HTML document and executed in a Java-enabled web browser. Includes a GUI and runs in the JVM on a client machine. application Sometimes “stand-alone application.” A program designed to run on its own--not within or as part of another program. area chart A type of chart that defines the space between the horizontal axis and a straight or bent line, often used to emphasize the relative importance of values over a period of time. arrays Data in lists or tables of values. AWT Abstract Windowing Toolkit. A set of Java development tools for creating GUI’s. axis The baseline of a chart that establishes what things are being compared. axis label Text that marks major intervals on a chart axis. Labels may indicate values or categories. axis title A title that applies to an entire axis on a chart. Titles generally define what kind of data is being shown on that axis. bar chart A type of chart that shows each piece of data as a horizontal bar. bar gap ratio For column and bar charts, the ratio of the space between the bars within a category and the width of the bars themselves. bubble chart A type of chart that allows users to show a visual comparison using three coordinates. CAB files CABinet files. Signed versions of JAR files. category A class of information on a chart into which data from different series is sorted. category axis A type of chart axis that shows the different categories being compared. class path Directions to the address of a .class or JAR file. column chart A type of chart that shows each piece of data as a vertical column. combination chart A type of chart that combines elements of various chart types. Each series on a combination chart can be displayed as columns, lines, areas, or steps. 230 Formula One for Java User’s Guide component A generic programming object: part of or a module from a larger program that serves a particular purpose or provides a particular functionality. In Java, JavaBeans, applets and servlets are components. context menu The menu that appears when you right-click a chart or a chart element. customizer Public Interface Customizer. Provides information and instructions to a Java Bean to customize its GUI. data label Text that marks a data point in a chart. data point One piece of data in a chart. For example: On a bar chart, a data point is a bar. On a line chart, a data point is a bend in the line. On a pie chart, a data point is a slice of the pie. data range In charting, the range of cells on a worksheet containing the data that is plotted on a chart. When the data in the data range changes, the chart changes automatically. database An organized set(s) of data, usually stored as records. design time The period during which the programmer is using an IDE to develop an application. doughnut chart A type of chart that shows different series of data as concentric doughnuts. Slices of the doughnuts represent data point values. drop line A line drawn on a line chart from a data point to the category axis to more clearly show the exact position of the data point. event A notification of change that happens within a program. field Part of a record in which an item of data is stored. In a database, one column typically contains one field. Formula One for Java Formula One for Java Version 7.0 garbage collection The automatic detection and freeing of memory no longer in use. grid line A line that marks a major or minor interval on a chart. Grid lines cross the chart’s plot area, extending from a tick mark on a chart axis. GUI Graphical User Interface. The use of images in concert with the keyboard or mouse to provide the user access to the functions of a program. high-low line A line drawn for each category on a line chart between the highest data point in a category and the lowest data point in that same category. HTML HyperText Markup Language. A file format for hypertext documents on the Internet. IDE Interactive Development Environment. A software development system. Usually includes an editor, graphical tools, and compiler. InfoBus Software developed by that provides interfaces and protocols that enable applets to exchange data--an “Information Bus.” instance or instantiation A single iteration of a program object. J2SDK JavaTM 2 SDK, Standard Edition, v 1.2. Software used to develop Java programs. Glossary 231 JAR files Java ARchive files. A compressed file format that combines many files into one. JavaBean Also Java Bean. A portable, reusable, platform-independent component used within another application or applet. JDBC Java Database Connectivity. An API for database access that allows database-independent connectivity. JDK 1.0.x or 1.1.x Java Development Kit version 1.0.x or 1.1.x (JDKTM 1.x.x). Software used to develop Java programs. JFC Java Foundation Classes. Includes Swing components and other features used to create GUIs. JRE Java Runtime Environment. Includes the JVM, core class files and other files. Allows end users to run programs written in Java. JVM Java Virtual Machine. The part of the Java Runtime Environment (JRE) that interprets bytecodes. Required to run programs written in Java. legend A table on a chart listing the chart’s series and showing the colors and/or markers corresponding to each. On pie and doughnut charts, legends list categories, not series. line chart A type of chart that shows the changes in data with a fluctuating line. major interval The main set of units into which a chart axis is divided. Ticks, grid lines, and axis labels appear at major intervals. marker An asterisk-style character that can be used to identify data points on line and XY charts. minor interval The secondary set of units into which a chart value axis is divided. Minor intervals appear between major intervals and are marked by ticks and grid lines but not by axis labels. MRJ Macintosh Runtime for Java. Java implementation for the Apple Macintosh computer open-close bar A bar drawn for each category on a line chart between the data point in the first chart series and the data point in the last chart series. pie chart A type of chart that shows each series of data as a circle cut into slices representing data point values. platform A functioning combination of computer hardware and software operating system. plot The main area of a chart that shows the axes, data points, data labels, ticks, grid lines, etc. Charts with studies display the main chart and the study in the same plot. range A nomenclature to specify cells within a worksheet. record Analogous to a row in a worksheet, an ordered set of fields within a database. RSA An key-based encryption system. RSA stands for Rivest, Shamir and Adleman, who developed the system. run time The period when a program is loaded in memory and operating. 232 Formula One for Java User’s Guide second Y axis An axis drawn on the right side of a chart, parallel to the primary Y axis. Second Y axes can be used to plot selected chart series against a different set of values. selected Cell(s) or object(s) made active. series A class of information that is being compared on a chart. Series are often grouped into categories. servlet A component that is executed by the web server’s JVM and provides server-side access to resources to the client. Servlets have no GUI. SQL “Structured Query Language.” A language used in developing, maintaining, and querying relational databases and systems. stack A method of displaying cumulative data on a chart. In a stacked column chart, each series is displayed as a band of color on a column. The heights of the columns represent the cumulative values of all data points in that column. step chart A type of chart that displays each data point as a stair step in a series of stair steps. stock chart A type of chart that displays stock market data. Stock charts usually show the range of prices of a stock over a period of time. string A sequence of characters or words, etc. study A sub-chart drawn below the main chart on the same plot. Each subchart has its own Y axis. Studies are usually used to compare dissimilar data. Swing Also Swing set. An API that contains components to develop a GUI in Java that do not rely on “native code.” Using Swing, the GUI looks the same on all platforms, or can be set to emulate the GUI of its current environment. threads, threading Program instructions that run independently of the program that creates them. tick A short line on a chart axis that marks major and minor intervals. For category axes, ticks separate each category. For value axes, ticks show different values. value axis An axis that displays numbers as values or percents. view Directions for a custom graphical instantiation of a software program. workbook A collection of worksheets within a file. Workbook Designer The GUI of Formula One for Java where user operations (entry of data, formulas, calculations, etc.) are carried out. worksheet Also known as a spreadsheet, a table of values ordered in rows and columns. X gap ratio For column and bar charts, the ratio of the space between categories and the width of the bars themselves. XY (scatter) chart A type of chart that plots two sets of numbers as one series of XY coordinates. 233 Index A About Formula One for Java command (Help menu) 17 Absolute cell references 50 Active cell 34 moving 35 Active worksheet 26 Adjacent (X) option 208 Adjacent axis crosses at category number option 203 Adjacent axis intersects at maximum category option 203 Aligning chart title text 130 data 73 data label text 216–217 headers and footers 122 API documentation 4 Arc button 18 Arc command (Insert menu) 14, 98 Arcs creating 18, 98 formatting 102 moving, sizing, and arranging 109–110 Area charts 152 axes on 192 combining with other chart types 160 data as percentages 188–190 stacking 187–188 Arrow keys 32, 35 Arrows, on line objects 101 Ascending Sort button 18 Autofill lists 54–55 dragging for filling 87 Automatic Layout option, in charts 150 Automatic recalculation 60 Axis 191–209 color of 222 formatting multiple 209 hiding 196 intersection 202–203 logarithmic 204 order of categories and values 203–204 redisplay hidden 196 second Y 205–206 selecting 139 See also Category axis, Value axis Axis labels 137, 196–198 and axis intersection 203 changing 184–185 Axis labels (continued) displaying 197–198 editing 196 for category axes 147 for value axes 197 hidden 198 numbers in 147, 218–219 order of 203–204 with data plotted as percentages 190 Axis scale 193–195 and bubble charts 157 and stacked charts 188 settings 193 with data plotted as percentages 190 Axis titles 137, 213–214 B Bar charts 158–160 axes on 192 bar spacing in 158–159 bars as lines in 160 combining with other chart types 160 data as percentages 188–190 stacking 187–188 varying colors of data points 227 Bar gap ratio 159, 188 Bar spacing, in column and bar charts 158–160 Bold button 19 Borders around a workbook 21 on cells 57, 80–81 Bring to Front command (Format menu) 16, 110 Bubble charts 153–157 axes on 192 bubbles extending off the plot 157 labelling the bubbles 156 overlapping bubbles 156 sizing the bubbles 155, 185 Button button 19 Button command (Insert menu) 15, 98 Buttons creating 19, 98 formatting 106 moving, sizing, and arranging 109–110 234 Formula One for Java User’s Guide C Calculating worksheets 60–62 Cancel Insert Object command (Insert menu) 15, 98 Cascade command (Window menu) 16 Categories in reverse order option 204 Categories, in charts 136, 147–149 and series 181–182 in doughnut charts 163 in pie charts 169 names of 185 Category axis 137, 192 axis scale of 193, 194 hiding, on a chart with study 208 intersection of 202–203 labels in 147, 196–198 changing 184–185 numbered 147 order of categories 203–204 Cell reference, in formula bar 21, 48 Cells active 34 aligning data in 73 attributes of 86 borders on 80, 81 clearing 94 color in 79 copying 86 deleting 93 edit mode 37 entering data in 32 formatting 63–84 inserting 93 moving 86 navigating with the keyboard 35 pasting 86 protecting 32 range of 34 references to 49–53 selecting 34–35 Cells command (Format menu) 15, 56, 58, 64, 67, 72, 73, 79, 80 Cells command (Insert menu) 14, 93 Center Across button 20 Center Align button 20 Chart command (Insert Menu) 14 Chart Data dialog 183 Chart types 127 changing 126 Charts 125–228 categories in 136, 147–149 colors in 221–228 creating 126 Charts (continued) data display options in 179–190 data ranges 126, 145–149, 182–185 default 126 deleting 133 dialog boxes for formatting 143 elements of 136–138 fill color of 223 fonts on 219–220 moving 132 moving elements 141 number formats in 218 outline of 222 printing 133 selecting elements of 138–140 selecting the chart object 139 series in 136, 147–149 sizing 132 sizing elements 141 studies in 138, 206–208 types of 126 undoing formatting 149–150 See also names of chart types Check box button 19 Check boxes creating 19, 98 formatting 104 moving, sizing, and arranging 109–110 Checkbox command (Insert menu) 15, 98 Circular references, solving 61 Clear All command (Edit menu) 13, 94 Clear Contents command (Edit menu) 13, 94 Clear Formats command (Edit menu) 13, 94 Clear Print Area command (File menu) 12 Clear Print Titles command (File menu) 12 Clearing cells 94 Clipboard 86 Close command (File menu) 12 Color button 20 Color palette, setting up 22 Colors automatic 79, 80 in charts 221–228 in custom number formats 70 in fonts 72 in worksheets and cells 78–81 printing 119 setting up the color palette 22 Column Autofit Selection command (Format menu) 15, 75 Column charts 158–160 as stock charts 172 axes on 192 bar spacing in 158–159 Index Column charts (continued) columns as lines in 160 combining with other chart types 160 data as percentages 188–190 stacking 187–188 Column Default Width command (Format menu) 15, 74 Column headings 81–82 allowing users to enter 32 displaying 31 naming 38 printing 119 selecting 39 Column Hide command (Format menu) 15 Column Unhide command (Format menu) 15 Column Width command (Format menu) 15, 75 Columns chart series in 147–149, 183 deleting 93 formatting headings of 81–82 freezing 78 inserting 93 print titles 116 selecting 35, 38 setting widths of 32, 73–77 Columns command (Insert menu) 14 Combination charts 160–162 and studies 175 axes on 192 Command prompt, to run the Workbook Designer 11 Commas, in number formats 68 Common Fixed and General Formats button 20 Conditional values, in number formats 70 Constant values, entering 43–44 Contents and Index command (Help menu) 17 Context menu 142 Copy button 17 Copy Cell Format command (Edit menu) 13, 90 Copy command (Edit menu) 12, 89, 90 Copy Format button 17 Copying data 86–90 formatting 89 Crosses At option 202 CTRL key 99 Currency button 20 Currency, formatting numbers as 65 Custom number formats 67–71 Cut button 17 Cut command (Edit menu) 12, 89, 90, 111 D Data aligning 73 entering and changing 36–37 finding and replacing 90–93 formatting 63–84 imported from a database 95 number formats for 64–71 sorting 94, 95 types of 42 validating 56 Data and Time Format button 20 Data entry 36, 48–57 constant values and 43–44 formulas and 44–62 multi-line 49 Data label lines 218 Data labels 137, 214–218 aligning text of 216–217 displaying 214 editing text in 215 fill color of 223 in bubble charts 156 in doughnut charts 165 in pie charts 171 in XY (scatter) charts 177 moving 141, 217 outline of 222 selecting 139 sizing 141 Data points 136, 180 as percentages 188–190 changing value of 146 colors of 223–224, 227–228 hidden 186–187 labelling 214–218 markers on 225–226 not displaying 152, 162, 171 outline of 222 selecting 139 in area charts 152 in step charts 171 series of 180–181 stacking 187–188 Data ranges, in charts 126, 145–149 changing 182–185 changing values in 146 for bubble charts 153–155 for high-low charts 173 for open-high-low-close charts 174 for stock charts 173–175 for XY (scatter) charts 176–177 235 236 Formula One for Java User’s Guide Data ranges, in charts (continued) headings in 145, 147 series and categories in 147–149 spaceholder cell in 146 Dates entering 43 formatting 66, 68–70 printed in headers and footers 122 Default autofill lists 54 chart 126, 150 column width 74 font 16 look and feel 22 row height 74 worksheet protection 58 Default Font command (Format menu) 16 Delete command (Edit menu) 13, 93 Delete key 32, 37 Delete Object command (Edit menu) 111 Delete Sheet command (Edit menu) 13 Deleting cells 93 charts 133 graphical objects 111 worksheets 33 Descending Sort button 18 Designer Help 4, 17 Digit placeholders, in number formats 67 Displaying formulas 30 items in the Workbook Designer 21 items on worksheets 30 zero values 30 #DIV/0! error message 62 Documentation xiii API 4 conventions xiv PDF files of 4 Dollar sign 43, 50 in number formats 68 Doughnut charts 163–165 and the vary colors option 228 exploding the slices 164–165 labelling doughnuts 165 legends in 163 order of doughnuts 163 sizing the hole 163–164 start angle of slices 164 Drag-and-drop filling from autofill lists using 87 for copying and moving data 87 Drawing and Forms button 18 Drawing and Forms Toolbar 18 Drawing and Forms Toolbar command (View menu) 14 Drawing graphical objects 98 Drop lines 137, 166–167 color of 222 selecting 139 Dropdown list box button 19 Dropdown list boxes creating 19, 98 formatting 102 moving, sizing, and arranging 109–110 Dropdown Listbox command (Insert menu) 15, 98 E Edit menu, in Workbook Designer 12 Edit mode 38, 48 Enable Protection command (Format menu) 15, 59 End key 35 ENTER key 32, 37, 59 Entering data in worksheets 36 Error messages #DIV/0! 62 #N/A 62 #NAME? 62 #NULL! 62 #NUM! 62 #REF! 62 #VALUE! 62 and locked cells 59 creating, with validation formulas 56 Errors entering 44 worksheet formula 62 Escape key 37 Examples of custom number formats 71 of freezing panes 77 of sorting 95 See also names of chart types Excel compatibility xvi, 38 graphical object compatibility 111 password-protected files 38 Exit command (File menu) 12 Explosion percent in doughnut charts 164–165 in pie charts 170 Index F F2 key 37, 48 F9 key 37 File menu, in Workbook Designer 12 Files, Formula One for Java 4 Fill Color button 20 Fill Down command (Edit menu) 13 Fill Right command (Edit menu) 13 Find and replace 90–93 Find button 17 Find command (Edit menu) 13, 91 Find dialog box 90 Fixing rows and columns. See Freezing panes Fonts 72 codes, for headers and footers 122 on charts 219–220 Footers, printing 121 Format Axis dialog 142, 143 Format button 89 Format Chart dialog 143 Format Data Labels dialog 142, 143 Format Data Point dialog 142, 143 Format Drop Lines dialog 142, 144 Format Grid Lines dialog 142, 144 Format High-Low Lines dialog 142, 144 Format Label Lines dialog 142, 144 Format Legend dialog 144 Format menu, in Workbook Designer 15 Format Open-Close Bars dialog 142, 144 Format Plot dialog 144 Format Series dialog 145 Format Title dialog 145 Formats 86 Formatting cells 63–84 charts 126–228 column widths 73–77 copying from cell to cell 89 creating custom number formats 67–71 fonts 72 graphical objects 99–108 headers and footers 122 numbers 64–71 row and column headings 81–82 row heights 73–77 Formatting Toolbar 19 Formatting Toolbar command (View menu) 14 Formula bar 21, 48 Formula Bar command (View menu) 13, 48 Formula One for Java documentation xiii features xv–xvi file extension (VTS) 37 file formats compatible with 37 files 4 installing 5 obtaining 4 version number 17 Formulas allowing entry of 32 and worksheet recalculation 60 cell references in 49–53 displaying 30, 58 entering 44–62 errors in 62 finding and replacing 90 in cells 86 validation 57 Fraction Format button 20 Fractions, formatting numbers as 66 Freeze Panes command (Format menu) 15, 78 Freezing panes 77–78 Function Reference xiii Functions 47 G General number format 64, 65 GIF files, inserting 107 Goto command (Edit menu) 13 Gradient fills, in charts 224 Graphical objects arranging layers of 110 compatibility with Excel 111 creating 98 deleting 111 formatting 99–108 identifying 108 moving 39, 109 naming 109 selecting 36, 39, 99 sizing 39, 110 > (greater than), in documentation xiv Grid lines 137, 201–202 and axis scale 195 color of 222 displaying 31 printing 119 selecting 139 237 238 Formula One for Java User’s Guide H K Headers, printing 121 Headings in the chart data range 145, 147 See also Row headings, Column headings Help displaying 17 files 4 Formula One for Java Designer help 18 Help button 18 Help menu, in Workbook Designer 17 High-low charts 173 High-low lines 138, 166 color of 222 selecting 139 Home key 35 HTML files, opening and saving 38 Keyboard commands 36 navigating and selecting cells using 35 Keys, for sorting 94 I Identifying graphical objects 108 Index list of worksheets 29 Insert Chart button 18 Insert menu, Workbook Designer 14 Insert Picture button 18 Inserting cells 93 charts 126 columns 93 GIF files 107 graphical objects 98 JPG files 107 rows 93 worksheets 27–28 Installing Formula One for Java 5 Intersection, of axes 202–203 Italic button 19 Iteration 61 J Japanese locale 69 Java Software Developers Kit (SDK) 5 Virtual Machine (JVM) 11 Javadoc API documentation 4 JavaHelp 4 JPG files, inserting 107 L Label lines 138 selecting 140 Labels. See Data labels, Axis labels Left Align button 20 Legends 131–132, 136 adding 131 fill color of 223 formatting options 132 in bubble charts 154 in doughnut charts 163 in pie charts 169 in XY (scatter) charts 176 moving 131, 141 outline of 222 selecting 140 sizing 132, 141 text in 132, 147, 184–185, 227–228 Length Ratio option 208 Licensing Formula One for Java 4 Line button 18 Line charts 166–168 as stock charts 172 axes on 192 combining with other chart types 160 data as percentages 188–190 stacking 187–188 varying colors of data points 227 Line command (Insert menu) 14, 98 Line feeds, cell entries and 49 Lines creating 18, 98 creating arrows on 101 formatting 100 in charts in bar and column charts 160 in combination charts 160 in XY (scatter) charts 175, 177 moving, sizing, and arranging 109–110 Linked to Current Datasource option 219 Locking cells 58 Logarithmic value axes 204 Logical values, entering 44 Look and feel 22 Index M Major divisions, on chart axis 193, 195 Major grid lines 201 Major Grid option 201 Major ticks 199 Margins, setting 120 Markers, in charts 137, 225–226 in line charts 166 in open-high-low-close charts 174 in XY (scatter) charts 175 Markers, type 57 Maximum option, on chart axis 193 Menus, in Workbook Designer 12–17 Minimum option, on chart axis 193 Minor divisions, on chart axis 193, 195 Minor grid lines 201 Minor Grid option 201 Minor ticks 199 Model/View/Controller architecture xv Mouse actions of 38 entering cell references with 50 selecting cells with 34–35 Move Ranges by Dragging checkbox 88 Moving active cell 35 chart elements 141 charts 132 data 88 drag-and drop for 87 menu commands for 89 graphical objects 109 Multi-line data entry 49, 73 N #N/A error message 62 Name command (Insert menu) 14, 54 #NAME? error message 62 Names defining 54 for graphical objects 109 for worksheets 29, 38 in headers and footers 122 Navigating in worksheets 38 Negative numbers 43 New button 17 New command (File menu) 12 New Window command (Window menu) 16 #NULL! error message 62 #NUM! error message 62 Number formats in charts 218 239 Number of categories between labels option 194 Number of categories between ticks option 194 Numbers as constant values 43, 44 as currency 65 as dates 66 as fractions 66 as percentages 66, 68 as times 66, 69 converted from text 45 formats for 64–71 in charts 218–219 in scientific notation 66, 68 O Object command (Format menu) 16, 100, 101, 102, 103, 105, 106, 108, 109 Objects. See Graphical objects Open button 17 Open command (File menu) 12 Open-close bars 138, 167–168 fill color of 223 outline of 222 selecting 140 Open-high-low-close charts 173, 174 Options command (Tools menu) 16, 21, 22, 55, 60, 61 Oval button 18 Oval command (Insert menu) 14, 98 Ovals creating 18, 98 formatting 102 moving, sizing, and arranging 109–110 P Page Break command (Insert menu) 14, 117 Page breaks 117 Page Down key 35 Page number, in headers and footers 122 Page Setup command (File menu) 12, 118, 119, 120 Page Up key 35 Panes 77 Paste button 17 Paste command (Edit menu) 12, 89 Paste Special command (Edit menu) 13, 90 Percent option, in charts 188–190 in line charts 168 Percent signs 43, 44 Percentage Format button 20 Percentages, formatting numbers as 66, 68 Picture command (Insert menu) 14 240 Formula One for Java User’s Guide Picture Object command (Insert menu) 98 Picture objects creating 18, 98 inserting images in 107 moving, sizing, and arranging 109–110 Pie charts 169–171 and the vary colors option 228 exploding the slices 170 labelling pies 171 legends in 169 order of pies 171 sizing the pies 169 start angle of slices 170 Plot Series on Axis option 208 Plots 136 and chart studies 207 fill color of 223 moving 141 outline of 222 selecting 140 sizing 141 + (plus sign), in documentation xiv Polygon button 19 Polygon command (Insert menu) 14, 98 Polygon point editing 107 Polygon Point Editing button 19 Polygon Points command (Edit menu) 13, 107 Polygons creating 19, 98 formatting 19, 102, 107 moving, sizing, and arranging 109–110 reshaping 107 Preferences command (Edit menu) 13 Preferences, setting 22 Print area 116 Print button 17 Print command (File menu) 12, 114 Printing headers and footers 121 page breaks 117 setting margins 120 setting print area 116 titles 116 worksheets 114 Protecting cells 32, 58 Ranges (continued) references to 46 selecting and moving 39 Reading workbooks 37 Recalculate command (Tools menu) 16 Recalculation 60–62 automatic 60 function key for 37 Rectangle button 19 Rectangle command (Insert menu) 15, 98 Rectangles creating 19, 98 formatting 102 moving, sizing, and arranging 109–110 Redo button 18 Redo command (Edit menu) 12 #REF! error message 62 References, solving circular 61 Relative cell references 50 Remove Page Break command (Insert menu) 117 Replace command (Edit menu) 13, 91 Replace dialog box 91 Reset entire chart to defaults option 150 Right Align button 20 Row Default Height command (Format menu) 15, 74 Row headings 81–82 allowing users to enter 32 displaying 31 naming 38 printing 119 selecting 39 Row Height command (Format menu) 15, 74 Row Hide command (Format menu) 15 Row Unhide command (Format menu) 15 Rows chart series in 147–149, 183 deleting 93 formatting headings of 81–82 freezing 78 inserting 93 print titles 116 selecting 33, 35, 38 setting heights of 32, 73–77 Rows command (Insert menu) 14, 93 Running the Workbook Designer 11 R S Ranges 34 allowing dragging of 32 filling 54 pasting to 86 Save As command (File menu) 12 Save button 17 Save command (File menu) 12 Saving workbooks 37 file formats for 37–38 Index Scatter charts. See XY (scatter) charts Scientific notation, formatting numbers as 66, 68 Scroll bars, displaying 31 Searching for data 90–93 Second Y axis 205–206 and stacked series 188 on a study 207 Select All Objects command (Edit menu) 13, 99 Selecting 34–36 allowing and disallowing 33 and the chart context menu 142 cells 34–35 chart elements 138–140 columns 38 entire worksheet 38 graphical objects 36, 39, 99 ranges 34–35 row and column headings 36 rows 38 rows and columns 35 using the mouse 38 worksheets 26 Send to Back command (Format menu) 16, 110 Series type, in combination charts 161–162 Series, in charts 136, 147–149, 180–181 adding 184–185 and categories 181–182 deleting 184–185 fill color of 223 hidden 186–187 in combination charts 161–162 in doughnut charts 163 in pie charts 169 labelling 214–218 markers on 225–226 names for 147, 184 on studies 208 open-close bars on 167, 174 order of 186–187 plotting as percentages 168, 188–190 selecting 140 stacking 187–188 vary colors within 227–228 Set Print Area command (File menu) 12, 116 Set Print Titles command (File menu) 12, 116 Sheet Properties command (Format menu) 15, 30, 32, 78 SHIFT key 37 Shift key 59, 99 Show bar as line option 160, 167, 175 Show Label Lines option 218 Sizing chart elements 141 charts 132 columns 73–77 graphical objects 39, 110 rows 73–77 Solaris installing Formula One for Java on 5 running the Workbook Designer on 11 Sort command (Edit menu) 13, 94 Sorting data 94 Spaceholder cell 146 Stacking series in charts 187–188 in line charts 168 with data plotted as percentages 189 Standard Toolbar 17 Standard Toolbar command (View menu) 13 Start angle in doughnut charts 164 in pie charts 170 Step charts 171–172 axes on 192 combining with other chart types 160 data as percentages 188–190 stacking 187–188 Stock charts 172–175 and studies 206 combination charts as 161 Strings, finding and replacing 90 Studies, in charts 138, 206–208 and stacked series 188 displaying series on 208 in combination charts 161 in stock charts 172 number of 207 quick guide for creating 207 size of 208 T TAB key 32, 37, 59 Tabs, worksheet 21 Technical Guide xiii Text entering 43 finding and replacing 90 Ticks 137, 199–200 and axis scale 195 Tile command (Window menu) 16 Tile Horizontal command (Window menu) 16 Tile Vertical command (Window menu) 16 241 242 Formula One for Java User’s Guide Times entering 43 formatting numbers as 66, 69 printed in headers and footers 122 Titles, in charts 129–130, 136 aligning text of 130 editing 129 fill color of 223 formatting options 130 moving 141 outline of 222 selecting 140 sizing 141 Toolbars 17–20 Tools menu, in Workbook Designer 16 TXT files, opening and saving 37 Type markers 21, 57 U Underline button 20 Undo 23 button 18 command 12 Undo command (Edit menu) 12 URL, inserting pictures with 107 Use Weighting check box 165, 169 User’s Guide xiii V Validating data 56 Value axis 137, 192 axis scale of 193, 195 intersection of 202–203 labels in 196–198 number formats 218–219 order of values 203–204 with data plotted as percentages 190 #VALUE! error message 62 Values 42–44, 86 finding and replacing 90 Values in reverse order option 204 Vary Colors option 227–228 in doughnut charts 165 in pie charts 171 View menu, in Workbook Designer 13 Views 10–11 settings retrieved from workbooks 37 Volume charts, in stock charts 173, 174–175 VTS files, opening and saving 37 W Windows 95, 98, NT installing Formula One for Java on 5 running the Workbook Designer on 11 Windows command (Window menu) 16 Workbook Designer displaying parts of 21 Edit menu in 12 File menu in 12 Format menu in 15 Help menu in 17 illustration of 10 Insert menu in 14 keyboard commands 36 menus 12–17 mouse actions 38 running 11 toolbars 17–20 Tools menu in 16 View menu in 13 Workbooks deleting worksheets from 33 description of 10 index list of worksheets in 29 inserting worksheets in 27–28 manipulating 26 reading 37 saving 37 selecting worksheets in 26 writing 37 Worksheet command (Insert menu) 14, 27, 28 Worksheet functions 47 Worksheets active 26 aligning data in cells 73 appending 28 calculating 60–62 color in background 78 in cells 79 controlling usage of 31 data entry in 36, 48–57 constant values in 43–44 formulas in 44–62 multi-line 49 data types in 42 defining names in 54 deleting 33 description of 10 displaying items on 30 editing 85 formatting 63–84 Index Worksheets (continued) index number of 29 inserting 27–28 keyboard commands in 36 manipulating 26 naming 29 navigating in 38 number formatting 64–71 page breaks in 117 protecting 58 selecting 26 selecting all cells in 38 sorting data in 94 tabs, location of 21 using the mouse with 38 working with multiple selected 30 Writing workbooks 37 X X axis 137 See also Category axis X gap ratio 159, 168 XLS files, opening and saving 37 XY (scatter) charts 175–177 axes on 192 Y Y axis 137 See also Value axis, Second Y axis (Y) Axis Count text box 207 Z Zero values, displaying 31 Zoom command (View Menu) 14 Zooming in and out in printing 118 in viewing 14, 31 243
© Copyright 2026 Paperzz