SimpleChart Style Xdialog

Description

The SimpleChart style Xdialog displays numeric data in the form of a bar, pie, or line chart. To create a list view style Xdialog.

  1. Create a new Action Script.

  2. Select "Xdialog Windows" in the Category list.

  3. Select "Display an XDialog Box" in the Action list.

  4. Click OK to display the Script Genie.

  5. Enter the name of new variable in the Variable Name field.

  6. Optionally, change the value of the Prompt field.

  7. Optionally, change the selection in the data Type list.

  8. Select "SimpleChart Control" in the Style list.

  9. Set the Width and Height of the resulting dialog box.

  10. Click Define SimpleChart Control to display the SimpleChart Genie.

  11. Continue with Data_Selection.

    images/AS_SimpleChart_Bar_Setup.gif

Data Selection

  1. Make a selection in the Data Selection > Chart Type list. The options are:

    • "Bar Chart"

    • "Line Chart"

    • "Pie Chart"

  2. Make a selection in the Data Selection > Populate from list. The options are:

    • "Static list"

    • "Alpha Anywhere Table (.DBF)"

  3. If you chose "Static list" in step 2:

    • Click the '...' button in the Data Selection > Static data field to display the Static List dialog.

    • Optionally, redefine the Column delimiter character.

    • Enter the data to be displayed in the chart, one entry per line. The data should be formatted . The must be numeric.

    • Press OK to continue.

  4. If you chose "Alpha Anywhere Table (.DBF)" in step 2:

    • Make a selection in the Data Selection > Populate style list. The options are:

      • "Multiple Rows, Single Field" - labels come from the data

      • "Multiple Fields, Single Row" - labels comes from the field names. This picture illustrates how 2 fields from multiple records are used for multiple rows, single field

        images/Multiple_Rows_Single_Field.gif
      • This picture illustrates how 1 record is used for multiple fields, single row

        images/Multiple_Fields_Single_Row.gif
    • Make a table selection in the Data Selection > Alpha Anywhere table list.

    • If you selected "Multiple Fields, Single Row" in step 4, click the '...' icon in Data Selection > Fields to select the fields to display in the Select Fields dialog.

    • Optionally, click the '...' icon in the Data Selection > Argument field to display the Define Arguments dialog. This allows you to prompt the user for values or read values from variables. You can use these values (arguments) in the Data Selection > Filter expression field.

    • Optionally, enter an expression that limits the records to display in the Data Selection > Filter expression field. Optionally, click to use the Expression Builder to help you define an expression that evaluates to a logical value.

    • Optionally, enter an expression that orders the records to display in the Data Selection > Order field. Optionally, click to use the Order Builder to help you define an expression that incorporates at least one field name.

    • If you selected "Multiple Rows, Single Field" in step 4, click the '...' icon in Data Selection > Get labels from field to select a table field.

    • If you selected "Multiple Rows, Single Field" in step 4, click the '...' icon in Data Selection > Get data from field to select a table field. This must be a numeric field.

  5. In the Options > Chart Caption field enter the title that will appear at the top of the chart.

  6. In the Options > Show Legend field select whether you want to show the data legend.

  7. If you selected "Bar Chart" or "Line Chart" in step 1, in the Options > Series Label field enter the description of the values shown on the vertical axis.

  8. In the Options > Legend Position list select the position of the legend. The options are:

    • "Top"

    • "Bottom"

    • "Left"

    • "Right"

  9. Optionally, click Preview to see how the chart will appear.

  10. Click OK to continue.

  11. Finish the Dialog Definition

    Click Next >.

  12. Optionally, enter the title of the dialog box in the Dialog Title field.

  13. Optionally, enter text to appear at the top of the dialog box into the Header Text field.

  14. Optionally, enter text to appear at the bottom of the dialog box into the Footer Text field.

  15. Optionally, modify the bottom labels in the Button Text fields.

  16. Click Next >.

  17. Optionally, modify the name of the variable in the Variable Name field that will capture the return value of the Xdialog box.

  18. Optionally, change the Scope of the return variable to one the following values. A variable's scope refers to where the variable can be seen, i.e. which other scripts can access the variable.

    • "Shared". Variables are available throughout the current form.

    • "Global". Variables are available anywhere in Alpha Anywhere.

    • "Local". Variables are available only in the current script.

  19. Click Next >.

  20. Optionally, modify the comment that describes the action.

  21. Click Finish.

See Also