Shortcodes

[wt-chart]

The following shortcode is available in Pro version of the plugin.

This shortcode can be placed to render a chart of the user’s weight / measurement entries.

Shortcode Arguments

The shortcode supports the following arguments:

Argument Description Options Example
user-id The WordPress user ID to display data for. Defaults to the current logged in user. Numeric [wt-chart user-id=21]
max-data-points The maximum number of data points to plot on the chart. Default is the specified in admin settings. Numeric [wt-chart max-data-points=5]
type Type of chart to display. 'line' (default) or 'bar' [wt-chart type='bar']
weight-line-color The line colour for weight entries. Default is the specified in admin settings. Hex value. [wt-chart weight-line-color='#000']
weight-fill-color The fill colour for weight entries. Default is the specified in admin settings. (Only for bar charts when measurements are disabled) Hex value. [wt-chart weight-fill-color='#000']
weight-target-color The line colour for target. Default is the specified in admin settings. Hex value. [wt-chart target-line-color='#000']
show-gridlines If set to false, gridlines are removed from the chart. Default is specified in admin settings. True or false. [wt-chart show-gridlines=false]
bezier If set to false, the bezier curve is disabled. Default is specified in admin settings. Only applies to a line chart. True or false. [wt-chart bezier=false]
show-custom-fields If set to false, meta fields shall be hidden from the chart. Default is specified in admin settings. True or false. [wt-chart show-custom-fields=false]
ignore-login-status If set to true, will display the chart's data in the event the user is not logged in (should be used alongside user-id attribute). True or false (default) [wt-chart user-id=21 ignore-login-status=true]

 

Yes No Suggest edit
Help Guide Powered by Documentor
Suggest Edit