Need a special offer?Find out if your project fits.
+

How to configure report using array of arrays

Resolved
sudhasmsa asked on August 23, 2018

Hello, 
 
I am trying to configure Pivot report( Javascript) . Trying to create like a parent child king of thing.
Here is how my data looks like.
 

var inlineJSon =   [
{
"id" : 1,
"name": "blahblah",
"children": [
{
"id" : "2",
" probability": "0.8"
}
]
}
]

I would like to create a parent child relation. Like I have all my parent as row's and in the columns I would to like child id's and probabilities.Something like a tree structure.


Could you please suggest a direction ?

3 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster August 24, 2018

Hello, Sudhasmsa,
Thank you for writing to us!
In Flexmonster it is possible to use two formats of JSON data:
1) array of objects, where each object is an unordered set of name/value pairs
2) array of arrays, where each sub-array contains ordered values
We suggest using the data in one of these formats. In order to get hierarchical data with several levels, it is possible to define data types. For more details please refer to the guide: Data types in JSON
Please let me know in case of any other questions.
Regards,
Tanya

Public
sudhasmsa August 27, 2018

Thank you for the swift response. So, I tried playing with Data types and hierarchical data as I listed above.  I am not sure whether flexmonster can handle nested array inside another or am I missing something.  Please let me know.

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster August 28, 2018

Hello, Sudhasma,
Thank you for your feedback. Flexmonster component does not support input data format which you suggested in your first message. As my colleague Tanya has already mentioned you need to format your input data according to the supported data formats. If you need to represent it as a parent-child relation we recommend to group the data under one folder as it is described in the following example: https://jsfiddle.net/flexmonster/pzj5cwd8/. You need to configure meta object and group data under one dimensionUniqueName.
Please let us know if the suggested approach works fine for you.
Regards,
Dmytro

Please login or Register to Submit Answer