Skip to main content

Dynamic Visualization and Content

Omni content can be made more dynamic by using the Mustache syntax to insert variables in different areas of the product - text tiles, dashboard titles, axis labels, and many more. Dynamic sections can read in variables like filters used, and do basic lookups into the query payload.

Here are a few examples (text tiles showing filters, axis with summary stats that shows filters):

Text Tiles​

From the dashboard text tiles can be made to dynamically reference filters that have been selected:

## Breakdown by Country
Filter applied: country **{{}}**
# Breakdown by state
Filter applied: state **{{filters.users.state.summary}}**

KPIs and Markdown Visualizations​

Markdown visualizations (in the workbook) can be wired to reference specific values in the table, as well the filters via the rows returned:

There have been **{{result._totals._first.order_items.order_count.value}}** orders placed for **{{result._first.products.brand.value}}** in **{{result._first.users.state.value}}**, and the average selling price is **{{result._first.order_items.sale_price_average.value}}**. 

See the πŸ—ΊπŸ“ below for **{{result._first.products.brand.value}}** stores in the top selling city - **{{}}, {{result._first.users.state.value}}**.

Iframes (via Markdown Visualization)​

Similar to vanilla markdown tiles, iframes can be made dynamic as well, here using a Google Maps search with a dynamic URL:

<iframe src="{{result.0.products.brand.value_static}}+in+{{}},{{result._first.users.state.value_static}}&key=AIzaSyCXfF4zpXaYkgVaBzj3oZUtmcDAxpdoOGk&" width="100%" height="100%" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>

Visualization Axis Labels​

Visualizations can also be made dynamic, here in the y-axis label to show summary values and the filter objects:

Order Count ({{result._totals.0.order_items.order_count.value}} Total Orders in {{result.0.users.state.value}})