Creating basic charts

You can create charts dynamically based on an external data source. Using the Basic Chart object from the Generator palette, you can create a variety of charts, including the following types: bar, line, area, and scatter.

The columns of the data source vary depending on the type of chart you want to generate.

Line and area charts require a Value column. The value specifies the relative height of a point in the chart.

Bar charts also require a Value column. The value specifies the relative height of the bar. You can optionally provide a Color column. You can also include the following columns: URL, Window, Goto, Gotolabel, and Hlabel. URL can be any valid URL. Window can be one of the following values: _self, _blank, _parent, or _top. Goto is a frame number in the parent timeline. Gotolabel is a label in the parent timeline. Hlabel is the text for the label on the horizontal axis. Adding URL, Goto, or Gotolabel makes the bar a button that jumps to the specified location when the user clicks it.

Stacked bar, stacked area, and stacked line charts require a Color column and a series of Value columns (value1, value2, ...., valuen).

Scatter charts require X and Y columns. A Symbol column can be included to plot points with symbols. If symbols are not used, the points are plotted with dots. You can also specify a Color column, which is used for the system default shape and the Hlabel column, which defines the text for the label on the horizontal axis.

Basic charts have the following properties in the Generator inspector:

Note: Each property is supported by all chart types unless otherwise noted.

Data Source specifies the file name, relative or absolute URL, database connection URL, or Java class URL from which Generator will obtain the data. You can specify multiple data sources when creating line or scatter charts by entering a semicolon-delimited list of data sources.

Chart Type specifies the type of chart to create.

Symbol is the name of the symbol in the library to use for plotting points in scatter charts. See Identifying symbols in the library for more information.

Max Data Entries controls the number of values displayed in the chart (both the maximum permitted and the minimum number for which space is allotted). For example, if Max Data Entries is set to 10, no more than the first 10 values from the data source are plotted in the chart, and the remaining values in the data source are ignored. If Max Data Entries is set to 10 and only 5 values are provided, Generator renders those five values provided in the first half of the chart only. When set to Default or left blank, Max Data Entries has no effect on the chart; the number of values in the data source are displayed in the full width of the chart. Applies to all chart types except scatter.

Gap sets the amount of space to appear between objects plotted in the chart (bar). Each unit is equal to 1/20 of a pixel. Applies to bar and stacked bar charts only.

3D Depth specifies the amount of depth to render in the chart (how deep data are plotted along the Z-axis). Each unit equals 1/20 of a pixel. Applies to all chart types except scatter.

Labels specifies whether labels should appear along the Y axis of the chart.

Label Format sets the font to use for the chart labels along the X and Y axes.

Horizontal Label Orientation specifies whether the orientation of labels along the X axis of the chart is vertical or horizontal. Requires an Hlabel column in the data source.

Horizontal Label Scale specifies the size of the label. The label can be scaled to fit the chart element (Scale to Fit) or displayed at the symbol size (Fixed). Half and Double display the symbol at half or double its original size, respectively. You can also enter a numerical scale factor to apply to the symbol. For example, entering 0.25 scales the label to one-quarter of the symbol size.

Value Display specifies whether the numeric value data should appear in the chart (Always or Never), or whether it is visible only when the pointer is over the chart area (Rollover). Applies to bar, stacked bar, and scatter charts only.

Value Scale indicates whether or not the text that displays the value data, when Value Display is set to Always or Rollover, should scale to fit within the chart element's area or within a fixed size. Applies to bar, stacked bar, and scatter charts only.

Value Format sets the font to use for the chart value labels appearing within the body of the chart. Applies to bar, stacked bar, and scatter charts only.

Value Placement specifies where value labels should be positioned within a bar chart. Applies to bar, stacked bar, and scatter charts only.

Symbol File specifies the path to an external Generator template containing the symbols to use for chart labels and values. If you are creating a scatter chart and use position labels, you must specify a symbol file. If Labels is set to On, the file must have a symbol named chartLabel1 containing the variable {label}, and chartValue1 with the variable {value} for values. Labels are available to all chart types; values are available to bar, stacked bar, and scatter charts only.

Grid Lines specifies whether or not grid lines are displayed behind the chart elements.

Grid Scales has Generator calculate the number and position of grid lines automatically (Auto) or calculate the position for the number of grid lines specified by the Major and Minor Gridlines properties (Manual).

Major Gridlines specifies the number of the bolder gridlines that are drawn in the chart when Grid Lines is set to On and Grid Scales is set to Manual.

Minor Gridlines specifies the number of lines between the bolder gridlines that are drawn in the chart when Grid Lines is set to On and Grid Scales is set to Manual.

Min Y-Pos Type specifies the minimum value of the chart (Absolute), or adjusts the chart's minimum value to the data by calculating a minimum value as a function of the range that the data spans (Relative Percent). When Relative Percent is specified, the minimum value on the chart is the difference between the data's maximum and minimum values multiplied by the percentage specified for Min Y-Pos. This calculation is according to the following formula:

Minimum chart value = Minimum value - (Maximum value - Minimum value)* Min Y-Pos

Min Y-Pos is an integer value specifying the lowest value represented in the chart when Min Y-Pos Type is set to Absolute. When Min Y-Pos Type is set to Relative Percent, the value for Min-Y Pos is the percentage that Generator uses to calculate the minimum value for the chart.

Max Y-Pos Type specifies the maximum value of the chart (Absolute) or adjusts the chart's maximum value to the data by calculating a maximum value as a function of the range that the data spans (Relative Percent). When Relative Percent is specified, the maximum value on the chart is the difference between the data's maximum and minimum values multiplied by the percentage specified for Max Y-Pos. This calculation is according to the following formula:

Maximum chart value = Maximum value + (Maximum value - Minimum value)* Max Y-Pos

Max Y-Pos is an integer value specifying the highest value represented in the chart when Max Y-Pos Type is set to Absolute. When Max Y-Pos Type is set to Relative Percent, the value in Max-Y Pos is the percentage that Generator uses to calculate the maximum value of the chart.

Origin specifies the positioning of the values equaling zero in the chart. Positive values permit all values in the chart to be shifted above the bottom line of the X-axis in the chart by the specified amount. Negative values shift values down toward the bottom line of the X axis by the specified amount. Applies to all chart types except stacked bar.

Border toggles a bounding rectangle around the chart object displayed in the color value specified in the Color property.

Border Thickness specifies the width of the chart object's border and major gridlines. Each unit equals 1/20 of a pixel.

Line Thickness specifies the width of lines that display data in the chart.

Color sets the Web-safe color name (for example, black), Web hexadecimal value (for example, #3434aa), or regular hexadecimal value (for example, 0x232356) of the color for the chart. For bar, stacked bar, stacked area, stacked line, and scatter chart types this value applies only to the gridlines and borders of the chart. For line and area styles, this value is also used to render the chart line or filled area of the chart.

Instance Name identifies the instance of the object so that it can be used with actions such as Tell Target and Set Property. See Using variables as parameters for Flash actions for more information on using this parameter.