Line chart SDS
Generates a line chart for a data set, with the option to add drill-down trees for additional data sets. You can populate the data set either statically or by using a service.

Appearance
Smooth line: When set to true, chart will smooth out the curve connecting the data points Boolean
Background color style: Background color
{Transparent | Primary | Info | Success | Warning | Danger}
ChartBackgroundColorStyle
Data series color style: The dataseries color style.
{Primary | Info | Success | Warning | Danger | Light}
ChartSDSColorStyle
Data series custom color style: The dataseries custom color style. NameValuePair
Show value labels: Setting to true will display data point values above each point Boolean
Show breadcrumbs: When enabled, the title shows the current position of the drill-down tree (depending on menu selection). Boolean
Point size: Size of the dot marking the value - 2.5 is the default Decimal
XY axis color style: XY axis color style
{None | Light - Labels Only | Dark - Labels Only | Light | Dark}
ChartXYAxisStyle
Gridlines style: The style used for horizontal gird lines.
{None | Light | Dark}
ChartGridLinesStyle
X label rotation: X axis label rotation (in degrees) Decimal
X axis height: X axis height (as integer) Integer
Border radius: Radius String
Padding: Padding for right, top, left, bottom (in px) String
Height: Height of the chart Integer

Behavior
Chart data mode: The method to populate chart data, from a service or from the config option. To populate drill down trees, you must use a service.
{From Service | From Config Option}
ChartDataMode
Data service: Data service that populate the DataSeries.
Data series: Single data series to populate chart DataSeries
Enable menu: Visibility of the menu. Necessary if you are using a drill-down tree, or if you have added menus. Boolean
Number of Y axis ticks: The value that you specify is not interpreted as an exact number but is adjusted to the best suitable tick count to provide optimal display. Integer
Y axis tick precision: The number of decimal places displayed for Y axis value labels. The default is 0. Integer
Min Y axis value: Minimum Y axis value Decimal
Max Y axis value: Max value along the Y axis Decimal
Use X axis culling: X axis culling Boolean
Number of X axis ticks: The value that you specify is not interpreted as an exact number but is adjusted to the best suitable tick count to provide optimal display. Integer
Show tooltip: When enabled, hovering over data points displays a tooltip containing the point's label and value. Boolean

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
Extends:
com.ibm.bpm.coach.CoachView
Methods:

