Description

The Graph Flow Tag displays network data rendered as a Sankey diagram. The body of the Graph Flow tag can contain a Chart Credit Tag for adding a credit to the chart and the Chart Export Tag for exporting the chart. For detail on how to change the color and background color see the demo below, for more detail on what you can change and set using CSS see here. The following tags can be nested within the chart sankey tag.

Usage

as element:
<graph:flow
       platform="{string}"
       query="{string}"
       source-field="{string}"
       target-field="{string}"
       [measure="{string}"]
       [measure-field="{string}"]
       data="{object}"
       [title="{string}"]
       [subtitle="{string}"]
       [series-name="{string}"]
       [inverted="{boolean}"]
       [options="{object}"]>
</graph:flow>

Directive info

  • This directive creates new scope.

Parameters

ParamTypeDetails
platformstringName of the platform (Required if not using data attribute).
querystringName of the query (Required if not using data attribute).
source-fieldstringName of a primary field to facet on (for example “Country”). The values of this facet will define the set of graph nodes with outgoing edges. (Required if not using data attribute).
target-fieldstringName of a secondary field to facet on (for example “City”), for every facet value of the primary field. The values of this facet will define the set of graph nodes with incoming edges. For example, say the primary facet (source-field) has values for Country=Germany and Country=France and the secondary facet (target-field) has values for City=Berlin, City=Munich and City=Paris. Then we add graph edges Germany-→Berlin, Germany-→Munich and France-→Paris. (Required if not using data attribute).
measure (optional)stringName of a numerical measure that defines the weight of each graph edge. When omitted, this defaults to the counts of the facets defined by the target-field. Some possible measures include “sum”, “mean” and “min”. (Only applicable if not using data attribute).
measure-field (optional)stringField to measure, when the “measure” option is specified.
dataobjectArray of arrays containing the data to render the sankey chart. In the format of ['from', 'to', 'weight'] [ ['Spain', 'Portugal', 100] ['Spain', 'Brazil', 300] ] (Required if not using the platform attribute)
title (optional)stringChart title
subtitle (optional)stringChart sub title
series-name (optional)stringThe name of the series. (default: ”)
inverted (optional)booleanWhether the chart should be inverted. (default: true)
options (optional)objectExtend the current options. Options can be found here.