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

Fieldslist Shows Up When Using API as DataSource Type (VUE)

Answered
Dan asked on June 29, 2021

According to the documentation the Fieldlist should be hidden by default, and in every case that I've tested it is, EXCEPT whenever the dataSource type is set to api. I confirmed this wasn't just unique to my application by cloning down the https://github.com/flexmonster/pivot-vue repo and changing the data source to api, setting the url to https://olap.flexmonster.com:9500 and the index to fm-product-sales.
For some reason, that will cause the fieldlist to automatically pop open when the component is mounted. Is there any way to prevent that from happening, while still using an API as the data source?

2 answers

Public
Vera Didenko Vera Didenko Flexmonster June 29, 2021

Hello, Dan,
 
Thank you for writing to us. 
 
For custom data source API, the Field List is automatically displayed if no data slice is specified.
To hide the Field List, a default slice needs to be provided, for example:

"dataSource": {
"type": "api",
"url": "https://olap.flexmonster.com:9500",
"index": "fm-product-sales"
},
"slice": {
"rows": [
{"uniqueName": "Color"}
],
"measures": [
{
"uniqueName": "Price",
"aggregation": "sum"
}
]
}

Here is a JSFiddle for illustration: https://jsfiddle.net/flexmonster/ctndsu7v/.
 
Please let us know if this helps.
 
Kind regards,
Vera

Public
Dan July 1, 2021

Awesome. Thanks for the quick response and helpful information.

Please login or Register to Submit Answer