SunburstGetValue

Fetches a value from a segment within a Sunburst Chart. You must use this function with the chart interactivity options, situated in the control's configuration window.

Syntax

SunburstGetValue( SunburstKeyword, ValueOption );

Parameters

Parameter Name Type Description Optional? Default Value
SunburstKeyword String The keyword of the intended Sunburst chart question. No n/a
ValueOption Variable Determines the type of value to interrogate. For a full list of potential values for this parameter, refer to the table below this one. No n/a

Potential arguments for ValueOption:

Integer String Equivalent Value Returned
1 All A list of all values from the selected segment, each separated by a pipe symbol (|).
2 XValue The name of the selected segment.
3 YValue The value of the selected segment.
4 ParentText The name of the selected segment's parent.
5 LayerIndex The index of the selected segment within the Sunburst chart.
6 PointIndex The index location of the selected segment in relation to its parent.
7 GroupName The name of the group to which the selected segment belongs.

Output

Case Result
ValueOption is set to 1 or "All" "XValue|YValue|ParentText|LayerIndex|PointIndex|GroupName"
ValueOption is set to another valid argument The requested value as a string
The function is unsuccessful An empty string

Use Case

The following function demonstrates how using SunburstGetValue in an action lets you retrieve a value—in this case, the value—from a specific Sunburst segment:

SunburstGetValue( SunburstChart, 3 );

This could be used with any Sunburst chart, such as the following:

An example of a Sunburst chart.

For example, clicking the segment labelled "London" would return its related value as a string:

400

If you were to click a parent segment, such as "UK", the function would combine the value of all child segments. In this case it would return:

1000