We have updated Flexmonster Software License Agreement, effective as of September 30, 2025 (list of changes)
All documentation

highcharts.getData

amcharts.getData(options: Object, callbackHandler: Function, updateHandler: Function): Object []

Requests data from Flexmonster and preprocesses it to the format required by Highcharts.

Parameters

Parameter/TypeDescription
options
Object
Sets options for data preprocessing.
options.type
String
optional The chart type to prepare data for.
List of supported types
  • "area"
  • "arearange"
  • "areaspline"
  • "areasplinerange"
  • "bar"
  • "bubble"
  • "column"
  • "columnrange"
  • "errorbar"
  • "funnel"
  • "line"
  • "pie"
  • "polygon"
  • "pyramid"
  • "scatter"
  • "spline"
  • "scatter"
options.slice
SliceObject
optional Defines the 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 highcharts.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.xAxisType
String
optional Sets the data type of a particular series.
To display dates on the chart as values, set xAxisType to "datetime" Live example.
options.valuesOnly
Boolean
optional Set this property to true to display all axes values in the chart as numbers. Only for the following chart types: "bubble", "line", "polygon", and "spline".

Live example

Note that for the "scatter" chart type, valuesOnly is always set to true.
Default value: false.
options.withDrilldown
Boolean
optional When set to true, drill-downs in the chart are enabled. This property is available for the following chart types: "area", "areaspline", "bar", "column", "waterfall", "funnel", "pie", "pyramid", "polygon", "spline", and "line".

Live example

Default value: false.
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.
prepareDataFunction takes two input parameters:
  • rawData — Object. Raw data to preprocess. Check out the structure of rawData.
  • options — Object. It contains options set in the googlecharts.getData() function.

Live example

callbackHandler
Function
Сreates the chart once the data is ready. Takes two input parameters:
  • chartData — Object. Data preprocessed by the Connector or prepareDataFunction (if specified).
  • rawData — Object. Raw data from the component. Can be used to get the number formatting specified in Flexmonster. Check out the structure of rawData.
updateHandler
Function
optional Updates the chart when the report is changed. It takes the same input parameters as the callbackHandler function: chartData and rawData.

Returns

An array of objects, where each object represents a data series in the chart. Each object contains:

  • A name field indicating the series label.
  • A data array with values corresponding to that series.

For example:

[{
data: [3452, 22833, 8184, 6144],
name: "Accessories"
},
{
data: [74493, 46193, 76900, 54395],
name: "Bikes"
},
{
data: [4228, 5806, 5716, 3654],
name: "Clothing"
},
{
data: [72159, 70799, 39607, 42892],
name: "Components"
}]

Examples

1) Calling the highcharts.getData() method:

pivot.highcharts.getData({
type: "bubble"
},
function(chartConfig) {
Highcharts.chart('highcharts-container', chartConfig);
},
function(chartConfig) {
Highcharts.chart('highcharts-container', chartConfig);
}
);

Live example

2) Defining the options.slice parameter in highcharts.getData():

pivot.highcharts.getData(
{
type: "pie",
slice: {
rows: [
{
uniqueName: "Color",
},
],
measures: [
{
uniqueName: "Quantity",
},
],
},
},
function (chartConfig) {
Highcharts.chart("highcharts-container", chartConfig)
},
function (chartConfig) {
Highcharts.chart("highcharts-container", chartConfig)
},
);

Live example

See also