...
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:
Notes:
- 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.
...
chart overlay - If the property is set to true, then the chart background color will depend on the chart type. Otherwise, the chart background color will be transparent. Read further in the FusionCharts setTransparent method.
...
- You may specify inline javascript code:
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:
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. User defined functions can be defined in Custom External Javascript.
Chart Data
One way to define the data presented on the chart is by setting the names and values from within Visual Designer. Defining data this way, the names and values fields are comma-separated lists, and the lists must be the same length. Note, however, that only single-series charts are supported when chart data is supplied this way.
...
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.
Database-Driven Chart
Another method to generate dynamic charts is by specifying a database file to drive the data. This is a fairly simple way to connect a chart widget to a database–no XML or JSON need be generated by your RPG program. However, database-driven charts can only display a single data series. (For multi-series charts, see the Dynamic Chart section below.)
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.
...
chart url json - Specify the URL of a web-service that returns chart data as JSON text. (Available with Profound UI versions Version 5., Fix Pack 7.0 and later.)
For any of the four properties under the Dynamic Chart category, you must only use one. Furthermore, these methods should not be used in conjunction with the Chart Data properties (i.e. names/values), nor should Database-Driven chart be used with these properties.
...
Normally you can preview a design by clicking Launch > Launch Preview..., and a preview will open in a new tab. With Database-Driven charts, however, the preview cannot connect to a database file because it doesn't know the library. You will need to save and compile the display file, and then create an RPG program to drive the page. Your program may be as simple as this: