KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Choosing between the CT Chart selection and CT Chart data commands
PRODUCT: 4D Chart | VERSION: | PLATFORM: Mac & Win
Published On: June 16, 2000
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

There are three commands in 4D Chart that you can use to create a graph:

CT Chart arrays
CT Chart selection
CT Chart data

The command CT Chart arrays builds a graph out of data stored in arrays.

If you want to create a graph directly from data stored in records, you can choose from either the CT Chart selection or the CT Chart data commands. Which should you pick?

You'd choose between these two commands based on how the data to be graphed is stored in your records.

When you want the values in several fields in your records to each appear in a separate curve on the graph, use "CT Chart selection".

Use "CT Chart data" when all the values to be graphed will come from one field, and the curve that each value falls on will depend on the entry in the specified Series field of the record.

For example, let's suppose you're graphing stock market activity.

If you design the database structure so there is one record for each day of stock market activity, and use separate fields in each record for the different stocks you're tracking, then you'd use "CT Chart selection" to graph the records.

If you design the table structure so that there is one record for each price quote, and each record contains a field for the date (4D Chart's "Category"), the stock name (4D Chart's "Series"), and the stock price (4D Chart's "Values"), then you'd use "CT Chart data" to graph the records.