Filter
rpress_category_earnings_graph_options
On this page
Filters the options passed to the category earnings pie chart.
Runs just after rpress_category_earnings_graph_data and before the RPRESS_Pie_Graph is created. The default array only sets legend_formatter; other pie graph options such as height or legend_position can be added.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$options | array | Pie graph options. By default only legend_formatter is set. |
$data | array | The label => total earnings array that will be plotted. |
Return value#
array. The pie graph options.
Example#
function my_earnings_pie_options( $options, $data ) {
$options['legend_position'] = 'e';
$options['show_labels'] = true;
return $options;
}
add_filter( 'rpress_category_earnings_graph_options', 'my_earnings_pie_options', 10, 2 );
Notes#
Fired from both the categories report table and the add-ons report table.
Source#
Applied in:
includes/admin/reporting/class-addons-reports-table.php(line 310), inRPRESS_Addons_Reports_Table::output_earnings_graph()includes/admin/reporting/class-categories-reports-table.php(line 310), inRPRESS_Categories_Reports_Table::output_earnings_graph()
See also#
Was this page helpful?
