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 tutorial will help you integrate Flexmonster with the RequireJS framework. Follow this guide to set up a simple RequireJS project using Flexmonster Pivot Table & Charts.
To get our sample project, download it as ZIP or clone it with the following commands:
git clone https://github.com/flexmonster/pivot-requirejs
cd pivot-requirejs
Install the npm dependencies described in package.json
:
npm install
Open the index.html
file in the browser to see the result.
Let’s take a closer look at the folder structure of this application:
scripts/
– the folder containing application JavaScript files:
main.js
- the main application file; this is where we embed Flexmonster.require.js
- the RequireJS library.index.html
– here we add the <div>
container for Flexmonster.package.json
– contains the description of the npm dependencies.Take a look at the contents of the key files:
requirejs(["node_modules/flexmonster/flexmonster.full.js"],
function() {
var pivot = new Flexmonster({
container: "pivotContainer",
toolbar: true,
report: "https://cdn.flexmonster.com/reports/report.json"
})
})
<!DOCTYPE html>
<html>
<head>
<title>Flexmonster Sample Project</title>
<!-- data-main attribute tells require.js to load
scripts/main.js after require.js loads. -->
<script data-main="scripts/main"
src="scripts/require.js">
</script>
<link rel="stylesheet" type="text/css"
href="node_modules/flexmonster/flexmonster.css">
</head>
<body>
<h1>Flexmonster Sample Project</h1>
<div id="pivotContainer"></div>
</body>
</html>
You may be interested in the following articles: