Render a graph with user points balances of desired points type(s).
Attributes:
- type – The points type(s). Accepts:
all
or any points type(s) slugs. - amount – The amount type to use as graph values. Accepts:
earned
,deducted
,expended
- current_user – Show points balances of the current logged in user. Accepts:
yes
orno
Default:yes
- user_id – Show points balances of a specific user.
- period – Display the period input. Accepts:
yes
orno
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
orno
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
orno
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_points_types_graph type="all" amount="earned" 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)"]