Initialize FlexMonster with Chart and only a Chart

Re-Open
Eric Morgan asked on February 11, 2019

We’ve had great luck using FlexMonster to create queries, do analysis, and generate charts and documents from the results. This functionality is reserved for trained and admin level persons within our application.
We would like the ability to load a targeted and preconfigured (as by an admin above) chart immediately for low level persons. They would see a chart but have no ability to select other data sets or other queries.
For example I (as admin) could create a query that finds % of persons that have received a flu shot in the last 90 days. I would like the results of this query in chart format to show up for lower level nurses as they login to our system. They can see the charted result but not any other details, grids, or toolbars. Only informative, not interactive. 
Can you provide any insight on how to do this?
 
Something like with bad pseudo code:
flexmonster.showOnlyChart(key, dataSetID, queryID, chartType, ….);
 
Thanks!
-Eric

5 answers

Public
Dmytro Zvazhii Flexmonster February 12, 2019

Hello Eric,
Thank you for writing to us.
Such behavior can be achieved with Flexmonster’s configurations.
You will need to create a Flexmonster instance with the following set of configs: 
– disable toolbar with applying toolbar: false,
– apply the necessary options configs, you can refer to our doc: https://www.flexmonster.com/api/options-object/
– disable context menu for charts by applying customizeContextMenu function, please refer to the following article: https://www.flexmonster.com/api/customizecontextmenu/
Also, here is a jsfiddle example which describes the idea: https://jsfiddle.net/flexmonster/af6nuvjs/.
Please let us know if it works for you.
Regards,
Dmytro

Public
Eric Morgan February 12, 2019

As usual great support! I will try this and report success/fail.
Thanks!!!
-Eric

Public
Chris Anderson March 6, 2019

Hi Eric,
Did this solution work for you? We’d be keen to do something very similar.
Thanks

Public
Eric Morgan March 6, 2019

I got busy and forgot to report back. Yes, this does work nicely!

Public
Chris Anderson March 6, 2019

Thanks Eric, much appreciated!

Please login or Register to Submit Answer