Module: chartme

Classes

CApplicationAPI
CChartAPI
CPageAPI

Methods

chartmeChart(DOMElement, options) → {module:chartme#CChartAPI}

Creates a new Chart-me Chart object
Parameters:
Name Type Description
DOMElement DOM A DOM Element, where the Chart-me Chart object will be drawn
options object [Optional] A options object, where you can set several options
Returns:
CChartAPI object
Type
module:chartme#CChartAPI

chartmePage(DOMElement, options) → {module:chartme#CPageAPI}

Creates a new Chart-me Page object
Parameters:
Name Type Description
DOMElement DOM A DOM Element, where the Chart-me Page object will be drawn
options object [Optional] A options object, where you can set several options
Returns:
CPageAPI object
Type
module:chartme#CPageAPI

(static) app(options)

Creates a new Chart-me object
Parameters:
Name Type Description
options module:chartme.ApplicationOptions A options object, where you can set several options
Example
var cm = new chartme.app({
   modules: {},
   settings: {},
   showMessage: function(_Message){ },
   onReady: function(_ChartmeAPI){ },
});

Type Definitions

ApplicationOptions

Chart-me Application Options
Defines the options for the whole Chart-me Application object
Type:
  • object
Properties:
Name Type Description
modules object [Optional] Defines all modules to be loaded. The standard modules are loaded automatically.
Properties
Name Type Description
graphics object [Optional] Object for all graphic modules to be loaded
Properties
Name Type Description
module object The module name you choose. It must match the folder name in modules/graphics folder
Properties
Name Type Description
files Array.<string> A list of all filenames to be loaded inside the defined folder e.g. ["standard.min.js", ...]
types object Defines all the visualization types in CMDXF which are loaded with this module and the corresponding class e.g. {"SINGLE_TIME": "CChart", ...}
sources object [Optional] Object for all sources modules to be loaded
Properties
Name Type Description
module object The module name you choose. It must match the folder name in modules/sources folder
Properties
Name Type Description
files Array.<string> A list of all filenames to be loaded inside the defined folder e.g. ["standard.min.js", ...]
types object Defines all the source types which are loaded with this module and the corresponding class e.g. {"CMDXF": "CCMDXF", ...}
settings object Defines all the settings you can additional set for the application
Properties
Name Type Description
hideAssert string [Optional]false true, if you want to hide the assert messages in the console
serverURL string [Optional] The URL to the server. Empty for no server connection.
showMessage module:chartme.showMessage [Optional] This function will be thrown, when a info message should be visible to the user
onReady module:chartme.onReady [Optional] This function will be thrown, when the initoialization process of the Chart-me Application is ready.
It is recommended to use this as entry point for the next functions.

CMDXF

Chart-me Data Exchange Format (CMDXF).
The following will show the format for input data in a strict JSON format. Chart-me can then interpret the data and show the visualisations of it.
Type:
  • Object
Properties:
Name Type Description
id- String Date.now() An unique ID of the source
name String "" The name of the source
dimensions Array.<Object> List of all Dimension
Properties
Name Type Description
key String Key of the dimension
text String Text of the dimension
isVisible String [Optional]true false when the dimension should not been shown in the chart
totalPosition String [Optional]"bottom" Defines the total position of the dimension ("top" or "bottom")
members Array.<Object> Member list of the dimension
Properties
Name Type Description
key String Key of the member
text String Text of the member
isNegative Boolean [Optional]false true if the member is negative calculation
isVariance Enum [Optional]NONE Defines if the dimension member is shown as a variance
Properties
Name Type Description
NONE String No variance
ABSOLUTE String Absolute variance
RELATIVE String Relative variance
isScenario Enum [Optional]NONE Defines if the dimension member is visualized with a scenario
Properties
Name Type Description
NONE String No scenario
PY String Previous year
AC String Actual
PL String Plan
FC String Forecast
DimensionKey dimKey The Scenario comes from the selected dimension. Format: #dimKey
isScenarioComp Enum [Optional]NONE Defines the comparison scenario. Only used for variances
Properties
Name Type Description
NONE String No scenario
PY String Previous year
AC String Actual
PL String Plan
FC String Forecast
DimensionKey dimKey The Scenario comes from the selected dimension. Format: #dimKey
informations String [Optional] Additional informations for the member from root system. Those will be returned in the callback functions
hierarchy Object [Optional] Defines the hierarchy informations of the member
Properties
Name Type Description
parent String [Optional]null sets the members parent key, null if the element is at top level
IsNode Boolean [Optional]false true if the member is a node, false or empty when not
isExpanded Boolean [Optional]false true if the member is expanded, fals eor empty when collapsed
filter Object [Optional] Defines the background filter for the data
Properties
Name Type Description
dimKey Object The dimension key of the selected filter, where [dimKey] needs to replace by the dimension key
Properties
Name Type Description
name String [Optional] The name of the filter
type Enum [Optional]SINGLE the type of the filter
Properties
Name Type Description
SINGLE Object Only one member is selected
CONSOLIDATED Object More than one member are selected
consolidation Enum [Optional]AVERAGE Defines the consolidation type. Only used for type = CONSOLIDATED
Properties
Name Type Description
ADDITION String Added all consolidated memberKeys
MULTIPLICATION String Multiplies all consolidated memberKeys
MAX String Takes the maximum value of all consolidated memberKeys
MIN String Takes the minimum value of all consolidated memberKeys
AVERAGE String Defines the average of all consolidated memberKeys
memberKeys Array.<String> The selected member keys. For the type = SINGLE only the first member has meaning
period Object [Optional] Defines the time period for this data
Properties
Name Type Description
type Enum Defines the steps of the selected period
Properties
Name Type Description
YEARS String Year steps
QUARTERS String Quarter steps
MONTHS String Month steps
WEEKS String Week steps
DAYS String Day steps
startDate Object Start date of the period
Properties
Name Type Description
day Number Day
month Number Month
year Number Year
endDate Object End date of the period
Properties
Name Type Description
day Number Day
month Number Month
year Number Year
columns Array.<Array.<Number>> Defines the x-axis members. The length must correspond the number of dimensions. The length of the inner column arrays must correspond the length of inner data array. (-1, if the dimension member is not an element of the axis)
rows Array.<Array.<Number>> Defines the y-axis members. The length must correspond the number of dimensions. The length of the inner row arrays must correspond the length of data array. (-1, if the dimension member is not an element of the axis)
data Array.<Array.<Object>> List of all data cells
Properties
Name Type Description
cell Object The cell
Properties
Name Type Description
value Number The cells value
formattedValue String [Optional] The cells formatted value
informations Object [Optional] The cells additional informations
Properties
Name Type Description
status Number [Optional] Defines the status of the cell - 0: normal, 1: bad, 2: warn, 3: good
editable Boolean [Optional] true if the cell is editable
comments Array.<Object> [Optional] The comments of the cell
Properties
Name Type Description
name String The name of the commenter
date String The date of the comment
text String The comments text
type Number The type to display the comment - 0: comment, 1: tablecell
informations Object Additional informations for the comment
visualization Enum [Optional]NONE Defines the information, how the CMDXF data looks like
Properties
Name Type Description
NONE String No visualization
TABLE_TIME String Table timeseries
SINGLE_TIME String Multi axes timeseries (horizontal) bars
WATERFALL_TIME String Multi axes timeseries (horizontal) waterfall bars
GROUPED_TIME String Multi series in one axes timeseries (horizontal) grouped bars
STACKED_TIME String Multi series in one axes timeseries (horizontal) stacked bars
STACKED100_TIME String Multi series in one axes timeseries (horizontal) stacked 100% bars
POINTLINE_TIME String Multi series in one axes timeseries (horizontal) point lines
TABLE_STRUCTURE String Table structure
SINGLE_STRUCTURE String Multi axes structure (vertical) bars
WATERFALL_STRUCTURE String Multi axes structure (vertical) waterfall bars
GROUPED_STRUCTURE String Multi series in one axes structure (vertical) grouped bars
STACKED_STRUCTURE String Multi series in one axes structure (vertical) stacked bars
STACKED100_STRUCTURE String Multi series in one axes structure (vertical) stacked 100% bars
POINTLINE_STRUCTURE String Multi series in one axes structure (horizontal) point lines
chartMultiplier dimKey [Optional]null Defines the dimension key, which multiplies the data in one chart for each member. Format: #dimKey
Tutorials:

onReady(CApplicationAPI)

On Load Chart-me Application Ready Function
This function will be thrown, when the Chart-me Application initialization process will be done.
Parameters:
Name Type Description
CApplicationAPI module:chartme#CApplicationAPI CApplicationAPI instance object
Example
var cm = new chartme.app({
   ...
   onReady: function(_ApplicationAPI){
      $.chartmePage($("#cm-object1"));
   },
   ...
});

showMessage(Message)

On show Message function
This function will be thrown, when a user message should be shown.
Parameters:
Name Type Description
Message string The message to be shown
Example
var cm = new chartme.app({
   ...
   showMessage: function(_Message){
      alert(_Message);
   },
   ...
});