Flexmonster Software License Agreement (“Agreement”) has been revised and is effective as of January 8, 2025.
The following modifications were made:
The modified version of Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after January 8, 2025, constitutes Licensee’s acceptance of the terms and conditions of the modified version of 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 or maintenance after the effective date of these modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
googlecharts.getData(options: Object, callbackHandler: Function, updateHandler: Function): Object []
Requests data from the component and preprocesses it to the format required by Google Charts, which is an array of arrays.
Parameter/Type | Description |
---|---|
options Object | Sets options for data preprocessing. |
options.type String | The chart type to prepare data for. List of types
|
options.slice SliceObject | optional Defines the data slice for the chart
Live example. If options.slice is not specified, the Connector prepares the data based on the current slice in Flexmonster Pivot.Note If googlecharts.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.Only for "json" and "csv" data source types. |
options.prepareDataFunction Function | optional A function that preprocesses data into the necessary format. Implement it to create a chart that is not present in the list of supported chart types. If prepareDataFunction is not specified, the Connector uses the built-in method to preprocess the data.prepareDataFunction takes two input parameters:
|
callbackHandler Function | Сreates the chart once the data is ready. Takes two input parameters:
|
updateHandler Function | optional Updates the chart when the report is changed. It takes the same input parameters as the callbackHandler function: chartData and rawData . |
An array of arrays where the first array contains the headers (e.g., category name and measure), and each subsequent array represents a data point with a label and its corresponding aggregated value. For example:
[
["Country", "Sum of Price"],
["Canada", 1034112],
["France", 1117794],
["Germany", 1070453],
["United Kingdom", 779899],
["United States", 847331]
]
1) Calling the googlecharts.getData()
method:
pivot.googlecharts.getData({}, drawChart, updateChart);
2) Defining the options.slice parameter in googlecharts.getData()
:
pivot.googlecharts.getData(
{
type: "pie",
slice: {
rows: [
{
uniqueName: "Category",
},
],
columns: [
{
uniqueName: "[Measures]",
},
],
measures: [
{
uniqueName: "Size",
},
],
},
},
drawChart,
drawChart,
)