analytics/chart on the fly
The analytics/chart
ui for qlik-embed accepts additional properties to
create a chart on the fly. This is a visualization which doesn’t
exist in the source Qlik Sense app, and is instead generated for the current
session when you supply the chart type, dimensions, and measures.
Note: Supports visualizations that work with the
analytics/chart
ui only. Review the visualization support table for compatibility information.
Here’s an example of a chart on the fly definition using qlik-embed web components.
When defining arrays or objects in HTML attributes, use either single quotes around the
attribute and standard double quotes inside, or encode double quotes as "
for valid
static HTML. This example uses single quotes for readability.
<qlik-embed ui="analytics/chart" app-id="<appid>" type="barchart" dimensions='["[CategoryName]", "[Product Name]"]' measures='["=Sum(Sales)", "=Sum([Cost of Goods Sold])", "=Sum([GrossMargin])"]' properties='{orientation: "horizontal"}' state-name="name_of_the_state" theme="breeze"></qlik-embed>
To create a chart on the fly, supply values for these properties:
app-id
: a unique Id representing a Qlik Analytics application.type
: The type of visualization to render. Here’s a list of available visualizations to choose from.
Depending on chart type, add:
dimensions
: An array field names or master dimension names wrapped with square brackets for Qlik script compatibility.measures
: An array of expressions pre-fixed with an equal sign, or square brackets for Qlik script compatibility.
You can also add additional properties:
state-name
: A string for the name of the alternate state to apply to the chart (must exist in the app).properties
: An object setting specific properties to control the presentation of the rendered object.
Want to explore more qlik-embed? Explore all qlik-embed UIs and params.