2013-07-09 14:31:22 +00:00
|
|
|
<?php
|
2016-01-05 10:11:20 +00:00
|
|
|
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
|
|
|
|
2013-07-09 14:31:22 +00:00
|
|
|
/**
|
2015-11-03 13:53:50 +00:00
|
|
|
* WC_Report_Customers
|
2014-02-14 13:02:37 +00:00
|
|
|
*
|
2014-08-31 07:19:13 +00:00
|
|
|
* @author WooThemes
|
|
|
|
* @category Admin
|
|
|
|
* @package WooCommerce/Admin/Reports
|
2014-02-14 13:02:37 +00:00
|
|
|
* @version 2.1.0
|
2013-07-09 14:31:22 +00:00
|
|
|
*/
|
|
|
|
class WC_Report_Customers extends WC_Admin_Report {
|
|
|
|
|
2016-01-05 10:11:20 +00:00
|
|
|
/**
|
2016-12-19 11:28:09 +00:00
|
|
|
* Chart colors.
|
2016-01-05 10:11:20 +00:00
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2016-12-20 11:07:31 +00:00
|
|
|
public $chart_colours = array();
|
2016-01-05 10:11:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Customers.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2015-02-03 14:10:03 +00:00
|
|
|
public $customers = array();
|
2014-08-31 07:19:13 +00:00
|
|
|
|
2013-07-09 14:31:22 +00:00
|
|
|
/**
|
2015-11-03 12:28:01 +00:00
|
|
|
* Get the legend for the main chart sidebar.
|
2014-08-31 07:19:13 +00:00
|
|
|
*
|
2013-07-09 14:31:22 +00:00
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function get_chart_legend() {
|
2018-03-05 18:59:17 +00:00
|
|
|
$legend = array();
|
2013-07-09 14:31:22 +00:00
|
|
|
|
|
|
|
$legend[] = array(
|
2017-03-28 17:58:51 +00:00
|
|
|
/* translators: %s: signups amount */
|
2018-03-05 18:59:17 +00:00
|
|
|
'title' => sprintf( __( '%s signups in this period', 'woocommerce' ), '<strong>' . sizeof( $this->customers ) . '</strong>' ),
|
|
|
|
'color' => $this->chart_colours['signups'],
|
2016-08-27 01:46:45 +00:00
|
|
|
'highlight_series' => 2,
|
2013-07-09 14:31:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
return $legend;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-01-05 10:11:20 +00:00
|
|
|
* Get chart widgets.
|
2014-08-31 07:19:13 +00:00
|
|
|
*
|
2013-07-09 14:31:22 +00:00
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function get_chart_widgets() {
|
|
|
|
$widgets = array();
|
|
|
|
|
|
|
|
$widgets[] = array(
|
|
|
|
'title' => '',
|
2016-08-27 01:46:45 +00:00
|
|
|
'callback' => array( $this, 'customers_vs_guests' ),
|
2013-07-09 14:31:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
return $widgets;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-01-05 10:11:20 +00:00
|
|
|
* Output customers vs guests chart.
|
2013-07-09 14:31:22 +00:00
|
|
|
*/
|
|
|
|
public function customers_vs_guests() {
|
|
|
|
|
2018-03-05 18:59:17 +00:00
|
|
|
$customer_order_totals = $this->get_order_report_data(
|
|
|
|
array(
|
|
|
|
'data' => array(
|
|
|
|
'ID' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => 'COUNT',
|
|
|
|
'name' => 'total_orders',
|
|
|
|
),
|
2016-08-27 01:46:45 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'where_meta' => array(
|
|
|
|
array(
|
|
|
|
'meta_key' => '_customer_user',
|
|
|
|
'meta_value' => '0',
|
|
|
|
'operator' => '>',
|
|
|
|
),
|
2016-08-27 02:08:49 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'filter_range' => true,
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$guest_order_totals = $this->get_order_report_data(
|
|
|
|
array(
|
|
|
|
'data' => array(
|
|
|
|
'ID' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => 'COUNT',
|
|
|
|
'name' => 'total_orders',
|
|
|
|
),
|
2016-08-27 01:46:45 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'where_meta' => array(
|
|
|
|
array(
|
|
|
|
'meta_key' => '_customer_user',
|
|
|
|
'meta_value' => '0',
|
|
|
|
'operator' => '=',
|
|
|
|
),
|
2016-08-27 02:08:49 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'filter_range' => true,
|
|
|
|
)
|
|
|
|
);
|
2013-07-09 14:31:22 +00:00
|
|
|
?>
|
|
|
|
<div class="chart-container">
|
|
|
|
<div class="chart-placeholder customers_vs_guests pie-chart" style="height:200px"></div>
|
|
|
|
<ul class="pie-chart-legend">
|
2016-12-20 11:07:31 +00:00
|
|
|
<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>
|
2013-07-09 14:31:22 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
jQuery(function(){
|
2018-03-05 18:59:17 +00:00
|
|
|
jQuery.plot(
|
2013-07-09 14:31:22 +00:00
|
|
|
jQuery('.chart-placeholder.customers_vs_guests'),
|
|
|
|
[
|
|
|
|
{
|
2016-10-12 10:16:30 +00:00
|
|
|
label: '<?php _e( 'Customer orders', 'woocommerce' ); ?>',
|
2018-03-05 18:59:17 +00:00
|
|
|
data: "<?php echo $customer_order_totals->total_orders; ?>",
|
2016-12-20 11:07:31 +00:00
|
|
|
color: '<?php echo $this->chart_colours['customers']; ?>'
|
2013-07-09 14:31:22 +00:00
|
|
|
},
|
|
|
|
{
|
2016-10-12 10:16:30 +00:00
|
|
|
label: '<?php _e( 'Guest orders', 'woocommerce' ); ?>',
|
2018-03-05 18:59:17 +00:00
|
|
|
data: "<?php echo $guest_order_totals->total_orders; ?>",
|
2016-12-20 11:07:31 +00:00
|
|
|
color: '<?php echo $this->chart_colours['guests']; ?>'
|
2013-07-09 14:31:22 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
{
|
|
|
|
grid: {
|
2014-08-31 07:19:13 +00:00
|
|
|
hoverable: true
|
|
|
|
},
|
2013-07-09 14:31:22 +00:00
|
|
|
series: {
|
2014-08-31 07:19:13 +00:00
|
|
|
pie: {
|
|
|
|
show: true,
|
|
|
|
radius: 1,
|
|
|
|
innerRadius: 0.6,
|
|
|
|
label: {
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
enable_tooltip: true,
|
|
|
|
append_tooltip: "<?php echo ' ' . __( 'orders', 'woocommerce' ); ?>",
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
jQuery('.chart-placeholder.customers_vs_guests').resize();
|
2013-07-09 14:31:22 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-11-03 12:28:01 +00:00
|
|
|
* Output the report.
|
2013-07-09 14:31:22 +00:00
|
|
|
*/
|
|
|
|
public function output_report() {
|
2014-08-31 07:19:13 +00:00
|
|
|
|
2013-07-09 14:31:22 +00:00
|
|
|
$ranges = array(
|
2018-03-05 18:59:17 +00:00
|
|
|
'year' => __( 'Year', 'woocommerce' ),
|
|
|
|
'last_month' => __( 'Last month', 'woocommerce' ),
|
|
|
|
'month' => __( 'This month', 'woocommerce' ),
|
|
|
|
'7day' => __( 'Last 7 days', 'woocommerce' ),
|
2013-07-09 14:31:22 +00:00
|
|
|
);
|
|
|
|
|
2016-12-20 11:07:31 +00:00
|
|
|
$this->chart_colours = array(
|
2013-07-09 14:31:22 +00:00
|
|
|
'signups' => '#3498db',
|
|
|
|
'customers' => '#1abc9c',
|
2016-08-27 01:46:45 +00:00
|
|
|
'guests' => '#8fdece',
|
2013-07-09 14:31:22 +00:00
|
|
|
);
|
|
|
|
|
2014-09-16 09:33:47 +00:00
|
|
|
$current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : '7day';
|
2013-07-09 14:31:22 +00:00
|
|
|
|
2014-08-31 07:19:13 +00:00
|
|
|
if ( ! in_array( $current_range, array( 'custom', 'year', 'last_month', 'month', '7day' ) ) ) {
|
2013-07-30 10:12:42 +00:00
|
|
|
$current_range = '7day';
|
2014-08-31 07:19:13 +00:00
|
|
|
}
|
2013-07-09 14:31:22 +00:00
|
|
|
|
2017-04-18 23:33:25 +00:00
|
|
|
$this->check_current_range_nonce( $current_range );
|
2013-07-30 10:12:42 +00:00
|
|
|
$this->calculate_current_range( $current_range );
|
2013-07-09 14:31:22 +00:00
|
|
|
|
|
|
|
$admin_users = new WP_User_Query(
|
|
|
|
array(
|
|
|
|
'role' => 'administrator',
|
2016-08-27 01:46:45 +00:00
|
|
|
'fields' => 'ID',
|
2013-07-09 14:31:22 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$manager_users = new WP_User_Query(
|
|
|
|
array(
|
|
|
|
'role' => 'shop_manager',
|
2016-08-27 01:46:45 +00:00
|
|
|
'fields' => 'ID',
|
2013-07-09 14:31:22 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$users_query = new WP_User_Query(
|
|
|
|
array(
|
|
|
|
'fields' => array( 'user_registered' ),
|
2016-08-27 01:46:45 +00:00
|
|
|
'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ),
|
2013-07-09 14:31:22 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->customers = $users_query->get_results();
|
|
|
|
|
2013-07-18 08:20:49 +00:00
|
|
|
foreach ( $this->customers as $key => $customer ) {
|
2014-08-31 07:19:13 +00:00
|
|
|
if ( strtotime( $customer->user_registered ) < $this->start_date || strtotime( $customer->user_registered ) > $this->end_date ) {
|
2013-07-18 08:20:49 +00:00
|
|
|
unset( $this->customers[ $key ] );
|
2014-08-31 07:19:13 +00:00
|
|
|
}
|
2013-07-18 08:20:49 +00:00
|
|
|
}
|
|
|
|
|
2018-03-05 18:59:17 +00:00
|
|
|
include WC()->plugin_path() . '/includes/admin/views/html-report-by-date.php';
|
2013-07-09 14:31:22 +00:00
|
|
|
}
|
|
|
|
|
2013-07-18 11:56:12 +00:00
|
|
|
/**
|
2015-11-03 12:28:01 +00:00
|
|
|
* Output an export link.
|
2013-07-18 11:56:12 +00:00
|
|
|
*/
|
|
|
|
public function get_export_button() {
|
2014-08-31 07:19:13 +00:00
|
|
|
|
2014-09-16 09:33:47 +00:00
|
|
|
$current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : '7day';
|
2013-07-18 11:56:12 +00:00
|
|
|
?>
|
|
|
|
<a
|
|
|
|
href="#"
|
2016-09-02 01:51:31 +00:00
|
|
|
download="report-<?php echo esc_attr( $current_range ); ?>-<?php echo date_i18n( 'Y-m-d', current_time( 'timestamp' ) ); ?>.csv"
|
2013-07-18 11:56:12 +00:00
|
|
|
class="export_csv"
|
|
|
|
data-export="chart"
|
2015-08-05 18:08:15 +00:00
|
|
|
data-xaxes="<?php esc_attr_e( 'Date', 'woocommerce' ); ?>"
|
2013-07-18 11:56:12 +00:00
|
|
|
data-groupby="<?php echo $this->chart_groupby; ?>"
|
|
|
|
>
|
|
|
|
<?php _e( 'Export CSV', 'woocommerce' ); ?>
|
|
|
|
</a>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
2013-07-09 14:31:22 +00:00
|
|
|
/**
|
2016-01-05 10:11:20 +00:00
|
|
|
* Output the main chart.
|
2013-07-09 14:31:22 +00:00
|
|
|
*/
|
|
|
|
public function get_main_chart() {
|
|
|
|
global $wp_locale;
|
|
|
|
|
2018-03-05 18:59:17 +00:00
|
|
|
$customer_orders = $this->get_order_report_data(
|
|
|
|
array(
|
|
|
|
'data' => array(
|
|
|
|
'ID' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => 'COUNT',
|
|
|
|
'name' => 'total_orders',
|
|
|
|
),
|
|
|
|
'post_date' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => '',
|
|
|
|
'name' => 'post_date',
|
|
|
|
),
|
2016-08-27 02:08:49 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'where_meta' => array(
|
|
|
|
array(
|
|
|
|
'meta_key' => '_customer_user',
|
|
|
|
'meta_value' => '0',
|
|
|
|
'operator' => '>',
|
|
|
|
),
|
2013-07-09 14:31:22 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'group_by' => $this->group_by_query,
|
|
|
|
'order_by' => 'post_date ASC',
|
|
|
|
'query_type' => 'get_results',
|
|
|
|
'filter_range' => true,
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
$guest_orders = $this->get_order_report_data(
|
|
|
|
array(
|
|
|
|
'data' => array(
|
|
|
|
'ID' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => 'COUNT',
|
|
|
|
'name' => 'total_orders',
|
|
|
|
),
|
|
|
|
'post_date' => array(
|
|
|
|
'type' => 'post_data',
|
|
|
|
'function' => '',
|
|
|
|
'name' => 'post_date',
|
|
|
|
),
|
2013-07-09 14:31:22 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'where_meta' => array(
|
|
|
|
array(
|
|
|
|
'meta_key' => '_customer_user',
|
|
|
|
'meta_value' => '0',
|
|
|
|
'operator' => '=',
|
|
|
|
),
|
2016-08-27 02:08:49 +00:00
|
|
|
),
|
2018-03-05 18:59:17 +00:00
|
|
|
'group_by' => $this->group_by_query,
|
|
|
|
'order_by' => 'post_date ASC',
|
|
|
|
'query_type' => 'get_results',
|
|
|
|
'filter_range' => true,
|
|
|
|
)
|
|
|
|
);
|
2013-07-09 14:31:22 +00:00
|
|
|
|
|
|
|
$signups = $this->prepare_chart_data( $this->customers, 'user_registered', '', $this->chart_interval, $this->start_date, $this->chart_groupby );
|
|
|
|
$customer_orders = $this->prepare_chart_data( $customer_orders, 'post_date', 'total_orders', $this->chart_interval, $this->start_date, $this->chart_groupby );
|
|
|
|
$guest_orders = $this->prepare_chart_data( $guest_orders, 'post_date', 'total_orders', $this->chart_interval, $this->start_date, $this->chart_groupby );
|
|
|
|
|
|
|
|
// Encode in json format
|
2018-03-05 18:59:17 +00:00
|
|
|
$chart_data = json_encode(
|
|
|
|
array(
|
|
|
|
'signups' => array_values( $signups ),
|
|
|
|
'customer_orders' => array_values( $customer_orders ),
|
|
|
|
'guest_orders' => array_values( $guest_orders ),
|
|
|
|
)
|
|
|
|
);
|
2013-07-09 14:31:22 +00:00
|
|
|
?>
|
|
|
|
<div class="chart-container">
|
|
|
|
<div class="chart-placeholder main"></div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
2013-07-18 11:56:12 +00:00
|
|
|
var main_chart;
|
|
|
|
|
2013-07-09 14:31:22 +00:00
|
|
|
jQuery(function(){
|
|
|
|
var chart_data = jQuery.parseJSON( '<?php echo $chart_data; ?>' );
|
|
|
|
|
2013-07-18 08:20:49 +00:00
|
|
|
var drawGraph = function( highlight ) {
|
|
|
|
var series = [
|
|
|
|
{
|
2018-03-05 18:59:17 +00:00
|
|
|
label: "<?php echo esc_js( __( 'Customer orders', 'woocommerce' ) ); ?>",
|
2013-07-18 08:20:49 +00:00
|
|
|
data: chart_data.customer_orders,
|
2016-12-20 11:07:31 +00:00
|
|
|
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' },
|
2013-07-18 08:20:49 +00:00
|
|
|
shadowSize: 0,
|
|
|
|
enable_tooltip: true,
|
|
|
|
append_tooltip: "<?php echo ' ' . __( 'customer orders', 'woocommerce' ); ?>",
|
|
|
|
stack: true,
|
|
|
|
},
|
|
|
|
{
|
2018-03-05 18:59:17 +00:00
|
|
|
label: "<?php echo esc_js( __( 'Guest orders', 'woocommerce' ) ); ?>",
|
2013-07-18 08:20:49 +00:00
|
|
|
data: chart_data.guest_orders,
|
2016-12-20 11:07:31 +00:00
|
|
|
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' },
|
2013-07-18 08:20:49 +00:00
|
|
|
shadowSize: 0,
|
|
|
|
enable_tooltip: true,
|
|
|
|
append_tooltip: "<?php echo ' ' . __( 'guest orders', 'woocommerce' ); ?>",
|
|
|
|
stack: true,
|
|
|
|
},
|
|
|
|
{
|
2018-03-05 18:59:17 +00:00
|
|
|
label: "<?php echo esc_js( __( 'Signups', 'woocommerce' ) ); ?>",
|
2013-07-18 08:20:49 +00:00
|
|
|
data: chart_data.signups,
|
2016-12-20 11:07:31 +00:00
|
|
|
color: '<?php echo $this->chart_colours['signups']; ?>',
|
2013-07-18 08:20:49 +00:00
|
|
|
points: { show: true, radius: 5, lineWidth: 3, fillColor: '#fff', fill: true },
|
|
|
|
lines: { show: true, lineWidth: 4, fill: false },
|
|
|
|
shadowSize: 0,
|
|
|
|
enable_tooltip: true,
|
|
|
|
append_tooltip: "<?php echo ' ' . __( 'new users', 'woocommerce' ); ?>",
|
|
|
|
stack: false
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
if ( highlight !== 'undefined' && series[ highlight ] ) {
|
|
|
|
highlight_series = series[ highlight ];
|
|
|
|
|
|
|
|
highlight_series.color = '#9c5d90';
|
|
|
|
|
|
|
|
if ( highlight_series.bars )
|
|
|
|
highlight_series.bars.fillColor = '#9c5d90';
|
|
|
|
|
|
|
|
if ( highlight_series.lines ) {
|
|
|
|
highlight_series.lines.lineWidth = 5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-18 11:56:12 +00:00
|
|
|
main_chart = jQuery.plot(
|
2013-07-18 08:20:49 +00:00
|
|
|
jQuery('.chart-placeholder.main'),
|
|
|
|
series,
|
2013-07-09 14:31:22 +00:00
|
|
|
{
|
2013-07-18 08:20:49 +00:00
|
|
|
legend: {
|
|
|
|
show: false
|
|
|
|
},
|
2014-08-31 07:19:13 +00:00
|
|
|
grid: {
|
|
|
|
color: '#aaa',
|
|
|
|
borderColor: 'transparent',
|
|
|
|
borderWidth: 0,
|
|
|
|
hoverable: true
|
|
|
|
},
|
|
|
|
xaxes: [ {
|
|
|
|
color: '#aaa',
|
|
|
|
position: "bottom",
|
|
|
|
tickColor: 'transparent',
|
2013-07-18 08:20:49 +00:00
|
|
|
mode: "time",
|
2016-09-09 00:14:28 +00:00
|
|
|
timeformat: "<?php echo ( 'day' === $this->chart_groupby ) ? '%d %b' : '%b'; ?>",
|
2018-03-05 18:59:17 +00:00
|
|
|
monthNames: <?php echo json_encode( array_values( $wp_locale->month_abbrev ) ); ?>,
|
2013-07-18 08:20:49 +00:00
|
|
|
tickLength: 1,
|
|
|
|
minTickSize: [1, "<?php echo $this->chart_groupby; ?>"],
|
|
|
|
tickSize: [1, "<?php echo $this->chart_groupby; ?>"],
|
|
|
|
font: {
|
2014-08-31 07:19:13 +00:00
|
|
|
color: "#aaa"
|
|
|
|
}
|
2013-07-18 08:20:49 +00:00
|
|
|
} ],
|
2014-08-31 07:19:13 +00:00
|
|
|
yaxes: [
|
|
|
|
{
|
|
|
|
min: 0,
|
|
|
|
minTickSize: 1,
|
|
|
|
tickDecimals: 0,
|
|
|
|
color: '#ecf0f1',
|
|
|
|
font: { color: "#aaa" }
|
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
);
|
|
|
|
jQuery('.chart-placeholder').resize();
|
2013-07-18 08:20:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
drawGraph();
|
2013-07-09 14:31:22 +00:00
|
|
|
|
2013-07-18 08:20:49 +00:00
|
|
|
jQuery('.highlight_series').hover(
|
|
|
|
function() {
|
|
|
|
drawGraph( jQuery(this).data('series') );
|
|
|
|
},
|
|
|
|
function() {
|
|
|
|
drawGraph();
|
|
|
|
}
|
|
|
|
);
|
2013-07-09 14:31:22 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php
|
|
|
|
}
|
2014-08-31 07:19:13 +00:00
|
|
|
}
|