Classes
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
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
(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
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
|
|||||||||||||||||||||||||||||||||||||||
settings |
object | Defines all the settings you can additional set for the application
Properties
|
|||||||||||||||||||||||||||||||||||||||
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.
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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filter |
Object | [Optional] Defines the background filter for the data
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
period |
Object | [Optional] Defines the time period for this data
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
visualization |
Enum | [Optional]NONE Defines the information, how the CMDXF data looks like
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
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.
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);
},
...
});