chart type - Specify the type of chart with this property. The most common types included in the designer's drop-down list are: Column3D, Column2D, Bar2D, Line, Area2D, Pie2D, Pie3D, and Doughnut3D.
There are also dozens of other chart types available. To specify a different type, click on "Other..." in the drop-down. The list becomes a text-box, and you can enter another chart type.
All available types are listed in the FusionCharts List of Charts.
As a simple example, you may disable chart animation by including the following property in chart options:
- Animation makes charts fancier but causes pages to load more slowly. Also, because the chart is loaded first, slow charts cause other elements on your page to load slowly.
- If you are using RPG to generate the chart XML or JSON, then this field is ignored.
With inline code, a variable named "name" is automatically defined and set to the name of the data column/bar/point that was clicked.
2. Create an anonymous function:
When using a function to handle the click, the first parameter is assigned with the name of the data column/bar/point that was clicked.
3. Specify a user-defined function:
values - Specify the value for a column/bar/point. This is the dependent variable.
2D Column Chart Example:
Hint: it is possible to create a dynamic chart by binding the names and values properties to your RPG program. However, other methods may better suit your needs.
To start, enter an existing data file into the database file property:
Next, specify a column for the name field. Click on the ellipses to display a helper dialog box:
If the database file is found in your library list, then a helpful dialog box appears:
If instead of a helpful dialog box you get an error message like this,
then you may need to modify the Library List by clicking the "Library List..." button:
Once you see the helpful dialog box, choose a column to be used for the name field. Data from this column becomes the independent variable in the chart; e.g. for a bar chart the data becomes the bar names.
Next, choose a database column to supply the chart values. Click on the ellipses icon in the value field property
You'll see a helpful dialog box for choosing the Value field, and you can pick one:
Choose a column and click OK.
summary option - Determines how values are used when creating the chart.
- none: No aggregation will be done. Same as leaving the field empty.
- average: Finds the average dependent value corresponding to each name field value.
- count: Counts the number of duplicate name field values within your data (ignores the value field).
- sum: Shows the sum of the dependent values for each name field value.
- maximum: Compares maximum dependent values among name field values.
- minimum: Compares minimum dependent values among name field values
selection criteria - You can limit the query results by adding SQL expressions to this property:
You can also use parameter markers in the expression in conjunction with the parameter value property. Specify a marker using a question mark.
parameter value - Specify a value for a parameter marker used in "selection criteria" property. Profound UI will accept any parameter marker values which are not bound to program fields. Parameter markers are numbered in order of occurrence, from left to right
To specify multiple parameter marker values, right-click the "parameter value" property and select Add Another Parameter Value:
record limit - Specify a limit on how many records are used in the chart; e.g. 5.
order by - Specify which fields determine the order of the items. This property is ignored when "summary option" is used.
Click the ellipses to use a helper dialog box for choosing a column.
Click on the text "chart xml" to display the Binding button:
Click the Bind button to display a binding dialog:
Put in a field name that the RPG program will write to; e.g. CHARTXML. Use Character data type and use a length large enough to hold the XML you will generate; e.g. 10000.
Press OK, and you should see the chart xml property is bound to CHARTXML. (The green text indicates that the property is bound.)
With that property bound, your RPG program can write to the CHARTXML field, and that data will be used to generate the chart widget when the page loads.