# statistics.reports.{name}.report_elements.{name}
---
structure:

  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:                               # Defined in separate file
  pivot_table:                          # Defined in separate file
  columns:                              # Defined in separate file

infos:

  - name:               label

  - name:               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

  - name:               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.


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

    version_added:      8.6.0


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

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

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

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

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

  - name:               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.

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

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

  - name:               show_graphs
    required_if:        if type equal table

  - name:               show_table
    required_if:        if type equal table


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

  - name:               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

  - name:               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

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

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

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

  - name:               omit_parenthesized_items
    required_if:        if type equal table

  - name:               use_overview_for_totals
    required_if:        if type equal table

  - name:               show_remainder_row
    required_if:        if type equal table

  - name:               show_averages_row
    required_if:        if type equal table

  - name:               show_min_row
    required_if:        if type equal table

  - name:               show_max_row
    required_if:        if type equal table

  - name:               show_totals_row
    required_if:        if type equal table

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

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

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

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

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

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

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

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

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

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

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

  - name:               graphs
    required_if:        type equal table

  - name:               pivot_table
    required_if:        type equal table

  - name:               columns
    required_if:        type equal table

...
