Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Styles testing

This is a draft to test styles for our notes. You can see different style variations below. Note1 is the most preferable for now.

More examples with Notes:

Note1

The API controller is essential for the communication of the server and Flexmonster Pivot. This guide describes how to implement the API controller for Flexmonster.DataServer.Core.dll.

This tutorial relates to the guide Referring the Data Server as a DLL.

Step 1. Create a new API controller

IApiService is a class from Flexmonster.DataServer.Core.dll containing methods for handling the custom data source API requests. These methods allow getting fields, members, and aggregated data.

Note2

The API controller is essential for the communication of the server and Flexmonster Pivot. This guide describes how to implement the API controller for Flexmonster.DataServer.Core.dll.

This tutorial relates to the guide Referring the Data Server as a DLL.

Step 1. Create a new API controller

IApiService is a class from Flexmonster.DataServer.Core.dll containing methods for handling the custom data source API requests. These methods allow getting fields, members, and aggregated data.

—————————————————————————————————————————————————————

—————————————————————————————————————————————————————

Example 1

This guide describes how to integrate Flexmonster with amCharts – a JavaScript library for interactive data visualization.

The approach described in the tutorial works only for amCharts 4. To integrate Flexmonster with older amCharts versions, follow this guide: Integration with any charting library.

See the sections below to integrate Flexmonster with the amCharts library:

Supported chart types

Data preprocessed by Flexmonster Connector for amCharts is of the array of objects format. All amCharts chart types accept this data format, so Flexmonster supports all of them.

See how to integrate the component with different chart types.

More ready-to-use examples of integration with amCharts you can find on the Examples page.

Example 2

An optional request to establish a connection between the client and server sides. Sends the version of the custom data source API implemented by the front end. Expects the version of the custom data source API implemented by the back end in return.

/handshake request allows checking whether the server and the client implement the same version of the custom data source API. If the implemented versions are incompatible, you will get an appropriate notification.

You need to handle the /handshake request properly to receive compatibility notifications. Find the recommended way of implementing the /handshake request here.

Request

{
"type": "handshake"
"version": string
}

The request has the following parameters:

  • type – String. The type of the request. In this case, it is "handshake".
  • version – String. The version of the custom data source API implemented by the front end.

Response

{
"version": "2.8.0"
}

The response has the following parameters:

  • version – String. The version of the custom data source API implemented by the back end.

Example 3

Using the custom data source API allows you to decide which aggregations to enable in Flexmonster and support on the back end.

The supported aggregations can be defined in the schema for fields of a certain type or for each field individually. The aggregations supported by Flexmonster for the custom data source API connection are the following: "sum", "count", "distinctcount", "average", "median", "product", "min", "max", "stdevp", "stdevs", "none".

In the schema, these are the only aggregation names that can be defined, since Flexmonster Pivot does not support custom aggregation names.

It is possible to define which aggregations are available for which fields in the back end; it is also not necessary to implement all the aggregations supported by Flexmonter.

Built-in front-end aggregations

For the custom data source API, Flexmonster supports the following built-in front-end aggregations: "percent", "percentofcolumn", "percentofrow", "percentofparentcolumntotal", "percentofparentrowtotal", "index", "differenceofcolumn", "differenceofrow", "%differenceofcolumn", "%differenceofrow", "runningtotalsofcolumn", "runningtotalsofrow".

These aggregations will appear in Flexmonster Pivot automatically if at least one aggregation is implemented on the back end (e.g., "sum"). Note that this feature is available only for the fields of the "number" type.

Example 4

Step 5. Run the server

Start Flexmonster Data Server by running the following command in the console:

on Windows

flexmonster-data-server.exe

on macOS and Ubuntu/Linux

./flexmonster-data-server

As soon as you start Flexmonster Data Server, it automatically preloads the data specified in the "Indexes" property. Thus, when Flexmonster Pivot requests the data, the server responds with already preloaded data.

The preloaded data is kept in the server’s RAM, so the number of indexes you can specify is limited by the amount of RAM available to the server.