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.
This guide illustrates how to connect Flexmonster to a CSV data source.
You can connect to your CSV data using the client-side or the server-side approach. To connect to a CSV file smaller than 100 MB, use the client-side approach, which is described in this guide.
To connect to a CSV file larger than 100 MB, we recommend using Flexmonster Data Server — our server-side solution for processing large datasets. For more details, refer to the Connecting to CSV using Flexmonster Data Server guide.
Your CSV data should be specified in the following format:
,
or ;
.false
.Speciality "Bike" Shop
must be specified as "Speciality ""Bike"" Shop"
.Category,Color,Country,Price Accessories,red,Australia,174 Components,blue,France,768 Clothing,green,Canada,512
Other CSV formats aren’t officially supported and may have unexpected results.
Note Ensure that dates are also specified in a supported format.
If Flexmonster is not yet embedded, set up an empty component in your webpage:
Complete the Integrating Flexmonster guide. Your code should look similar to the following example:
let pivot = new Flexmonster({ container: "pivotContainer", componentFolder: "node_modules/flexmonster/", toolbar: true });
Complete the Integration with React guide. Your code should look similar to the following example:
<FlexmonsterReact.Pivot toolbar={true} />
Complete the Integration with Angular guide. Your code should look similar to the following example:
<fm-pivot [toolbar]="true"> </fm-pivot>
Complete the Integration with Vue guide. Your code should look similar to the following example:
<Pivot toolbar />
You can connect Flexmonster to remote or local CSV data.
Remote CSV data can be a remote CSV file or data generated by a server-side script. Flexmonster can be connected to remote CSV data in one of the following ways:
To connect to remote СSV data via UI, use the Toolbar:
Step 1. On the Toolbar, select Connect > To remote CSV. As a result, the Open remote CSV pop-up window will appear.
Step 2. Enter the URL to your CSV data in the input field and click Open.
To connect to remote CSV data in the report, use the dataSource.filename property:
report: { dataSource: { filename: "<url-to-remote-csv-data>" } }
To connect to remote CSV data at runtime, use the connectTo() or updateData() API call with the DataSourceObject input parameter. For details on data source configurations, go to the In the report tab:
connectTo()
API call: pivot.connectTo({Live example
filename: "<url-to-remote-csv-data>"
});
updateData()
API call: pivot.updateData({Live example
filename: "<url-to-remote-csv-data>"
});
The pivot table can be connected to a CSV file from your computer in one of the following ways:
To connect to a local СSV file via UI, use the Toolbar:
Step 1. On the Toolbar, select Connect > To local CSV. As a result, the file manager will appear.
Step 2. Select the file via the file manager.
To connect to a local CSV file in the report, use the dataSource.browseForFile property:
report: { dataSource: { type: "csv", browseForFile: true } }
Note The type
property must be defined explicitly.
To connect to a local CSV file at runtime, use the connectTo() or updateData() API call with the DataSourceObject input parameter. For details on data source configurations, go to the In the report tab:
connectTo()
API call: pivot.connectTo({
type: "csv",
browseForFile: true
});
Note The type
property must be defined explicitly.
updateData()
API call: pivot.updateData({
type: "csv",
browseForFile: true
});
Note The type
property must be defined explicitly.
You can define how fields from the data source are treated and presented within the component using the mapping. For example, you can:
Note If you are using column prefixes to set data types in CSV, we recommend migrating from CSV prefixes to the mapping.
For easy migration from CSV prefixes to the mapping, see the table below.
CSV prefix | Mapping type | Description |
---|---|---|
+ | "string" | The field is a dimension. |
- | "number" | The field is a value. |
m+ | "month" | The field stores months. |
w+ | "weekday" | The field stores days of the week. |
d+ | "date" | The field stores a date. The field of this type is split into 3 different fields: Year, Month, and Day. |
D+ | "year/month/day" | The field stores a date. It’s displayed as a multilevel hierarchy with the following levels: Year > Month > Day. |
D4+ | "year/quarter/month/day" | The field is a date. It’s displayed as a multilevel hierarchy with the following levels: Year > Quarter > Month > Day. |
ds+ | "date string" | The field stores a date. It can be formatted using the datePattern option (default is "dd/MM/yyyy" ). |
t+ | "time" | The field stores time. |
dt+ | "datetime" | The field stores a date. It can be formatted using the dateTimePattern option (default is "dd/MM/yyyy HH:mm:ss" ). |
id+ | "id" | The field is an id. The field of this type can be used for editing data. It’s not shown in the Field List. |
If your data contains non-Latin characters, ensure you have set UTF-8 encoding for your data and page so the data is displayed correctly in the component.
If you run into any issues, visit our troubleshooting page.
You may be interested in the following articles: