1. Documentation
  2. Frontend Reports
  3. [gamipress_frontend_reports_rank_types_graph]

[gamipress_frontend_reports_rank_types_graph]

Render a graph with user ranks earned of desired rank type(s).

Attributes:

  • type – The rank type(s). Accepts: all or any rank type(s) slugs.
  • current_user – Show ranks earned of the current logged in user. Accepts: yes or no Default: yes
  • user_id – Show ranks earned balances of a specific user.
  • period – Display the period input. Accepts: yes or no Default: yes
  • period_value – Set period initial value. If you hide the period input, user won’t be able to change this value. Accepts: this-week, past-week, this-month, past-month, this-year, past-year, custom Default: this-week
  • period_start – Period start date. Leave blank to no filter by a start date (graph will be filtered only to the end date).
    Accepts any valid PHP date format. (More information)
  • period_end – Period end date. Leave blank to no filter by an end date (graph will be filtered from the start date to today).
    Accepts any valid PHP date format. (More information)
  • range – Display the range input. Accepts: yes or no Default: yes
  • range_value – Set range initial value. If you hide the range input, user won’t be able to change this value. Accepts: week, month, year Default: this-week
  • legend – Show graph legend. Accepts: yes or no Default: no
  • background – Single or comma-separated list of colors to use as chart statistics background color. Accepts colors in format hex, rgb and rgba. Accepts: alpha Default: Array
  • border – Single or comma-separated list of colors to use as chart statistics border color. Accepts colors in format hex, rgb and rgba. Accepts: alpha Default: Array
  • grid – The grid lines color. Accepts colors in format hex, rgb and rgba. Accepts: alpha Default: rgba(0,0,0,0.1)
  • max_ticks – Set the maximum number of ticks. Leave blank to auto-calculate them.

Example:
[gamipress_frontend_reports_rank_types_graph type="all" current_user="yes" period="yes" period_value="this-week" range="yes" range_value="week" legend="" background="rgba(54,162,235,0.5),rgba(255,99,132,0.5),rgba(75,192,192,0.5),rgba(255,205,86,0.5),rgba(201,203,207,0.5)" border="#36a2eb,#ff6384,#4bc0c0,#ffcd56,#c9cbcf" grid="rgba(0,0,0,0.1)"]

How can we help?