Content

chartgizmo

Description

Example

Properties

Description

The chartgizmo renders a chart graphic in a Dashboard Page Type.

a.

You can use a predefined measurement SDI, or enter your own SQL. When entering your own SQL, return both a measurecategory column (varchar) and a measurevalue column (number).

b.

If you are using the date chart, return a measuredate column (date) rather than the measurecategory column.

c.

Use the "Refresh every" property to set how often the Gizmo queries the database and updates the chart. The update is initialized off screen (for smooth updating). Refreshing the Gizmos keeps the current LabVantage connection alive. However, frequent refreshes may reduce system performance.

NOTE:   The chartgizmo is rendered using the DataChartPage Page Type. This extends the chartgizmo capabilities by revealing the additional capabilities of the DataChartPage Page Type and JFreeChart.

Example

chartgizmo Properties

Property Name Description
Gizmo Properties Defines high-level characteristics of the gizmo:
Property NameDescription
title title of the gizmo.
Tab IdIf using tabs, specify an identifier for the tab. If not using tabs, leave this blank. If you leave this blank and you are using tabs, the gizmo will not be displayed.
Show GizmoYes/No shows/hides the gizmo.
WidthWidth of the gizmo in pixels.
HeightHeight of the gizmo in pixels.
Enable ResizeYes/No allows/prevents resizing of the gizmo.
Refresh on Timer Every (sec)Time (in seconds) between window refreshes.
Options Details concerning properties that appear on options dialogs:
Property NameDescription
Property Id Identifier of the property that appears on an options dialog. If this is in a collection or property list, include the full path using the dot character (.) as a separator.
EditableNo disables editing of the property, but it will still be visible.
Query Type Determines the Query Mode. Which properties to use when building the query in order to run the Gizmo. If not provided defaults to SQL.
Property NameDescription
SDI ListAn SDI List Query runs a basic one dimensional query on the SDC specified. It uses the same SDIRequest API as used in the List page/element. Full SDI level security and ActiveFlag is considered. However this query type cannot be used to run groupbys or or complex aggregate queries.
SDI AggregateThis query type combines the powers of the SQL query with the security and simplicity of the SDI List query. It allows property driven queries to be built but runs it through the LabVantage security layer so that rows returned are only returned if the user has access to them. ActiveFlag is also considered.
SQLSQL Query. A simple query that returns two columns, Measurecategory and Measurevalue.

Example:

select s_productid as measurecategory, count(s_sample.s_samplid) measurevalue from s_product, s_sample where s_product.productid=s_sample.productid

 

You can also use parameters in the SQL:

select s_productid as measurecategory, count(s_sample.s_samplid) measurevalue from s_product, s_sample where s_product.productid=s_sample.productid AND s_sample.sampletypeid='[sampletype]'

MonitorOptionally choose a monitor SDI set up. You can use a scheduled task to update a value which will be used to render the meter.

Note: This is not a recommended way to monitor for changes in the system but has been left for backward compatibility.

Chart title title of the chart.
Chart Type Type of graphical representation for display of the retrieved data (Pie Chart, Pie Chart 3D, Bar Chart, Bar Chart 3D, Line Chart, Line Chart 3D, Sparkline, Date Chart).
Chart Subtitle Subtitle of the chart.
Show title? Yes/No shows/hides the Chart title.
Monitor ID Optional identifier of the display monitor in use.
SQL Enter a SQL statement returning columns "measurevalue" and "measurecategory" (for pie and bar charts or "measurevalue" and "measuredate" (for date charts).
SDI Aggregate Properties used to define the SDI Aggregate Query Type.
Property NameDescription
SDC IdThe SDC Id for the primary query.
Query FromThe secondary aggregate table to query from (where to join will occur).
Query WhereThe filter clause for the query which creates the join.

For example:

s_sample.productid=s_product.s_productid

in parameter form:

s_sample.productid=s_product.s_productid AND s_sampleid!='[test]'

Category StringProperties for defining the Category (label) column.
PropertyDescription
Category TypeCan be a specific column or a custom SQL statement (a nested query for example). This is required and forms the groupby for the query.
Column IdThe column to use for the Category.

For example: s_productid

Custom StringThe custom column definition (nested SQL) to use.
Value StringProperties for defining the value column used when plotting data.
Property IdDescription
Value TypeThe type of Value string to render.
Property IdDescription
ColumnMust be a number column which returns the value to plot.
CountPerforms a count on the aggregate.
AveragePerforms an average on the aggregate.
SumPerforms a sum on the aggregate.
CustomAllows a custom nested SQL.
Column IDThe column Id for the Value Column, Count, Average or Sum.
Custom StringIf the Value Type is Custom enter the custom nested SQL.
Order ByOrder by clause for the query.
SDI List Properties used to define the SDI List Query Type.
Property NameDescription
SDC IdThe SDC Id for the primary query. For example, LV_WorkflowDef.
Query IdThe Query Id from the list of queries. This will then be used to filter the SDI list returned. You cannot use a Query Id and a querywhere together.
Query ParamsA Collection of Parameters to use with Query Id.
Property IdDescription
IdentifierUnique identifier for this item, rendered as an ID attribute in the HTML tag.
Column IDValue of the parameter.
Query FromThe additional From Clause. Cannot be used if using a Query Id.
Query WhereFilter clause which can only be used if not using a Query Id.
Category Column IdThe column to use as the Category (label) column. For example, workflowdefid.
Value Column IdThe column to use for the plot value. This must be a number. You can also use inner sub queries to join tables. However this is less efficieint than using the SDI Aggregate Query mode.

For example:

(SELECT count(DISTINCT taskdefid) from taskqueue tq where tq.workflowdefid = workflowdef.workflowdefid) measurevalue

Parameters can be used in the Properties such as in Query Where:

workflowdefid != '[excludeworkflow]'

"All" or Others Specifies whether to use the "All" category or others.
Display Axis Labels Yes/No shows/hides the axis labels.
X Axis Label Label that identifies the X axis value.
Y Axis Label Label that identifies the Y axis value.
Show Legend? Yes/No shows/hides the legend.
Autorange X Axis Deprecated. Yes autoranges the X axis value range.
X Minimum Deprecated. Minimum value of the X axis.
X Maximum Deprecated. Maximum value of the X axis.
Autorange Y Axis Yes autoranges the Y axis value range.
Y Minimum Minimum value of the Y axis.
Y Maximum Maximum value of the Y axis.
View URL Use [measurecategory] and [measureseries] in the URL.
View Target When a link on the chart is clicked which target should be used: _blank (creates a new window) or _parent (Loads into frame). Defaults to _blank.
Parameter Prifix Deprecated. Prefix used when an item is clicked to create a parameter (such as prefix_measurecategory). Defaults to an empty string.
Data Chart Page Overrides any data chart page property for this Gizmo. Add a new Child page to the LV_ChartGizmoPage then select it here.
Paint Supplier Choose to show Charts in a single (Standard) color, or select a Color Scheme. Choose the Standard Color or Color Scheme below.
Color Scheme Choose a color scheme such as cool or vibrant (pre-defined set).
Standard Color Choose a color from the dropdown list, or enter an RGB value.
Label Position How to position category labels (such as "Up 45", or "Down 90").
Tooltip Expression to determine tooltip shown on mouseover. You can use [measurecategory], [measurepercentage], [measurevalue], [rownumber] and [seriesid].
Vertical Ticklabels Specifies the orientation of category labels in bar or sparkline charts. Choose "Yes" to display labels vertically.