parent
23c500986e
commit
bc24a2e854
|
@ -19,7 +19,7 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $chart_colors = array();
|
||||
public $chart_colours = array();
|
||||
|
||||
/**
|
||||
* Coupon codes.
|
||||
|
@ -107,14 +107,14 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
|||
$legend[] = array(
|
||||
/* translators: %s: discount ammount */
|
||||
'title' => sprintf( __( '%s discounts in total', 'woocommerce' ), '<strong>' . wc_price( $total_discount ) . '</strong>' ),
|
||||
'color' => $this->chart_colors['discount_amount'],
|
||||
'color' => $this->chart_colours['discount_amount'],
|
||||
'highlight_series' => 1,
|
||||
);
|
||||
|
||||
$legend[] = array(
|
||||
/* translators: %s: coupons ammount */
|
||||
'title' => sprintf( __( '%s coupons used in total', 'woocommerce' ), '<strong>' . $total_coupons . '</strong>' ),
|
||||
'color' => $this->chart_colors['coupon_count'],
|
||||
'color' => $this->chart_colours['coupon_count'],
|
||||
'highlight_series' => 0,
|
||||
);
|
||||
|
||||
|
@ -133,7 +133,7 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
|||
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$this->chart_colors = array(
|
||||
$this->chart_colours = array(
|
||||
'discount_amount' => '#3498db',
|
||||
'coupon_count' => '#d4d9dc',
|
||||
);
|
||||
|
@ -460,8 +460,8 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Number of coupons used', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_coupon_counts,
|
||||
color: '<?php echo $this->chart_colors['coupon_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['coupon_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['coupon_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['coupon_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
hoverable: false
|
||||
},
|
||||
|
@ -469,7 +469,7 @@ class WC_Report_Coupon_Usage extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Discount amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_discount_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['discount_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['discount_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 3, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 4, fill: false },
|
||||
shadowSize: 0,
|
||||
|
|
|
@ -19,7 +19,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $chart_colors = array();
|
||||
public $chart_colours = array();
|
||||
|
||||
/**
|
||||
* Customers.
|
||||
|
@ -39,7 +39,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
$legend[] = array(
|
||||
/* translators: %s: signups ammount */
|
||||
'title' => sprintf( __( '%s signups in this period', 'woocommerce' ), '<strong>' . sizeof( $this->customers ) . '</strong>' ),
|
||||
'color' => $this->chart_colors['signups'],
|
||||
'color' => $this->chart_colours['signups'],
|
||||
'highlight_series' => 2,
|
||||
);
|
||||
|
||||
|
@ -106,8 +106,8 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
<div class="chart-container">
|
||||
<div class="chart-placeholder customers_vs_guests pie-chart" style="height:200px"></div>
|
||||
<ul class="pie-chart-legend">
|
||||
<li style="border-color: <?php echo $this->chart_colors['customers']; ?>"><?php _e( 'Customer sales', 'woocommerce' ); ?></li>
|
||||
<li style="border-color: <?php echo $this->chart_colors['guests']; ?>"><?php _e( 'Guest sales', 'woocommerce' ); ?></li>
|
||||
<li style="border-color: <?php echo $this->chart_colours['customers']; ?>"><?php _e( 'Customer sales', 'woocommerce' ); ?></li>
|
||||
<li style="border-color: <?php echo $this->chart_colours['guests']; ?>"><?php _e( 'Guest sales', 'woocommerce' ); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
@ -118,12 +118,12 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
{
|
||||
label: '<?php _e( 'Customer orders', 'woocommerce' ); ?>',
|
||||
data: "<?php echo $customer_order_totals->total_orders ?>",
|
||||
color: '<?php echo $this->chart_colors['customers']; ?>'
|
||||
color: '<?php echo $this->chart_colours['customers']; ?>'
|
||||
},
|
||||
{
|
||||
label: '<?php _e( 'Guest orders', 'woocommerce' ); ?>',
|
||||
data: "<?php echo $guest_order_totals->total_orders ?>",
|
||||
color: '<?php echo $this->chart_colors['guests']; ?>'
|
||||
color: '<?php echo $this->chart_colours['guests']; ?>'
|
||||
}
|
||||
],
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$this->chart_colors = array(
|
||||
$this->chart_colours = array(
|
||||
'signups' => '#3498db',
|
||||
'customers' => '#1abc9c',
|
||||
'guests' => '#8fdece',
|
||||
|
@ -315,8 +315,8 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Customer orders', 'woocommerce' ) ) ?>",
|
||||
data: chart_data.customer_orders,
|
||||
color: '<?php echo $this->chart_colors['customers']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['customers']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['customers']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['customers']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
enable_tooltip: true,
|
||||
append_tooltip: "<?php echo ' ' . __( 'customer orders', 'woocommerce' ); ?>",
|
||||
|
@ -325,8 +325,8 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Guest orders', 'woocommerce' ) ) ?>",
|
||||
data: chart_data.guest_orders,
|
||||
color: '<?php echo $this->chart_colors['guests']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['guests']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['guests']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['guests']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
enable_tooltip: true,
|
||||
append_tooltip: "<?php echo ' ' . __( 'guest orders', 'woocommerce' ); ?>",
|
||||
|
@ -335,7 +335,7 @@ class WC_Report_Customers extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Signups', 'woocommerce' ) ) ?>",
|
||||
data: chart_data.signups,
|
||||
color: '<?php echo $this->chart_colors['signups']; ?>',
|
||||
color: '<?php echo $this->chart_colours['signups']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 3, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 4, fill: false },
|
||||
shadowSize: 0,
|
||||
|
|
|
@ -19,7 +19,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $chart_colors = array();
|
||||
public $chart_colours = array();
|
||||
|
||||
/**
|
||||
* Categories ids.
|
||||
|
@ -95,7 +95,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
|||
$legend[] = array(
|
||||
/* translators: 1: total items sold 2: category name */
|
||||
'title' => sprintf( __( '%1$s sales in %2$s', 'woocommerce' ), '<strong>' . wc_price( $total ) . '</strong>', $category->name ),
|
||||
'color' => isset( $this->chart_colors[ $index ] ) ? $this->chart_colors[ $index ] : $this->chart_colors[0],
|
||||
'color' => isset( $this->chart_colours[ $index ] ) ? $this->chart_colours[ $index ] : $this->chart_colours[0],
|
||||
'highlight_series' => $index,
|
||||
);
|
||||
|
||||
|
@ -117,7 +117,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
|||
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$this->chart_colors = array( '#3498db', '#34495e', '#1abc9c', '#2ecc71', '#f1c40f', '#e67e22', '#e74c3c', '#2980b9', '#8e44ad', '#2c3e50', '#16a085', '#27ae60', '#f39c12', '#d35400', '#c0392b' );
|
||||
$this->chart_colours = array( '#3498db', '#34495e', '#1abc9c', '#2ecc71', '#f1c40f', '#e67e22', '#e74c3c', '#2980b9', '#8e44ad', '#2c3e50', '#16a085', '#27ae60', '#f39c12', '#d35400', '#c0392b' );
|
||||
|
||||
$current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : '7day';
|
||||
|
||||
|
@ -335,7 +335,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
|
|||
<?php
|
||||
$index = 0;
|
||||
foreach ( $chart_data as $data ) {
|
||||
$color = isset( $this->chart_colors[ $index ] ) ? $this->chart_colors[ $index ] : $this->chart_colors[0];
|
||||
$color = isset( $this->chart_colours[ $index ] ) ? $this->chart_colours[ $index ] : $this->chart_colours[0];
|
||||
$width = $this->barwidth / sizeof( $chart_data );
|
||||
$offset = ( $width * $index );
|
||||
$series = $data['data'];
|
||||
|
|
|
@ -19,7 +19,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $chart_colors = array();
|
||||
public $chart_colours = array();
|
||||
|
||||
/**
|
||||
* The report data.
|
||||
|
@ -387,13 +387,13 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
'<strong>' . wc_price( $data->total_sales ) . '</strong>'
|
||||
),
|
||||
'placeholder' => __( 'This is the sum of the order totals after any refunds and including shipping and taxes.', 'woocommerce' ),
|
||||
'color' => $this->chart_colors['sales_amount'],
|
||||
'color' => $this->chart_colours['sales_amount'],
|
||||
'highlight_series' => 6,
|
||||
);
|
||||
if ( $data->average_total_sales > 0 ) {
|
||||
$legend[] = array(
|
||||
'title' => $average_total_sales_title,
|
||||
'color' => $this->chart_colors['average'],
|
||||
'color' => $this->chart_colours['average'],
|
||||
'highlight_series' => 2,
|
||||
);
|
||||
}
|
||||
|
@ -405,13 +405,13 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
'<strong>' . wc_price( $data->net_sales ) . '</strong>'
|
||||
),
|
||||
'placeholder' => __( 'This is the sum of the order totals after any refunds and excluding shipping and taxes.', 'woocommerce' ),
|
||||
'color' => $this->chart_colors['net_sales_amount'],
|
||||
'color' => $this->chart_colours['net_sales_amount'],
|
||||
'highlight_series' => 7,
|
||||
);
|
||||
if ( $data->average_sales > 0 ) {
|
||||
$legend[] = array(
|
||||
'title' => $average_sales_title,
|
||||
'color' => $this->chart_colors['net_average'],
|
||||
'color' => $this->chart_colours['net_average'],
|
||||
'highlight_series' => 3,
|
||||
);
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
__( '%s orders placed', 'woocommerce' ),
|
||||
'<strong>' . $data->total_orders . '</strong>'
|
||||
),
|
||||
'color' => $this->chart_colors['order_count'],
|
||||
'color' => $this->chart_colours['order_count'],
|
||||
'highlight_series' => 1,
|
||||
);
|
||||
|
||||
|
@ -432,7 +432,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
__( '%s items purchased', 'woocommerce' ),
|
||||
'<strong>' . $data->total_items . '</strong>'
|
||||
),
|
||||
'color' => $this->chart_colors['item_count'],
|
||||
'color' => $this->chart_colours['item_count'],
|
||||
'highlight_series' => 0,
|
||||
);
|
||||
$legend[] = array(
|
||||
|
@ -443,7 +443,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
$this->report_data->total_refunded_orders,
|
||||
$this->report_data->refunded_order_items
|
||||
),
|
||||
'color' => $this->chart_colors['refund_amount'],
|
||||
'color' => $this->chart_colours['refund_amount'],
|
||||
'highlight_series' => 8,
|
||||
);
|
||||
$legend[] = array(
|
||||
|
@ -452,7 +452,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
__( '%s charged for shipping', 'woocommerce' ),
|
||||
'<strong>' . wc_price( $data->total_shipping ) . '</strong>'
|
||||
),
|
||||
'color' => $this->chart_colors['shipping_amount'],
|
||||
'color' => $this->chart_colours['shipping_amount'],
|
||||
'highlight_series' => 5,
|
||||
);
|
||||
$legend[] = array(
|
||||
|
@ -461,7 +461,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
__( '%s worth of coupons used', 'woocommerce' ),
|
||||
'<strong>' . wc_price( $data->total_coupons ) . '</strong>'
|
||||
),
|
||||
'color' => $this->chart_colors['coupon_amount'],
|
||||
'color' => $this->chart_colours['coupon_amount'],
|
||||
'highlight_series' => 4,
|
||||
);
|
||||
|
||||
|
@ -479,7 +479,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$this->chart_colors = array(
|
||||
$this->chart_colours = array(
|
||||
'sales_amount' => '#b1d4ea',
|
||||
'net_sales_amount' => '#3498db',
|
||||
'average' => '#b1d4ea',
|
||||
|
@ -599,16 +599,16 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Number of items sold', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_item_counts,
|
||||
color: '<?php echo $this->chart_colors['item_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['item_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['item_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['item_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
hoverable: false
|
||||
},
|
||||
{
|
||||
label: "<?php echo esc_js( __( 'Number of orders', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_counts,
|
||||
color: '<?php echo $this->chart_colors['order_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['order_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['order_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['order_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
hoverable: false
|
||||
},
|
||||
|
@ -616,7 +616,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Average gross sales amount', 'woocommerce' ) ) ?>",
|
||||
data: [ [ <?php echo min( array_keys( $data['order_amounts'] ) ); ?>, <?php echo $this->report_data->average_total_sales; ?> ], [ <?php echo max( array_keys( $data['order_amounts'] ) ); ?>, <?php echo $this->report_data->average_total_sales; ?> ] ],
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['average']; ?>',
|
||||
color: '<?php echo $this->chart_colours['average']; ?>',
|
||||
points: { show: false },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -626,7 +626,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Average net sales amount', 'woocommerce' ) ) ?>",
|
||||
data: [ [ <?php echo min( array_keys( $data['order_amounts'] ) ); ?>, <?php echo $this->report_data->average_sales; ?> ], [ <?php echo max( array_keys( $data['order_amounts'] ) ); ?>, <?php echo $this->report_data->average_sales; ?> ] ],
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['net_average']; ?>',
|
||||
color: '<?php echo $this->chart_colours['net_average']; ?>',
|
||||
points: { show: false },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -636,7 +636,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Coupon amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.coupon_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['coupon_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['coupon_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 2, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -646,7 +646,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Shipping amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.shipping_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['shipping_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['shipping_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 2, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -656,7 +656,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Gross sales amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.gross_order_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['sales_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['sales_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 2, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -666,7 +666,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Net sales amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.net_order_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['net_sales_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['net_sales_amount']; ?>',
|
||||
points: { show: true, radius: 6, lineWidth: 4, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 5, fill: false },
|
||||
shadowSize: 0,
|
||||
|
@ -676,7 +676,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Refund amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.refund_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['refund_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['refund_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 2, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 2, fill: false },
|
||||
shadowSize: 0,
|
||||
|
|
|
@ -19,7 +19,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public $chart_colors = array();
|
||||
public $chart_colours = array();
|
||||
|
||||
/**
|
||||
* Product ids.
|
||||
|
@ -105,14 +105,14 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
$legend[] = array(
|
||||
/* translators: %s: total items sold */
|
||||
'title' => sprintf( __( '%s sales for the selected items', 'woocommerce' ), '<strong>' . wc_price( $total_sales ) . '</strong>' ),
|
||||
'color' => $this->chart_colors['sales_amount'],
|
||||
'color' => $this->chart_colours['sales_amount'],
|
||||
'highlight_series' => 1,
|
||||
);
|
||||
|
||||
$legend[] = array(
|
||||
/* translators: %s: total items purchased */
|
||||
'title' => sprintf( __( '%s purchases for the selected items', 'woocommerce' ), '<strong>' . ( $total_items ) . '</strong>' ),
|
||||
'color' => $this->chart_colors['item_count'],
|
||||
'color' => $this->chart_colours['item_count'],
|
||||
'highlight_series' => 0,
|
||||
);
|
||||
|
||||
|
@ -131,7 +131,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$this->chart_colors = array(
|
||||
$this->chart_colours = array(
|
||||
'sales_amount' => '#3498db',
|
||||
'item_count' => '#d4d9dc',
|
||||
);
|
||||
|
@ -493,8 +493,8 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
{
|
||||
label: "<?php echo esc_js( __( 'Number of items sold', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_item_counts,
|
||||
color: '<?php echo $this->chart_colors['item_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colors['item_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
color: '<?php echo $this->chart_colours['item_count']; ?>',
|
||||
bars: { fillColor: '<?php echo $this->chart_colours['item_count']; ?>', fill: true, show: true, lineWidth: 0, barWidth: <?php echo $this->barwidth; ?> * 0.5, align: 'center' },
|
||||
shadowSize: 0,
|
||||
hoverable: false
|
||||
},
|
||||
|
@ -502,7 +502,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
|
|||
label: "<?php echo esc_js( __( 'Sales amount', 'woocommerce' ) ) ?>",
|
||||
data: order_data.order_item_amounts,
|
||||
yaxis: 2,
|
||||
color: '<?php echo $this->chart_colors['sales_amount']; ?>',
|
||||
color: '<?php echo $this->chart_colours['sales_amount']; ?>',
|
||||
points: { show: true, radius: 5, lineWidth: 3, fillColor: '#fff', fill: true },
|
||||
lines: { show: true, lineWidth: 4, fill: false },
|
||||
shadowSize: 0,
|
||||
|
|
Loading…
Reference in New Issue