Official Content

You can use this property to act programmatically on the chart elements. It contains the name of the variable based on the QueryViewerElements SDT.

Values

&Elements Name of the variable that will implement the changes’ inherent properties. This is the default value.

QueryViewerElements SDT Structure

QueryViewerElements

Example

For the following example, the following query is taken as a reference.

ElementsPropertySample01

The information displayed can often be lengthy when the elements that comprise it are expanded (default setting). This may be easily avoided by collapsing all the elements starting from the first one, or from another element close to the first one. Later on, the user will expand those nodes as needed.

In the image below, the PivotTable is completely expanded.

ElementsPropertySample02

The following code shows how to completely collapse all the elements for the Brand element.

Event Start
    &Element = New()
    &Element.Name = !"CarBrandName"
    &Element.ExpandCollapse.Type = QueryViewerExpandCollapse.CollapseAllValues
    &Elements.Add(&Element)
EndEvent

The result would be as follows:

ElementsPropertySample03

Besides, if you don't want to display its subtotals, you can add the following to the previous code:

    &Element.Format.Subtotals = QueryViewerSubtotals.No

and the result would be as shown in the image below.

ElementsPropertySample04

Scope

Output type: Table, PivotTable, Chart, Card


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant