---

node:       profiles.$profile_node_name.statistics.reports.$name.
            report_elements.$name

infos_node: profile.statistics.reports.report_elements


structure:

  report_elements:
    _:                                  node-list    # foreach report element
    label:                              string
    display_side_by_side:               bool
    show_header_bar:                    bool
    report_link:                        string
    header:                             string
    footer:                             string
    description:                        string
    date_filter:
      df:                               string
    filters:
      expression:                       string
    table_filter_expression:            string
    type:                               string
    report_field:                       string       # Removed
    show_graphs:                        bool
    show_table:                         bool

    compact_view:                       bool
    display_graphs_side_by_side:        bool
    maximum_table_bar_graph_length:     int

    sort_by:                            string
    sort_direction:                     string
    number_of_rows:                     int
    omit_parenthesized_items:           bool
    use_overview_for_totals:            bool
    show_remainder_row:                 bool
    show_averages_row:                  bool
    show_min_row:                       bool
    show_max_row:                       bool
    show_totals_row:                    bool

    session_user_field:                 string
    session_date_time_field:            string
    session_id_field:                   string
    session_duration_field:             string
    session_events_field:               string
    session_entrances_field:            string
    session_exits_field:                string
    session_sequence_number_field:      string
    session_page_field:                 string

    expand_paths_greater_than:          bool
    number_of_rows_expanded:            int

    graphs:                             node
    pivot_table:                        node
    columns:                            node-list

infos:

  - node:               label

  - node:               display_side_by_side
    default_value:      false
    comment:            This flows the report element next to the previous
                        report element as long as there is enough horizontal
                        space.

    version_added:      8.6.0

  - node:               show_header_bar
    default_value:      false
    comment:            The meaning of this option is actually to show the
                        report element name because the header bar/line is
                        always shown since version 8.6.0.

  - node:               report_link
    value:              optional report node name
    comment:            This links the report element label to the given
                        report name.

    version_added:      8.6.0

  - node:               header
    comment:            Allow HTML markup in footer.

  - node:               footer
    comment:            Allow HTML markup in footer.

  - node:               description
    comment:            Report element description. Allow HTML markup in
                        description.

  - node:               date_filter.df
    comment:            Date filter, i.e. last3d. Applies to report element
                        only.

  - node:               filter.expression
    comment:            Salang report filter expression. Applies to report
                        element only.

  - node:               table_filter_expression
    comment:            >
                        Displays rows where the expression evaluates to true.

                        I.e.:
                        cell_by_name(row_number, 'page_views') > 20 or
                        (cell_by_name(row_number, 'size') > 1024) and
                        (cell_by_name(row_number, 'page_views') > 0)

                        This expression is especially useful because it
                        supports aggregating fields which are not yet covered
                        by the global filter.

  - node:               type
    values:
                        - overview
                        - table
                        - log_detail
                        - sessions_overview
                        - session_paths
                        - session_page_paths

  - node:               report_field
    removed:            true
    comment:            The node name of a non-aggregating report field.

  - node:               show_graphs
    required_if:        if type equal table

  - node:               show_table
    required_if:        if type equal table

  - node:               compact_view
    required_if:        if type equal overview
    comment:            Displays the overview as horizontal bar.
    version_added:      8.6.0

  - node:               display_graphs_side_by_side
    required_if:        if type equal table
    comment:            This flows the graphs next to each other within the
                        report element as long there is enough horizontal
                        space. This is the new default behaviour starting with
                        version 8.6.0 if the option doesn't exist or when a new
                        report element is added.

    version_added:      8.6.0

  - node:               maximum_table_bar_graph_length
    value:              greater 0
    required_if:        if type equal table
    comment:            Defines the maximum table bar graph length.
    version_added:      8.6.0

  - node:               sort_by
    value:              empty or report field node name
    required_if:        if type equal table or log_detail

  - node:               sort_direction
    value:              [ascending, descending]
    default_value:      descending
    required_if:        if type equal table or log_detail

  - node:               number_of_rows
    value:              greater 0
    required_if:        if type equal table or log_detail or session paths or
                        session page paths

  - node:               omit_parenthesized_items
    required_if:        if type equal table

  - node:               use_overview_for_totals
    required_if:        if type equal table

  - node:               show_remainder_row
    required_if:        if type equal table

  - node:               show_averages_row
    required_if:        if type equal table

  - node:               show_min_row
    required_if:        if type equal table

  - node:               show_max_row
    required_if:        if type equal table

  - node:               show_totals_row
    required_if:        if type equal table

  - node:               session_user_field
    required_if:        type equal sessions_overview or session_paths
    value:              database field node name

  - node:               session_date_time_field
    required_if:        type equal sessions_overview or session_page_paths
    value:              database field node name

  - node:               session_id_field
    required_if:        type equal sessions_overview or session_paths or
                        session_page_paths
    value:              database field node name

  - node:               session_duration_field
    required_if:        type equal sessions_overview
    value:              database field node name

  - node:               session_events_field
    required_if:        type equal sessions_overview
    value:              database field node name

  - node:               session_entrances_field
    required_if:        type equal sessions_overview or session_page_paths
    value:              database field node name

  - node:               session_exits_field
    required_if:        type equal sessions_overview or session_page_paths
    value:              database field node name

  - node:               session_sequence_number_field
    required_if:        type equal session_paths
    value:              database field node name

  - node:               session_page_field
    required_if:        type equal session_paths or session_page_paths
    value:              database field node name

  - node:               expand_paths_greater_than
    required_if:        type equal session_paths
    comment:            This option is only used for command line reports

  - node:               number_of_rows_expanded
    required_if:        type equal session_paths
    comment:            This option is only used for command line reports

  - node:               graphs
    required_if:        type equal table
    defined_in_file:    profile.statistics.reports.report_elements.graphs.yaml

  - node:               pivot_table
    required_if:        type equal table
    defined_in_file:    profile.statistics.reports.report_elements.
                        pivot_table.yaml

  - node:               columns
    required_if:        if report element type equal overview, table or
                        log_detail
    defined_in_file:    profile.statistics.reports.report_elements.columns.yaml

...
