Replies: 4 comments 2 replies
-
Hi, In case your Slice with representation has ID 123 use: Without having the dec source to this assumption (anybody please correct otherwise), preselect_filters addressed to the filter_box will be propagated to all slices unless filters are not set on the ignore list. |
Beta Was this translation helpful? Give feedback.
-
Ok, I have to admit there was some steps and infos missing. But it's doable. It's just not very obvious. Easiest way to understand is as follows:
You'll notice there's all parameters injected using encoded JSON. Inside the url_params there's a slice_id. Also you'll find adhoc_filters, which you can change to your needs. If you'd like to have the Chart render without all controls, just add '&standalone=true' to the end of the URL. You also might not need all the params listed, so adjust to your needs. Hope this helps. Sidenote: I found export/import lacks the ability to deal with charts that do not belong to a dashboard. So I ended up putting all those charts into a fake dashboard, so those can be exported and imported easily. Also you want them to have only the same datasource in one chart to avoid an import mess. So best use one fake dashboard per database and you'll be able to export and import your work easily. Charts alone do not offer that functionality (if, please let me know ;-) |
Beta Was this translation helpful? Give feedback.
-
Have you considered, hiding the chart in the dashboard with CSS? if all you want to do is hide it, that should be simple enough. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I need to pass dynamic ids from URL. I tried adding filter box and preselect_filters in the URL like below but it is not working. |
Beta Was this translation helpful? Give feedback.
-
Hi all, the final goal I'm trying to achieve is:
For example, if I have a Dashboard made up of a Filer Box and a Slice, using the following URL allows me to have the results correctly pre-filtered:
http://<THE_SERVER>:8081/superset/dashboard/27/?preselect_filters={"178": {"name": ["John Smith"], "__time_range": "Last week"}}
The problem is that I'll also have a Filter Box in full sight, and I don't want to present it in the final embedding iframe
But, obviously, if I remove the Filter Box element from Dashboard "27", it doesn't work anymore. The Dashboard that will be generated using the above URL won't be filtered at all
The question:
Thanks for any useful insights!
Beta Was this translation helpful? Give feedback.
All reactions