Inherited addClass(name, [replaced])
Add/replace CSS class(es) for this control
NameTypeDefaultDescription
name{string}CSS class name(s) to add to the control. Separate class names by a space if more than one class.
replaced{string}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. Note: this function is not applicable to Donut and Pie Charts.
NameTypeDefaultDescription
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
NameTypeDefaultDescription
action{String}An identifier for this action
menuItemLabel{String}The label of the menu item
icon{String}(Font Awesome) icon name for the menu item. See {@link http://fontawesome.io/icons Font Awesome} for a comprehensive list of icons. Refer to the knowledge center for the latest Font Awesome version.
badgeText{String}text/value to show in a badge next to the menu item
onClickFunction{function}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
NameTypeDefaultDescription
action{String}An identifier for this action
menuItemLabel{String}The label of the menu item
icon{String}(Font Awesome) icon name for the menu item. See {@link http://fontawesome.io/icons Font Awesome} for a comprehensive list of icons. Refer to the knowledge center for the latest Font Awesome version.
badgeText{String}text/value to show in a badge next to the menu item
onClickFunction{function}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. Note: this function is not applicable to Donut and Pie Charts.
NameTypeDefaultDescription
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
NameTypeDefaultDescription
seriesName{(string|string[])}the name(s) of the dataseries that you want to defocus. If no series is specified, all data in chart will be dimmed

drillUp()
Goes one step up in the Drill Down Tree hierarchy

focusSeries([seriesName])
Focus the DataSeries in the chart
NameTypeDefaultDescription
seriesName{(string|string[])}the name(s) of the dataseries that you want to focus. If no series is specified, all data in chart will be highlighted

getColorStyle() Returns: {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"

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

getCurrentDimensionCriteria() Returns: {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.
Example
me.getCurrentDimensionCriteria(); //returns --> Object {name: "Type", value: "CLOTHING"}

getDataSeries() Returns: {DataSeries}
Get the current data series being used to populate the chart

getDataSeriesColorStyle() Returns: {string}
Returns color style currently set for data series

getDataSeriesCustomColorStyle() Returns: {object | array}
Returns color style currently set for data series

getDrillDownStack() Returns: {NameValuePair[]}
Get the stack/structure of the drill-down tree. Only functional if drill-down is enabled

getQueryData() Returns: {*}
Gets the input of the Data Series AJAX Service

getSelectedDataPoint() Returns: {object}
Returns the last selected data point in the chart

getType() Returns: {string}
Get descriptive string representing the type of control

groupSeries(whether, [seriesName])
Groups the DataSeries in the chart.
NameTypeDefaultDescription
whether{boolean}to group the series or not
seriesName{string[]}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.

Inherited hide(collapseFlag)
Hide this view/control
NameTypeDefaultDescription
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
NameTypeDefaultDescription
seriesName{(string|string[])}the name(s) of the dataseries that you want to show. If no names are specified, all series in chart will be hidden

Inherited isBound() Returns: {boolean}
Indicates bound status of control.

Inherited isEnabled() Returns: {boolean}
Checks if the view is enabled or not
Example
var enabled = MyView.isEnabled();

Inherited isLabelVisible() Returns: {boolean}
Checks if control label is visible
Example
var labelVisible = MyView.isLabelVisible();

Inherited isVisible() Returns: {boolean}
Checks whether or not view is visible
Example
var visible = MyView.isVisible();

Inherited propagateUpValueChange(event) Returns: {boolean}
Propagates value change of control up through parent views
NameTypeDefaultDescription
event{Event}Value change event (usually an onchange event)
Example
MyView.propagateUp(event);

redrawChart()
Redraws the chart. This operation simply redraws the chart and does not refresh the current chart data. It is useful
to quickly redraw the chart when it is not displaying properly. It is quicker than doing a full refresh.

refresh()
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. Note: this function is not applicable to Donut and Pie Charts.
NameTypeDefaultDescription
label{string}Label for the line that is to be removed

removeMenuAction(actionId)
Removes an action from the chart's popup menu
NameTypeDefaultDescription
actionId{String}Identifier for the action to be removed

removeVerticalLine([label])
Removes vertical line with specified label. If no label is specified, all vertical lines will be removed. Note: this function is not applicable to Donut and Pie Charts.
NameTypeDefaultDescription
label{string}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
NameTypeDefaultDescription
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

setDataSeriesCustomColorStyle(style)
Set color for the charted data series.
NameTypeDefaultDescription
style{object | array}Specify a name value pair object for single data series and an array of name value pair for multi data series. The name property should specify the series-name or category name in the case of pie and donut charts. The value should specify the color by name, HEX code or RGB code.

Inherited setEnabled(enabled, required)
Enable/disable this view/control
NameTypeDefaultDescription
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

Inherited setLabelVisible(visible)
Show/hide the label of this view/control
NameTypeDefaultDescription
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
NameTypeDefaultDescription
queryData{*}Updated query data

Inherited setViewData(data, createPseudoBinding)
Set/update bound data associated this view/control. Only works for views/controls with bound data.

Note: Should only be used with simple type bindings, or complex type bindings with simple type properties.
Should not be used with bindings that have properties that are lists or compext types. For complex types, set bindings using
the binding.set pattern detailed in the Knowlege Center section Binding Data and Configuration Options
NameTypeDefaultDescription
data{Object}Value of bound data. The type of this parameter must match the type of the bound data.
createPseudoBinding{boolean}If set to true, creates a pseudo binding if there is no current binding.
Example
MyView.setViewData("TEST"); //Updates bound data to the string 'TEST'

Inherited setVisible(visible, collapse)
Show/hide this view/control
NameTypeDefaultDescription
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"

Inherited show()
Show this view/control
Example
MyView.show();

showSeries([seriesName])
Shows the DataSeries in the chart
NameTypeDefaultDescription
seriesName{(string|string[])}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.
NameTypeDefaultDescription
chartType{string}the chart type in {bar, line, area, spline, area-spline, step, area-step, pie, donut}
seriesName{string[]}the name of the series that you want to transform the chart with
Example
me.transform("bar", ["SeriesName 1", "SeriesName 2"]);

Inherited triggerFormulaUpdates([phase])
Broadcasts the expression trigger for the specified view
NameTypeDefaultDescription
phase{int}bpmext.ui.PHASE_NORMALThe phase we are currently in
Example
MyView.triggerFormulaUpdates();