Chart Portlets

From MT Marvelit
Jump to: navigation, search

Chart-based reports are displayed using the MarvelIT Chart Portlet.

Select Datasource: The datasource used to execute the query for this report.

Select from Saved Query: A list of saved queries (from the Chart table).

Parameter List: List of Parameters, separated by a space. Is available when selecting a saved query. See Parameter section below.

Title: Title of the chart.

Width: Sets the width of the chart.

Height: Sets the Height of the chart.

URL: A hyperlink to a web, portal, wiki or other page that will be displayed upon clicking the displayed chart. See Creating Click Throughs on how this field could be used.

Target - determines the desired action on a click thru on this chart. Values are: _blank - the target URL will open in a new window - _self - the target URL will open in the same frame as it was clicked - _parent - the target URL will open in the parent frameset - _top - the target URL will open in the full body of the window

Category Parameter - enter a variable name to be used on a chart click thru. If you specify a variable here and you click on a specific part of a chart - the category value will be passed as part of the URL to the next page. See Creating Click Throughs for additional information

Series Parameter - same as the Category Parameter - but enter a different name to pass the series - see above link for additional details

XML Descriptor: Field for entering XML formating for the chart. See Format Portlets using XML for additional information on XML formatting.

Saved Chart Name: Name of the chart (displayed in the Saved Query list). Admin only.

SQL: SQL Query used to populate the chart. Admin only.

Chart Type: List of chart types supported by the Chart Portlet. Admin only.

Orientation: Chart Orientaion - Horizontal or Vertical. Only will display if selected Chart Type has more than 1 available orientation.

Display Details: Display SQL Results as a report above or below.

Cancel: Cancel changes and display the chart. If a new chart - will display an empty chart portlet.

Save: Save changes and display the chart.

Available Chart Types

The Chart type pulldown menu has the following types of charts available:


Each of these chart types have specific types of sql that needs to be used. For example: The pie chart will contain values and 1 set of numbers to be charted. If the SQL returns two sets of numbers than an error will be displayed.

Here is a chart that displays the number of columns to be returned by SQL for each Chart Type:

To be Completed

Completed Chart Portlet


Here is a completed Completed Chart Portlet. Several things to point out:

Parameters: Entering Valid Lever Names ( see Levers Portlet ) in the Parameter List field - causes the portlet to refresh and fields are displayed for entering default values for each lever. In this example: the wildcard for the database is entered. Any value for that particular lever can be entered as a default value.

Parameters in SQL: The Levers are entered into the example SQL as follows:

  • where FClass like '$P{FClass}' and Org1 like '$P{Org1}' and Org2 like '$P{Org3}' and Org3 like '$P{Org3}
  • When the pane is displayed - those levers will appear at the top of the pane. Selecting values for them and clicking the GO button - will cause the portlet to refresh and the lever values will be used in the SQL statement.


  • Like is used in the where clause for the use of the wildcard selection. If your lever does not include a wildcard value - you can use the equal condition.

Combination Charts: The SQL entered demonstrates the creation of a combination chart. This is accomplished by entering two sql statements seperated by a ;. The first chart will use the Chart Type field in the portlet as it's format. The second chart will always be a line chart. XML can be used to specify formatting examples for combination charts. See Format Portlets using XML for information about XML formatting.

Here is the displayed chart from the Chart Portlet example: