Templating from chart's dataset

Overview

As an App Builder, you could want to display information from datasets to contextualize your stories.

Usage

In order to template the dataset's column value, you'll need to use the following syntax:

<$= data["CHART_ID"]["datasetColumn"] $>

In the " Information " section, you can retrieve the chart's ID inside its configuration form, inside the "Information" section.

However, when referring to a column resulting from an aggregation made through the SmartEditor, the column ("my_column") to which you must refer follows this format: __aggregType_myColumn__.

So for example, when referring to a column "profit" aggregated with the sum operator, the syntax to use will be:

<$= data["4c7274d9-bae4-e77c-d1ef-21ddd98dee0c"]["__sum_profit__"] $>

Here is the list of the different aggregation prefixes: sum (for sum), avg (for average), min (for minimum), max (for maximum), first (for first), last (for last), count (for count), count distinct (for Count Distinct).

As of today, you can't refer to a column that isn't used in your chart's configuration.

Example in a Narrative

Templating

(also starring a Filter's value)

Templated

Last updated