Menu
Download Free Trial
  1. Getting started
    1. Quickstart
    2. System requirements
    3. Managing license keys
    4. Updating to the latest version
    5. Typical errors
    6. Migration guide
    7. Installation troubleshooting
  2. JSON data source
    1. Data types in JSON
  3. CSV data source
    1. Data types in CSV
  4. Connecting to SQL database
    1. Connecting to database with .NET
    2. Connecting to Relational Database with .NET Core
    3. Connecting to database with Java
    4. Connecting to database with PHP
  5. Connecting to Microsoft Analysis Services
    1. Getting started with Accelerator
    2. Installing Accelerator as a Windows Service
    3. Configuring username/password protection
    4. Configuring secure HTTPS connection
    5. Troubleshooting
  6. Connecting to Pentaho Mondrian
    1. Getting started with Accelerator
    2. Configuring Mondrian roles
    3. Сonfiguring username/password protection
    4. Сonfiguring secure HTTPS connection
    5. Troubleshooting
  7. Connecting to icCube
  8. Configuring report
    1. Data source
    2. Slice
    3. Options
    4. Number formatting
    5. Conditional formatting
    6. Set report to the component
    7. Get report from the component
    8. Date and time formatting
    9. Calculated values
    10. Custom sorting
  9. Integration
    1. Integration with AngularJS
    2. Integration with Angular 2
    3. Integration with Angular 4
    4. Integration with React
    5. Integration with RequireJS
    6. Integration with TypeScript
    7. Integration with ASP.NET
    8. Integration with JSP
    9. Integration with PhoneGap
  10. Integration with charts
    1. Integration with Highcharts
    2. Integration with FusionCharts
    3. Integration with Google Charts
    4. Integration with any charting library
  11. Customizing toolbar
  12. Customizing appearance
  13. Localizing component
  14. Global Object
  15. Export and print
  16. API reference - JavaScript
  17. API reference - Flex
Table of contents

Quickstart

Embed into the web application

Here you can find a guide through the process of embedding Pivot Table and Charts Component into your HTML using flexmonster.js library.

To get your Pivot Table component embedded you should accomplish the following steps:

  1. Download a free trial of the component and extract the files from the downloaded package.
  2. Copy flexmonster/ folder into your web project root to your server.
  3. Include jquery and flexmonster.js into your HTML page. Please note, that your page should be in the same folder as flexmonster/:
    <script src="flexmonster/lib/jquery.min.js"></script>
    <script src="flexmonster/flexmonster.js"></script>
    
    
  4. Create <div> container for the component:
    <div id="pivotContainer">The component will appear here</div>
    <script src="flexmonster/lib/jquery.min.js"></script>
    <script src="flexmonster/flexmonster.js"></script>
    
  5. Add simple script to embed the component. Please note, licenseKey is your license or trial key, so you should replace XXXX-XXXX-XXXX-XXXX-XXXX with an actual key:
    <div id="pivotContainer">The component will appear here</div>
    <script src="flexmonster/lib/jquery.min.js"></script>
    <script src="flexmonster/flexmonster.js"></script>
    
    <script>
    	var pivot = $("#pivotContainer").flexmonster({
    		toolbar: true,
    		licenseKey: "XXXX-XXXX-XXXX-XXXX-XXXX"
    	});
    </script>
    
    
  6. Now launch the page from browser — here you go! The component without data is embedded into your project. You can see the example on JSFiddle.
  7. The next step is to see your own data on the grid. Find detailed tutorials for connecting Pivot Table to the following data sources: JSON, CSV, SQL database, Microsoft Analysis Services, Mondrian and icCube.

Should you have any problems — visit our troubleshooting page.

Initial jQuery call to embed the component

This is the first API call you need to know.

$("#pivotContainer").flexmonster({
	componentFolder:String, 
	global:Object, 
	width:Number, 
	height:Number, 
	report:Object|String, 
	toolbar:Boolean, 
	licenseKey:the license key})

As a parameter jQuery call gets id of the HTML element you would like to have as a container for the component.
It embeds the component into HTML page and allows you to provide it with all necessary information for the initialization by setting the following arguments:

  • componentFolder – URL of the component’s folder which contains all necessary files. Also, it is used as a base URL for report files, localization files, styles and images. The default value for componentFolder is flexmonster/.
  • global – object that allows you to preset options for all reports. These options can be overwritten for concrete reports. Object structure is the same as for report.
  • width – width of the component on the page (pixels or percent). The default value for width is 100%.
  • height – height of the component on the page (pixels or percent). The default value for height is 500.
  • report – property to set a report. It can be inline report JSON or URL to report JSON. XML reports are also supported in terms of backward compatibility.
  • toolbar – parameter to embed the toolbar (the one that is shown in Pivot Table demo) or not. Default value is false – without toolbar.
  • licenseKey – the license key.

All the parameters are optional. If you run $("#pivotContainer").flexmonster() – empty component without toolbar will be added with the default width and height.