Website: www.flexmonster.com
Flexmonster Pivot is a powerful JavaScript tool for interactive web reporting. It allows you to visualize and analyze data from JSON, CSV, SQL, NoSQL, Elasticsearch, and OLAP data sources fast and conveniently. Flexmonster is designed to integrate seamlessly with any client-side framework and can be easily embedded into your application.
This repository contains the utility for converting Flexmonster reports from old XML format (versions 1.5 through 2.2) to JSON format (version 2.3 and later). You can also use the online version of the converter, which is available on our website.
Table of contents:
- Download a
.zip
archive with the converter or clone it from GitHub with the following command:
git clone https://github.com/flexmonster/pivot-xml-report-converter.git
The converter is located in the js/
folder.
- Use the converter in your project. It can be done as follows:
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<!-- Include the converter in your HTML page -->
<script type="text/javascript" src="pivot-xml-report-converter/js/fm-converter.js"></script>
<script type="text/javascript">
const xmlReport = '<config>' +
'<dataSource type="csv">' +
'<filename>https://cdn.flexmonster.com/data/data.csv</filename>' +
'</dataSource>' +
'</config>';
let jsonReport = fmCovertXmlReport(xmlReport);
console.log(jsonReport);
</script>
Note that the xmlReport
should have the String
type. In the index.js
file, you can find an example of reading a local .xml
file and passing the String
data to the converter.
- Install the converter with the following npm command:
npm install pivot-xml-report-converter
- Use the converter in your project. It can be done as follows:
let converter = require('pivot-xml-report-converter');
const xmlReport = '<config>' +
'<dataSource type="csv">' +
'<filename>https://cdn.flexmonster.com/data/data.csv</filename>' +
'</dataSource>' +
'</config>';
let jsonReport = converter(xmlReport);
console.log(jsonReport);
Note that the xmlReport
should have the String
type. In the index.js
file, you can find an example of reading a local .xml
file and passing the String
data to the converter.