Chart Script dialog

The Chart Script dialog specifies which variable data will be displayed in a chart and shows a preview of both the chart (on the right hand side) and the data (at the bottom). This dialog is one of the parts of the Insert Chart wizards. It can be reopened by double-clicking the relevant script in the Scripts pane.

For more information about charts, see: Business graphics.

These are the options in the Chart Script dialog:

  • Name: The name of the script, making it easier to identify it.
  • Selector: The Selector or Text to apply the script to.
    • Selector: Uses CSS selectors to find the element to which the script applies. (See also: Selectors in Connect.)
    • Text: Uses text as a trigger for the script. The script applies to all instances of the text found in the template.
    • Selector and Text: Uses text within the specified Selector as a trigger for the script.
  • Input Type: Use the drop-down to select the source of the data to add to the Chart.
    • Data fields: Select to use fields at the record level in the Data Model.
    • Data table: Select to use fields in a detail table. At least one detail table must be available in the Data Model Pane for this option to be functional.
      • Detail table: Use the drop-down to select one of the detail tables that are part of the Data Model.
      • Category: Use the drop-down list to select the data field (in the selected detail table) of which the values will appear under the bars or the line; in other words, on the x axis.
  • Values: Select data fields with a numerical value.
    • Column: Removing the topmost check deselects all data fields.
    • Labels: Click the label to enter a new label for a field. It depends on the Input Type where the labels appear: with Data Fields, the labels appear under the x-axis of the chart; with a Data Table, labels appear in the Legend.
    • Color: Click on the color to open the Color Picker dialog (Color Picker) and select a different color.

    Buttons next to Values:

    • The Toggle non-numeric fields button filters non-numeric fields from the list. The list will then display only Integer, Float and Currency data fields.
    • The Move Up and Move Down buttons change the order of the fields, which is reflected in the chart.
  • OK: Click to save any changes made to the script, apply the changes in the template, and close the dialog.
  • Cancel: Click to close the dialog without saving changes.
  • Expand: Click to convert the script generator to a regular script. Note that this action is not reversible once the regular script has been saved.
    The expanded script will use either double or single quotation marks, depending on the Preferences (Window > Preferences > Scripting; see Scripting Preferences).
  • Apply: Saves changes made to the script and applies the changes in the template without closing the dialog. Note that the effect will only be visible on the Preview tab in the Workspace.

Expanded Script window

When expanded, the Script window replaces all parts of the wizard below the Selector by a box in which the script can be typed. See Writing your own scripts.

For an overview of keyboard shortcuts that can be used in this script editor, see Keyboard shortcuts.