Class: StepChartSDS

StepChartSDS

The Step Chart displays data in a chart on a Coach with the option to add drill down trees for presenting additional data sets. A StepChartSDS control provides the following configuration properties in Process Designer:

Behavior

Chart Data Mode: Select whether to populate chart data from a service or from the config option. Note that drill down trees are currently only available by populating through an AJAX service
{From Service | From Config Option}
string
Data Service: Data service that populate the DataSeries. AJAX Service
Data Series: Single data series to populate chart DataSeries
Series name Name for the Data Series string
Data points List of Data Points to include in the Data Series DataPoint[]
Enable Menu: Visibility of the menu. Necessary if you have are using a drill-down tree, or if you have added menus boolean
Number of Y Axis Ticks: Maximum number of ticks on the Y axis integer
Y Axis Tick Precision: Number of decimal places to display for Y axis value labels, default is 0 integer
Min Y Axis Value: Minimum Y axis value decimal
Max Y Axis Value: The max value on the Y axis decimal
Use X Axis Culling: X axis culling boolean
Max X Tick Count: Maximum number of ticks on the X axis integer
Show Tooltip: When enabled, hovering over data points with the mouse will cause a tooltip to appear, containing both the name of the point, as well as its value boolean

Appearance

Show Area Below Steps: When enabled, area beneath step chart will be filled in (similar to Area Chart) boolean
Background Color Style: Background color
{Transparent | Primary | Info | Success | Warning | Danger}
string
Data Series Color Style: The dataseries color style
{Light | Primary | Info | Success | Warning | Danger}
string
Show Value Labels: When enabled, datapoint values will be visible above each point boolean
Show Breadcrumbs: When enabled, the title shows the current position of the drill-down tree (depending on menu selection). boolean
XY Axis Color Style: XY axis color style
{None | Light - Labels Only | Dark - Labels Only | Light | Dark}
string
Gridlines Style: Set style for horizontal gridlines, if any
{None | Light | Dark}
string
X Label Rotation: X axis label rotation (in degrees) decimal
Border Radius: Radius string
Padding: Padding for right, top, left, bottom (in px) string
Height: The height of the chart integer

Events

On Load:
Description: This event is fired when the chart is loaded
Example:
me.defocusSeries("Brand1")
On Refreshed:
Description: This event is fired when the chart is refreshed
Example:
me.focusSeries("Brand1")
On Click:
Description: This event is fired when the chart is clicked
Example:
me.transform("donut", ["Brand1","Brand2"])
On Menu Action:
Description: This event is fired when a menu action is detected
Example:
console.log("Running menu action '" + action.name + "' on " + me.getSelectedDataPoint().label + " with value of " + me.getSelectedDataPoint().value)
Context Variables action {object}
Properties name
Articles
Area Chart
Bar Chart
Donut Chart
Line Chart
Multi Purpose Chart
Pie Chart
Step Chart

new StepChartSDS()

This constructor is never used explicitly.

Extends

Members

Methods

Add/replace CSS class(es) for this control
Name Type Description
name string CSS class name(s) to add to the control. Separate class names by a space if more than one class.
replaced string optional CSS class name(s) to be replaced by the first argument. Separate class names by a space if more than one class.
Example
Button.addClass("green");

addHorizontalLine(value, label)

Adds a horizontal line to the chart
Name Type Description
value integer the position of the y-value that you want to add the dashed horizontal line
label string the label of the line

addStaticMenuAction(action, menuItemLabel, icon, badgeText, onClickFunction)

Adds an action to the chart's popup menu and optionally attaches logic to it
Name Type Description
action String An identifier for this action
menuItemLabel String The label of the menu item
icon String optional (FontAwesome) icon name for the menu item
badgeText String optional text/value to show in a badge next to the menu item
onClickFunction function optional a callback function to be invoked when the menu item is clicked. If omitted, the "on menu action" event will be called when the item is clicked

addTempMenuAction(action, menuItemLabel, icon, badgeText, onClickFunction)

Adds an action to the chart's popup menu and optionally attaches logic to it. This method should ONLY be called from the On Click event of the chart - otherwise it will not be displayed in the menu
Name Type Description
action String An identifier for this action
menuItemLabel String The label of the menu item
icon String optional (FontAwesome) icon name for the menu item
badgeText String optional text/value to show in a badge next to the menu item
onClickFunction function optional a callback function to be invoked when the menu item is clicked. If omitted, the "on menu action" event will be called when the item is clicked

addVerticalLine(value, label)

Adds a vertical line to the chart
Name Type Description
value integer the position of the x-value that you want to add the dashed vertical line
label string the label of the line

defocusSeries(seriesName)

Defocus the DataSeries in the chart
Name Type Description
seriesName string | Array.<string> optional the name(s) of the dataseries that you want to defocus. If no series is specified, all data in chart will be dimmed
Goes one step up in the Drill Down Tree hierarchy

focusSeries(seriesName)

Focus the DataSeries in the chart
Name Type Description
seriesName string | Array.<string> optional the name(s) of the dataseries that you want to focus. If no series is specified, all data in chart will be highlighted

getColorStyle(){string}

Get the color style for the background. NOTE: This always returns the color as set, to avoid ambiguity always set the color using "T"|"P"|"I"|"S"|"W"|"G"
Returns:
Type Description
string

getCurrentDimension(){string}

Get the current drilldown dimension (the current hierarchical level at the drill-down tree). Only functional if drill-down is enabled
Returns:
Type Description
string

