Column Chart Configuration

Function

a!columnChartConfig()( primaryGrouping, secondaryGrouping, measures, sort, dataLimit, link )

Contains configuration for how to display data in a column chart. See the Column Chart Component page for examples on using this configuration supporting function.

See also:

Parameters

Name Keyword Types Description

Primary Grouping

primaryGrouping

Grouping

Defines the field labels to display on the axis in the chart, configured using a!grouping().

Secondary Grouping

secondaryGrouping

Grouping

Defines the field labels to display in the stacking or grouped bars in the chart, configured using a!grouping().

Measures

measures

Measure

Defines the numerical calculations for data in the chart, configured using a!measure(). If no measure is provided, a count of records shows as the measurement in the chart.

Sort

sort

SortInfo

Use a!sortInfo() to define a sort. Use the alias of any groupings or measures, and sort in ascending or descending order. If an alias is not defined, use the record field references from groupings or measures.

Data Limit

dataLimit

Integer

Maximum number of data points to display on the chart. Default: 100. Valid values: 1-5000.

Link

link

Any Type

Link to execute when a user selects a data point on the chart. Use fv!selection to pass context from the selection made on the chart to the link. Create a link using a!dynamicLink().

Usage considerations

Using a!columnChartConfig()

  • a!columnChartConfig() is always used within a column chart component.
  • This configuration is used when a record type is defined as the data source for a column chart.
  • If no measure is provided, the chart displays a count of records. Also, the label displays as Count of <primary key field name>.

Using groups and data limits

  • The primaryGrouping is required to display data on the chart. The data values returned from the grouping display on the horizontal axis.
  • The secondaryGrouping is optional; if this parameter is provided, the data values for the secondary grouping will display in the legend and / or tooltips if they are enabled.
  • The dataLimit determines the total number of data points displayed in the chart. When both a primary and secondary grouping are provided, there is a data point for each unique combination of values: with 3 values in your primary grouping and 4 values in your secondary grouping, you will have 12 values on your chart.
  • When a dynamic link is added to the link parameter, the current selected data is available using fv!selection. This variable returns a map that contains each of the field aliases as the key and the unformatted value as the value. Since the alias is used for the key, aliases are required for each grouping and measure when using a link. See Chart Configuration Using Records for an example of how to configure a link.

Using the sort parameter

  • You can sort by any field used in the groupings or measures.
  • When configuring sort in Design Mode, you must sort by an alias. In Expression Mode, you can use an alias or a field name if an alias is not provided.
  • You can add multiple sorts in your configuration.
Open in Github Built: Fri, Oct 22, 2021 (11:11:24 AM)

On This Page

FEEDBACK