# statistics.reports.{name}.report_elements.{name}.graphs
---

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

infos_node: profile.statistics.reports.report_elements.graphs

structure:

  graphs:
    graph_type:               string
    y_axis_height:            int
    x_axis_length:            int
    show_chrono_graph:        bool
    show_3d:                  bool
    show_percent_on_y_axis:   bool
    sort_all_descending:      bool
    max_variables:            int
    show_remainder:           bool
    show_legend:              bool
    show_percent_in_legend:   bool
    show_values_in_legend:    bool
    max_legend_rows:          int

infos:

  - node:               graph_type
    values:             [bar, line, pie]
    default_value:      bar

  - node:               y_axis_height
    min_value:          1

  - node:               x_axis_length
    min_value:          1

  - node:               show_chrono_graph
    required_if:        if the report element supports chrono mode (single
                        non-aggregating field and of type date_time)

    comment:            Shows a graph in chronological order.

  - node:               show_3d
    required_if:        if type eqal pie

    comment:            Shows a 3D  pie chart.

  - node:               show_percent_on_y_axis
    required_if:        if type eqal bar or line
    version_added:      8.6.0

  - node:               sort_all_descending
    default_value:      true

    comment:            >
                        If not in chrono mode: If true we sort each graph
                        field descending. Else we sort by report element
                        sort_by and sort_direction.

  - node:               max_variables
    value:              greater 0
    required_if:        if non-chronological bar or line graph or pie chart

  - node:               show_remainder
    required_if:        if non-chronological bar or line graph
    comment:            A pie chart always shows the remainder, if any.

  - node:               show_legend
    required_if:        if non-chronological bar or line graph or pie chart

    comment:            If a graph is in chrono mode we simply ignore the
                        legend. Though as we allow a date_time field graph to
                        be sorted by i.e. hits where we swicth to non-chrono
                        mode (x-axis shows simply 1,2,3...) it is useful to
                        show a legend in this case.

  - node:               show_percent_in_legend
    default_value:      false
    required_if:        if show_legend equal true
    version_added:      8.6.0

  - node:               show_values_in_legend
    default_value:      false
    required_if:        if show_legend equal true
    version_added:      8.6.0

  - node:               max_legend_rows
    min_value:          1
    required_if:        if show_legend equal true

...














