Свойство | Type | Description | |
---|---|---|---|
$barwidth | integer | The bar width. | |
$chart_groupby | string | Group chart item by day or month. | |
$chart_interval | integer | The chart interval. | |
$end_date | The end date of the report. | ||
$group_by_query | string | Group by SQL query. | |
$start_date | The start date of the report. |
Méthode | Description | |
---|---|---|
calculate_current_range ( string $current_range ) | Get the current range and calculate the start and end dates. | |
get_chart_legend ( ) : array | Get the legend for the main chart sidebar. | |
get_chart_widgets ( ) : array | Get chart widgets. | |
get_currency_tooltip ( ) : string | Return currency tooltip JS based on WooCommerce currency position settings. | |
get_export_button ( ) | Get an export link if needed. | |
get_main_chart ( ) : string | Get the main chart. | |
get_order_report_data ( array $args = [] ) : mixed | Get report totals such as order totals and discount amounts. | |
output_report ( ) | Output the report. | |
prepare_chart_data ( array $data, string $date_key, string $data_key, integer $interval, string $start_date, string $group_by ) : array | Put data with post_date's into an array of times. | |
sales_sparkline ( integer $id = '', integer $days = 7, string $type = 'sales' ) : string | Prepares a sparkline to show sales in the last X days. |
public calculate_current_range ( string $current_range ) | ||
$current_range | string |
public get_chart_legend ( ) : array | ||
Résultat | array |
public get_chart_widgets ( ) : array | ||
Résultat | array |
public get_currency_tooltip ( ) : string | ||
Résultat | string |
public get_main_chart ( ) : string | ||
Résultat | string |
public get_order_report_data ( array $args = [] ) : mixed | ||
$args | array | |
Résultat | mixed | depending on query_type |
public prepare_chart_data ( array $data, string $date_key, string $data_key, integer $interval, string $start_date, string $group_by ) : array | ||
$data | array | array of your data |
$date_key | string | key for the 'date' field. e.g. 'post_date' |
$data_key | string | key for the data you are charting |
$interval | integer | |
$start_date | string | |
$group_by | string | |
Résultat | array |
public string $chart_groupby | ||
Résultat | string |
public string $group_by_query | ||
Résultat | string |