Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
amcharts.getData(options: Object, callbackHandler: Function, updateHandler: Function)
Requests data from the component and preprocesses it to an array of objects. This format is supported by amCharts.
Parameter/Type | Description |
---|---|
options Object | Allows setting options for data preprocessing. |
options.slice SliceObject | optional Defines the data slice to be used for the chart. If not defined, the Connector prepares the data based on the current slice in Flexmonster Pivot. Note: if amcharts.getData() gets the slice as a parameter, the chart will not respond to further slice changes on the grid, which means data shown on the chart will be static. |
options.prepareDataFunction Function | optional Allows you to override the Connector's default prepareDataFunction and perform custom data preprocessing if needed.If prepareDataFunction is not specified, the Connector uses the built-in method to preprocess the data.prepareDataFunction takes two input parameters:
|
callbackHandler Function | Used to create the chart once the data is ready to be passed to it. Takes two input parameters:
|
updateHandler Function | optional Used to update the chart when the report is updated. It takes the same input parameters as the callbackHandler function: chartData and rawData . |
Returns an array of objects that contains the data for the chart. For example:
[ { "categoryName": "value", "measureName 1": "value", … "measureName n": "value", } … ]
Learn more about how the Connector prepares data for the chart.
1) Calling the amcharts.getData()
method:
pivot.amcharts.getData({}, drawChart, updateChart);
See a live demo on JSFiddle.
2) Passing the slice to the amcharts.getData()
method:
pivot.amcharts.getData(
{
slice: {
rows: [{uniqueName: "Country"}],
columns: [{uniqueName: "[Measures]"}],
measures: [{uniqueName: "Quantity"}]
}
},
drawChart,
updateChart
);
amcharts.getCategoryName
amcharts.getMeasureNameByIndex
amcharts.getNumberOfMeasures
amcharts.getNumberFormatPattern