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

How to load the data.

David Chen asked on February 1, 2016

Trying to evaluate flexmonster pivot table.
The config file is where you specified where your data is located as well as pre determine rows/columns/aggregated function of which values
I was wondering if you can parse the code out instead looking at a physical file. for example
<div id=”pivotContainer”>The component will appear within this DIV.</div>
<script type=”text/javascript” src=”flexmonster/flexmonster.js”></script>
<script type=”text/javascript”>
flexmonster.embedPivotComponent(“flexmonster/”, “pivotContainer”,”100%”, “500”, {configUrl : “

<dataSource type=”OCSV>



     …… where you state your xml 





<axis name=”rows>

<hierarchy sort=”asc>





12 answers

Iryna Kulchytska Iryna Kulchytska Flexmonster February 1, 2016

Hi David,
You can pass report object (which is an analogue of the config XML file) into embedPivotComponent() function as the 5th parameter. Please check the following live sample
More information about report object can be found in the documentation: Please check getReport() and setReport() API calls.
Kind regards,

David Chen February 1, 2016

Exactly what we need!!
Another question I’m looking at All In One Demo
there is the menu: Connect, Open, Save, Grid, Charts, Format, Options, Fields, Export, Fullscreen.
Is it possible to hide Connect, Open, Save, Full Screen?
Also is it possible to hide the grid lines and well as the 1,2,3,4,5 grud header

David Chen February 1, 2016

Trying to implement this code, does seems to be working.
SyntaxEditor Code Snippet

<div id='pivotContainer'></div> 
<script type='text/javascript' src=''></script>
<script type='text/javascript'>
var jsondata = [{
    'Color': 'green',
    'M': 'September',
    'W': 'Wed',
    'country': 'Canada',
    'state': 'Ontario',
    'city': 'Toronto',
    'Price': 174,
    'Quantity': 22
  }, {
    'Color': 'red',
    'M': 'March',
    'W': 'Mon',
    'Time': '1000',
    'country': 'USA',
    'state': 'California',
    'city': 'Los Angeles',
    'Price': null,
    'Quantity': 19

var report = {
  configuratorActive: false,
  data: jsondata,
  rows: [{uniqueName: 'Color'}],
  columns: [{uniqueName: '[Measures]'}],
  measures: [{uniqueName: 'Price'}, {uniqueName: 'Quantity'}],
  formats: [{name: '', nullValue: 'blank'}]

flexmonster.embedPivotComponent('http://ourhost.../demo/html5/flexmonster/', 'pivotContainer','100%', '500', report, true);
Iryna Kulchytska Iryna Kulchytska Flexmonster February 1, 2016

I’m glad to read that this is exactly what you need.
Regarding your question about a possibility to hide Connect, Open, Save, Full Screen from the toolbar, it is possible to customize the toolbar as much as you need. Please find more information about hiding the buttons from the toolbar in the documentation –
Regarding your question about hiding the grid lines and well as the 1,2,3,4,5:
 – the grid lines can be removed by overriding CSS properties for grid cells –, as follows:
#fm-grid-view .fm-cell {
    border: 0px !important;
 – the rows/columns numbers can be hidden by setting the report property showHeaders to false, as follows:
Kind regards,

David Chen February 1, 2016

Thanks for answering the styling
The second issue was I’m trying implement the demo with your jsondata, it doesn’t seem to be working 

David Chen February 1, 2016

actually its working

David Chen February 1, 2016

Another question, once I purchased it, the trial and the trademark at the bottom of the grid will be removed?

daniil February 1, 2016

Hi David,
Thank you for your question. Yes, I do confirm that once you purchase the license, the trial watermark and the trademark will disappear at the bottom of the grid.
Kind regards,

David Chen February 1, 2016

Thank you, so far, I am very impress with it, we will definitely get it soon. Just need to evaluate playing it further especially with calculated field to see if it can achieve what we wanted. 

David Chen February 3, 2016

Base on the below code: both Price Quantity will be “Sum”, I assume this is by default. How to I change the default say into Count or Average?
SyntaxEditor Code Snippet

  rows: [{uniqueName: 'Color'}],
  columns: [{uniqueName: '[Measures]'}],
  measures: [{uniqueName: 'Price'}, {uniqueName: 'Quantity'}],
David Chen February 3, 2016

actually i will answer my question: 
SyntaxEditor Code Snippet

measures: [{uniqueName: 'Price', aggregation:'Count'}, { uniqueName:...
Tanya Gryshko Tanya Gryshko Flexmonster December 7, 2016

Hello David and all Flexmonster users,
Please note that embedPivotComponent() method was deprecated in version 2.3. You should use $(“#pivotContainer”).flexmonster() instead. This method has report property to set a report. It can be inline Report Object, URL to report JSON or URL to report XML. After the release of version 2.3, the structure of Report Object was changed. For more details please refer to the documentation:
Check the updated sample with hidden gridlines and headers:

Please login or Register to Submit Answer