🎉 Flexmonster Pivot Table & Charts v2.8 has arrived!Read the blog post
Get Free Trial
Get Free Trial

Hello, Array of pivot tables

Answered
Bilguun asked on January 6, 2020

Dear Flexmonster team,
I have a question, first im using trial version.
How do i get pivot table instance or call selector properties, Here is explanation
i need more pivot tables something like [].push(newpivot) then i itterate all those pivots i need access these pivots container properties im using var newPivot = new Flexmonster({container: “#ddd”, })
[].push(newPivot)
[0].width = “100%”;
[0].toolbar = true;
so on
Excuse my poor english 
Thank you
 

4 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 6, 2020

Hello,
 
Thank you for your question.
 
When a new instance of Flexmonster is created, you obtain its reference that allows modifying the state of the component through the provided API.
 
We would like to kindly draw your attention to the fact that the size of the component has to be specified in advance, as well as the presence of the Toolbar.
 
However, in case changing such options is required, we recommend using the following workarounds:

  • In order to add or remove the Toolbar after the component is created, we recommend hiding it through CSS by default. An example demonstrating such an approach.
  • In order to change the size of the component, its container can be placed inside the resizable wrapper. Please note that the size of Flexmonster’s container has to be specified in percents. Please check out an example by following the link: https://jsfiddle.net/flexmonster/mLgroce6/.

 
We hope it works for you.
 
Please contact us in case of additional questions.
 
Regards,
Illia

Public
Bilguun January 7, 2020

Thank you for quick reply. Little bit misunderstood in my side what is real reason is i need 2 or more pivot tables then i have named those pivot tables generate Global Unique Identifier container: “c7b1e3fd-c1a7-4139-b96d-32eed6b1e898” so name must be different. First crated table cannot get GUID after rendered this GUID added then i cant control hide menu button if i create another pivot table second created table toolbarhide button control first created pivot table toolbar  shown hide 
Second thing: 
When i have [] of pivot i need access https://imgur.com/a/gAHmpvO this properties then i can ettirate over loop through my pivots then possible to save database then call again here please how can i access named pivot properties getReport() function hasnt there 

Attachments:
pivot.zip

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 8, 2020

Hello,
 
Thank you for your feedback.
 
Hiding the Toolbar for multiple instances is achievable through CSS selectors.
 
The getReport API can be called for the specific instance of Flexmonster by the reference it has obtained with a creation. In case you use an array in order to save references, the call has to have the structure similar to the following:

instancesArray[n].gerReport();

 
Please check out an example demonstrating the approaches described above.
 
Kind regards,
Illia

Public
Bilguun January 9, 2020

Thank you works well.

Please login or Register to Submit Answer