getCurrentDimensionCriteria(){object}

Returns an object with a name/value pair that describes the current position of the drill-down tree; Only functional if drill-down is enabled.
Returns:
Type Description
object
Example
me.getCurrentDimensionCriteria();  //returns -->  Object {name: "Type", value: "CLOTHING"}

getDataSeries(){DataSeries}

Get the current data series being used to populate the chart
Returns:
Type Description
DataSeries

getDataSeriesColorStyle(){string}

Returns color style currently set for data series
Returns:
Type Description
string

getDrillDownStack(){Array.<NameValuePair>}

Get the stack/structure of the drill-down tree. Only functional if drill-down is enabled
Returns:
Type Description
Array.<NameValuePair> Array of name/value pairs

getQueryData(){*}

Gets the input of the Data Series AJAX Service
Returns:
Type Description
*

getSelectedDataPoint(){object}

Returns the last selected data point in the chart
Returns:
Type Description
object The object contains the properties: label and value

getType(){string}

Get descriptive string representing the type of control
Returns:
Type Description
string

groupSeries(whether, seriesName)

Groups the DataSeries in the chart.
Name Type Description
whether boolean to group the series or not
seriesName Array.<string> optional the name of the dataseries
Example
me.groupSeries(true, ["SeriesName 1", "SeriesName 2", "SeriesName 3"]); //SeriesName 1, SeriesName2, and SeriesName3 will stack together if it is a bar chart.
Hide this view/control
Name Type Description
collapseFlag boolean Set to true to collapse the view (equivalent to a view setting of "NONE")
Example
MyView.hide();

hideSeries(seriesName)

Hides the DataSeries in the chart
Name Type Description
seriesName string | Array.<string> optional the name(s) of the dataseries that you want to show. If no names are specified, all series in chart will be hidden
Indicates bound status of control.
Returns:
Type Description
boolean True if the control is bound to coach data.
Checks if the view is enabled or not
Returns:
Type Description
boolean Enabled status
Example
var enabled = MyView.isEnabled();
Checks if control label is visible
Returns:
Type Description
boolean Label visibility status
Example
var labelVisible = MyView.isLabelVisible();
Checks whether or not view is visible
Returns:
Type Description
boolean Visibility status
Example
var visible = MyView.isVisible();
Propagates value change of control up through parent views
Name Type Description
event Event Value change event (usually an onchange event)
Returns:
Type Description
boolean True if a formula update was triggered on the control's parent, otherwise false
Example
MyView.propagateUp(event);
Updates the chart by calling the AJAX service and using the Data Series data returned.

removeHorizontalLine(label)

Removes horizontal line with specified label. If no label is specified, all horizontal lines will be removed
Name Type Description
label string optional Label for the line that is to be removed

removeMenuAction(actionId){boolean}

Removes an action from the chart's popup menu
Name Type Description
actionId String Identifier for the action to be removed
Returns:
Type Description
boolean true if action found and removed, otherwise false

removeVerticalLine(label)

Removes vertical line with specified label. If no label is specified, all vertical lines will be removed
Name Type Description
label string optional Label for the line that is to be removed

setDataSeriesColorStyle(style)

Set the color style for the charted data series. NOTE: to avoid ambiguity always set the color using "D"|"P"|"I"|"S"|"W"|"G". Note that the Default option is available instead of Light for Pie, Donut, and Multi Purpose charts. All other charts have the Light option, instead of Default
Name Type Description
style string "DEFAULT"|"DEF"|"D"=Default | "PRIMARY"|"PRI"|"P"=Primary | "LIGHT"|" L"=Light |INFO"|INF"|"I"=Info | "SUCCESS"|"S"=Success | "WARNING"|"WARN"|"W"=Warning | "DANGER"|ERROR|ERR"|"E"|"G"=Danger
Enable/disable this view/control
Name Type Description
enabled boolean Enabled/read-only flag (true to enable view, false to disable/make read-only)
required boolean Enable/disable required field flag for control
Example
MyView.setEnabled(false); //Make MyView read-only
Show/hide the label of this view/control
Name Type Description
visible boolean Label visibility flag (true to show view label, false to hide)
Example
MyView.setLabelVisible(false);

setQueryData(queryData)

Sets the input to the Data Series AJAX Service
Name Type Description
queryData * Updated query data
Show/hide this view/control
Name Type Description
visible boolean Visibility flag (true to show view, false to hide)
collapse boolean Set to true to collapse the control space when visible is set to false.
Examples
MyView.setVisible(false, false); //Equivalent to MyView.hide()
MyView.setVisible(false, true); // Sets visibility to "None"
Show this view/control
Example
MyView.show();

showSeries(seriesName)

Shows the DataSeries in the chart
Name Type Description
seriesName string | Array.<string> optional the name(s) of the dataseries that you want to show. If no names are specified, all series in chart will be shown

transform(chartType, seriesName)

Transforms the chart taking in a new chart type with the specified series name.
Name Type Description
chartType string the chart type in {bar, line, area, spline, area-spline, step, area-step, pie, donut}
seriesName Array.<string> the name of the series that you want to transform the chart with
Example
me.transform("bar", ["SeriesName 1", "SeriesName 2"]);
Broadcasts the expression trigger for the specified view
Name Type Default Description
phase int bpmext.ui.PHASE_NORMAL optional The phase we are currently in
Example
MyView.triggerFormulaUpdates();