Version Description
- Changed: We temporarily disabled reports in admin dashboard and mailing
Download this release
Release Info
Developer | webdorado |
Plugin | WD Google Analytics |
Version | 1.0.22 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.0.22
- admin/pages/overview.php +22 -1
- assets/logo.png +0 -0
- assets/seo_logo.png +0 -0
- gawd_class.php +45 -57
- google-analytics-wd.php +15 -15
- inc/css/gawd_admin.css +0 -11
- inc/css/wd_bp_install.css +1 -1
- inc/js/amcharts.js +0 -53
- inc/js/ammap.js +0 -65
- inc/js/dataloader.min.js +0 -1
- inc/js/gawd_admin.js +7 -1746
- inc/js/gawd_front.js +1 -124
- inc/js/gawd_map_chart.js +0 -502
- inc/js/light.js +0 -1
- inc/js/pie.js +0 -6
- inc/js/serial.js +0 -13
- inc/js/worldLow.js +0 -1
- include/gawd_pdf_file.php +3 -2
- include/src/flag_mapping +0 -237
- include/src/fonts/DejaVuSans.ttf +0 -0
- include/src/fonts/FF_FONT0-Bold.gdf +0 -0
- include/src/fonts/FF_FONT0.gdf +0 -0
- include/src/fonts/FF_FONT1-Bold.gdf +0 -0
- include/src/fonts/FF_FONT1.gdf +0 -0
- include/src/fonts/FF_FONT2-Bold.gdf +0 -0
- include/src/fonts/FF_FONT2.gdf +0 -0
- include/src/gd_image.inc.php +0 -2304
- include/src/imageSmoothArc.php +0 -344
- include/src/imgdata_balls.inc.php +0 -1061
- include/src/imgdata_bevels.inc.php +0 -104
- include/src/imgdata_diamonds.inc.php +0 -177
- include/src/imgdata_pushpins.inc.php +0 -517
- include/src/imgdata_squares.inc.php +0 -150
- include/src/imgdata_stars.inc.php +0 -144
- include/src/jpg-config.inc.php +0 -138
- include/src/jpgraph.php +0 -2525
admin/pages/overview.php
CHANGED
@@ -11,7 +11,7 @@ $new_buttons_full = '<button data-hint="Click to navigate to Real Time report on
|
|
11 |
}
|
12 |
?>
|
13 |
|
14 |
-
<?php screen_icon('options-general'); ?>
|
15 |
<div class="wd-upgrade-pro-main-wrap">
|
16 |
<span class="wd-text">This section lets you check the audience overview of your website.
|
17 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" target="_blank" href="https://web-dorado.com/wordpress-google-analytics/quick-start/overview.html">Read more in User Guide.</a>
|
@@ -75,7 +75,28 @@ $new_buttons_full = '<button data-hint="Click to navigate to Real Time report on
|
|
75 |
</div>
|
76 |
</div>
|
77 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
<script>
|
80 |
function change_account(that){
|
81 |
jQuery('#web_property_name').val(jQuery(that).find(':selected').closest('optgroup').attr('label'));
|
11 |
}
|
12 |
?>
|
13 |
|
14 |
+
<?php //screen_icon('options-general'); ?>
|
15 |
<div class="wd-upgrade-pro-main-wrap">
|
16 |
<span class="wd-text">This section lets you check the audience overview of your website.
|
17 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;" target="_blank" href="https://web-dorado.com/wordpress-google-analytics/quick-start/overview.html">Read more in User Guide.</a>
|
75 |
</div>
|
76 |
</div>
|
77 |
</div>
|
78 |
+
<div style="display: inline-block;margin-left: 25px;">
|
79 |
+
<style>
|
80 |
+
#gawd_analytics_link {
|
81 |
+
font-size: 14px;
|
82 |
+
color: rgba(255, 255, 255, 1);
|
83 |
+
background-color: #7CB5D7;
|
84 |
+
display: inline-block;
|
85 |
+
padding: 10px 23px;
|
86 |
+
border-radius: 100px;
|
87 |
+
cursor: pointer;
|
88 |
+
text-decoration: none;
|
89 |
+
opacity: 1;
|
90 |
+
line-height: 18px;
|
91 |
+
}
|
92 |
|
93 |
+
#gawd_analytics_link:hover {
|
94 |
+
opacity: 0.8;
|
95 |
+
}
|
96 |
+
</style>
|
97 |
+
<p>Reports charts are temporarily disabled in this version. Please use Google Analytics dashboard to view them.</p>
|
98 |
+
<a id="gawd_analytics_link" href="https://analytics.google.com/" target="_blank">View reports</a>
|
99 |
+
</div>
|
100 |
<script>
|
101 |
function change_account(that){
|
102 |
jQuery('#web_property_name').val(jQuery(that).find(':selected').closest('optgroup').attr('label'));
|
assets/logo.png
DELETED
Binary file
|
assets/seo_logo.png
ADDED
Binary file
|
gawd_class.php
CHANGED
@@ -48,22 +48,22 @@ class GAWD
|
|
48 |
$gawd_user_data = get_option('gawd_user_data');
|
49 |
$gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? $gawd_settings['gawd_post_page_roles'] : array();
|
50 |
$roles = $this->get_current_user_role();
|
51 |
-
if ((isset($gawd_settings['gawd_tracking_enable']) && $gawd_settings['gawd_tracking_enable'] == 'on') && (isset($gawd_settings['post_page_chart']) && $gawd_settings['post_page_chart'] != '') && (in_array($roles, $gawd_post_page_roles) || current_user_can('manage_options')) && ( isset( $gawd_user_data['refresh_token'] ) && ( $gawd_user_data['refresh_token'] != '' ) ) && isset($gawd_user_data['default_webPropertyId'])) {
|
52 |
-
add_filter('manage_posts_columns', array($this, 'gawd_add_columns'));
|
53 |
-
// Populate custom column in Posts List
|
54 |
-
add_action('manage_posts_custom_column', array($this, 'gawd_add_icons'), 10, 2);
|
55 |
-
// Add custom column in Pages List
|
56 |
-
add_filter('manage_pages_columns', array($this, 'gawd_add_columns'));
|
57 |
-
// Populate custom column in Pages List
|
58 |
-
add_action('manage_pages_custom_column', array($this, 'gawd_add_icons'), 10, 2);
|
59 |
-
add_action('load-post.php', array($this, 'gawd_add_custom_box'));
|
60 |
-
}
|
61 |
$gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? $gawd_settings['gawd_frontend_roles'] : array();
|
62 |
$gawd_user_status = get_option('gawd_user_status');
|
63 |
-
if ((isset($gawd_settings['gawd_tracking_enable']) && $gawd_settings['gawd_tracking_enable'] == 'on') && (in_array($roles, $gawd_frontend_roles) || current_user_can('manage_options')) && ( isset( $gawd_user_data['refresh_token'] ) && ( $gawd_user_data['refresh_token'] != '' ) ) && isset($gawd_user_data['default_webPropertyId']) && $gawd_user_status == '1') {
|
64 |
-
add_action('wp_enqueue_scripts', array($this, 'gawd_front_scripts'));
|
65 |
-
add_action('admin_bar_menu', array($this, 'report_adminbar'), 999);
|
66 |
-
}
|
67 |
|
68 |
$this->update_credentials();
|
69 |
$credentials = get_option('gawd_credentials');
|
@@ -187,19 +187,19 @@ class GAWD
|
|
187 |
add_action('wp_ajax_show_page_post_data', array($this, 'show_page_post_data'));
|
188 |
add_action('wp_ajax_show_data_compact', array($this, 'show_data_compact'));
|
189 |
add_action('wp_ajax_get_realtime', array($this, 'get_realtime'));
|
190 |
-
add_action('wp_dashboard_setup', array($this, 'google_analytics_wd_dashboard_widget'));
|
191 |
add_action('admin_menu', array($this, 'overview_date_meta'));
|
192 |
-
add_filter('cron_schedules', array($this, 'gawd_my_schedule'));
|
193 |
add_action('admin_init', array($this, 'gawd_export'));
|
194 |
-
add_action('gawd_pushover_daily', array($this, 'gawd_pushover_daily'));
|
195 |
-
add_action('gawd_pushover_gawd_weekly', array($this, 'gawd_pushover_weekly'));
|
196 |
-
add_action('gawd_pushover_gawd_monthly', array($this, 'gawd_pushover_monthly'));
|
197 |
-
add_action('gawd_alert_daily', array($this, 'gawd_alert_daily'));
|
198 |
-
add_action('gawd_alert_gawd_monthly', array($this, 'gawd_alert_monthly'));
|
199 |
-
add_action('gawd_alert_gawd_weekly', array($this, 'gawd_alert_weekly'));
|
200 |
-
add_action('gawd_email_daily', array($this, 'gawd_daily_email'), 0);
|
201 |
-
add_action('gawd_email_gawd_weekly', array($this, 'gawd_weekly_email'));
|
202 |
-
add_action('gawd_email_gawd_monthly', array($this, 'gawd_monthly_email'));
|
203 |
//add_action('init', array($this, 'gawd_daily_email'));
|
204 |
add_action('wp_head', array($this, 'gawd_tracking_code'), 99);
|
205 |
add_action('admin_notices', array($this, 'check_property_delete'), 9999);
|
@@ -514,23 +514,23 @@ class GAWD
|
|
514 |
$this,
|
515 |
'gawd_real_time'
|
516 |
), 'gawd_analytics', 'side', 'high');
|
517 |
-
add_meta_box('gawd-date-meta', __('Audience', 'gawd'), array(
|
518 |
-
$this,
|
519 |
-
'gawd_date_box'
|
520 |
-
), 'gawd_analytics', $orintation, null);
|
521 |
-
add_meta_box('gawd-country-box', __('Location', 'gawd'), array(
|
522 |
-
$this,
|
523 |
-
'gawd_country_box'
|
524 |
-
), 'gawd_analytics', $orintation, null);
|
525 |
-
//left side thin meta.
|
526 |
-
add_meta_box('gawd-visitors-meta', __('Visitors', 'gawd'), array(
|
527 |
-
$this,
|
528 |
-
'gawd_visitors'
|
529 |
-
), 'gawd_analytics', 'side', null);
|
530 |
-
add_meta_box('gawd-browser-meta', __('Browsers', 'gawd'), array(
|
531 |
-
$this,
|
532 |
-
'gawd_browser'
|
533 |
-
), 'gawd_analytics', 'side', null);
|
534 |
}
|
535 |
|
536 |
public function gawd_date_box()
|
@@ -621,11 +621,6 @@ class GAWD
|
|
621 |
{
|
622 |
if (is_user_logged_in()) {
|
623 |
wp_enqueue_style('admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION);
|
624 |
-
wp_enqueue_script('gawd_amcharts', GAWD_URL . '/inc/js/amcharts.js', false, GAWD_VERSION);
|
625 |
-
wp_enqueue_script('gawd_pie', GAWD_URL . '/inc/js/pie.js', false, GAWD_VERSION);
|
626 |
-
wp_enqueue_script('gawd_serial', GAWD_URL . '/inc/js/serial.js', false, GAWD_VERSION);
|
627 |
-
wp_enqueue_script('gawd_light_theme', GAWD_URL . '/inc/js/light.js', array('jquery'), GAWD_VERSION);
|
628 |
-
wp_enqueue_script('gawd_dataloader', GAWD_URL . '/inc/js/dataloader.min.js', array('jquery'), GAWD_VERSION);
|
629 |
wp_enqueue_script('gawd_front_js', GAWD_URL . '/inc/js/gawd_front.js', array('jquery'), GAWD_VERSION);
|
630 |
wp_localize_script('gawd_front_js', 'gawd_front', array(
|
631 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
@@ -676,16 +671,9 @@ class GAWD
|
|
676 |
wp_enqueue_style('ui.jqgrid.css', GAWD_URL . '/inc/css/ui.jqgrid.css', false, GAWD_VERSION);
|
677 |
wp_enqueue_script('gawd_moment', GAWD_URL . '/inc/js/moment.min.js', false, GAWD_VERSION);
|
678 |
wp_enqueue_script('gawd_daterangepicker', GAWD_URL . '/inc/js/daterangepicker.js', false, GAWD_VERSION);
|
679 |
-
wp_enqueue_script('gawd_amcharts', GAWD_URL . '/inc/js/amcharts.js', false, GAWD_VERSION);
|
680 |
-
wp_enqueue_script('gawd_pie', GAWD_URL . '/inc/js/pie.js', false, GAWD_VERSION);
|
681 |
-
wp_enqueue_script('gawd_serial', GAWD_URL . '/inc/js/serial.js', false, GAWD_VERSION);
|
682 |
/*Map*/
|
683 |
-
wp_enqueue_script('
|
684 |
-
wp_enqueue_script('gawd_worldLow', GAWD_URL . '/inc/js/worldLow.js', false, GAWD_VERSION);
|
685 |
-
wp_enqueue_script('gawd_map_chart', GAWD_URL . '/inc/js/gawd_map_chart.js', false, GAWD_VERSION);
|
686 |
/*End Map*/
|
687 |
-
wp_enqueue_script('gawd_light_theme', GAWD_URL . '/inc/js/light.js', array('jquery'), GAWD_VERSION);
|
688 |
-
wp_enqueue_script('gawd_dataloader', GAWD_URL . '/inc/js/dataloader.min.js', array('jquery'), GAWD_VERSION);
|
689 |
wp_enqueue_script('rgbcolor.js', GAWD_URL . '/inc/js/rgbcolor.js', array('jquery'), GAWD_VERSION);
|
690 |
wp_enqueue_script('StackBlur.js', GAWD_URL . '/inc/js/StackBlur.js', array('jquery'), GAWD_VERSION);
|
691 |
wp_enqueue_script('canvg.js', GAWD_URL . '/inc/js/canvg.js', array('jquery'), GAWD_VERSION);
|
@@ -790,12 +778,12 @@ class GAWD
|
|
790 |
array($this, $this->gawd_set_display('gawd_display_overview_page')) //$function = '',
|
791 |
);
|
792 |
add_submenu_page(
|
793 |
-
|
794 |
__('Reports', 'gawd'), //$page_title
|
795 |
__('Reports', 'gawd'), //$menu_title
|
796 |
$permission, //$capability
|
797 |
$this->gawd_set_slug('gawd_reports'), //$menu_slug
|
798 |
-
array($this, $this->gawd_set_display('
|
799 |
);
|
800 |
add_submenu_page(
|
801 |
$parent_slug, //$parent_slug
|
48 |
$gawd_user_data = get_option('gawd_user_data');
|
49 |
$gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? $gawd_settings['gawd_post_page_roles'] : array();
|
50 |
$roles = $this->get_current_user_role();
|
51 |
+
// if ((isset($gawd_settings['gawd_tracking_enable']) && $gawd_settings['gawd_tracking_enable'] == 'on') && (isset($gawd_settings['post_page_chart']) && $gawd_settings['post_page_chart'] != '') && (in_array($roles, $gawd_post_page_roles) || current_user_can('manage_options')) && ( isset( $gawd_user_data['refresh_token'] ) && ( $gawd_user_data['refresh_token'] != '' ) ) && isset($gawd_user_data['default_webPropertyId'])) {
|
52 |
+
// add_filter('manage_posts_columns', array($this, 'gawd_add_columns'));
|
53 |
+
// // Populate custom column in Posts List
|
54 |
+
// add_action('manage_posts_custom_column', array($this, 'gawd_add_icons'), 10, 2);
|
55 |
+
// // Add custom column in Pages List
|
56 |
+
// add_filter('manage_pages_columns', array($this, 'gawd_add_columns'));
|
57 |
+
// // Populate custom column in Pages List
|
58 |
+
// add_action('manage_pages_custom_column', array($this, 'gawd_add_icons'), 10, 2);
|
59 |
+
// add_action('load-post.php', array($this, 'gawd_add_custom_box'));
|
60 |
+
// }
|
61 |
$gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? $gawd_settings['gawd_frontend_roles'] : array();
|
62 |
$gawd_user_status = get_option('gawd_user_status');
|
63 |
+
// if ((isset($gawd_settings['gawd_tracking_enable']) && $gawd_settings['gawd_tracking_enable'] == 'on') && (in_array($roles, $gawd_frontend_roles) || current_user_can('manage_options')) && ( isset( $gawd_user_data['refresh_token'] ) && ( $gawd_user_data['refresh_token'] != '' ) ) && isset($gawd_user_data['default_webPropertyId']) && $gawd_user_status == '1') {
|
64 |
+
// add_action('wp_enqueue_scripts', array($this, 'gawd_front_scripts'));
|
65 |
+
// add_action('admin_bar_menu', array($this, 'report_adminbar'), 999);
|
66 |
+
// }
|
67 |
|
68 |
$this->update_credentials();
|
69 |
$credentials = get_option('gawd_credentials');
|
187 |
add_action('wp_ajax_show_page_post_data', array($this, 'show_page_post_data'));
|
188 |
add_action('wp_ajax_show_data_compact', array($this, 'show_data_compact'));
|
189 |
add_action('wp_ajax_get_realtime', array($this, 'get_realtime'));
|
190 |
+
// add_action('wp_dashboard_setup', array($this, 'google_analytics_wd_dashboard_widget'));
|
191 |
add_action('admin_menu', array($this, 'overview_date_meta'));
|
192 |
+
// add_filter('cron_schedules', array($this, 'gawd_my_schedule'));
|
193 |
add_action('admin_init', array($this, 'gawd_export'));
|
194 |
+
// add_action('gawd_pushover_daily', array($this, 'gawd_pushover_daily'));
|
195 |
+
// add_action('gawd_pushover_gawd_weekly', array($this, 'gawd_pushover_weekly'));
|
196 |
+
// add_action('gawd_pushover_gawd_monthly', array($this, 'gawd_pushover_monthly'));
|
197 |
+
// add_action('gawd_alert_daily', array($this, 'gawd_alert_daily'));
|
198 |
+
// add_action('gawd_alert_gawd_monthly', array($this, 'gawd_alert_monthly'));
|
199 |
+
// add_action('gawd_alert_gawd_weekly', array($this, 'gawd_alert_weekly'));
|
200 |
+
// add_action('gawd_email_daily', array($this, 'gawd_daily_email'), 0);
|
201 |
+
// add_action('gawd_email_gawd_weekly', array($this, 'gawd_weekly_email'));
|
202 |
+
// add_action('gawd_email_gawd_monthly', array($this, 'gawd_monthly_email'));
|
203 |
//add_action('init', array($this, 'gawd_daily_email'));
|
204 |
add_action('wp_head', array($this, 'gawd_tracking_code'), 99);
|
205 |
add_action('admin_notices', array($this, 'check_property_delete'), 9999);
|
514 |
$this,
|
515 |
'gawd_real_time'
|
516 |
), 'gawd_analytics', 'side', 'high');
|
517 |
+
// add_meta_box('gawd-date-meta', __('Audience', 'gawd'), array(
|
518 |
+
// $this,
|
519 |
+
// 'gawd_date_box'
|
520 |
+
// ), 'gawd_analytics', $orintation, null);
|
521 |
+
// add_meta_box('gawd-country-box', __('Location', 'gawd'), array(
|
522 |
+
// $this,
|
523 |
+
// 'gawd_country_box'
|
524 |
+
// ), 'gawd_analytics', $orintation, null);
|
525 |
+
// //left side thin meta.
|
526 |
+
// add_meta_box('gawd-visitors-meta', __('Visitors', 'gawd'), array(
|
527 |
+
// $this,
|
528 |
+
// 'gawd_visitors'
|
529 |
+
// ), 'gawd_analytics', 'side', null);
|
530 |
+
// add_meta_box('gawd-browser-meta', __('Browsers', 'gawd'), array(
|
531 |
+
// $this,
|
532 |
+
// 'gawd_browser'
|
533 |
+
// ), 'gawd_analytics', 'side', null);
|
534 |
}
|
535 |
|
536 |
public function gawd_date_box()
|
621 |
{
|
622 |
if (is_user_logged_in()) {
|
623 |
wp_enqueue_style('admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION);
|
|
|
|
|
|
|
|
|
|
|
624 |
wp_enqueue_script('gawd_front_js', GAWD_URL . '/inc/js/gawd_front.js', array('jquery'), GAWD_VERSION);
|
625 |
wp_localize_script('gawd_front_js', 'gawd_front', array(
|
626 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
671 |
wp_enqueue_style('ui.jqgrid.css', GAWD_URL . '/inc/css/ui.jqgrid.css', false, GAWD_VERSION);
|
672 |
wp_enqueue_script('gawd_moment', GAWD_URL . '/inc/js/moment.min.js', false, GAWD_VERSION);
|
673 |
wp_enqueue_script('gawd_daterangepicker', GAWD_URL . '/inc/js/daterangepicker.js', false, GAWD_VERSION);
|
|
|
|
|
|
|
674 |
/*Map*/
|
675 |
+
//wp_enqueue_script('gawd_map_chart', GAWD_URL . '/inc/js/gawd_map_chart.js', false, GAWD_VERSION);
|
|
|
|
|
676 |
/*End Map*/
|
|
|
|
|
677 |
wp_enqueue_script('rgbcolor.js', GAWD_URL . '/inc/js/rgbcolor.js', array('jquery'), GAWD_VERSION);
|
678 |
wp_enqueue_script('StackBlur.js', GAWD_URL . '/inc/js/StackBlur.js', array('jquery'), GAWD_VERSION);
|
679 |
wp_enqueue_script('canvg.js', GAWD_URL . '/inc/js/canvg.js', array('jquery'), GAWD_VERSION);
|
778 |
array($this, $this->gawd_set_display('gawd_display_overview_page')) //$function = '',
|
779 |
);
|
780 |
add_submenu_page(
|
781 |
+
null, //$parent_slug
|
782 |
__('Reports', 'gawd'), //$page_title
|
783 |
__('Reports', 'gawd'), //$menu_title
|
784 |
$permission, //$capability
|
785 |
$this->gawd_set_slug('gawd_reports'), //$menu_slug
|
786 |
+
array($this, $this->gawd_set_display('gawd_display_overview_page')) //$function = '',
|
787 |
);
|
788 |
add_submenu_page(
|
789 |
$parent_slug, //$parent_slug
|
google-analytics-wd.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* Plugin Name: Google Analytics
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
|
6 |
-
* Description: Google Analytics
|
7 |
-
* Version: 1.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -26,7 +26,7 @@ if (!defined('GAWD_INC')) {
|
|
26 |
}
|
27 |
|
28 |
if (!defined('GAWD_VERSION')) {
|
29 |
-
define('GAWD_VERSION', '1.
|
30 |
}
|
31 |
|
32 |
|
@@ -290,32 +290,32 @@ if (!function_exists('gawd_wd_bp_install_notice')) {
|
|
290 |
}
|
291 |
|
292 |
$prefix = 'gawd';
|
293 |
-
$meta_value = get_option('
|
294 |
if ($meta_value === '' || $meta_value === false) {
|
295 |
ob_start();
|
296 |
?>
|
297 |
<div class="notice notice-info" id="wd_bp_notice_cont">
|
298 |
<p>
|
299 |
-
<img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/
|
300 |
-
<?php _e("Google Analytics WD advises:
|
301 |
-
<a href="https://wordpress.org/plugins/
|
302 |
-
target="_blank"><?php _e("
|
303 |
-
<?php _e("plugin
|
304 |
<a class="button button-primary"
|
305 |
-
href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=
|
306 |
<span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
|
307 |
</a>
|
308 |
</p>
|
309 |
<button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
|
310 |
</button>
|
311 |
</div>
|
312 |
-
<script>wd_bp_url = '<?php echo add_query_arg(array('action' => '
|
313 |
<?php
|
314 |
echo ob_get_clean();
|
315 |
}
|
316 |
}
|
317 |
|
318 |
-
if (!is_dir(plugin_dir_path(dirname(__FILE__)) . '
|
319 |
add_action('admin_notices', 'gawd_wd_bp_install_notice');
|
320 |
}
|
321 |
|
@@ -326,9 +326,9 @@ if (!function_exists('gawd_wd_bp_install_notice')) {
|
|
326 |
* 1 : never show again
|
327 |
*/
|
328 |
function gawd_wd_bp_install_notice_status() {
|
329 |
-
update_option('
|
330 |
}
|
331 |
-
add_action('
|
332 |
}
|
333 |
|
334 |
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Plugin Name: WD Google Analytics
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
|
6 |
+
* Description: WD Google Analytics is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
|
7 |
+
* Version: 1.0.22
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
26 |
}
|
27 |
|
28 |
if (!defined('GAWD_VERSION')) {
|
29 |
+
define('GAWD_VERSION', '1.0.22');
|
30 |
}
|
31 |
|
32 |
|
290 |
}
|
291 |
|
292 |
$prefix = 'gawd';
|
293 |
+
$meta_value = get_option('wd_seo_notice_status');
|
294 |
if ($meta_value === '' || $meta_value === false) {
|
295 |
ob_start();
|
296 |
?>
|
297 |
<div class="notice notice-info" id="wd_bp_notice_cont">
|
298 |
<p>
|
299 |
+
<img id="wd_bp_logo_notice" src="<?php echo $wd_bp_plugin_url . '/assets/seo_logo.png'; ?>">
|
300 |
+
<?php _e("Google Analytics WD advises: Optimize your web pages for search engines with the", $prefix) ?>
|
301 |
+
<a href="https://wordpress.org/plugins/seo-by-10web/" title="<?php _e("More details", $prefix) ?>"
|
302 |
+
target="_blank"><?php _e("FREE SEO", $prefix) ?></a>
|
303 |
+
<?php _e("plugin.", $prefix) ?>
|
304 |
<a class="button button-primary"
|
305 |
+
href="<?php echo esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=seo-by-10web'), 'install-plugin_seo-by-10web')); ?>">
|
306 |
<span onclick="wd_bp_notice_install()"><?php _e("Install", $prefix); ?></span>
|
307 |
</a>
|
308 |
</p>
|
309 |
<button type="button" class="wd_bp_notice_dissmiss notice-dismiss"><span class="screen-reader-text"></span>
|
310 |
</button>
|
311 |
</div>
|
312 |
+
<script>wd_bp_url = '<?php echo add_query_arg(array('action' => 'wd_seo_dismiss',), admin_url('admin-ajax.php')); ?>'</script>
|
313 |
<?php
|
314 |
echo ob_get_clean();
|
315 |
}
|
316 |
}
|
317 |
|
318 |
+
if (!is_dir(plugin_dir_path(dirname(__FILE__)) . 'seo-by-10web')) {
|
319 |
add_action('admin_notices', 'gawd_wd_bp_install_notice');
|
320 |
}
|
321 |
|
326 |
* 1 : never show again
|
327 |
*/
|
328 |
function gawd_wd_bp_install_notice_status() {
|
329 |
+
update_option('wd_seo_notice_status', '1', 'no');
|
330 |
}
|
331 |
+
add_action('wp_ajax_wd_seo_dismiss', 'gawd_wd_bp_install_notice_status');
|
332 |
}
|
333 |
|
334 |
|
inc/css/gawd_admin.css
CHANGED
@@ -150,13 +150,6 @@
|
|
150 |
text-align: center !important
|
151 |
}
|
152 |
|
153 |
-
/* #gawd_browser_meta {
|
154 |
-
width: 100%;
|
155 |
-
height: 700px;
|
156 |
-
}
|
157 |
-
#gawd_browser_meta .amcharts-chart-div{
|
158 |
-
height:320px !important
|
159 |
-
} */
|
160 |
|
161 |
#chart {
|
162 |
width: 100%;
|
@@ -3002,10 +2995,6 @@ th.ui-th-column div {
|
|
3002 |
text-align: right
|
3003 |
}
|
3004 |
|
3005 |
-
.amcharts-main-div .amcharts-chart-div svg {
|
3006 |
-
max-width: 100% !important;
|
3007 |
-
max-height: 100% !important;
|
3008 |
-
}
|
3009 |
|
3010 |
.gawd_custom_code {
|
3011 |
width: 100%;
|
150 |
text-align: center !important
|
151 |
}
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
#chart {
|
155 |
width: 100%;
|
2995 |
text-align: right
|
2996 |
}
|
2997 |
|
|
|
|
|
|
|
|
|
2998 |
|
2999 |
.gawd_custom_code {
|
3000 |
width: 100%;
|
inc/css/wd_bp_install.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
}
|
9 |
|
10 |
#wd_bp_logo_notice {
|
11 |
-
width:
|
12 |
float: left;
|
13 |
margin-right: 10px;
|
14 |
}
|
8 |
}
|
9 |
|
10 |
#wd_bp_logo_notice {
|
11 |
+
width: 50px;
|
12 |
float: left;
|
13 |
margin-right: 10px;
|
14 |
}
|
inc/js/amcharts.js
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
(function(){var d;window.AmCharts?d=window.AmCharts:(d={},window.AmCharts=d,d.themes={},d.maps={},d.inheriting={},d.charts=[],d.onReadyArray=[],d.useUTC=!1,d.updateRate=60,d.uid=0,d.lang={},d.translations={},d.mapTranslations={},d.windows={},d.initHandlers=[],d.amString="am",d.pmString="pm");d.Class=function(a){var b=function(){arguments[0]!==d.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(d.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0;a<arguments.length;a++)this.events[arguments[a]]=[]},b.prototype.listenTo=function(a,b,c){this.removeListener(a,b,c);a.events[b].push({handler:c,scope:this})},b.prototype.addListener=function(a,b,c){this.removeListener(this,a,b);a&&this.events[a]&&this.events[a].push({handler:b,scope:c})},b.prototype.removeListener=function(a,b,c){if(a&&a.events&&(a=a.events[b]))for(b=a.length-1;0<=b;b--)a[b].handler===c&&a.splice(b,1)},b.prototype.fire=function(a){for(var b=this.events[a.type],c=0;c<b.length;c++){var d=b[c];d.handler.call(d.scope,a)}});for(var c in a)b.prototype[c]=a[c];return b};d.addChart=function(a){window.requestAnimationFrame?d.animationRequested||(d.animationRequested=!0,window.requestAnimationFrame(d.update)):d.updateInt||(d.updateInt=setInterval(function(){d.update()},Math.round(1E3/d.updateRate)));d.charts.push(a)};d.removeChart=function(a){for(var b=d.charts,c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);0===b.length&&d.updateInt&&(clearInterval(d.updateInt),d.updateInt=NaN)};d.isModern=!0;d.getIEVersion=function(){var a=0,b,c;"Microsoft Internet Explorer"==navigator.appName&&(b=navigator.userAgent,c=/MSIE ([0-9]{1,}[.0-9]{0,})/,null!==c.exec(b)&&(a=parseFloat(RegExp.$1)));return a};d.applyLang=function(a,b){var c=d.translations;b.dayNames=d.extend({},d.dayNames);b.shortDayNames=d.extend({},d.shortDayNames);b.monthNames=d.extend({},d.monthNames);b.shortMonthNames=d.extend({},d.shortMonthNames);b.amString="am";b.pmString="pm";c&&(c=c[a])&&(d.lang=c,c.monthNames&&(b.dayNames=d.extend({},c.dayNames),b.shortDayNames=d.extend({},c.shortDayNames),b.monthNames=d.extend({},c.monthNames),b.shortMonthNames=d.extend({},c.shortMonthNames)),c.am&&(b.amString=c.am),c.pm&&(b.pmString=c.pm));d.amString=b.amString;d.pmString=b.amString};d.IEversion=d.getIEVersion();9>d.IEversion&&0<d.IEversion&&(d.isModern=!1,d.isIE=!0);d.dx=0;d.dy=0;if(document.addEventListener||window.opera)d.isNN=!0,d.isIE=!1,d.dx=.5,d.dy=.5;document.attachEvent&&(d.isNN=!1,d.isIE=!0,d.isModern||(d.dx=0,d.dy=0));window.chrome&&(d.chrome=!0);d.handleMouseUp=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleReleaseOutside&&e.handleReleaseOutside(a)}};d.handleMouseMove=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleMouseMove&&e.handleMouseMove(a)}};d.handleWheel=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];if(e&&e.mouseIsOver){e.mouseWheelScrollEnabled||e.mouseWheelZoomEnabled?e.handleWheel&&e.handleWheel(a):a.stopPropagation&&a.stopPropagation();break}}};d.resetMouseOver=function(){for(var a=d.charts,b=0;b<a.length;b++){var c=a[b];c&&(c.mouseIsOver=!1)}};d.ready=function(a){d.onReadyArray.push(a)};d.handleLoad=function(){d.isReady=!0;for(var a=d.onReadyArray,b=0;b<a.length;b++){var c=a[b];isNaN(d.processDelay)?c():setTimeout(c,d.processDelay*b)}};d.addInitHandler=function(a,b){d.initHandlers.push({method:a,types:b})};d.callInitHandler=function(a){var b=d.initHandlers;if(d.initHandlers)for(var c=0;c<b.length;c++){var e=b[c];e.types?d.isInArray(e.types,a.type)&&e.method(a):e.method(a)}};d.getUniqueId=function(){d.uid++;return"AmChartsEl-"+d.uid};d.isNN&&(document.addEventListener("mousemove",d.handleMouseMove),document.addEventListener("mouseup",d.handleMouseUp,!0),window.addEventListener("load",d.handleLoad,!0),window.addEventListener("DOMMouseScroll",d.handleWheel,!0),document.addEventListener("mousewheel",d.handleWheel,!0));d.isIE&&(document.attachEvent("onmousemove",d.handleMouseMove),document.attachEvent("onmouseup",d.handleMouseUp),window.attachEvent("onload",d.handleLoad),document.attachEvent("onmousewheel",d.handleWheel));d.clear=function(){var a=d.charts;if(a)for(var b=a.length-1;0<=b;b--)a[b].clear();d.updateInt&&clearInterval(d.updateInt);d.charts=[];d.isNN&&(document.removeEventListener("mousemove",d.handleMouseMove,!0),document.removeEventListener("mouseup",d.handleMouseUp,!0),window.removeEventListener("load",d.handleLoad,!0),window.removeEventListener("DOMMouseScroll",d.handleWheel,!0),document.removeEventListener("mousewheel",d.handleWheel,!0));d.isIE&&(document.detachEvent("onmousemove",d.handleMouseMove),document.detachEvent("onmouseup",d.handleMouseUp),window.detachEvent("onload",d.handleLoad))};d.makeChart=function(a,b,c){var e=b.type,h=b.theme;d.isString(h)&&(h=d.themes[h],b.theme=h);var f;switch(e){case"serial":f=new d.AmSerialChart(h);break;case"xy":f=new d.AmXYChart(h);break;case"pie":f=new d.AmPieChart(h);break;case"radar":f=new d.AmRadarChart(h);break;case"gauge":f=new d.AmAngularGauge(h);break;case"funnel":f=new d.AmFunnelChart(h);break;case"map":f=new d.AmMap(h);break;case"stock":f=new d.AmStockChart(h);break;case"gantt":f=new d.AmGanttChart(h)}d.extend(f,b);d.isReady?isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c):d.ready(function(){isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c)});return f};d.realWrite=function(a,b){a.write(b)};d.updateCount=0;d.validateAt=Math.round(d.updateRate/10);d.update=function(){var a=d.charts;d.updateCount++;var b=!1;d.updateCount==d.validateAt&&(b=!0,d.updateCount=0);if(a)for(var c=a.length-1;0<=c;c--)a[c].update&&a[c].update(),b&&(a[c].autoResize?a[c].validateSize&&a[c].validateSize():a[c].premeasure&&a[c].premeasure());window.requestAnimationFrame&&window.requestAnimationFrame(d.update)};d.bezierX=3;d.bezierY=6;"complete"==document.readyState&&d.handleLoad()})();(function(){var d=window.AmCharts;d.toBoolean=function(a,b){if(void 0===a)return b;switch(String(a).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return!!a}};d.removeFromArray=function(a,b){var c;if(void 0!==b&&void 0!==a)for(c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1)};d.getPath=function(){var a=document.getElementsByTagName("script");if(a)for(var b=0;b<a.length;b++){var c=a[b].src;if(-1!==c.search(/\/(amcharts|ammap)\.js/))return c.replace(/\/(amcharts|ammap)\.js.*/,"/")}};d.normalizeUrl=function(a){return""!==a&&-1===a.search(/\/$/)?a+"/":a};d.isAbsolute=function(a){return 0===a.search(/^http[s]?:|^\//)};d.isInArray=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};d.getDecimals=function(a){var b=0;isNaN(a)||(a=String(a),-1!=a.indexOf("e-")?b=Number(a.split("-")[1]):-1!=a.indexOf(".")&&(b=a.split(".")[1].length));return b};d.wordwrap=function(a,b,c,e){var h,f,g,k;a+="";if(1>b)return a;h=-1;for(a=(k=a.split(/\r\n|\n|\r/)).length;++h<a;k[h]+=g){g=k[h];for(k[h]="";g.length>b;k[h]+=d.trim(g.slice(0,f))+((g=g.slice(f)).length?c:""))f=2==e||(f=g.slice(0,b+1).match(/\S*(\s)?$/))[1]?b:f.input.length-f[0].length||1==e&&b||f.input.length+(f=g.slice(b).match(/^\S*/))[0].length;g=d.trim(g)}return k.join(c)};d.trim=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};d.wrappedText=function(a,b,c,e,h,f,g,k){var l=d.text(a,b,c,e,h,f,g);if(l){var m=l.getBBox();if(m.width>k){var n="\n";d.isModern||(n="<br>");k=Math.floor(k/(m.width/
|
2 |
-
b.length));2<k&&(k-=2);b=d.wordwrap(b,k,n,!0);l.remove();l=d.text(a,b,c,e,h,f,g)}}return l};d.getStyle=function(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle)try{c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}catch(e){}else a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};d.removePx=function(a){if(void 0!==a)return Number(a.substring(0,a.length-2))};d.getURL=function(a,b){if(a)if("_self"!=b&&b)if("_top"==b&&window.top)window.top.location.href=a;else if("_parent"==b&&window.parent)window.parent.location.href=a;else if("_blank"==b)window.open(a);else{var c=document.getElementsByName(b)[0];c?c.src=a:(c=d.windows[b])?c.opener&&!c.opener.closed?c.location.href=a:d.windows[b]=window.open(a):d.windows[b]=window.open(a)}else window.location.href=a};d.ifArray=function(a){return a&&"object"==typeof a&&0<a.length?!0:!1};d.callMethod=function(a,b){var c;for(c=0;c<b.length;c++){var e=b[c];if(e){if(e[a])e[a]();var d=e.length;if(0<d){var f;for(f=0;f<d;f++){var g=e[f];if(g&&g[a])g[a]()}}}}};d.toNumber=function(a){return"number"==typeof a?a:Number(String(a).replace(/[^0-9\-.]+/g,""))};d.toColor=function(a){if(""!==a&&void 0!==a)if(-1!=a.indexOf(",")){a=a.split(",");var b;for(b=0;b<a.length;b++){var c=a[b].substring(a[b].length-6,a[b].length);a[b]="#"+c}}else a=a.substring(a.length-6,a.length),a="#"+a;return a};d.toCoordinate=function(a,b,c){var e;void 0!==a&&(a=String(a),c&&c<b&&(b=c),e=Number(a),-1!=a.indexOf("!")&&(e=b-Number(a.substr(1))),-1!=a.indexOf("%")&&(e=b*Number(a.substr(0,a.length-1))/100));return e};d.fitToBounds=function(a,b,c){a<b&&(a=b);a>c&&(a=c);return a};d.isDefined=function(a){return void 0===a?!1:!0};d.stripNumbers=function(a){return a.replace(/[0-9]+/g,"")};d.roundTo=function(a,b){if(0>b)return a;var c=Math.pow(10,b);return Math.round(a*c)/c};d.toFixed=function(a,b){var c=String(Math.round(a*Math.pow(10,b)));if(0<b){var e=c.length;if(e<b){var d;for(d=0;d<b-e;d++)c="0"+c}e=c.substring(0,
|
3 |
-
c.length-b);""===e&&(e=0);return e+"."+c.substring(c.length-b,c.length)}return String(c)};d.formatDuration=function(a,b,c,e,h,f){var g=d.intervals,k=f.decimalSeparator;if(a>=g[b].contains){var l=a-Math.floor(a/g[b].contains)*g[b].contains;"ss"==b?(l=d.formatNumber(l,f),1==l.split(k)[0].length&&(l="0"+l)):l=d.roundTo(l,f.precision);("mm"==b||"hh"==b)&&10>l&&(l="0"+l);c=l+""+e[b]+""+c;a=Math.floor(a/g[b].contains);b=g[b].nextInterval;return d.formatDuration(a,b,c,e,h,f)}"ss"==b&&(a=d.formatNumber(a,f),1==a.split(k)[0].length&&(a="0"+a));("mm"==b||"hh"==b)&&10>a&&(a="0"+a);c=a+""+e[b]+""+c;if(g[h].count>g[b].count)for(a=g[b].count;a<g[h].count;a++)b=g[b].nextInterval,"ss"==b||"mm"==b||"hh"==b?c="00"+e[b]+""+c:"DD"==b&&(c="0"+e[b]+""+c);":"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));return c};d.formatNumber=function(a,b,c,e,h){a=d.roundTo(a,b.precision);isNaN(c)&&(c=b.precision);var f=b.decimalSeparator;b=b.thousandsSeparator;var g;g=0>a?"-":"";a=Math.abs(a);var k=String(a),l=!1;-1!=k.indexOf("e")&&(l=!0);0<=c&&!l&&(k=d.toFixed(a,c));var m="";if(l)m=k;else{var k=k.split("."),l=String(k[0]),n;for(n=l.length;0<=n;n-=3)m=n!=l.length?0!==n?l.substring(n-3,n)+b+m:l.substring(n-3,n)+m:l.substring(n-3,n);void 0!==k[1]&&(m=m+f+k[1]);void 0!==c&&0<c&&"0"!=m&&(m=d.addZeroes(m,f,c))}m=g+m;""===g&&!0===e&&0!==a&&(m="+"+m);!0===h&&(m+="%");return m};d.addZeroes=function(a,b,c){a=a.split(b);void 0===a[1]&&0<c&&(a[1]="0");return a[1].length<c?(a[1]+="0",d.addZeroes(a[0]+b+a[1],b,c)):void 0!==a[1]?a[0]+b+a[1]:a[0]};d.scientificToNormal=function(a){var b;a=String(a).split("e");var c;if("-"==a[1].substr(0,1)){b="0.";for(c=0;c<Math.abs(Number(a[1]))-1;c++)b+="0";b+=a[0].split(".").join("")}else{var e=0;b=a[0].split(".");b[1]&&(e=b[1].length);b=a[0].split(".").join("");for(c=0;c<Math.abs(Number(a[1]))-e;c++)b+="0"}return b};d.toScientific=function(a,b){if(0===a)return"0";var c=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),e=String(e).split(".").join(b);return String(e)+"e"+c};d.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};d.hitTest=function(a,b,c){var e=!1,h=a.x,f=a.x+a.width,g=a.y,k=a.y+a.height,l=d.isInRectangle;e||(e=l(h,g,b));e||(e=l(h,k,b));e||(e=l(f,g,b));e||(e=l(f,k,b));e||!0===c||(e=d.hitTest(b,a,!0));return e};d.isInRectangle=function(a,b,c){return a>=c.x-5&&a<=c.x+c.width+5&&b>=c.y-5&&b<=c.y+c.height+5?!0:!1};d.isPercents=function(a){if(-1!=String(a).indexOf("%"))return!0};d.formatValue=function(a,b,c,e,h,f,g,k){if(b){void 0===h&&(h="");var l;for(l=0;l<c.length;l++){var m=c[l],n=b[m];void 0!==n&&(n=f?d.addPrefix(n,k,g,e):d.formatNumber(n,e),a=a.replace(new RegExp("\\[\\["+h+""+m+"\\]\\]","g"),n))}}return a};d.formatDataContextValue=function(a,b){if(a){var c=a.match(/\[\[.*?\]\]/g),e;for(e=0;e<c.length;e++){var d=c[e],d=d.substr(2,d.length-4);void 0!==b[d]&&(a=a.replace(new RegExp("\\[\\["+d+"\\]\\]","g"),b[d]))}}return a};d.massReplace=function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var e=b[c];void 0===e&&(e="");a=a.replace(c,e)}return a};d.cleanFromEmpty=function(a){return a.replace(/\[\[[^\]]*\]\]/g,"")};d.addPrefix=function(a,b,c,e,h){var f=d.formatNumber(a,e),g="",k,l,m;if(0===a)return"0";0>a&&(g="-");a=Math.abs(a);if(1<a)for(k=b.length-1;-1<k;k--){if(a>=b[k].number&&(l=a/b[k].number,m=Number(e.precision),1>m&&(m=1),c=d.roundTo(l,m),m=d.formatNumber(c,{precision:-1,decimalSeparator:e.decimalSeparator,thousandsSeparator:e.thousandsSeparator}),!h||l==c)){f=g+""+m+""+b[k].prefix;break}}else for(k=0;k<c.length;k++)if(a<=c[k].number){l=a/c[k].number;m=Math.abs(Math.floor(Math.log(l)*Math.LOG10E));l=d.roundTo(l,m);f=g+""+l+""+c[k].prefix;break}return f};d.remove=function(a){a&&a.remove()};d.getEffect=function(a){">"==a&&(a="easeOutSine");"<"==a&&(a="easeInSine");"elastic"==a&&(a="easeOutElastic");return a};d.getObjById=function(a,b){var c,e;for(e=0;e<a.length;e++){var d=a[e];if(d.id==b){c=d;break}}return c};d.applyTheme=function(a,b,c){b||(b=d.theme);b&&b[c]&&d.extend(a,b[c])};d.isString=function(a){return"string"==typeof a?!0:!1};d.extend=function(a,b,c){var e;a||(a={});for(e in b)c?a.hasOwnProperty(e)||(a[e]=b[e]):a[e]=b[e];return a};d.copyProperties=function(a,b){for(var c in a)a.hasOwnProperty(c)&&"events"!=c&&void 0!==a[c]&&"function"!=typeof a[c]&&"cname"!=c&&(b[c]=a[c])};d.processObject=function(a,b,c,e){if(!1===a instanceof b&&(a=e?d.extend(new b(c),a):d.extend(a,new b(c),!0),a.listeners))for(var h in a.listeners)b=a.listeners[h],a.addListener(b.event,b.method);return a};d.fixNewLines=function(a){var b=RegExp("\\n","g");a&&(a=a.replace(b,"<br />"));return a};d.fixBrakes=function(a){if(d.isModern){var b=RegExp("<br>","g");a&&(a=a.replace(b,"\n"))}else a=d.fixNewLines(a);return a};d.deleteObject=function(a,b){if(a){if(void 0===b||null===b)b=20;if(0!==b)if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c<a.length;c++)d.deleteObject(a[c],b-1),a[c]=null;else if(a&&!a.tagName)try{for(c in a)a[c]&&("object"==typeof a[c]&&d.deleteObject(a[c],b-1),"function"!=typeof a[c]&&(a[c]=null))}catch(e){}}};d.bounce=function(a,b,c,e,d){return(b/=d)<1/2.75?7.5625*e*b*b+c:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+.9375)+c:e*(7.5625*(b-=2.625/2.75)*b+.984375)+c};d.easeInOutQuad=function(a,b,c,e,d){b/=d/2;if(1>b)return e/2*b*b+c;b--;return-e/2*(b*(b-2)-1)+c};d.easeInSine=function(a,b,c,e,d){return-e*Math.cos(b/d*(Math.PI/2))+e+c};d.easeOutSine=function(a,b,c,e,d){return e*Math.sin(b/d*(Math.PI/2))+c};d.easeOutElastic=function(a,b,c,e,d){a=1.70158;var f=0,g=e;if(0===b)return c;if(1==(b/=d))return c+e;f||(f=.3*d);g<Math.abs(e)?(g=e,a=f/4):a=f/(2*Math.PI)*Math.asin(e/g);return g*Math.pow(2,-10*b)*Math.sin(2*(b*d-a)*Math.PI/f)+e+c};d.fixStepE=function(a){a=a.toExponential(0).split("e");var b=Number(a[1]);9==Number(a[0])&&b++;return d.generateNumber(1,b)};d.generateNumber=function(a,b){var c="",e;e=0>b?Math.abs(b)-1:Math.abs(b);var d;for(d=0;d<e;d++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)};d.setCN=function(a,b,c,e){if(a.addClassNames&&b&&(b=b.node)&&c){var d=b.getAttribute("class");a=a.classNamePrefix+"-";e&&(a="");d?b.setAttribute("class",d+" "+a+c):b.setAttribute("class",a+c)}};d.parseDefs=function(a,b){for(var c in a){var e=typeof a[c];if(0<a[c].length&&"object"==e)for(var h=0;h<a[c].length;h++)e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c][h],e);else"object"==e?(e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c],e)):b.setAttribute(c,a[c])}}})();(function(){var d=window.AmCharts;d.AxisBase=d.Class({construct:function(a){this.createEvents("clickItem","rollOverItem","rollOutItem");this.titleDY=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;this.bcn="axis-";this.centerLabels=!1;this.firstDayOfWeek=1;this.centerLabelOnFullPeriod=this.markPeriodChange=this.boldPeriodBeginning=!0;this.periods=[{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},{period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"JJ:NN:SS"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={fff:"ss",ss:"mm",mm:"hh",hh:"DD",DD:"MM",MM:"YYYY"};d.applyTheme(this,a,"AxisBase")},zoom:function(a,b){this.start=a;this.end=b;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var a=this.position;"H"==this.orientation?("left"==a&&(a="bottom"),"right"==a&&(a="top")):("bottom"==a&&(a="left"),"top"==a&&(a="right"));this.position=a},init:function(){this.createBalloon()},draw:function(){var a=this.chart;this.prevBY=this.prevBX=NaN;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.setBalloonBounds();this.labels=[];var b=a.container,c=b.set();a.gridSet.push(c);this.set=c;b=b.set();a.axesLabelsSet.push(b);this.labelsSet=b;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(a=this.height/this.minVerticalGap,3>a&&(a=3)):a=this.width/this.minHorizontalGap,this.gridCountR=Math.max(a,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(a){this.orientation=a?"H":"V"},addTitle:function(){var a=this.title;this.titleLabel=null;if(a){var b=this.chart,c=this.titleColor;void 0===c&&(c=b.color);var e=this.titleFontSize;isNaN(e)&&(e=b.fontSize+1);a=d.text(b.container,a,c,b.fontFamily,e,this.titleAlign,this.titleBold);d.setCN(b,a,this.bcn+"title");this.titleLabel=a}},positionTitle:function(){var a=this.titleLabel;if(a){var b,c,e=this.labelsSet,h={};0<e.length()?h=e.getBBox():(h.x=0,h.y=0,h.width=this.width,h.height=this.height,d.VML&&(h.y+=this.y,h.x+=this.x));e.push(a);var e=h.x,f=h.y;d.VML&&(this.rotate?e-=this.x:f-=this.y);var g=h.width,h=h.height,k=this.width,l=this.height,m=0,n=a.getBBox().height/2,q=this.inside,p=this.titleAlign;switch(this.position){case"top":b="left"==p?-1:"right"==p?k:k/2;c=f-10-n;break;case"bottom":b="left"==p?-1:"right"==p?k:k/2;c=f+h+10+n;break;case"left":b=e-10-n;q&&(b-=5);m=-90;c=("left"==p?l+1:"right"==p?-1:l/2)+this.titleDY;break;case"right":b=e+g+10+n,q&&(b+=7),c=("left"==p?l+2:"right"==p?-2:l/2)+this.titleDY,m=-90}this.marginsChanged?(a.translate(b,c),this.tx=b,this.ty=c):a.translate(this.tx,this.ty);this.marginsChanged=!1;isNaN(this.titleRotation)||(m=this.titleRotation);0!==m&&a.rotate(m)}},pushAxisItem:function(a,b){var c=this,e=a.graphics();0<e.length()&&(b?c.labelsSet.push(e):c.set.push(e));if(e=a.getLabel())this.labelsSet.push(e),e.click(function(b){c.handleMouse(b,a,"clickItem")}).mouseover(function(b){c.handleMouse(b,a,"rollOverItem")}).mouseout(function(b){c.handleMouse(b,a,"rollOutItem")})},handleMouse:function(a,b,c){this.fire({type:c,value:b.value,serialDataItem:b.serialDataItem,axis:this,target:b.label,chart:this.chart,event:a})},addGuide:function(a){for(var b=this.guides,c=!1,e=b.length,h=0;h<b.length;h++)b[h]==a&&(c=!0,e=h);a=d.processObject(a,d.Guide,this.theme);a.id||(a.id="guideAuto"+e+"_"+(new Date).getTime());c||b.push(a)},removeGuide:function(a){var b=this.guides,c;for(c=0;c<b.length;c++)b[c]==a&&b.splice(c,1)},handleGuideOver:function(a){clearTimeout(this.chart.hoverInt);var b=a.graphics.getBBox(),c=this.x+b.x+b.width/2,b=this.y+b.y+b.height/2,e=a.fillColor;void 0===e&&(e=a.lineColor);this.chart.showBalloon(a.balloonText,e,!0,c,b)},handleGuideOut:function(){this.chart.hideBalloon()},addEventListeners:function(a,b){var c=this;a.mouseover(function(){c.handleGuideOver(b)});a.touchstart(function(){c.handleGuideOver(b)});a.mouseout(function(){c.handleGuideOut(b)})},getBBox:function(){var a;this.labelsSet&&(a=this.labelsSet.getBBox());a?d.VML||(a={x:a.x+this.x,y:a.y+this.y,width:a.width,height:a.height}):a={x:0,y:0,width:0,height:0};return a},destroy:function(){d.remove(this.set);d.remove(this.labelsSet);var a=this.axisLine;a&&d.remove(a.axisSet);d.remove(this.grid0)},chooseMinorFrequency:function(a){for(var b=10;0<b;b--)if(a/b==Math.round(a/b))return a/b},parseDatesDraw:function(){var a,b=this.chart,c=this.showFirstLabel,e=this.showLastLabel,h,f="",g=d.extractPeriod(this.minPeriod),k=d.getPeriodDuration(g.period,g.count),l,m,n,q,p,t=this.firstDayOfWeek,r=this.boldPeriodBeginning;a=this.minorGridEnabled;var u,x=this.gridAlpha,z,v=this.choosePeriod(0),A=v.period,v=v.count,y=d.getPeriodDuration(A,v);y<k&&(A=g.period,v=g.count,y=k);g=A;"WW"==g&&(g="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var B=Math.ceil(this.timeDifference/y)+5,D=l=d.resetDateToMin(new Date(this.startTime-y),A,v,t).getTime();if(g==A&&1==v&&this.centerLabelOnFullPeriod||this.autoWrap||this.centerLabels)n=y*this.stepWidth,this.autoWrap&&!this.centerLabels&&(n=-n);this.cellWidth=k*this.stepWidth;q=Math.round(l/y);k=-1;q/2==Math.round(q/2)&&(k=-2,l-=y);q=this.firstTime;var C=0,J=0;a&&1<v&&(u=this.chooseMinorFrequency(v),z=d.getPeriodDuration(A,u),"DD"==A&&(z+=d.getPeriodDuration("hh")));if(0<this.gridCountR)for(B-5-k>this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),a=k;a<=B;a++){p=q+y*(a+Math.floor((D-q)/y))-C;"DD"==A&&(p+=36E5);p=d.resetDateToMin(new Date(p),A,v,t).getTime();"MM"==A&&(h=(p-l)/y,1.5<=(p-l)/y&&(p=p-(h-1)*y+d.getPeriodDuration("DD",3),p=d.resetDateToMin(new Date(p),A,1).getTime(),C+=y));h=(p-this.startTime)*this.stepWidth;if("radar"==b.type){if(h=this.axisWidth-h,0>h||h>this.axisWidth)continue}else this.rotate?"date"==this.type&&"middle"==this.gridPosition&&
|
4 |
-
(J=-y*this.stepWidth/2):"date"==this.type&&(h=this.axisWidth-h);f=!1;this.nextPeriod[g]&&(f=this.checkPeriodChange(this.nextPeriod[g],1,p,l,g));l=!1;f&&this.markPeriodChange?(f=this.dateFormatsObject[this.nextPeriod[g]],this.twoLineMode&&(f=this.dateFormatsObject[g]+"\n"+f,f=d.fixBrakes(f)),l=!0):f=this.dateFormatsObject[g];r||(l=!1);this.currentDateFormat=f;f=d.formatDate(new Date(p),f,b);if(a==k&&!c||a==B&&!e)f=" ";this.labelFunction&&(f=this.labelFunction(f,new Date(p),this,A,v,m).toString());this.boldLabels&&(l=!0);m=new this.axisItemRenderer(this,h,f,!1,n,J,!1,l);this.pushAxisItem(m);m=l=p;if(!isNaN(u))for(h=1;h<v;h+=u)this.gridAlpha=this.minorGridAlpha,f=p+z*h,f=d.resetDateToMin(new Date(f),A,u,t).getTime(),f=new this.axisItemRenderer(this,(f-this.startTime)*this.stepWidth,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),this.pushAxisItem(f);this.gridAlpha=x}},choosePeriod:function(a){var b=d.getPeriodDuration(this.periods[a].period,this.periods[a].count),c=this.periods;return this.timeDifference<b&&0<a?c[a-1]:Math.ceil(this.timeDifference/b)<=this.gridCountR?c[a]:a+1<c.length?this.choosePeriod(a+1):c[a]},getStepWidth:function(a){var b;this.startOnAxis?(b=this.axisWidth/(a-1),1==a&&(b=this.axisWidth)):b=this.axisWidth/a;return b},timeZoom:function(a,b){this.startTime=a;this.endTime=b},minDuration:function(){var a=d.extractPeriod(this.minPeriod);return d.getPeriodDuration(a.period,a.count)},checkPeriodChange:function(a,b,c,e,h){c=new Date(c);var f=new Date(e),g=this.firstDayOfWeek;e=b;"DD"==a&&(b=1);c=d.resetDateToMin(c,a,b,g).getTime();b=d.resetDateToMin(f,a,b,g).getTime();return"DD"==a&&"hh"!=h&&c-b<d.getPeriodDuration(a,e)-d.getPeriodDuration("hh",1)?!1:c!=b?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var a;for(a=0;a<this.dateFormats.length;a++){var b=this.dateFormats[a];this.dateFormatsObject[b.period]=b.format}},hideBalloon:function(){this.balloon&&this.balloon.hide&&this.balloon.hide();this.prevBY=this.prevBX=NaN},formatBalloonText:function(a){return a},showBalloon:function(a,b,c,e){var d=this.offset;switch(this.position){case"bottom":b=this.height+d;break;case"top":b=-d;break;case"left":a=-d;break;case"right":a=this.width+d}c||(c=this.currentDateFormat);if("V"==this.orientation){if(0>b||b>this.height)return;if(isNaN(b)){this.hideBalloon();return}b=this.adjustBalloonCoordinate(b,e);e=this.coordinateToValue(b)}else{if(0>a||a>this.width)return;if(isNaN(a)){this.hideBalloon();return}a=this.adjustBalloonCoordinate(a,e);e=this.coordinateToValue(a)}var f;if(d=this.chart.chartCursor)f=d.index;if(this.balloon&&void 0!==e&&this.balloon.enabled){if(this.balloonTextFunction){if("date"==this.type||!0===this.parseDates)e=new Date(e);e=this.balloonTextFunction(e)}else this.balloonText?e=this.formatBalloonText(this.balloonText,f,c):isNaN(e)||(e=this.formatValue(e,c));if(a!=this.prevBX||b!=this.prevBY)this.balloon.setPosition(a,b),this.prevBX=a,this.prevBY=b,e&&this.balloon.showBalloon(e)}},adjustBalloonCoordinate:function(a){return a},createBalloon:function(){var a=this.chart,b=a.chartCursor;b&&(b=b.cursorPosition,"mouse"!=b&&(this.stickBalloonToCategory=!0),"start"==b&&(this.stickBalloonToStart=!0),"ValueAxis"==this.cname&&(this.stickBalloonToCategory=!1));this.balloon&&(this.balloon.destroy&&this.balloon.destroy(),d.extend(this.balloon,a.balloon,!0))},setBalloonBounds:function(){var a=this.balloon;if(a){var b=this.chart;a.cornerRadius=0;a.shadowAlpha=0;a.borderThickness=1;a.borderAlpha=1;a.adjustBorderColor=!1;a.showBullet=!1;this.balloon=a;a.chart=b;a.mainSet=b.plotBalloonsSet;a.pointerWidth=this.tickLength;if(this.parseDates||"date"==this.type)a.pointerWidth=0;a.className=this.id;b="V";"V"==this.orientation&&(b="H");this.stickBalloonToCategory||(a.animationDuration=0);var c,e,d,f,g=this.inside,k=this.width,l=this.height;switch(this.position){case"bottom":c=0;e=k;g?(d=0,f=l):(d=l,f=l+1E3);break;case"top":c=0;e=k;g?(d=0,f=l):(d=-1E3,f=0);break;case"left":d=0;f=l;g?(c=0,e=k):(c=-1E3,e=0);break;case"right":d=0,f=l,g?(c=0,e=k):(c=k,e=k+1E3)}a.drop||(a.pointerOrientation=b);a.setBounds(c,d,e,f)}}})})();(function(){var d=window.AmCharts;d.ValueAxis=d.Class({inherits:d.AxisBase,construct:function(a){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisZoomed","axisIntZoomed");d.ValueAxis.base.construct.call(this,a);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.includeAllValues=this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.axisFrequency=1;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.pointPosition="axis";this.minMaxMultiplier=1;this.logGridLimit=2;this.totalTextOffset=this.treatZeroAs=0;this.minPeriod="ss";this.relativeStart=0;this.relativeEnd=1;d.applyTheme(this,a,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var a=this.chart;"xy"!=a.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?(d.isString(this.synchronizeWith)&&(this.synchronizeWith=a.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax(),0===this.start&&this.end==this.data.length-1&&isNaN(this.minZoom)&&isNaN(this.maxZoom)&&(this.fullMin=this.min,this.fullMax=this.max,"date"!=this.type&&(isNaN(this.minimum)||(this.fullMin=this.minimum),isNaN(this.maximum)||(this.fullMax=this.maximum)),this.logarithmic&&(this.fullMin=this.logMin,0===this.fullMin&&(this.fullMin=this.treatZeroAs)),"date"==this.type&&(this.minimumDate||(this.fullMin=this.minRR),this.maximumDate||(this.fullMax=this.maxRR))))},draw:function(){d.ValueAxis.base.draw.call(this);var a=this.chart,b=this.set;this.labelRotationR=this.labelRotation;d.setCN(a,this.set,"value-axis value-axis-"+this.id);d.setCN(a,this.labelsSet,"value-axis value-axis-"+this.id);d.setCN(a,this.axisLine.axisSet,"value-axis value-axis-"+this.id);var c=this.type;"duration"==c&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);"date"==c&&(this.logarithmic=!1,this.min=this.minRR,this.max=this.maxRR,this.reversed=!1,this.getDateMinMax());if(this.logarithmic){var e=this.treatZeroAs,h=this.getExtremes(0,this.data.length-1).min;!isNaN(this.minimum)&&this.minimum<h&&(h=this.minimum);this.logMin=h;this.minReal<h&&(this.minReal=h);isNaN(this.minReal)&&(this.minReal=h);0<e&&0===h&&(this.minReal=h=e);if(0>=h||0>=this.minimum){this.fire({type:"logarithmicAxisFailed",chart:a});return}}this.grid0=null;var f,g,k=a.dx,l=a.dy,e=!1,h=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)e=!0;else{"date"==this.type&&this.min==this.max&&(this.max+=this.minDuration(),this.min-=this.minDuration());var m=this.labelFrequency,n=this.showFirstLabel,q=this.showLastLabel,p=1,t=0;this.minCalc=this.min;this.maxCalc=this.max;this.strictMinMax&&(isNaN(this.minimum)||(this.min=this.minimum),isNaN(this.maximum)||(this.max=this.maximum));isNaN(this.minZoom)||(this.minReal=this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);if(this.logarithmic){g=Math.log(this.fullMax)*Math.LOG10E-Math.log(this.fullMin)*Math.LOG10E;var r=Math.log(this.max)/Math.LN10-Math.log(this.fullMin)*Math.LOG10E;this.relativeStart=
|
5 |
-
(Math.log(this.minReal)/Math.LN10-Math.log(this.fullMin)*Math.LOG10E)/g;this.relativeEnd=r/g}else this.relativeStart=d.fitToBounds((this.min-this.fullMin)/(this.fullMax-this.fullMin),0,1),this.relativeEnd=d.fitToBounds((this.max-this.fullMin)/(this.fullMax-this.fullMin),0,1);var r=Math.round((this.maxCalc-this.minCalc)/this.step)+1,u;!0===h?(u=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/u,u>this.logGridLimit&&(r=Math.ceil(Math.log(this.max)*Math.LOG10E)+
|
6 |
-
1,t=Math.round(Math.log(this.minReal)*Math.LOG10E),r>this.gridCountR&&(p=Math.ceil(r/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var x=0;1>this.step&&-1<this.step&&(x=d.getDecimals(this.step));this.integersOnly&&(x=0);x>this.maxDecCount&&(x=this.maxDecCount);var z=this.precision;isNaN(z)||(x=z);isNaN(this.maxZoom)&&(this.max=d.roundTo(this.max,this.maxDecCount),this.min=d.roundTo(this.min,this.maxDecCount));g={};g.precision=x;g.decimalSeparator=a.nf.decimalSeparator;g.thousandsSeparator=a.nf.thousandsSeparator;this.numberFormatter=g;var v;this.exponential=!1;for(g=t;g<r;g+=p){var A=d.roundTo(this.step*g+this.min,x);-1!=String(A).indexOf("e")&&(this.exponential=!0)}this.duration&&(this.maxInterval=d.getMaxInterval(this.max,this.duration));var x=this.step,y,A=this.minorGridAlpha;this.minorGridEnabled&&(y=this.getMinorGridStep(x,this.stepWidth*x));if(this.autoGridCount||0!==this.gridCount)if("date"==c)this.generateDFObject(),this.timeDifference=this.max-this.min,this.maxTime=this.lastTime=this.max,this.startTime=this.firstTime=this.min,this.parseDatesDraw();else for(r>=this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),c=this.minCalc,h&&(r++,c=this.maxCalc-r*x),g=t;g<r;g+=p)if(t=x*g+c,t=d.roundTo(t,this.maxDecCount+1),!this.integersOnly||Math.round(t)==t)if(isNaN(z)||Number(d.toFixed(t,z))==t){if(!0===h)if(u>this.logGridLimit)t=Math.pow(10,g);else if(0>=t&&(t=c+x*g+x/2,0>=t))continue;v=this.formatValue(t,!1,g);Math.round(g/m)!=g/m&&(v=void 0);if(0===g&&!n||g==r-1&&!q)v=" ";f=this.getCoordinate(t);var B;this.rotate&&this.autoWrap&&(B=this.stepWidth*x-10);v=new this.axisItemRenderer(this,f,v,void 0,B,void 0,void 0,this.boldLabels);this.pushAxisItem(v);if(t==this.baseValue&&"radar"!=a.type){var D,C;v=this.width;var J=this.height;"H"==this.orientation?0<=f&&f<=v+1&&(D=[f,f,f+k],C=[J,0,l]):0<=f&&f<=J+1&&(D=[0,v,v+k],C=[f,f,f+l]);D&&(v=d.fitToBounds(2*this.gridAlpha,0,1),isNaN(this.zeroGridAlpha)||(v=this.zeroGridAlpha),v=d.line(a.container,D,C,this.gridColor,v,1,this.dashLength),v.translate(this.x,this.y),this.grid0=v,a.axesSet.push(v),v.toBack(),d.setCN(a,v,this.bcn+"zero-grid-"+this.id),d.setCN(a,v,this.bcn+"zero-grid"))}if(!isNaN(y)&&0<A&&g<r-1){v=x/y;h&&(y=x*(g+p)+this.minCalc,y=d.roundTo(y,this.maxDecCount+1),u>this.logGridLimit&&(y=Math.pow(10,g+p)),v=9,y=(y-t)/v);f=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(J=1;J<v;J++){var H=this.getCoordinate(t+y*J),H=new this.axisItemRenderer(this,H,"",!1,0,0,!1,!1,0,!0);this.pushAxisItem(H)}this.gridAlpha=
|
7 |
-
f}}u=this.guides;B=u.length;if(0<B){D=this.fillAlpha;for(g=this.fillAlpha=0;g<B;g++)C=u[g],k=NaN,y=C.above,isNaN(C.toValue)||(k=this.getCoordinate(C.toValue),v=new this.axisItemRenderer(this,k,"",!0,NaN,NaN,C),this.pushAxisItem(v,y)),l=NaN,isNaN(C.value)||(l=this.getCoordinate(C.value),v=new this.axisItemRenderer(this,l,C.label,!0,NaN,(k-l)/2,C),this.pushAxisItem(v,y)),isNaN(k)&&(l-=3,k=l+3),isNaN(k-l)||0>l&&0>k||(k=new this.guideFillRenderer(this,l,k,C),this.pushAxisItem(k,y),y=k.graphics(),C.graphics=
|
8 |
-
y,C.balloonText&&this.addEventListeners(y,C));this.fillAlpha=D}g=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(g=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(g=this.max);h&&g<this.minReal&&(g=this.minReal);this.baseCoord=this.getCoordinate(g,!0);g={type:"axisChanged",target:this,chart:a};g.min=h?this.minReal:this.min;g.max=this.max;this.fire(g);this.axisCreated=!0}h=this.axisLine.set;g=this.labelsSet;b.translate(this.x,this.y);g.translate(this.x,this.y);this.positionTitle();"radar"!=a.type&&h.toFront();!this.visible||e?(b.hide(),h.hide(),g.hide()):(b.show(),h.show(),g.show());this.axisY=this.y;this.axisX=this.x},getDateMinMax:function(){this.minimumDate&&(this.minimumDate instanceof Date||(this.minimumDate=d.getDate(this.minimumDate,this.chart.dataDateFormat,"fff")),this.min=this.minimumDate.getTime());this.maximumDate&&(this.maximumDate instanceof Date||(this.maximumDate=d.getDate(this.maximumDate,this.chart.dataDateFormat,"fff")),this.max=this.maximumDate.getTime())},formatValue:function(a,b,c){var e=this.exponential,h=this.logarithmic,f=this.numberFormatter,g=this.chart;if(f)return!0===this.logarithmic&&(e=-1!=String(a).indexOf("e")?!0:!1),this.useScientificNotation&&(e=!0),this.usePrefixes&&(e=!1),e?(c=-1==String(a).indexOf("e")?a.toExponential(15):String(a),e=c.split("e"),c=Number(e[0]),e=Number(e[1]),c=d.roundTo(c,14),10==c&&(c=1,e+=1),c=c+"e"+e,0===a&&(c="0"),1==a&&(c="1")):(h&&(e=String(a).split("."),e[1]?(f.precision=e[1].length,0>c&&(f.precision=Math.abs(c)),b&&1<a&&(f.precision=0)):f.precision=-1),c=this.usePrefixes?d.addPrefix(a,g.prefixesOfBigNumbers,g.prefixesOfSmallNumbers,f,!b):d.formatNumber(a,f,f.precision)),this.duration&&(b&&(f.precision=0),c=d.formatDuration(a,this.duration,"",this.durationUnits,this.maxInterval,f)),"date"==this.type&&(c=d.formatDate(new Date(a),this.currentDateFormat,g)),this.recalculateToPercents?c+="%":(b=this.unit)&&(c="left"==this.unitPosition?b+c:c+b),this.labelFunction&&(c="date"==this.type?this.labelFunction(c,new Date(a),this).toString():this.labelFunction(a,c,this).toString()),c},getMinorGridStep:function(a,b){var c=[5,4,2];60>b&&c.shift();for(var e=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),d=0;d<c.length;d++){var f=a/c[d],g=Math.floor(Math.log(Math.abs(f))*Math.LOG10E);if(!(1<Math.abs(e-g)))if(1>a){if(g=Math.pow(10,-g)*f,g==Math.round(g))return f}else if(f==Math.round(f))return f}},stackGraphs:function(a){var b=this.stackType;"stacked"==b&&(b="regular");"line"==b&&(b="none");"100% stacked"==b&&(b="100%");this.stackType=b;var c=[],e=[],h=[],f=[],g,k=this.chart.graphs,l,m,n,q,p,t=this.baseValue,r=!1;if("line"==a||"step"==a||"smoothedLine"==a)r=!0;if(r&&("regular"==b||"100%"==b))for(q=0;q<k.length;q++)n=k[q],n.stackGraph=null,n.hidden||(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable&&(l&&(n.stackGraph=l),l=n));n=this.start-10;l=this.end+10;q=this.data.length-1;n=d.fitToBounds(n,0,q);l=d.fitToBounds(l,0,q);for(p=n;p<=l;p++){var u=0;for(q=0;q<k.length;q++)if(n=k[q],n.hidden)n.newStack&&(h[p]=NaN,e[p]=NaN);else if(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable)if(m=this.data[p].axes[this.id].graphs[n.id],g=m.values.value,isNaN(g))n.newStack&&(h[p]=NaN,e[p]=NaN);else{var x=d.getDecimals(g);u<x&&(u=x);isNaN(f[p])?f[p]=Math.abs(g):f[p]+=Math.abs(g);f[p]=d.roundTo(f[p],u);x=n.fillToGraph;r&&x&&(x=this.data[p].axes[this.id].graphs[x.id])&&(m.values.open=x.values.value);"regular"==b&&(r&&(isNaN(c[p])?(c[p]=g,m.values.close=g,m.values.open=this.baseValue):(isNaN(g)?m.values.close=c[p]:m.values.close=g+c[p],m.values.open=c[p],c[p]=m.values.close)),"column"==a&&(n.newStack&&(h[p]=NaN,e[p]=NaN),m.values.close=g,0>g?(m.values.close=g,isNaN(e[p])?m.values.open=t:(m.values.close+=e[p],m.values.open=e[p]),e[p]=m.values.close):(m.values.close=g,isNaN(h[p])?m.values.open=t:(m.values.close+=h[p],m.values.open=h[p]),h[p]=m.values.close)))}}for(p=this.start;p<=this.end;p++)for(q=0;q<k.length;q++)(n=k[q],n.hidden)?n.newStack&&(h[p]=NaN,e[p]=NaN):(m=n.type,n.chart==this.chart&&n.valueAxis==this&&a==m&&n.stackable&&(m=this.data[p].axes[this.id].graphs[n.id],g=m.values.value,isNaN(g)||(c=g/f[p]*100,m.values.percents=c,m.values.total=f[p],n.newStack&&(h[p]=NaN,e[p]=NaN),"100%"==b&&(isNaN(e[p])&&(e[p]=0),isNaN(h[p])&&(h[p]=0),0>c?(m.values.close=d.fitToBounds(c+e[p],-100,100),m.values.open=e[p],e[p]=m.values.close):(m.values.close=d.fitToBounds(c+h[p],-100,100),m.values.open=h[p],h[p]=m.values.close)))))},recalculate:function(){var a=this.chart,b=a.graphs,c;for(c=0;c<b.length;c++){var e=b[c];if(e.valueAxis==this){var h="value";if("candlestick"==e.type||"ohlc"==e.type)h="open";var f,g,k=this.end+2,k=d.fitToBounds(this.end+1,0,this.data.length-1),l=this.start;0<l&&l--;var m;g=this.start;e.compareFromStart&&(g=0);if(!isNaN(a.startTime)&&(m=a.categoryAxis)){var n=m.minDuration(),n=new Date(a.startTime+n/2),q=d.resetDateToMin(new Date(a.startTime),m.minPeriod).getTime();d.resetDateToMin(new Date(n),m.minPeriod).getTime()>q&&g++}if(m=a.recalculateFromDate)m=d.getDate(m,a.dataDateFormat,"fff"),g=a.getClosestIndex(a.chartData,"time",m.getTime(),!0,0,a.chartData.length),k=a.chartData.length-1;for(m=g;m<=k&&(g=this.data[m].axes[this.id].graphs[e.id],f=g.values[h],e.recalculateValue&&(f=g.dataContext[e.valueField+e.recalculateValue]),isNaN(f));m++);this.recBaseValue=f;for(h=l;h<=k;h++){g=this.data[h].axes[this.id].graphs[e.id];g.percents={};var l=g.values,p;for(p in l)g.percents[p]="percents"!=p?l[p]/f*100-100:l[p]}}}},getMinMax:function(){var a=!1,b=this.chart,c=b.graphs,e;for(e=0;e<c.length;e++){var h=c[e].type;("line"==h||"step"==h||"smoothedLine"==h)&&this.expandMinMax&&(a=!0)}a&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==b.type&&(!0!==b.categoryAxis.parseDates||a||this.end<this.data.length-1&&this.end++);this.includeAllValues&&(this.start=0,this.end=this.data.length-1);a=this.minMaxMultiplier;b=this.getExtremes(this.start,this.end);this.min=b.min;this.max=b.max;this.minRR=this.min;this.maxRR=this.max;a=(this.max-this.min)*(a-1);this.min-=a;this.max+=a;a=this.guides.length;if(this.includeGuidesInMinMax&&0<a)for(b=0;b<a;b++)c=this.guides[b],c.toValue<this.min&&(this.min=c.toValue),c.value<this.min&&(this.min=c.value),c.toValue>this.max&&(this.max=c.toValue),c.value>this.max&&(this.max=c.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);"date"==this.type&&this.getDateMinMax();this.min>this.max&&(a=this.max,this.max=this.min,this.min=a);isNaN(this.minZoom)||(this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);this.minCalc=this.min;this.maxCalc=this.max;this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);a=this.min;b=this.max;c=this.max-this.min;e=0===c?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;isNaN(this.maximum)&&(this.max=Math.ceil(this.max/e)*e+e);isNaN(this.minimum)&&(this.min=Math.floor(this.min/e)*e-e);0>this.min&&
|
9 |
-
0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);c=this.max-this.min;e=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E))/10;this.step=Math.ceil(c/this.gridCountR/e)*e;c=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));c=d.fixStepE(c);e=Math.ceil(this.step/c);5<e&&(e=10);5>=e&&2<e&&(e=5);this.step=Math.ceil(this.step/(c*e))*c*e;1>c?(this.maxDecCount=Math.abs(Math.log(Math.abs(c))*Math.LOG10E),
|
10 |
-
this.maxDecCount=Math.round(this.maxDecCount),this.step=d.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=a&&(this.min=0);0<this.max&&0>=b&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));c=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=c);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);this.logarithmic&&(2<Math.log(b)*Math.LOG10E-Math.log(a)*Math.LOG10E?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(b))*Math.LOG10E))):(a=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E))/10,Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10<a&&(this.minReal=this.min=10*a)))},
|
11 |
-
getExtremes:function(a,b){var c,e,d;for(d=a;d<=b;d++){var f=this.data[d].axes[this.id].graphs,g;for(g in f)if(f.hasOwnProperty(g)){var k=this.chart.graphsById[g];if(k.includeInMinMax&&(!k.hidden||this.includeHidden)){isNaN(c)&&(c=Infinity);isNaN(e)&&(e=-Infinity);this.foundGraphs=!0;k=f[g].values;this.recalculateToPercents&&(k=f[g].percents);var l;if(this.minMaxField)l=k[this.minMaxField],l<c&&(c=l),l>e&&(e=l);else for(var m in k)k.hasOwnProperty(m)&&"percents"!=m&&"total"!=m&&(l=k[m],l<c&&(c=l),l>e&&(e=l))}}}return{min:c,max:e}},zoomOut:function(){this.maxZoom=this.minZoom=NaN;this.zoomToRelativeValues(0,1)},zoomToRelativeValues:function(a,b,c){if(this.reversed){var e=a;a=1-b;b=1-e}var d=this.fullMax,e=this.fullMin,f=e+(d-e)*a,g=e+(d-e)*b;this.logarithmic&&(d=Math.log(d)*Math.LOG10E-Math.log(e)*Math.LOG10E,f=Math.pow(10,d*a+Math.log(e)*Math.LOG10E),g=Math.pow(10,d*b+Math.log(e)*Math.LOG10E));return this.zoomToValues(f,g,c)},zoomToValues:function(a,b,c){if(b<a){var e=b;b=a;a=e}var h=this.fullMax,e=this.fullMin;this.relativeStart=(a-e)/(h-e);this.relativeEnd=(b-e)/(h-e);if(this.logarithmic){var h=Math.log(h)*Math.LOG10E-Math.log(e)*Math.LOG10E,f=Math.log(b)/Math.LN10-Math.log(e)*Math.LOG10E;this.relativeStart=(Math.log(a)/Math.LN10-Math.log(e)*Math.LOG10E)/h;this.relativeEnd=f/h}if(this.minZoom!=a||this.maxZoom!=b){if(0!==this.relativeStart||1!=this.relativeEnd)this.minZoom=a,this.maxZoom=b;e={type:"axisZoomed"};e.chart=this.chart;e.valueAxis=this;e.startValue=a;e.endValue=b;e.relativeStart=
|
12 |
-
this.relativeStart;e.relativeEnd=this.relativeEnd;this.prevStartValue==a&&this.prevEndValue==b||this.fire(e);this.prevStartValue=a;this.prevEndValue=b;c||(a={},d.copyProperties(e,a),a.type="axisIntZoomed",this.fire(a));return!0}},coordinateToValue:function(a){if(isNaN(a))return NaN;var b=this.axisWidth,c=this.stepWidth,e=this.reversed,d=this.rotate,f=this.min,g=this.minReal;return!0===this.logarithmic?Math.pow(10,(d?!0===e?(b-a)/c:a/c:!0===e?a/c:(b-a)/c)+Math.log(g)*Math.LOG10E):!0===e?d?f-(a-b)/
|
13 |
-
c:a/c+f:d?a/c+f:f-(a-b)/c},getCoordinate:function(a,b){if(isNaN(a))return NaN;var c=this.rotate,e=this.reversed,d=this.axisWidth,f=this.stepWidth,g=this.min,k=this.minReal;!0===this.logarithmic?(0===a&&(a=this.treatZeroAs),g=Math.log(a)*Math.LOG10E-Math.log(k)*Math.LOG10E,c=c?!0===e?d-f*g:f*g:!0===e?f*g:d-f*g):c=!0===e?c?d-f*(a-g):f*(a-g):c?f*(a-g):d-f*(a-g);1E7<Math.abs(c)&&(c=c/Math.abs(c)*1E7);b||(c=Math.round(c));return c},synchronizeWithAxis:function(a){this.synchronizeWith=a;this.listenTo(this.synchronizeWith,
|
14 |
-
"axisChanged",this.handleSynchronization)},handleSynchronization:function(){if(this.synchronizeWith){d.isString(this.synchronizeWith)&&(this.synchronizeWith=this.chart.getValueAxisById(this.synchronizeWith));var a=this.synchronizeWith,b=a.min,c=a.max,a=a.step,e=this.synchronizationMultiplier;e&&(this.min=b*e,this.max=c*e,this.step=a*e,b=Math.abs(Math.log(Math.abs(Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E))))*Math.LOG10E),this.maxDecCount=b=Math.round(b),this.draw())}}})})();(function(){var d=window.AmCharts;d.RecAxis=d.Class({construct:function(a){var b=a.chart,c=a.axisThickness,e=a.axisColor,h=a.axisAlpha,f=a.offset,g=a.dx,k=a.dy,l=a.x,m=a.y,n=a.height,q=a.width,p=b.container;"H"==a.orientation?(e=d.line(p,[0,q],[0,0],e,h,c),this.axisWidth=a.width,"bottom"==a.position?(k=c/2+f+n+m-1,c=l):(k=-c/2-f+m+k,c=g+l)):(this.axisWidth=a.height,"right"==a.position?(e=d.line(p,[0,0,-g],[0,n,n-k],e,h,c),k=m+k,c=c/2+f+g+q+l-1):(e=d.line(p,[0,0],[0,n],e,h,c),k=m,c=-c/2-f+l));e.translate(c,k);c=b.container.set();c.push(e);b.axesSet.push(c);d.setCN(b,e,a.bcn+"line");this.axisSet=c;this.set=e}})})();(function(){var d=window.AmCharts;d.RecItem=d.Class({construct:function(a,b,c,e,h,f,g,k,l,m,n,q){b=Math.round(b);var p=a.chart;this.value=c;void 0==c&&(c="");l||(l=0);void 0==e&&(e=!0);var t=p.fontFamily,r=a.fontSize;void 0==r&&(r=p.fontSize);var u=a.color;void 0==u&&(u=p.color);void 0!==n&&(u=n);var x=a.chart.container,z=x.set();this.set=z;var v=a.axisThickness,A=a.axisColor,y=a.axisAlpha,B=a.tickLength,D=a.gridAlpha,C=a.gridThickness,J=a.gridColor,H=a.dashLength,S=a.fillColor,O=a.fillAlpha,Q=a.labelsEnabled;n=a.labelRotationR;var ia=a.counter,I=a.inside,Z=a.labelOffset,va=a.dx,ma=a.dy,Oa=a.orientation,ea=a.position,ca=a.previousCoord,X=a.height,ya=a.width,da=a.offset,fa,za;g?(void 0!==g.id&&(q=p.classNamePrefix+"-guide-"+g.id),Q=!0,isNaN(g.tickLength)||(B=g.tickLength),void 0!=g.lineColor&&(J=g.lineColor),void 0!=g.color&&(u=g.color),isNaN(g.lineAlpha)||(D=g.lineAlpha),isNaN(g.dashLength)||(H=g.dashLength),isNaN(g.lineThickness)||(C=g.lineThickness),!0===g.inside&&(I=!0,0<da&&(da=0)),isNaN(g.labelRotation)||(n=g.labelRotation),isNaN(g.fontSize)||(r=g.fontSize),g.position&&(ea=g.position),void 0!==g.boldLabel&&(k=g.boldLabel),isNaN(g.labelOffset)||(Z=g.labelOffset)):""===c&&(B=0);m&&!isNaN(a.minorTickLength)&&(B=a.minorTickLength);var ga="start";0<h&&(ga="middle");a.centerLabels&&(ga="middle");var T=n*Math.PI/180,Y,Ca,G=0,w=0,na=0,ha=Y=0,Pa=0;"V"==Oa&&(n=0);var ba;Q&&""!==c&&(ba=a.autoWrap&&0===n?d.wrappedText(x,c,u,t,r,ga,k,Math.abs(h),0):d.text(x,c,u,t,r,ga,k),ga=ba.getBBox(),ha=ga.width,Pa=ga.height);if("H"==Oa){if(0<=b&&b<=ya+1&&(0<B&&0<y&&b+l<=ya+1&&(fa=d.line(x,[b+l,b+l],[0,B],A,y,C),z.push(fa)),0<D&&(za=d.line(x,[b,b+va,b+va],[X,X+ma,ma],J,D,C,H),z.push(za))),w=0,G=b,g&&90==n&&I&&(G-=r),!1===e?(ga="start",w="bottom"==ea?I?w+B:w-B:I?w-B:w+B,G+=3,0<h&&(G+=h/2-3,ga="middle"),0<n&&(ga="middle")):ga="middle",1==ia&&0<O&&!g&&!m&&ca<ya&&(e=d.fitToBounds(b,0,ya),ca=d.fitToBounds(ca,0,ya),Y=e-ca,0<Y&&(Ca=d.rect(x,Y,a.height,S,O),Ca.translate(e-Y+va,ma),z.push(Ca))),"bottom"==ea?(w+=X+r/2+da,I?(0<n?(w=X-ha/2*Math.sin(T)-B-3,G+=ha/2*Math.cos(T)-4+2):0>n?(w=X+ha*Math.sin(T)-B-3+2,G+=-ha*Math.cos(T)-Pa*Math.sin(T)-4):w-=B+r+3+3,w-=Z):(0<n?(w=X+ha/2*Math.sin(T)+B+3,G-=ha/2*Math.cos(T)):0>n?(w=X+B+3-ha/2*Math.sin(T)+2,G+=ha/2*Math.cos(T)):w+=B+v+3+3,w+=Z)):(w+=ma+r/2-da,G+=va,I?(0<n?(w=ha/2*Math.sin(T)+B+3,G-=ha/2*Math.cos(T)):w+=B+3,w+=Z):(0<n?(w=-(ha/2)*Math.sin(T)-B-6,G+=ha/2*Math.cos(T)):w-=B+r+3+v+3,w-=Z)),"bottom"==ea?Y=(I?X-B-1:X+v-1)+da:(na=va,Y=(I?ma:ma-B-v+1)-da),f&&(G+=f),f=G,0<n&&(f+=ha/2*Math.cos(T)),ba&&(r=0,I&&(r=ha/2*Math.cos(T)),f+r>ya+2||0>f))ba.remove(),ba=null}else{0<=b&&b<=X+1&&(0<B&&0<y&&b+l<=X+1&&(fa=d.line(x,[0,B+1],[b+l,b+l],A,y,C),z.push(fa)),0<D&&(za=d.line(x,[0,va,ya+va],[b,b+ma,b+ma],J,D,C,H),z.push(za)));ga="end";if(!0===I&&"left"==ea||!1===I&&"right"==ea)ga="start";w=b-Pa/2+2;1==ia&&0<O&&!g&&!m&&(e=d.fitToBounds(b,0,X),ca=d.fitToBounds(ca,0,X),T=e-ca,Ca=d.polygon(x,[0,a.width,a.width,0],[0,0,T,T],S,O),Ca.translate(va,e-T+ma),z.push(Ca));w+=r/2;"right"==ea?(G+=va+ya+da,w+=ma,I?(f||(w-=r/2+3),G=G-(B+4)-Z):(G+=B+4+v,w-=2,G+=Z)):I?(G+=B+4-da,f||(w-=r/2+3),g&&(G+=va,w+=ma),G+=Z):(G+=-B-v-4-2-da,w-=2,G-=Z);fa&&("right"==ea?(na+=va+da+ya-1,Y+=ma,na=I?na-v:na+v):(na-=da,I||(na-=B+v)));f&&(w+=f);I=-3;"right"==ea&&(I+=ma);ba&&(w>X+1||w<I)&&(ba.remove(),ba=null)}fa&&(fa.translate(na,Y),d.setCN(p,fa,a.bcn+"tick"),d.setCN(p,fa,q,!0),g&&d.setCN(p,fa,"guide"));!1===a.visible&&(fa&&fa.remove(),ba&&(ba.remove(),ba=null));ba&&(ba.attr({"text-anchor":ga}),ba.translate(G,w,NaN,!0),0!==n&&ba.rotate(-n,a.chart.backgroundColor),a.allLabels.push(ba),this.label=ba,d.setCN(p,ba,a.bcn+"label"),d.setCN(p,ba,q,!0),g&&d.setCN(p,ba,"guide"));za&&(d.setCN(p,za,a.bcn+"grid"),d.setCN(p,za,q,!0),g&&d.setCN(p,za,"guide"));Ca&&(d.setCN(p,Ca,a.bcn+"fill"),d.setCN(p,Ca,q,!0));m?za&&d.setCN(p,za,a.bcn+"grid-minor"):(a.counter=0===ia?1:0,a.previousCoord=b);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}})})();(function(){var d=window.AmCharts;d.RecFill=d.Class({construct:function(a,b,c,e){var h=a.dx,f=a.dy,g=a.orientation,k=0;if(c<b){var l=b;b=c;c=l}var m=e.fillAlpha;isNaN(m)&&(m=0);var l=a.chart.container,n=e.fillColor;"V"==g?(b=d.fitToBounds(b,0,a.height),c=d.fitToBounds(c,0,a.height)):(b=d.fitToBounds(b,0,a.width),c=d.fitToBounds(c,0,a.width));c-=b;isNaN(c)&&(c=4,k=2,m=0);0>c&&"object"==typeof n&&(n=n.join(",").split(",").reverse());"V"==g?(g=d.rect(l,a.width,c,n,m),g.translate(h,b-k+f)):(g=d.rect(l,c,a.height,n,m),g.translate(b-k+h,f));d.setCN(a.chart,g,"guide-fill");e.id&&d.setCN(a.chart,g,"guide-fill-"+e.id);this.set=l.set([g])},graphics:function(){return this.set},getLabel:function(){}})})();(function(){var d=window.AmCharts;d.AmChart=d.Class({construct:function(a){this.svgIcons=this.tapToActivate=!0;this.theme=a;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.20.1";d.addChart(this);this.createEvents("buildStarted","dataUpdated","init","rendered","drawn","failed","resized","animationFinished");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.autoResize=!0;this.autoDisplay=!1;this.addCodeCredits=this.accessible=!0;this.touchStartTime=this.touchClickDuration=0;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var b=document.createElement("div"),c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.chartDiv=b;b=document.createElement("div");c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.legendDiv=b;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.handDrawThickness=1;this.prefixesOfBigNumbers=[{number:1E3,prefix:"k"},{number:1E6,prefix:"M"},{number:1E9,prefix:"G"},{number:1E12,prefix:"T"},{number:1E15,prefix:"P"},{number:1E18,prefix:"E"},{number:1E21,prefix:"Z"},{number:1E24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1E-24,prefix:"y"},{number:1E-21,prefix:"z"},{number:1E-18,prefix:"a"},{number:1E-15,prefix:"f"},{number:1E-12,prefix:"p"},{number:1E-9,prefix:"n"},{number:1E-6,prefix:"\u03bc"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new d.AmBalloon(this.theme);this.balloon.chart=this;this.processTimeout=0;this.processCount=1E3;this.animatable=[];d.applyTheme(this,a,"AmChart")},drawChart:function(){0<this.realWidth&&0<this.realHeight&&(this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr(),this.renderFix(),this.chartDiv&&(this.boundingRect=this.chartDiv.getBoundingClientRect()))},makeAccessible:function(a,b){this.accessible&&a&&(a.setAttr("role","img"),a.setAttr("aria-label",b))},drawBackground:function(){d.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,e=this.set;d.isModern||0!==c||(c=.001);var h=this.updateWidth();this.realWidth=h;var f=this.updateHeight();this.realHeight=f;b=d.polygon(a,[0,h-1,h-1,0],[0,0,f-1,f-1],b,c,1,this.borderColor,this.borderAlpha);d.setCN(this,b,"bg");this.background=b;e.push(b);if(b=this.backgroundImage)a=a.image(b,0,0,h,f),d.setCN(this,b,"bg-image"),this.bgImg=a,e.push(a)},drawTitles:function(a){var b=this.titles;this.titleHeight=0;if(d.ifArray(b)){var c=20,e;for(e=0;e<b.length;e++){var h=b[e],h=d.processObject(h,d.Title,this.theme);if(!1!==h.enabled){var f=h.color;void 0===f&&(f=this.color);var g=h.size;isNaN(g)&&(g=this.fontSize+2);isNaN(h.alpha);var k=this.marginLeft,l=!0;void 0!==h.bold&&(l=h.bold);f=d.wrappedText(this.container,h.text,f,this.fontFamily,g,"middle",l,this.realWidth-35);f.translate(k+(this.realWidth-this.marginRight-k)/2,c);f.node.style.pointerEvents="none";h.sprite=f;d.setCN(this,f,"title");h.id&&d.setCN(this,f,"title-"+h.id);f.attr({opacity:h.alpha});c+=f.getBBox().height+5;a?f.remove():this.freeLabelsSet.push(f)}}this.titleHeight=c-10}},write:function(a){var b=this;if(b.listeners)for(var c=
|
15 |
-
0;c<b.listeners.length;c++){var e=b.listeners[c];b.addListener(e.event,e.method)}b.fire({type:"buildStarted",chart:b});b.afterWriteTO&&clearTimeout(b.afterWriteTO);0<b.processTimeout?b.afterWriteTO=setTimeout(function(){b.afterWrite.call(b,a)},b.processTimeout):b.afterWrite(a)},afterWrite:function(a){if(a="object"!=typeof a?document.getElementById(a):a){for(;a.firstChild;)a.removeChild(a.firstChild);this.div=a;a.style.overflow="hidden";a.style.textAlign="left";var b=this.chartDiv,c=this.legendDiv,e=this.legend,h=c.style,f=b.style;this.measure();this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;var g,k=document.createElement("div");g=k.style;g.position="relative";this.containerDiv=k;k.className=this.classNamePrefix+"-main-div";b.className=this.classNamePrefix+"-chart-div";a.appendChild(k);var l=this.exportConfig;l&&d.AmExport&&!this.AmExport&&(this.AmExport=new d.AmExport(this,l));this.amExport&&d.AmExport&&(this.AmExport=d.extend(this.amExport,new d.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(e){e=this.addLegend(e,e.divId);if(e.enabled)switch(h.left=null,h.top=null,h.right=null,f.left=null,f.right=null,f.top=null,h.position="relative",f.position="relative",e.position){case"bottom":k.appendChild(b);k.appendChild(c);break;case"top":k.appendChild(c);k.appendChild(b);break;case"absolute":g.width=a.style.width;g.height=a.style.height;h.position="absolute";f.position="absolute";void 0!==e.left&&(h.left=e.left+"px");void 0!==e.right&&(h.right=e.right+"px");void 0!==e.top&&(h.top=e.top+"px");void 0!==e.bottom&&(h.bottom=e.bottom+"px");e.marginLeft=0;e.marginRight=0;k.appendChild(b);k.appendChild(c);break;case"right":g.width=a.style.width;g.height=a.style.height;h.position="relative";f.position="absolute";k.appendChild(b);k.appendChild(c);break;case"left":g.width=a.style.width;g.height=a.style.height;h.position="absolute";f.position="relative";k.appendChild(b);k.appendChild(c);break;case"outside":k.appendChild(b)}else k.appendChild(b);this.prevLegendPosition=e.position}else k.appendChild(b);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){d.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme);window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=d.getPath());void 0===this.path&&(this.path="amcharts/");this.path=d.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(d.callInitHandler(this),this.initHC=!0);d.applyLang(this.language,this);var a=this.numberFormatter;a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.destroy();(a=this.container)?(a.container.innerHTML="",a.width=this.realWidth,a.height=this.realHeight,a.addDefs(this),this.chartDiv.appendChild(a.container)):a=new d.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);this.container=a;this.extension=".png";this.svgIcons&&d.SVG&&(this.extension=".svg");this.checkDisplay();a.chart=this;d.VML||d.SVG?(a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,d.remove(this.set),this.set=a.set(),d.remove(this.gridSet),this.gridSet=a.set(),d.remove(this.cursorLineSet),this.cursorLineSet=a.set(),d.remove(this.graphsBehindSet),this.graphsBehindSet=a.set(),d.remove(this.bulletBehindSet),this.bulletBehindSet=a.set(),d.remove(this.columnSet),this.columnSet=a.set(),d.remove(this.graphsSet),this.graphsSet=a.set(),d.remove(this.trendLinesSet),this.trendLinesSet=a.set(),d.remove(this.axesSet),this.axesSet=a.set(),d.remove(this.cursorSet),this.cursorSet=a.set(),d.remove(this.scrollbarsSet),this.scrollbarsSet=a.set(),d.remove(this.bulletSet),this.bulletSet=a.set(),d.remove(this.freeLabelsSet),this.freeLabelsSet=a.set(),d.remove(this.axesLabelsSet),this.axesLabelsSet=a.set(),d.remove(this.balloonsSet),this.balloonsSet=a.set(),d.remove(this.plotBalloonsSet),this.plotBalloonsSet=a.set(),d.remove(this.zoomButtonSet),this.zoomButtonSet=a.set(),d.remove(this.zbSet),this.zbSet=null,d.remove(this.linkSet),this.linkSet=a.set()):this.fire({type:"failed",chart:this})},premeasure:function(){var a=this.div;if(a){try{this.boundingRect=this.chartDiv.getBoundingClientRect()}catch(e){}var b=a.offsetWidth,c=a.offsetHeight;a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);if(b!=this.mw||c!=this.mh)this.mw=b,this.mh=c,this.measure()}},measure:function(){var a=this.div;if(a){var b=this.chartDiv,c=a.offsetWidth,e=a.offsetHeight,h=this.container;a.clientHeight&&(c=a.clientWidth,e=a.clientHeight);var f=d.removePx(d.getStyle(a,"padding-left")),g=d.removePx(d.getStyle(a,"padding-right")),k=d.removePx(d.getStyle(a,"padding-top")),l=d.removePx(d.getStyle(a,"padding-bottom"));isNaN(f)||(c-=f);isNaN(g)||(c-=g);isNaN(k)||(e-=k);isNaN(l)||(e-=l);f=a.style;a=f.width;f=f.height;-1!=a.indexOf("px")&&(c=d.removePx(a));-1!=f.indexOf("px")&&(e=d.removePx(f));e=Math.round(e);c=Math.round(c);a=Math.round(d.toCoordinate(this.width,c));f=Math.round(d.toCoordinate(this.height,e));(c!=this.previousWidth||e!=this.previousHeight)&&0<a&&0<f&&(b.style.width=a+"px",b.style.height=f+"px",b.style.padding=0,h&&h.setSize(a,f),this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme));this.balloon.setBounds&&this.balloon.setBounds(2,2,a-2,f);this.balloon.chart=this;this.realWidth=a;this.realHeight=f;this.divRealWidth=c;this.divRealHeight=e}},checkDisplay:function(){if(this.autoDisplay&&this.container){var a=d.rect(this.container,10,10),b=a.getBBox();0===b.width&&0===b.height&&(this.divRealHeight=this.divRealWidth=this.realHeight=this.realWidth=0,this.previousWidth=this.previousHeight=NaN);a.remove()}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.legend&&this.legend.destroy()},clearTimeOuts:function(){var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},clear:function(a){d.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));a||d.removeChart(this);if(a=this.div)for(;a.firstChild;)a.removeChild(a.firstChild);this.legend&&this.legend.destroy()},setMouseCursor:function(a){"auto"==a&&d.isNN&&(a="default");this.chartDiv.style.cursor=a;this.legendDiv.style.cursor=a},redrawLabels:function(){this.labels=[];var a=this.allLabels;this.createLabelsSet();var b;for(b=0;b<a.length;b++)this.drawLabel(a[b])},drawLabel:function(a){var b=this;if(b.container&&!1!==a.enabled){a=d.processObject(a,d.Label,b.theme);var c=a.y,e=a.text,h=a.align,f=a.size,g=a.color,k=a.rotation,l=a.alpha,m=a.bold,n=d.toCoordinate(a.x,b.realWidth),c=d.toCoordinate(c,b.realHeight);n||(n=0);c||(c=0);void 0===g&&(g=b.color);isNaN(f)&&(f=b.fontSize);h||(h="start");"left"==h&&(h="start");"right"==h&&(h="end");"center"==h&&(h="middle",k?c=b.realHeight-c+c/2:n=b.realWidth/
|
16 |
-
2-n);void 0===l&&(l=1);void 0===k&&(k=0);c+=f/2;e=d.text(b.container,e,g,b.fontFamily,f,h,m,l);e.translate(n,c);d.setCN(b,e,"label");a.id&&d.setCN(b,e,"label-"+a.id);0!==k&&e.rotate(k);a.url?(e.setAttr("cursor","pointer"),e.click(function(){d.getURL(a.url,b.urlTarget)})):e.node.style.pointerEvents="none";b.labelsSet.push(e);b.labels.push(e)}},addLabel:function(a,b,c,e,d,f,g,k,l,m){a={x:a,y:b,text:c,align:e,size:d,color:f,alpha:k,rotation:g,bold:l,url:m,enabled:!0};this.container&&this.drawLabel(a);this.allLabels.push(a)},clearLabels:function(){var a=this.labels,b;for(b=a.length-1;0<=b;b--)a[b].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var a=this.divRealHeight,b=this.legend;if(b){var c=this.legendDiv.offsetHeight,b=b.position;if("top"==b||"bottom"==b){a-=c;if(0>a||isNaN(a))a=0;this.chartDiv.style.height=a+"px"}}return a},updateWidth:function(){var a=this.divRealWidth,b=this.divRealHeight,c=this.legend;if(c){var e=this.legendDiv,d=e.offsetWidth;isNaN(c.width)||(d=c.width);c.ieW&&(d=c.ieW);var f=e.offsetHeight,e=e.style,g=this.chartDiv.style,c=c.position;if("right"==c||"left"==c){a-=d;if(0>a||isNaN(a))a=0;g.width=a+"px";this.balloon.setBounds(2,2,a-2,this.realHeight);"left"==c?(g.left=d+"px",e.left="0px"):(g.left="0px",e.left=a+"px");b>f&&(e.top=(b-f)/2+"px")}}return a},getTitleHeight:function(){this.drawTitles(!0);return this.titleHeight},addTitle:function(a,b,c,e,d){isNaN(b)&&(b=this.fontSize+2);a={text:a,size:b,color:c,alpha:e,bold:d,enabled:!0};this.titles.push(a);
|
17 |
-
return a},handleWheel:function(a){var b=0;a||(a=window.event);a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);b&&this.handleWheelReal(b,a.shiftKey);a.preventDefault&&a.preventDefault()},handleWheelReal:function(){},handleDocTouchStart:function(){this.hideBalloonReal();this.handleMouseMove();this.tmx=this.mouseX;this.tmy=this.mouseY;this.touchStartTime=(new Date).getTime()},handleDocTouchEnd:function(){-.5<this.tmx&&this.tmx<this.divRealWidth+1&&0<this.tmy&&this.tmy<this.divRealHeight?(this.handleMouseMove(),4>Math.abs(this.mouseX-this.tmx)&&4>Math.abs(this.mouseY-this.tmy)?(this.tapped=!0,this.panRequired&&this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="none",this.chartDiv.style.touchAction="none")):this.mouseIsOver||this.resetTouchStyle()):(this.tapped=!1,this.resetTouchStyle())},resetTouchStyle:function(){this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="auto",this.chartDiv.style.touchAction="auto")},checkTouchDuration:function(a){var b=this,c=(new Date).getTime();if(a)if(a.touches)b.isTouchEvent=!0;else if(!b.isTouchEvent)return!0;if(c-b.touchStartTime>b.touchClickDuration)return!0;setTimeout(function(){b.resetTouchDuration()},300)},resetTouchDuration:function(){this.isTouchEvent=!1},checkTouchMoved:function(){if(4<Math.abs(this.mouseX-this.tmx)||4<Math.abs(this.mouseY-this.tmy))return!0},addListeners:function(){var a=this,b=a.chartDiv;document.addEventListener?("ontouchstart"in document.documentElement&&(b.addEventListener("touchstart",function(b){a.handleTouchStart.call(a,b)},!0),b.addEventListener("touchmove",function(b){a.handleMouseMove.call(a,b)},!0),b.addEventListener("touchend",function(b){a.handleTouchEnd.call(a,b)},!0),document.addEventListener("touchstart",function(b){a.handleDocTouchStart.call(a,b)}),document.addEventListener("touchend",function(b){a.handleDocTouchEnd.call(a,b)})),b.addEventListener("mousedown",function(b){a.mouseIsOver=!0;a.handleMouseMove.call(a,b);a.handleMouseDown.call(a,b);a.handleDocTouchStart.call(a,b)},!0),b.addEventListener("mouseover",function(b){a.handleMouseOver.call(a,b)},!0),b.addEventListener("mouseout",function(b){a.handleMouseOut.call(a,b)},!0),b.addEventListener("mouseup",function(b){a.handleDocTouchEnd.call(a,b)},!0)):(b.attachEvent("onmousedown",function(b){a.handleMouseDown.call(a,b)}),b.attachEvent("onmouseover",function(b){a.handleMouseOver.call(a,b)}),b.attachEvent("onmouseout",function(b){a.handleMouseOut.call(a,b)}))},dispDUpd:function(){this.skipEvents||(this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,this.fire({type:"dataUpdated",chart:this})),this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),this.chartRendered||(this.fire({type:"rendered",chart:this}),this.chartRendered=!0),this.fire({type:"drawn",chart:this}));this.skipEvents=!1},validateSize:function(){var a=this;a.premeasure();a.checkDisplay();if(a.divRealWidth!=a.previousWidth||a.divRealHeight!=a.previousHeight){var b=a.legend;if(0<a.realWidth&&0<a.realHeight){a.sizeChanged=!0;if(b){a.legendInitTO&&clearTimeout(a.legendInitTO);var c=setTimeout(function(){b.invalidateSize()},10);a.timeOuts.push(c);a.legendInitTO=c}a.marginsUpdated=!1;clearTimeout(a.initTO);c=setTimeout(function(){a.initChart()},10);a.timeOuts.push(c);a.initTO=c}a.renderFix();b&&b.renderFix&&b.renderFix();clearTimeout(a.resizedTO);a.resizedTO=setTimeout(function(){a.fire({type:"resized",chart:a})},10);a.previousHeight=a.divRealHeight;a.previousWidth=a.divRealWidth}},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var a=this;a.marginsUpdated=!1;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateSize()},5);a.timeOuts.push(b);a.validateTO=b},validateData:function(a){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated=!1,this.initChart(a))},validateNow:function(a,b){this.initTO&&clearTimeout(this.initTO);a&&(this.dataChanged=!0,this.marginsUpdated=!1);this.skipEvents=b;this.chartRendered=!1;var c=this.legend;c&&c.position!=this.prevLegendPosition&&(this.previousWidth=this.mw=0,c.invalidateSize&&(c.invalidateSize(),this.validateSize()));this.write(this.div)},showItem:function(a){a.hidden=!1;this.initChart()},hideItem:function(a){a.hidden=!0;this.initChart()},hideBalloon:function(){var a=this;clearTimeout(a.hoverInt);clearTimeout(a.balloonTO);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},a.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var a=this.balloon;a&&a.hide&&a.hide()},showBalloon:function(a,b,c,e,d){var f=this;clearTimeout(f.balloonTO);clearTimeout(f.hoverInt);f.balloonTO=setTimeout(function(){f.showBalloonReal.call(f,a,b,c,e,d)},1)},showBalloonReal:function(a,b,c,e,d){this.handleMouseMove();var f=this.balloon;f.enabled&&(f.followCursor(!1),f.changeColor(b),!c||f.fixedPosition?(f.setPosition(e,d),isNaN(e)||isNaN(d)?f.followCursor(!0):f.followCursor(!1)):f.followCursor(!0),a&&f.showBalloon(a))},handleMouseOver:function(){this.outTO&&clearTimeout(this.outTO);d.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(){var a=this;d.resetMouseOver();a.outTO&&clearTimeout(a.outTO);a.outTO=setTimeout(function(){a.handleMouseOutReal()},10)},handleMouseOutReal:function(){this.mouseIsOver=!1},handleMouseMove:function(a){a||(a=window.event);this.mouse2Y=this.mouse2X=NaN;var b,c,e,d;if(a){if(a.touches){var f=a.touches.item(1);f&&this.panEventsEnabled&&this.boundingRect&&(e=f.clientX-this.boundingRect.left,d=f.clientY-this.boundingRect.top);a=a.touches.item(0);if(!a)return}else this.wasTouched=!1;this.boundingRect&&a.clientX&&(b=a.clientX-this.boundingRect.left,c=a.clientY-this.boundingRect.top);isNaN(e)?this.mouseX=b:(this.mouseX=Math.min(b,e),this.mouse2X=Math.max(b,e));isNaN(d)?this.mouseY=c:(this.mouseY=Math.min(c,d),this.mouse2Y=Math.max(c,d))}},handleTouchStart:function(a){this.hideBalloonReal();a&&(a.touches&&this.tapToActivate&&!this.tapped||!this.panRequired)||(this.handleMouseMove(a),this.handleMouseDown(a))},handleTouchEnd:function(a){this.wasTouched=!0;this.handleMouseMove(a);d.resetMouseOver();this.handleReleaseOutside(a)},handleReleaseOutside:function(){this.handleDocTouchEnd.call(this)},handleMouseDown:function(a){d.resetMouseOver();this.mouseIsOver=!0;a&&a.preventDefault&&(this.panEventsEnabled?a.preventDefault():a.touches||a.preventDefault())},addLegend:function(a,b){a=d.processObject(a,d.AmLegend,this.theme);a.divId=b;a.ieW=0;var c;c="object"!=typeof b&&b?document.getElementById(b):b;this.legend=a;a.chart=this;c?(a.div=c,a.position="outside",a.autoMargins=!1):a.div=this.legendDiv;return a},removeLegend:function(){this.legend=void 0;this.previousWidth=0;this.legendDiv.innerHTML=""},handleResize:function(){(d.isPercents(this.width)||d.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!d.VML){var a=this.container;a&&a.renderFix()}},getSVG:function(){if(d.hasSVG)return this.container},animate:function(a,b,c,e,h,f,g){a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);c={obj:a,frame:0,attribute:b,from:c,to:e,time:h,effect:f,suffix:g};a["an_"+b]=c;this.animations.push(c);return c},setLegendData:function(a){var b=this.legend;b&&b.setData(a)},stopAnim:function(a){d.removeFromArray(this.animations,a)},updateAnimations:function(){var a;this.container&&this.container.update();if(this.animations)for(a=this.animations.length-1;0<=a;a--){var b=this.animations[a],c=d.updateRate*b.time,e=b.frame+1,h=b.obj,f=b.attribute;if(e<=c){b.frame++;var g=Number(b.from),k=Number(b.to)-g,c=d[b.effect](0,e,g,k,c);0===k?(this.animations.splice(a,1),h.node.style[f]=Number(b.to)+b.suffix):h.node.style[f]=c+b.suffix}else h.node.style[f]=Number(b.to)+
|
18 |
-
b.suffix,h.animationFinished=!0,this.animations.splice(a,1)}},update:function(){this.updateAnimations();var a=this.animatable;if(0<a.length){for(var b=!0,c=a.length-1;0<=c;c--){var e=a[c];e&&(e.animationFinished?a.splice(c,1):b=!1)}b&&(this.fire({type:"animationFinished",chart:this}),this.animatable=[])}},inIframe:function(){try{return window.self!==window.top}catch(a){return!0}},brr:function(){if(!this.hideCredits){var a="amcharts.com",b=window.location.hostname.split("."),c;2<=b.length&&(c=b[b.length-
|
19 |
-
2]+"."+b[b.length-1]);this.amLink&&(b=this.amLink.parentNode)&&b.removeChild(this.amLink);b=this.creditsPosition;if(c!=a||!0===this.inIframe()){var a="http://www."+a,e=c=0,d=this.realWidth,f=this.realHeight,g=this.type;if("serial"==g||"xy"==g||"gantt"==g)c=this.marginLeftReal,e=this.marginTopReal,d=c+this.plotAreaWidth,f=e+this.plotAreaHeight;var g=a+"/javascript-charts/",k="JavaScript charts",l="";"ammap"==this.product&&(g=a+"/javascript-maps/",k="Interactive JavaScript maps",l="");a=document.createElement("a");l=document.createTextNode(l);a.setAttribute("href",g);a.setAttribute("title",k);this.urlTarget&&a.setAttribute("target",this.urlTarget);a.appendChild(l);this.chartDiv.appendChild(a);this.amLink=a;g=a.style;g.position="absolute";g.textDecoration="none";g.color=this.color;g.fontFamily=this.fontFamily;g.fontSize="11px";g.opacity=.7;g.display="block";var k=a.offsetWidth,a=a.offsetHeight,l=5+c,m=e+5;"bottom-left"==b&&(l=5+c,m=f-a-3);"bottom-right"==b&&(l=d-k-5,m=f-a-3);"top-right"==b&&(l=d-k-5,m=e+5);g.left=l+"px";g.top=m+"px"}}}});d.Slice=d.Class({construct:function(){}});d.SerialDataItem=d.Class({construct:function(){}});d.GraphDataItem=d.Class({construct:function(){}});d.Guide=d.Class({construct:function(a){this.cname="Guide";d.applyTheme(this,a,this.cname)}});d.Title=d.Class({construct:function(a){this.cname="Title";d.applyTheme(this,a,this.cname)}});d.Label=d.Class({construct:function(a){this.cname="Label";d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.AmGraph=d.Class({construct:function(a){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.accessibleLabel="[[title]] [[value]]";this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;this.bcn="graph-";this.dateFormat="MMM DD, YYYY";this.noRounding=!0;d.applyTheme(this,a,this.cname)},init:function(){this.createBalloon()},draw:function(){var a=this.chart;a.isRolledOverBullet=!1;var b=a.type;if(a.drawGraphs){isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator});var c=a.container;this.container=c;this.destroy();var e=c.set();this.set=e;e.translate(this.x,this.y);var h=c.set();this.bulletSet=h;h.translate(this.x,this.y);this.behindColumns?(a.graphsBehindSet.push(e),a.bulletBehindSet.push(h)):(a.graphsSet.push(e),a.bulletSet.push(h));var f=this.bulletAxis;d.isString(f)&&(this.bulletAxis=a.getValueAxisById(f));c=c.set();d.remove(this.columnsSet);this.columnsSet=c;d.setCN(a,e,"graph-"+this.type);d.setCN(a,e,"graph-"+this.id);d.setCN(a,h,"graph-"+this.type);d.setCN(a,h,"graph-"+this.id);this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];h=this.labelPosition;h||(f=this.valueAxis.stackType,h="top","column"==this.type&&(a.rotate&&(h="right"),"100%"==f||"regular"==f)&&(h="middle"),this.labelPosition=h);d.ifArray(this.data)&&(a=!1,"xy"==b?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(a=!0):this.valueAxis.axisCreated&&(a=!0),!this.hidden&&a&&this.createGraph());e.push(c)}},createGraph:function(){var a=this,b=a.chart;a.startAlpha=b.startAlpha;a.seqAn=b.sequencedAnimation;a.baseCoord=a.valueAxis.baseCoord;void 0===a.fillAlphas&&(a.fillAlphas=0);a.bulletColorR=a.bulletColor;void 0===a.bulletColorR&&(a.bulletColorR=a.lineColorR,a.bulletColorNegative=a.negativeLineColor);void 0===a.bulletAlpha&&(a.bulletAlpha=a.lineAlpha);if("step"==c||d.VML)a.noRounding=!1;var c=b.type;"gantt"==c&&(c="serial");clearTimeout(a.playedTO);if(!isNaN(a.valueAxis.min)&&!isNaN(a.valueAxis.max)){switch(c){case"serial":a.categoryAxis&&(a.createSerialGraph(),"candlestick"==a.type&&1>a.valueAxis.minMaxMultiplier&&a.positiveClip(a.set));break;case"radar":a.createRadarGraph();break;case"xy":a.createXYGraph()}a.playedTO=setTimeout(function(){a.setAnimationPlayed.call(a)},500*a.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var a=[],b=[],c=this.xAxis,e=this.yAxis;this.pmh=e.height;this.pmw=c.width;this.pmy=this.pmx=0;var d;for(d=this.start;d<=this.end;d++){var f=this.data[d].axes[c.id].graphs[this.id],g=f.values,k=g.x,l=g.y,g=c.getCoordinate(k,this.noRounding),m=e.getCoordinate(l,this.noRounding);if(!isNaN(k)&&!isNaN(l)&&(a.push(g),b.push(m),f.x=g,f.y=m,k=this.createBullet(f,g,m,d),l=this.labelText)){var l=this.createLabel(f,l),n=0;k&&(n=k.size);this.positionLabel(f,g,m,l,n)}}this.drawLineGraph(a,b);this.launchAnimation()},createRadarGraph:function(){var a=this.valueAxis.stackType,b=[],c=[],e=[],d=[],f,g,k,l,m;for(m=this.start;m<=this.end;m++){var n=this.data[m].axes[this.valueAxis.id].graphs[this.id],q,p;"none"==a||"3d"==a?q=n.values.value:(q=n.values.close,p=n.values.open);if(isNaN(q))this.connect||(this.drawLineGraph(b,c,e,d),b=[],c=[],e=[],d=[]);else{var t=this.valueAxis.getCoordinate(q,this.noRounding)-this.height,t=t*this.valueAxis.rMultiplier,r=-360/(this.end-this.start+1)*m;"middle"==this.valueAxis.pointPosition&&(r-=180/(this.end-this.start+
|
20 |
-
1));q=t*Math.sin(r/180*Math.PI);t*=Math.cos(r/180*Math.PI);b.push(q);c.push(t);if(!isNaN(p)){var u=this.valueAxis.getCoordinate(p,this.noRounding)-this.height,u=u*this.valueAxis.rMultiplier,x=u*Math.sin(r/180*Math.PI),r=u*Math.cos(r/180*Math.PI);e.push(x);d.push(r);isNaN(k)&&(k=x);isNaN(l)&&(l=r)}r=this.createBullet(n,q,t,m);n.x=q;n.y=t;if(x=this.labelText)x=this.createLabel(n,x),u=0,r&&(u=r.size),this.positionLabel(n,q,t,x,u);isNaN(f)&&(f=q);isNaN(g)&&(g=t)}}b.push(f);c.push(g);isNaN(k)||(e.push(k),d.push(l));this.drawLineGraph(b,c,e,d);this.launchAnimation()},positionLabel:function(a,b,c,e,d){if(e){var f=this.chart,g=this.valueAxis,k="middle",l=!1,m=this.labelPosition,n=e.getBBox(),q=this.chart.rotate,p=a.isNegative,t=this.fontSize;void 0===t&&(t=this.chart.fontSize);c-=n.height/2-t/2-1;void 0!==a.labelIsNegative&&(p=a.labelIsNegative);switch(m){case"right":m=q?p?"left":"right":"right";break;case"top":m=q?"top":p?"bottom":"top";break;case"bottom":m=q?"bottom":p?"top":"bottom";break;case"left":m=q?p?"right":"left":"left"}var t=a.columnGraphics,r=0,u=0;t&&(r=t.x,u=t.y);var x=this.labelOffset;switch(m){case"right":k="start";b+=d/2+x;break;case"top":c=g.reversed?c+(d/2+n.height/2+x):c-(d/2+n.height/2+x);break;case"bottom":c=g.reversed?c-(d/2+n.height/2+x):c+(d/2+n.height/2+x);break;case"left":k="end";b-=d/2+x;break;case"inside":"column"==this.type&&(l=!0,q?p?(k="end",b=r-3-x):(k="start",b=r+3+x):c=p?u+7+x:u-10-x);break;case"middle":"column"==this.type&&(l=!0,q?b-=(b-r)/2+x-3:c-=(c-u)/
|
21 |
-
2+x-3)}"auto"!=this.labelAnchor&&(k=this.labelAnchor);e.attr({"text-anchor":k});this.labelRotation&&e.rotate(this.labelRotation);e.translate(b,c);!this.showAllValueLabels&&t&&l&&(n=e.getBBox(),n.height>a.columnHeight||n.width>a.columnWidth)&&(e.remove(),e=null);e&&"radar"!=f.type&&(0>b||b>this.width||0>c||c>this.height)&&(e.remove(),e=null);if(e&&("serial"==f.type||"gantt"==f.type))if(q){if(0>c||c>this.height)e.remove(),e=null}else if(0>b||b>this.width)e.remove(),e=null;e&&this.allBullets.push(e);return e}},getGradRotation:function(){var a=270;"horizontal"==this.gradientOrientation&&(a=0);return this.gradientRotation=a},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var a=this.chart,b=this.id,c=this.index,e=this.data,h=this.chart.container,f=this.valueAxis,g=this.type,k=this.columnWidthReal,l=this.showBulletsAt;isNaN(this.columnWidth)||(k=this.columnWidth);isNaN(k)&&(k=.8);var m=this.useNegativeColorIfDown,n=this.width,q=this.height,p=this.y,t=this.rotate,r=this.columnCount,u=d.toCoordinate(this.cornerRadiusTop,k/2),x=this.connect,z=[],v=[],A,y,B,D,C=this.chart.graphs.length,J,H=this.dx/this.tcc,S=this.dy/this.tcc,O=f.stackType,Q=this.start,ia=this.end,I=this.scrollbar,Z="graph-column-";I&&(Z="scrollbar-graph-column-");var va=this.categoryAxis,ma=this.baseCoord,Oa=this.negativeBase,ea=this.columnIndex,ca=this.lineThickness,X=this.lineAlpha,ya=this.lineColorR,da=this.dashLength,fa=this.set,za,ga=this.getGradRotation(),T=this.chart.columnSpacing,Y=va.cellWidth,Ca=(Y*k-r)/r;T>Ca&&(T=Ca);var G,w,na,ha=q,Pa=n,ba=0,tb=0,ub,vb,gb,hb,wb=this.fillColorsR,Qa=this.negativeFillColors,Ja=this.negativeLineColor,Ya=this.fillAlphas,Za=this.negativeFillAlphas;"object"==typeof Ya&&(Ya=Ya[0]);"object"==typeof Za&&(Za=Za[0]);var xb=this.noRounding;"step"==g&&(xb=!1);var ib=f.getCoordinate(f.min);f.logarithmic&&(ib=f.getCoordinate(f.minReal));this.minCoord=ib;this.resetBullet&&(this.bullet="none");if(!(I||"line"!=g&&"smoothedLine"!=g&&"step"!=g||(1==e.length&&
|
22 |
-
"step"!=g&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!Qa&&void 0==Ja||m))){var Ua=Oa;Ua>f.max&&(Ua=f.max);Ua<f.min&&(Ua=f.min);f.logarithmic&&(Ua=f.minReal);var Ka=f.getCoordinate(Ua),Lb=f.getCoordinate(f.max);t?(ha=q,Pa=Math.abs(Lb-Ka),ub=q,vb=Math.abs(ib-Ka),hb=tb=0,f.reversed?(ba=0,gb=Ka):(ba=Ka,gb=0)):(Pa=n,ha=Math.abs(Lb-Ka),vb=n,ub=Math.abs(ib-Ka),gb=ba=0,f.reversed?(hb=p,tb=Ka):hb=Ka)}var La=Math.round;this.pmx=La(ba);this.pmy=La(tb);this.pmh=La(ha);this.pmw=La(Pa);this.nmx=La(gb);this.nmy=La(hb);this.nmh=La(ub);this.nmw=La(vb);d.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||(r=1);k="column"==g?(Y*k-T*(r-1))/r:Y*k;1>k&&(k=1);var Mb=this.fixedColumnWidth;isNaN(Mb)||(k=Mb);var L;if("line"==g||"step"==g||"smoothedLine"==g){if(0<Q){for(L=Q-1;-1<L;L--)if(G=e[L],w=G.axes[f.id].graphs[b],na=w.values.value,!isNaN(na)){Q=L;break}if(this.lineColorField)for(L=Q;-1<L;L--)if(G=e[L],w=G.axes[f.id].graphs[b],w.lineColor){this.bulletColorSwitched=this.lineColorSwitched=
|
23 |
-
w.lineColor;break}if(this.fillColorsField)for(L=Q;-1<L;L--)if(G=e[L],w=G.axes[f.id].graphs[b],w.fillColors){this.fillColorsSwitched=w.fillColors;break}if(this.dashLengthField)for(L=Q;-1<L;L--)if(G=e[L],w=G.axes[f.id].graphs[b],!isNaN(w.dashLength)){this.dashLengthSwitched=w.dashLength;break}}if(ia<e.length-1)for(L=ia+1;L<e.length;L++)if(G=e[L],w=G.axes[f.id].graphs[b],na=w.values.value,!isNaN(na)){ia=L;break}}ia<e.length-1&&ia++;var U=[],V=[],Ra=!1;if("line"==g||"step"==g||"smoothedLine"==g)if(this.stackable&&"regular"==O||"100%"==O||this.fillToGraph)Ra=!0;var Nb=this.noStepRisers,jb=-1E3,kb=-1E3,lb=this.minDistance,Sa=!0,$a=!1;for(L=Q;L<=ia;L++){G=e[L];w=G.axes[f.id].graphs[b];w.index=L;var ab,Ta=NaN;if(m&&void 0==this.openField)for(var yb=L+1;yb<e.length&&(!e[yb]||!(ab=e[L+1].axes[f.id].graphs[b])||!ab.values||(Ta=ab.values.value,isNaN(Ta)));yb++);var R,P,K,aa,ja=NaN,E=NaN,F=NaN,N=NaN,M=NaN,pa=NaN,qa=NaN,ra=NaN,sa=NaN,wa=NaN,Da=NaN,ka=NaN,la=NaN,W=NaN,zb=NaN,Ab=NaN,ta=NaN,ua=void 0,Ma=wb,Va=Ya,Ha=ya,Aa,Ea,Bb=this.proCandlesticks,mb=this.topRadius,Fa=q-1,oa=n-1,bb=this.pattern;void 0!=w.pattern&&(bb=w.pattern);isNaN(w.alpha)||(Va=w.alpha);isNaN(w.dashLength)||(da=w.dashLength);var Ia=w.values;f.recalculateToPercents&&(Ia=w.percents);if(Ia){W=this.stackable&&"none"!=O&&"3d"!=O?Ia.close:Ia.value;if("candlestick"==g||"ohlc"==g)W=Ia.close,Ab=Ia.low,qa=f.getCoordinate(Ab),zb=Ia.high,sa=f.getCoordinate(zb);ta=Ia.open;F=f.getCoordinate(W,xb);isNaN(ta)||(M=f.getCoordinate(ta,xb),m&&"regular"!=O&&"100%"!=O&&(Ta=ta,ta=M=NaN));m&&(void 0==this.openField?ab&&(ab.isNegative=Ta<W?!0:!1,isNaN(Ta)&&(w.isNegative=!Sa)):w.isNegative=Ta>W?!0:!1);if(!I)switch(this.showBalloonAt){case"close":w.y=F;break;case"open":w.y=M;break;case"high":w.y=sa;break;case"low":w.y=qa}var ja=G.x[va.id],Wa=this.periodSpan-1;"step"!=g||isNaN(G.cellWidth)||(Y=G.cellWidth);var xa=Math.floor(Y/2)+Math.floor(Wa*Y/2),Ga=xa,nb=0;"left"==this.stepDirection&&(nb=(2*Y+Wa*Y)/2,ja-=nb);"center"==this.stepDirection&&(nb=Y/2,ja-=nb);"start"==
|
24 |
-
this.pointPosition&&(ja-=Y/2+Math.floor(Wa*Y/2),xa=0,Ga=Math.floor(Y)+Math.floor(Wa*Y));"end"==this.pointPosition&&(ja+=Y/2+Math.floor(Wa*Y/2),xa=Math.floor(Y)+Math.floor(Wa*Y),Ga=0);if(Nb){var Cb=this.columnWidth;isNaN(Cb)||(xa*=Cb,Ga*=Cb)}I||(w.x=ja);-1E5>ja&&(ja=-1E5);ja>n+1E5&&(ja=n+1E5);t?(E=F,N=M,M=F=ja,isNaN(ta)&&!this.fillToGraph&&(N=ma),pa=qa,ra=sa):(N=E=ja,isNaN(ta)&&!this.fillToGraph&&(M=ma));if(!Bb&&W<ta||Bb&&W<za)w.isNegative=!0,Qa&&(Ma=Qa),Za&&(Va=Za),void 0!=Ja&&(Ha=Ja);$a=!1;isNaN(W)||(m?W>Ta?(Sa&&($a=!0),Sa=!1):(Sa||($a=!0),Sa=!0):w.isNegative=W<Oa?!0:!1,za=W);var Ob=!1;I&&a.chartScrollbar.ignoreCustomColors&&(Ob=!0);Ob||(void 0!=w.color&&(Ma=w.color),w.fillColors&&(Ma=w.fillColors));switch(g){case"line":if(isNaN(W))x||(this.drawLineGraph(z,v,U,V),z=[],v=[],U=[],V=[]);else{if(Math.abs(E-jb)>=lb||Math.abs(F-kb)>=lb)z.push(E),v.push(F),jb=E,kb=F;wa=E;Da=F;ka=E;la=F;!Ra||isNaN(M)||isNaN(N)||(U.push(N),V.push(M));if($a||void 0!=w.lineColor&&w.lineColor!=this.lineColorSwitched||void 0!=w.fillColors&&w.fillColors!=this.fillColorsSwitched||!isNaN(w.dashLength))this.drawLineGraph(z,v,U,V),z=[E],v=[F],U=[],V=[],!Ra||isNaN(M)||isNaN(N)||(U.push(N),V.push(M)),m?Sa?(this.lineColorSwitched=ya,this.fillColorsSwitched=wb):(this.lineColorSwitched=Ja,this.fillColorsSwitched=Qa):(this.lineColorSwitched=w.lineColor,this.fillColorsSwitched=w.fillColors),this.dashLengthSwitched=w.dashLength;w.gap&&(this.drawLineGraph(z,v,U,V),z=[],v=[],U=[],V=[])}break;case"smoothedLine":if(isNaN(W))x||(this.drawSmoothedGraph(z,v,U,V),z=[],v=[],U=[],V=[]);else{if(Math.abs(E-jb)>=lb||Math.abs(F-kb)>=lb)z.push(E),v.push(F),jb=E,kb=F;wa=E;Da=F;ka=E;la=F;!Ra||isNaN(M)||isNaN(N)||(U.push(N),V.push(M));void 0==w.lineColor&&void 0==w.fillColors&&isNaN(w.dashLength)||(this.drawSmoothedGraph(z,v,U,V),z=[E],v=[F],U=[],V=[],!Ra||isNaN(M)||isNaN(N)||(U.push(N),V.push(M)),this.lineColorSwitched=w.lineColor,this.fillColorsSwitched=w.fillColors,this.dashLengthSwitched=w.dashLength);w.gap&&(this.drawSmoothedGraph(z,v,U,V),z=[],v=[],U=[],V=[])}break;case"step":if(!isNaN(W)){t?(isNaN(A)||(z.push(A),v.push(F-xa)),v.push(F-xa),z.push(E),v.push(F+Ga),z.push(E),!Ra||isNaN(M)||isNaN(N)||(isNaN(B)||(U.push(B),V.push(M-xa)),U.push(N),V.push(M-xa),U.push(N),V.push(M+Ga))):(isNaN(y)||(v.push(y),z.push(E-xa)),z.push(E-xa),v.push(F),z.push(E+Ga),v.push(F),!Ra||isNaN(M)||isNaN(N)||(isNaN(D)||(U.push(N-xa),V.push(D)),U.push(N-xa),V.push(M),U.push(N+Ga),V.push(M)));A=E;y=F;B=N;D=M;wa=E;Da=F;ka=E;la=F;if($a||void 0!=w.lineColor||void 0!=w.fillColors||!isNaN(w.dashLength)){var cc=z[z.length-2],dc=v[v.length-2];z.pop();v.pop();this.drawLineGraph(z,v,U,V);z=[cc];v=[dc];t?(v.push(F+Ga),z.push(E)):(z.push(E+Ga),v.push(F));U=[];V=[];this.lineColorSwitched=w.lineColor;this.fillColorsSwitched=w.fillColors;this.dashLengthSwitched=w.dashLength;m&&(Sa?(this.lineColorSwitched=ya,this.fillColorsSwitched=wb):(this.lineColorSwitched=Ja,this.fillColorsSwitched=Qa))}if(Nb||w.gap)A=y=NaN,this.drawLineGraph(z,v,U,V),z=[],v=[],U=[],V=[]}else if(!x){if(1>=this.periodSpan||1<this.periodSpan&&E-A>xa+Ga)A=y=NaN;this.drawLineGraph(z,v,U,V);z=[];v=[];U=[];V=[]}break;case"column":Aa=Ha;void 0!=w.lineColor&&(Aa=w.lineColor);if(!isNaN(W)){m||(w.isNegative=W<Oa?!0:!1);w.isNegative&&(Qa&&(Ma=Qa),void 0!=Ja&&(Aa=Ja));var Pb=f.min,Qb=f.max,ob=ta;isNaN(ob)&&(ob=Oa);if(!(W<Pb&&ob<Pb||W>Qb&&ob>Qb)){var Ba;if(t){"3d"==O?(P=F-(r/2-this.depthCount+1)*(k+T)+T/2+S*ea,R=N+H*ea,Ba=ea):(P=Math.floor(F-(r/2-ea)*(k+T)+T/2),R=N,Ba=0);K=k;wa=E;Da=P+k/2;ka=E;la=P+k/2;P+K>q+Ba*S&&(K=q-P+Ba*S);P<Ba*S&&(K+=P,P=Ba*S);aa=E-N;var ec=R;R=d.fitToBounds(R,0,n);aa+=ec-R;aa=d.fitToBounds(aa,-R,n-R+H*ea);w.labelIsNegative=0>aa?!0:!1;0===aa&&1/W===1/-0&&(w.labelIsNegative=!0);isNaN(G.percentWidthValue)||(K=this.height*G.percentWidthValue/100,P=ja-K/2,Da=P+K/2);K=d.roundTo(K,2);aa=d.roundTo(aa,2);P<q&&0<K&&(ua=new d.Cuboid(h,aa,K,H-a.d3x,S-a.d3y,Ma,Va,ca,Aa,X,ga,u,t,da,bb,mb,Z),w.columnWidth=Math.abs(aa),w.columnHeight=Math.abs(K))}else{"3d"==O?(R=E-(r/2-this.depthCount+1)*(k+T)+T/2+H*ea,P=M+S*ea,Ba=ea):(R=E-(r/2-ea)*(k+T)+T/2,P=M,Ba=0);K=k;wa=R+k/2;Da=F;ka=R+k/2;la=F;R+K>n+Ba*H&&(K=n-R+Ba*H);R<Ba*H&&(K+=R-Ba*H,R=Ba*H);aa=F-M;w.labelIsNegative=0<aa?!0:!1;0===aa&&-0===W&&(w.labelIsNegative=!0);var fc=P;P=d.fitToBounds(P,this.dy,q);aa+=fc-P;aa=d.fitToBounds(aa,-P+S*ea,q-P);isNaN(G.percentWidthValue)||(K=this.width*G.percentWidthValue/100,R=ja-K/2,wa=R+K/2);K=d.roundTo(K,2);aa=d.roundTo(aa,2);R<n+ea*H&&0<K&&(this.showOnAxis&&(P-=S/2),ua=new d.Cuboid(h,K,aa,H-a.d3x,S-a.d3y,Ma,Va,ca,Aa,this.lineAlpha,ga,u,t,da,bb,mb,Z),w.columnHeight=Math.abs(aa),w.columnWidth=Math.abs(K))}}if(ua){Ea=ua.set;d.setCN(a,ua.set,"graph-"+this.type);d.setCN(a,ua.set,"graph-"+this.id);w.className&&d.setCN(a,ua.set,w.className,!0);w.columnGraphics=Ea;R=d.roundTo(R,2);P=d.roundTo(P,2);Ea.translate(R,P);(w.url||this.showHandOnHover)&&Ea.setAttr("cursor","pointer");if(!I){"none"==O&&(J=t?(this.end+1-L)*C-c:C*L+c);"3d"==O&&(t?(J=(this.end+1-L)*C-c-1E3*this.depthCount,wa+=H*this.columnIndex,ka+=H*this.columnIndex,w.y+=H*this.columnIndex):(J=(C-c)*(L+1)+1E3*this.depthCount,Da+=S*this.columnIndex,la+=S*this.columnIndex,w.y+=S*this.columnIndex));if("regular"==O||"100%"==O)J=t?0<Ia.value?(this.end+1-L)*C+c:(this.end+1-L)*C-c:0<Ia.value?C*L+c:C*L-c;this.columnsArray.push({column:ua,depth:J});w.x=t?P+K/2:R+K/2;this.ownColumns.push(ua);this.animateColumns(ua,L,E,N,F,M);this.addListeners(Ea,w)}this.columnsSet.push(Ea)}}break;case"candlestick":if(!isNaN(ta)&&!isNaN(W)){var Xa,cb;Aa=Ha;void 0!=w.lineColor&&(Aa=w.lineColor);wa=E;la=Da=F;ka=E;if(t){"open"==l&&(ka=N);"high"==l&&(ka=ra);"low"==l&&(ka=pa);E=d.fitToBounds(E,0,oa);N=d.fitToBounds(N,0,oa);pa=d.fitToBounds(pa,0,oa);ra=d.fitToBounds(ra,0,oa);if(0===E&&0===N&&0===pa&&0===ra)continue;if(E==oa&&N==oa&&pa==oa&&ra==oa)continue;P=F-k/2;R=N;K=k;P+K>q&&(K=q-P);0>P&&(K+=P,P=0);if(P<q&&0<K){var Db,Eb;W>ta?(Db=[E,ra],Eb=[N,pa]):(Db=[N,ra],Eb=[E,pa]);!isNaN(ra)&&!isNaN(pa)&&F<q&&0<F&&(Xa=d.line(h,Db,[F,F],Aa,X,ca),cb=d.line(h,Eb,[F,F],Aa,X,ca));aa=E-N;ua=new d.Cuboid(h,aa,K,H,S,Ma,Ya,ca,Aa,X,ga,u,t,da,bb,mb,Z)}}else{"open"==l&&(la=M);"high"==l&&(la=sa);"low"==l&&(la=qa);F=d.fitToBounds(F,0,Fa);M=d.fitToBounds(M,0,Fa);qa=d.fitToBounds(qa,0,Fa);sa=d.fitToBounds(sa,0,Fa);if(0===F&&0===M&&0===qa&&0===sa)continue;if(F==Fa&&M==Fa&&qa==Fa&&sa==Fa)continue;R=E-k/2;P=M+ca/2;K=k;R+K>n&&(K=n-R);0>R&&(K+=R,R=0);aa=F-M;if(R<n&&0<K){Bb&&W>=ta&&(Va=0);var ua=new d.Cuboid(h,K,aa,H,S,Ma,Va,ca,Aa,X,ga,u,t,da,bb,mb,Z),Fb,Gb;W>ta?(Fb=[F,sa],Gb=[M,qa]):(Fb=[M,sa],Gb=[F,qa]);!isNaN(sa)&&!isNaN(qa)&&E<n&&0<E&&(Xa=d.line(h,[E,E],Fb,Aa,X,ca),cb=d.line(h,[E,E],Gb,Aa,X,ca),d.setCN(a,Xa,this.bcn+"line-high"),w.className&&d.setCN(a,Xa,w.className,!0),d.setCN(a,cb,this.bcn+"line-low"),w.className&&d.setCN(a,cb,w.className,!0))}}ua&&(Ea=ua.set,w.columnGraphics=Ea,fa.push(Ea),Ea.translate(R,P-ca/2),(w.url||this.showHandOnHover)&&Ea.setAttr("cursor","pointer"),Xa&&(fa.push(Xa),fa.push(cb)),I||(w.x=t?P+K/2:R+K/2,this.animateColumns(ua,L,E,N,F,M),this.addListeners(Ea,w)))}break;case"ohlc":if(!(isNaN(ta)||isNaN(zb)||isNaN(Ab)||isNaN(W))){var Rb=h.set();fa.push(Rb);W<ta&&(w.isNegative=!0,void 0!=Ja&&(Ha=Ja));var pb,qb,rb;if(t){la=F;ka=E;"open"==l&&(ka=N);"high"==l&&(ka=ra);"low"==l&&(ka=pa);pa=d.fitToBounds(pa,0,oa);ra=d.fitToBounds(ra,0,oa);if(0===E&&0===N&&0===pa&&0===ra)continue;if(E==oa&&N==oa&&pa==oa&&ra==oa)continue;var Hb=F-k/2,Hb=d.fitToBounds(Hb,0,q),Sb=d.fitToBounds(F,0,q),Ib=F+k/2,Ib=d.fitToBounds(Ib,0,q);0<=N&&N<=oa&&(qb=d.line(h,[N,N],[Hb,Sb],Ha,X,ca,da));0<F&&F<q&&(pb=d.line(h,[pa,ra],[F,F],Ha,X,ca,da));0<=E&&E<=oa&&(rb=d.line(h,[E,E],[Sb,Ib],Ha,X,ca,da))}else{la=F;"open"==l&&(la=M);"high"==l&&(la=sa);"low"==l&&(la=qa);var ka=E,qa=d.fitToBounds(qa,0,Fa),sa=d.fitToBounds(sa,0,Fa),Jb=E-k/2,Jb=d.fitToBounds(Jb,0,n),Tb=d.fitToBounds(E,0,n),Kb=E+k/2,Kb=d.fitToBounds(Kb,0,n);0<=M&&M<=Fa&&(qb=d.line(h,[Jb,Tb],[M,M],Ha,X,ca,da));0<E&&E<n&&(pb=d.line(h,[E,E],[qa,sa],Ha,X,ca,da));0<=F&&F<=Fa&&(rb=d.line(h,[Tb,Kb],[F,F],Ha,X,ca,da))}fa.push(qb);fa.push(pb);fa.push(rb);d.setCN(a,qb,this.bcn+"stroke-open");d.setCN(a,rb,this.bcn+"stroke-close");d.setCN(a,pb,this.bcn+"stroke");w.className&&d.setCN(a,Rb,w.className,!0);wa=E;Da=F}}if(!I&&!isNaN(W)){var Ub=this.hideBulletsCount;if(this.end-this.start<=Ub||0===Ub){var Vb=this.createBullet(w,ka,la,L),Wb=this.labelText;if(Wb&&!isNaN(wa)&&!isNaN(wa)){var gc=this.createLabel(w,Wb),Xb=0;Vb&&(Xb=Vb.size);this.positionLabel(w,wa,Da,gc,Xb)}if("regular"==O||"100%"==O){var Yb=f.totalText;if(Yb){var Na=this.createLabel(w,Yb,f.totalTextColor);d.setCN(a,Na,this.bcn+"label-total");this.allBullets.push(Na);if(Na){var Zb=Na.getBBox(),$b=Zb.width,ac=Zb.height,db,eb,sb=f.totalTextOffset,bc=f.totals[L];bc&&bc.remove();var fb=0;"column"!=g&&(fb=this.bulletSize);t?(eb=Da,db=0>W?E-$b/2-2-fb-sb:E+$b/2+3+fb+sb):(db=wa,eb=0>W?F+ac/2+fb+sb:F-ac/2-3-fb-sb);Na.translate(db,eb);f.totals[L]=Na;t?(0>eb||eb>q)&&Na.remove():(0>db||db>n)&&Na.remove()}}}}}}}if("line"==g||"step"==g||"smoothedLine"==g)"smoothedLine"==g?this.drawSmoothedGraph(z,v,U,V):this.drawLineGraph(z,v,U,V),I||this.launchAnimation();this.bulletsHidden&&this.hideBullets();this.customBulletsHidden&&this.hideCustomBullets()},animateColumns:function(a,b){var c=this,e=c.chart.startDuration;0<e&&!c.animationPlayed&&(c.seqAn?(a.set.hide(),c.animationArray.push(a),e=setTimeout(function(){c.animate.call(c)},e/(c.end-c.start+1)*(b-c.start)*1E3),c.timeOuts.push(e)):c.animate(a),c.chart.animatable.push(a))},createLabel:function(a,b,c){var e=this.chart,h=a.labelColor;h||(h=this.color);h||(h=e.color);c&&(h=c);c=this.fontSize;void 0===c&&(this.fontSize=c=e.fontSize);var f=this.labelFunction;b=e.formatString(b,a);b=d.cleanFromEmpty(b);f&&(b=f(a,b));if(void 0!==b&&""!==b)return a=d.text(this.container,b,h,e.fontFamily,c),a.node.style.pointerEvents="none",d.setCN(e,a,this.bcn+"label"),this.bulletSet.push(a),a},positiveClip:function(a){a.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(a){a.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(a,b,c,e){var h=this;if(1<a.length){var f=h.noRounding,g=h.set,k=h.chart,l=h.container,m=l.set(),n=l.set();g.push(n);g.push(m);var q=h.lineAlpha,p=h.lineThickness,g=h.fillAlphas,t=h.lineColorR,r=h.negativeLineAlpha;isNaN(r)&&(r=q);var u=h.lineColorSwitched;u&&(t=u);var u=h.fillColorsR,x=h.fillColorsSwitched;x&&(u=x);var z=h.dashLength;(x=h.dashLengthSwitched)&&(z=x);var x=h.negativeLineColor,v=h.negativeFillColors,A=h.negativeFillAlphas,y=h.baseCoord;0!==h.negativeBase&&(y=h.valueAxis.getCoordinate(h.negativeBase,f),y>h.height&&(y=h.height),0>y&&(y=0));q=d.line(l,a,b,t,q,p,z,!1,!0,f);d.setCN(k,q,h.bcn+"stroke");m.push(q);m.click(function(a){h.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){h.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){h.handleGraphEvent(a,"rollOutGraph")}).touchmove(function(a){h.chart.handleMouseMove(a)}).touchend(function(a){h.chart.handleTouchEnd(a)});void 0===x||h.useNegativeColorIfDown||(p=d.line(l,a,b,x,r,p,z,!1,!0,f),d.setCN(k,p,h.bcn+"stroke"),d.setCN(k,p,h.bcn+"stroke-negative"),n.push(p));if(0<g||0<A)if(p=a.join(";").split(";"),r=b.join(";").split(";"),q=k.type,"serial"==q||"radar"==q?0<c.length?(c.reverse(),e.reverse(),p=a.concat(c),r=b.concat(e)):"radar"==q?(r.push(0),p.push(0)):h.rotate?(r.push(r[r.length-1]),p.push(y),r.push(r[0]),p.push(y),r.push(r[0]),p.push(p[0])):(p.push(p[p.length-1]),r.push(y),p.push(p[0]),r.push(y),p.push(a[0]),r.push(r[0])):"xy"==q&&(b=h.fillToAxis)&&(d.isString(b)&&(b=k.getValueAxisById(b)),"H"==b.orientation?(y="top"==b.position?0:b.height,p.push(p[p.length-1]),r.push(y),p.push(p[0]),r.push(y),p.push(a[0]),r.push(r[0])):(y="left"==b.position?0:b.width,r.push(r[r.length-1]),p.push(y),r.push(r[0]),p.push(y),r.push(r[0]),p.push(p[0]))),a=h.gradientRotation,0<g&&(b=d.polygon(l,p,r,u,g,1,"#000",0,a,f),b.pattern(h.pattern,NaN,k.path),d.setCN(k,b,h.bcn+"fill"),m.push(b)),v||void 0!==x)isNaN(A)&&(A=g),v||(v=x),f=d.polygon(l,p,r,v,A,1,"#000",0,a,f),d.setCN(k,f,h.bcn+"fill"),d.setCN(k,f,h.bcn+"fill-negative"),f.pattern(h.pattern,NaN,k.path),n.push(f),n.click(function(a){h.handleGraphEvent(a,"clickGraph")}).mouseover(function(a){h.handleGraphEvent(a,"rollOverGraph")}).mouseout(function(a){h.handleGraphEvent(a,"rollOutGraph")}).touchmove(function(a){h.chart.handleMouseMove(a)}).touchend(function(a){h.chart.handleTouchEnd(a)});h.applyMask(n,m)}},applyMask:function(a,b){var c=a.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(b),0<c&&this.negativeClip(a))},drawSmoothedGraph:function(a,b,c,e){if(1<a.length){var h=this.set,f=this.chart,g=this.container,k=g.set(),l=g.set();h.push(l);h.push(k);var m=this.lineAlpha,n=this.lineThickness,h=this.dashLength,q=this.fillAlphas,p=this.lineColorR,t=this.fillColorsR,r=this.negativeLineColor,u=this.negativeFillColors,x=this.negativeFillAlphas,z=this.baseCoord,v=this.lineColorSwitched;v&&(p=v);(v=this.fillColorsSwitched)&&(t=v);var A=this.negativeLineAlpha;isNaN(A)&&(A=m);v=this.getGradRotation();m=new d.Bezier(g,a,b,p,m,n,t,0,h,void 0,v);d.setCN(f,m,this.bcn+"stroke");k.push(m.path);void 0!==r&&(n=new d.Bezier(g,a,b,r,A,n,t,0,h,void 0,v),d.setCN(f,n,this.bcn+"stroke"),d.setCN(f,n,this.bcn+"stroke-negative"),l.push(n.path));0<q&&(m=a.join(";").split(";"),p=b.join(";").split(";"),n="",0<c.length?(c.push("M"),e.push("M"),c.reverse(),e.reverse(),m=a.concat(c),p=b.concat(e)):(this.rotate?(n+=" L"+z+","+b[b.length-1],n+=" L"+z+","+b[0]):(n+=" L"+a[a.length-1]+","+z,n+=" L"+a[0]+","+z),n+=" L"+a[0]+","+b[0]),c=new d.Bezier(g,m,p,NaN,0,0,t,q,h,n,v),d.setCN(f,c,this.bcn+"fill"),c.path.pattern(this.pattern,NaN,f.path),k.push(c.path),u||void 0!==r)&&(x||(x=q),u||(u=r),a=new d.Bezier(g,a,b,NaN,0,0,u,x,h,n,v),a.path.pattern(this.pattern,NaN,f.path),d.setCN(f,a,this.bcn+"fill"),d.setCN(f,a,this.bcn+"fill-negative"),l.push(a.path));this.applyMask(l,k)}},launchAnimation:function(){var a=this,b=a.chart.startDuration;if(0<b&&!a.animationPlayed){var c=a.set,e=a.bulletSet;d.VML||(c.attr({opacity:a.startAlpha}),e.attr({opacity:a.startAlpha}));c.hide();e.hide();a.seqAn?(b=setTimeout(function(){a.animateGraphs.call(a)},a.index*b*1E3),a.timeOuts.push(b)):a.animateGraphs()}},animateGraphs:function(){var a=this.chart,b=this.set,c=this.bulletSet,e=this.x,d=this.y;b.show();c.show();var f=a.startDuration,g=a.startEffect;b&&(this.rotate?(b.translate(-1E3,d),c.translate(-1E3,d)):(b.translate(e,-1E3),c.translate(e,-1E3)),b.animate({opacity:1,translate:e+","+d},f,g),c.animate({opacity:1,translate:e+","+d},f,g),a.animatable.push(b))},animate:function(a){var b=this.chart,c=this.animationArray;!a&&0<c.length&&(a=c[0],c.shift());c=d[d.getEffect(b.startEffect)];b=b.startDuration;a&&(this.rotate?a.animateWidth(b,c):a.animateHeight(b,c),a.set.show())},legendKeyColor:function(){var a=this.legendColor,b=this.lineAlpha;void 0===a&&(a=this.lineColorR,0===b&&(b=this.fillColorsR)&&(a="object"==typeof b?b[0]:b));return a},legendKeyAlpha:function(){var a=this.legendAlpha;void 0===a&&(a=this.lineAlpha,this.fillAlphas>a&&(a=this.fillAlphas),0===a&&(a=this.bulletAlpha),0===a&&(a=1));return a},createBullet:function(a,b,c){if(!isNaN(b)&&!isNaN(c)&&("none"!=this.bullet||this.customBullet||a.bullet||a.customBullet)){var e=this.chart,h=this.container,f=this.bulletOffset,g=this.bulletSize;isNaN(a.bulletSize)||(g=a.bulletSize);var k=a.values.value,l=this.maxValue,m=this.minValue,n=this.maxBulletSize,q=this.minBulletSize;isNaN(l)||(isNaN(k)||(g=(k-m)/(l-m)*(n-q)+q),m==l&&(g=n));l=g;this.bulletAxis&&(g=a.values.error,isNaN(g)||(k=g),g=this.bulletAxis.stepWidth*k);g<this.minBulletSize&&(g=this.minBulletSize);this.rotate?b=a.isNegative?b-
|
25 |
-
f:b+f:c=a.isNegative?c+f:c-f;q=this.bulletColorR;a.lineColor&&(this.bulletColorSwitched=a.lineColor);this.bulletColorSwitched&&(q=this.bulletColorSwitched);a.isNegative&&void 0!==this.bulletColorNegative&&(q=this.bulletColorNegative);void 0!==a.color&&(q=a.color);var p;"xy"==e.type&&this.valueField&&(p=this.pattern,a.pattern&&(p=a.pattern));f=this.bullet;a.bullet&&(f=a.bullet);var k=this.bulletBorderThickness,m=this.bulletBorderColorR,n=this.bulletBorderAlpha,t=this.bulletAlpha;m||(m=q);this.useLineColorForBulletBorder&&(m=this.lineColorR,this.lineColorSwitched&&(m=this.lineColorSwitched));var r=a.alpha;isNaN(r)||(t=r);p=d.bullet(h,f,g,q,t,k,m,n,l,0,p,e.path);l=this.customBullet;a.customBullet&&(l=a.customBullet);l&&(p&&p.remove(),"function"==typeof l?(l=new l,l.chart=e,a.bulletConfig&&(l.availableSpace=c,l.graph=this,l.graphDataItem=a,l.bulletY=c,a.bulletConfig.minCoord=this.minCoord-c,l.bulletConfig=a.bulletConfig),l.write(h),p&&l.showBullet&&l.set.push(p),a.customBulletGraphics=l.cset,p=l.set):(p=h.set(),l=h.image(l,0,0,g,g),p.push(l),this.centerCustomBullets&&l.translate(-g/2,-g/2)));if(p){(a.url||this.showHandOnHover)&&p.setAttr("cursor","pointer");if("serial"==e.type||"gantt"==e.type)if(-.5>b||b>this.width||c<-g/2||c>this.height)p.remove(),p=null;p&&(this.bulletSet.push(p),p.translate(b,c),this.addListeners(p,a),this.allBullets.push(p));a.bx=b;a.by=c;d.setCN(e,p,this.bcn+"bullet");a.className&&d.setCN(e,p,a.className,!0)}if(p){p.size=g||0;if(e=this.bulletHitAreaSize)h=d.circle(h,e,"#FFFFFF",.001,0),h.translate(b,c),a.hitBullet=h,this.bulletSet.push(h),this.addListeners(h,a);a.bulletGraphics=p}else p={size:0};p.graphDataItem=a;return p}},showBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!1;for(b=0;b<a.length;b++)a[b].show()},hideBullets:function(){var a=this.allBullets,b;this.bulletsHidden=!0;for(b=0;b<a.length;b++)a[b].hide()},showCustomBullets:function(){var a=this.allBullets,b;this.customBulletsHidden=!1;for(b=0;b<a.length;b++){var c=a[b].graphDataItem;c.customBulletGraphics&&c.customBulletGraphics.show()}},hideCustomBullets:function(){var a=this.allBullets,b;this.customBulletsHidden=!0;for(b=0;b<a.length;b++){var c=a[b].graphDataItem;c.customBulletGraphics&&c.customBulletGraphics.hide()}},addListeners:function(a,b){var c=this;a.mouseover(function(a){c.handleRollOver(b,a)}).mouseout(function(a){c.handleRollOut(b,a)}).touchend(function(a){c.handleRollOver(b,a);c.chart.panEventsEnabled&&c.handleClick(b,a)}).touchstart(function(a){c.handleRollOver(b,a)}).click(function(a){c.handleClick(b,a)}).dblclick(function(a){c.handleDoubleClick(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)});var e=c.chart;if(e.accessible&&c.accessibleLabel){var d=e.formatString(c.accessibleLabel,b);e.makeAccessible(a,d)}},handleRollOver:function(a,b){this.handleGraphEvent(b,"rollOverGraph");if(a){var c=this.chart;a.bulletConfig&&(c.isRolledOverBullet=!0);var e={type:"rollOverGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(e);c.fire(e);clearTimeout(c.hoverInt);(c=c.chartCursor)&&c.valueBalloonsEnabled||this.showGraphBalloon(a,"V",!0)}},handleRollOut:function(a,b){if(a){var c=this.chart,e={type:"rollOutGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(e);c.fire(e);c.isRolledOverBullet=!1}this.handleGraphEvent(b,"rollOutGraph");c=this.chart;(c=c.chartCursor)&&c.valueBalloonsEnabled||this.hideBalloon()},handleClick:function(a,b){if(!this.chart.checkTouchMoved()&&this.chart.checkTouchDuration(b)){if(a){var c={type:"clickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c);d.getURL(a.url,this.urlTarget)}this.handleGraphEvent(b,"clickGraph")}},handleGraphEvent:function(a,b){var c={type:b,graph:this,target:this,chart:this.chart,event:a};this.fire(c);this.chart.fire(c)},handleRightClick:function(a,b){if(a){var c={type:"rightClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c)}},handleDoubleClick:function(a,b){if(a){var c={type:"doubleClickGraphItem",item:a,index:a.index,graph:this,target:this,chart:this.chart,event:b};this.fire(c);this.chart.fire(c)}},zoom:function(a,b){this.start=a;this.end=b;this.draw()},changeOpacity:function(a){var b=this.set;b&&b.setAttr("opacity",a);if(b=this.ownColumns){var c;for(c=0;c<b.length;c++){var e=b[c].set;e&&e.setAttr("opacity",a)}}(b=this.bulletSet)&&b.setAttr("opacity",a)},destroy:function(){d.remove(this.set);d.remove(this.bulletSet);var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},createBalloon:function(){var a=this.chart;this.balloon?this.balloon.destroy&&this.balloon.destroy():this.balloon={};var b=this.balloon;d.extend(b,a.balloon,!0);b.chart=a;b.mainSet=a.plotBalloonsSet;b.className=this.id},hideBalloon:function(){var a=this,b=a.chart;b.chartCursor?b.chartCursor.valueBalloonsEnabled||b.hideBalloon():b.hideBalloon();clearTimeout(a.hoverInt);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},b.hideBalloonTime)},hideBalloonReal:function(){this.balloon&&this.balloon.hide();this.fixBulletSize()},fixBulletSize:function(){if(d.isModern){var a=this.resizedDItem;if(a){var b=a.bulletGraphics;b&&!b.doNotScale&&(b.translate(a.bx,a.by,1),b.setAttr("fill-opacity",this.bulletAlpha),b.setAttr("stroke-opacity",this.bulletBorderAlpha))}this.resizedDItem=null}},showGraphBalloon:function(a,b,c,e,h){var f=this.chart,g=this.balloon,k=0,l=0,m=f.chartCursor,n=!0;m?m.valueBalloonsEnabled||(g=f.balloon,k=this.x,l=this.y,n=!1):(g=f.balloon,k=this.x,l=this.y,n=!1);clearTimeout(this.hoverInt);if(f.chartCursor&&(this.currentDataItem=a,"serial"==f.type&&f.isRolledOverBullet&&f.chartCursor.valueBalloonsEnabled)){this.hideBalloonReal();return}this.resizeBullet(a,e,h);if(g&&g.enabled&&this.showBalloon&&!this.hidden){var m=f.formatString(this.balloonText,a,!0),q=this.balloonFunction;q&&(m=q(a,a.graph));m&&(m=d.cleanFromEmpty(m));m&&""!==m?(e=f.getBalloonColor(this,a),g.drop||(g.pointerOrientation=b),b=a.x,h=a.y,f.rotate&&(b=a.y,h=a.x),b+=k,h+=l,isNaN(b)||isNaN(h)?this.hideBalloonReal():(a=this.width,q=this.height,n&&g.setBounds(k,l,a+k,q+l),g.changeColor(e),g.setPosition(b,h),g.fixPrevious(),g.fixedPosition&&(c=!1),!c&&"radar"!=f.type&&(b<k||b>a+k||h<l-.5||h>q+l)?(g.showBalloon(m),g.hide(0)):(g.followCursor(c),g.showBalloon(m)))):(this.hideBalloonReal(),this.resizeBullet(a,e,h))}else this.hideBalloonReal()},resizeBullet:function(a,b,c){this.fixBulletSize();if(a&&d.isModern&&(1!=b||!isNaN(c))){var e=a.bulletGraphics;e&&!e.doNotScale&&(e.translate(a.bx,a.by,b),isNaN(c)||(e.setAttr("fill-opacity",c),e.setAttr("stroke-opacity",c)),this.resizedDItem=a)}}})})();(function(){var d=window.AmCharts;d.ChartCursor=d.Class({construct:function(a){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","onShowCursor","draw","selected","moved","panning","zoomStarted");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonText="[[category]]";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;this.leaveCursor=!1;this.leaveAfterTouch=!0;this.valueZoomable=!1;this.balloonPointerOrientation="horizontal";this.hLineEnabled=this.vLineEnabled=!0;this.vZoomEnabled=this.hZoomEnabled=!1;d.applyTheme(this,a,this.cname)},draw:function(){this.destroy();var a=this.chart;a.panRequired=!0;var b=a.container;this.rotate=a.rotate;this.container=b;this.prevLineHeight=this.prevLineWidth=NaN;b=b.set();b.translate(this.x,this.y);this.set=b;a.cursorSet.push(b);this.createElements();d.isString(this.limitToGraph)&&(this.limitToGraph=d.getObjById(a.graphs,this.limitToGraph),this.fullWidth=!1,this.cursorPosition="middle");this.pointer=this.balloonPointerOrientation.substr(0,1).toUpperCase();this.isHidden=!1;this.hideLines();this.valueLineAxis||(this.valueLineAxis=a.valueAxes[0])},createElements:function(){var a=this.chart,b=a.dx,c=a.dy,e=this.width,h=this.height,f,g,k=this.cursorAlpha,l=this.valueLineAlpha;this.rotate?(f=l,g=k):(g=l,f=k);"xy"==a.type&&(g=k,void 0!==l&&(g=l),f=k);this.vvLine=d.line(this.container,[b,0,0],[c,0,h],this.cursorColor,f,1);d.setCN(a,this.vvLine,"cursor-line");d.setCN(a,this.vvLine,"cursor-line-vertical");this.hhLine=d.line(this.container,[0,e,e+b],[0,0,c],this.cursorColor,g,1);d.setCN(a,this.hhLine,"cursor-line");d.setCN(a,this.hhLine,"cursor-line-horizontal");this.vLine=this.rotate?this.vvLine:this.hhLine;this.set.push(this.vvLine);this.set.push(this.hhLine);this.set.node.style.pointerEvents="none";this.fullLines=this.container.set();a=a.cursorLineSet;a.push(this.fullLines);a.translate(this.x,this.y);a.clipRect(0,0,e,h);this.set.clipRect(0,0,e,h)},update:function(){var a=this.chart,b=a.mouseX-this.x,c=a.mouseY-this.y;this.mouseX=b;this.mouseY=c;this.mouse2X=a.mouse2X-this.x;this.mouse2Y=a.mouse2Y-this.y;var e;if(a.chartData&&0<a.chartData.length){this.mouseIsOver()?(this.hideGraphBalloons=!1,this.rolledOver=e=!0,this.updateDrawing(),this.vvLine&&isNaN(this.fx)&&(a.rotate||!this.limitToGraph)&&this.vvLine.translate(b,0),!this.hhLine||!isNaN(this.fy)||a.rotate&&this.limitToGraph||this.hhLine.translate(0,c),isNaN(this.mouse2X)?this.dispatchMovedEvent(b,c):e=!1):this.forceShow||this.hideCursor();if(this.zooming){if(!isNaN(this.mouse2X)){isNaN(this.mouse2X0)||this.dispatchPanEvent();return}if(this.pan){this.dispatchPanEvent();return}(this.hZoomEnabled||this.vZoomEnabled)&&this.zooming&&this.updateSelection()}e&&this.showCursor()}},updateDrawing:function(){this.drawing&&this.chart.setMouseCursor("crosshair");this.drawingNow&&(d.remove(this.drawingLine),this.drawingLine=d.line(this.container,[this.drawStartX,this.mouseX],[this.drawStartY,this.mouseY],this.cursorColor,1,1))},fixWidth:function(a){if(this.fullWidth&&this.prevLineWidth!=a){var b=this.vvLine,c=0;b&&(b.remove(),c=b.x);b=this.container.set();b.translate(c,0);c=d.rect(this.container,a,this.height,this.cursorColor,this.cursorAlpha,0);d.setCN(this.chart,c,"cursor-fill");c.translate(-a/2,0);b.push(c);this.vvLine=b;this.fullLines.push(b);this.prevLineWidth=a}},fixHeight:function(a){if(this.fullWidth&&this.prevLineHeight!=a){var b=this.hhLine,c=0;b&&(b.remove(),c=b.y);b=this.container.set();b.translate(0,c);c=d.rect(this.container,this.width,a,this.cursorColor,this.cursorAlpha);c.translate(0,-a/2);b.push(c);this.fullLines.push(b);this.hhLine=b;this.prevLineHeight=a}},fixVLine:function(a,b){if(!isNaN(a)){if(isNaN(this.prevLineX)){var c=0,e=this.mouseX;if(this.limitToGraph){var d=this.chart.categoryAxis;d&&(this.chart.rotate||(c="bottom"==d.position?this.height:-this.height),e=a)}this.vvLine.translate(e,c)}else this.prevLineX!=a&&this.vvLine.translate(this.prevLineX,this.prevLineY);this.fx=a;this.prevLineX!=a&&(c=this.animationDuration,this.zooming&&(c=0),this.vvLine.stop(),this.vvLine.animate({translate:a+","+b},c,"easeOutSine"),this.prevLineX=a,this.prevLineY=b)}},fixHLine:function(a,b){if(!isNaN(a)){if(isNaN(this.prevLineY)){var c=0,e=this.mouseY;if(this.limitToGraph){var d=this.chart.categoryAxis;d&&(this.chart.rotate&&(c="right"==d.position?this.width:-this.width),e=a)}this.hhLine.translate(c,e)}else this.prevLineY!=a&&this.hhLine.translate(this.prevLineX,this.prevLineY);this.fy=a;this.prevLineY!=a&&(c=this.animationDuration,this.zooming&&(c=0),this.hhLine.stop(),this.hhLine.animate({translate:b+","+a},c,"easeOutSine"),this.prevLineY=a,this.prevLineX=b)}},hideCursor:function(a){this.forceShow=!1;this.chart.wasTouched&&this.leaveAfterTouch||this.isHidden||this.leaveCursor||(this.hideLines(),this.isHidden=!0,this.index=this.prevLineY=this.prevLineX=this.mouseY0=this.mouseX0=this.fy=this.fx=NaN,a?this.chart.handleCursorHide():this.fire({target:this,chart:this.chart,type:"onHideCursor"}),this.chart.setMouseCursor("auto"))},hideLines:function(){this.vvLine&&this.vvLine.hide();this.hhLine&&this.hhLine.hide();this.fullLines&&this.fullLines.hide();this.isHidden=!0;this.chart.handleCursorHide()},showCursor:function(a){!this.drawing&&this.enabled&&(this.vLineEnabled&&this.vvLine&&this.vvLine.show(),this.hLineEnabled&&this.hhLine&&this.hhLine.show(),this.isHidden=!1,this.updateFullLine(),a||this.fire({target:this,chart:this.chart,type:"onShowCursor"}),this.pan&&this.chart.setMouseCursor("default"))},updateFullLine:function(){this.zooming&&this.fullWidth&&this.selection&&(this.rotate?0<this.selection.height&&this.hhLine.hide():0<this.selection.width&&this.vvLine.hide())},updateSelection:function(){if(!this.pan&&this.enabled){var a=this.mouseX,b=this.mouseY;isNaN(this.fx)||(a=this.fx);isNaN(this.fy)||(b=this.fy);this.clearSelection();var c=this.mouseX0,e=this.mouseY0,h=this.width,f=this.height,a=d.fitToBounds(a,0,h),b=d.fitToBounds(b,0,f),g;a<c&&(g=a,a=c,c=g);b<e&&(g=b,b=e,e=g);this.hZoomEnabled?h=a-c:c=0;this.vZoomEnabled?f=b-e:e=0;isNaN(this.mouse2X)&&0<Math.abs(h)&&0<Math.abs(f)&&(a=this.chart,b=d.rect(this.container,h,f,this.cursorColor,this.selectionAlpha),d.setCN(a,b,"cursor-selection"),b.width=h,b.height=f,b.translate(c,e),this.set.push(b),this.selection=b);this.updateFullLine()}},mouseIsOver:function(){var a=this.mouseX,b=this.mouseY;if(this.justReleased)return this.justReleased=!1,!0;if(this.mouseIsDown)return!0;if(!this.chart.mouseIsOver)return this.handleMouseOut(),!1;if(0<a&&a<this.width&&0<b&&b<this.height)return!0;this.handleMouseOut()},fixPosition:function(){this.prevY=this.prevX=NaN},handleMouseDown:function(){this.update();if(this.mouseIsOver())if(this.mouseIsDown=!0,this.mouseX0=this.mouseX,this.mouseY0=this.mouseY,this.mouse2X0=this.mouse2X,this.mouse2Y0=this.mouse2Y,this.drawing)this.drawStartY=this.mouseY,this.drawStartX=this.mouseX,this.drawingNow=!0;else if(this.dispatchMovedEvent(this.mouseX,this.mouseY),!this.pan&&isNaN(this.mouse2X0)&&(isNaN(this.fx)||(this.mouseX0=this.fx),isNaN(this.fy)||(this.mouseY0=this.fy)),this.hZoomEnabled||this.vZoomEnabled){this.zooming=!0;var a={chart:this.chart,target:this,type:"zoomStarted"};a.x=this.mouseX/this.width;a.y=this.mouseY/this.height;this.index0=a.index=this.index;this.timestamp0=this.timestamp;this.fire(a)}},registerInitialMouse:function(){},handleReleaseOutside:function(){this.mouseIsDown=!1;if(this.drawingNow){this.drawingNow=!1;d.remove(this.drawingLine);var a=this.drawStartX,b=this.drawStartY,c=this.mouseX,e=this.mouseY,h=this.chart;(2<Math.abs(a-c)||2<Math.abs(b-e))&&this.fire({type:"draw",target:this,chart:h,initialX:a,initialY:b,finalX:c,finalY:e})}this.zooming&&(this.zooming=!1,this.selectWithoutZooming?this.dispatchZoomEvent("selected"):(this.hZoomEnabled||this.vZoomEnabled)&&this.dispatchZoomEvent("zoomed"),this.rolledOver&&this.dispatchMovedEvent(this.mouseX,this.mouseY));this.mouse2Y0=this.mouse2X0=this.mouseY0=this.mouseX0=NaN},dispatchZoomEvent:function(a){if(!this.pan){var b=this.selection;if(b&&3<Math.abs(b.width)&&3<Math.abs(b.height)){var c=Math.min(this.index,this.index0),e=Math.max(this.index,this.index0),d=c,f=e,g=this.chart,k=g.chartData,l=g.categoryAxis;l&&l.parseDates&&!l.equalSpacing&&(d=k[c]?k[c].time:Math.min(this.timestamp0,this.timestamp),f=k[e]?g.getEndTime(k[e].time):Math.max(this.timestamp0,this.timestamp));var b={type:a,chart:this.chart,target:this,end:f,start:d,startIndex:c,endIndex:e,selectionHeight:b.height,selectionWidth:b.width,selectionY:b.y,selectionX:b.x},m;this.hZoomEnabled&&4<Math.abs(this.mouseX0-this.mouseX)&&(b.startX=this.mouseX0/this.width,b.endX=this.mouseX/this.width,m=!0);this.vZoomEnabled&&4<Math.abs(this.mouseY0-this.mouseY)&&(b.startY=1-this.mouseY0/this.height,b.endY=1-this.mouseY/this.height,m=!0);m&&(this.prevY=this.prevX=NaN,this.fire(b),"selected"!=a&&this.clearSelection());this.hideCursor()}}},dispatchMovedEvent:function(a,b,c,e){a=Math.round(a);b=Math.round(b);if(!this.isHidden&&(a!=this.prevX||b!=this.prevY||"changed"==c)){c||(c="moved");var d=this.fx,f=this.fy;isNaN(d)&&(d=a);isNaN(f)&&(f=b);var g=!1;this.zooming&&this.pan&&(g=!0);g={hidden:this.isHidden,type:c,chart:this.chart,target:this,x:a,y:b,finalX:d,finalY:f,zooming:this.zooming,panning:g,mostCloseGraph:this.mostCloseGraph,index:this.index,skip:e,hideBalloons:this.hideGraphBalloons};this.rotate?(g.position=b,g.finalPosition=f):(g.position=a,g.finalPosition=d);this.prevX=a;this.prevY=b;e?this.chart.handleCursorMove(g):(this.fire(g),"changed"==c&&this.chart.fire(g))}},dispatchPanEvent:function(){if(this.mouseIsDown){var a=d.roundTo((this.mouseX-this.mouseX0)/this.width,3),b=d.roundTo((this.mouseY-this.mouseY0)/this.height,3),c=d.roundTo((this.mouse2X-this.mouse2X0)/
|
26 |
-
this.width,3),e=d.roundTo((this.mouse2Y-this.mouse2Y0)/this.height,2),h=!1;0!==Math.abs(a)&&0!==Math.abs(b)&&(h=!0);if(this.prevDeltaX==a||this.prevDeltaY==b)h=!1;isNaN(c)||isNaN(e)||(0!==Math.abs(c)&&0!==Math.abs(e)&&(h=!0),this.prevDelta2X!=c&&this.prevDelta2Y!=e)||(h=!1);h&&(this.hideLines(),this.fire({type:"panning",chart:this.chart,target:this,deltaX:a,deltaY:b,delta2X:c,delta2Y:e,index:this.index}),this.prevDeltaX=a,this.prevDeltaY=b,this.prevDelta2X=c,this.prevDelta2Y=e)}},clearSelection:function(){var a=
|
27 |
-
this.selection;a&&(a.width=0,a.height=0,a.remove())},destroy:function(){this.clear();d.remove(this.selection);this.selection=null;clearTimeout(this.syncTO);d.remove(this.set)},clear:function(){},setTimestamp:function(a){this.timestamp=a},setIndex:function(a,b){a!=this.index&&(this.index=a,b||this.isHidden||this.dispatchMovedEvent(this.mouseX,this.mouseY,"changed"))},handleMouseOut:function(){this.enabled&&this.rolledOver&&(this.leaveCursor||this.setIndex(void 0),this.forceShow=!1,this.hideCursor(),this.rolledOver=!1)},showCursorAt:function(a){var b=this.chart.categoryAxis;b&&this.setPosition(b.categoryToCoordinate(a))},setPosition:function(a){var b=this.chart,c=b.categoryAxis;if(c){var e,d,f=c.coordinateToValue(a);c.showBalloonAt(f);this.forceShow=!0;c.stickBalloonToCategory?b.rotate?this.fixHLine(a,0):this.fixVLine(a,0):(this.showCursor(),b.rotate?this.hhLine.translate(0,a):this.vvLine.translate(a,0));b.rotate?e=a:d=a;this.dispatchMovedEvent(d,e);b.rotate?(this.vvLine&&this.vvLine.hide(),this.hhLine&&this.hhLine.show()):(this.hhLine&&this.hhLine.hide(),this.vvLine&&this.vvLine.show());this.updateFullLine();this.isHidden=!1;this.dispatchMovedEvent(d,e,"moved",!0)}},enableDrawing:function(a){this.enabled=!a;this.hideCursor();this.drawing=a},syncWithCursor:function(a,b){clearTimeout(this.syncTO);a&&(a.isHidden?this.hideCursor(!0):this.syncWithCursorReal(a,b))},isZooming:function(a){this.zooming=a},syncWithCursorReal:function(a,b){var c=a.vvLine,e=a.hhLine;this.index=a.index;this.forceShow=!0;this.zooming&&this.pan||this.showCursor(!0);this.hideGraphBalloons=b;this.justReleased=a.justReleased;this.zooming=a.zooming;this.index0=a.index0;this.mouseX0=a.mouseX0;this.mouseY0=a.mouseY0;this.mouse2X0=a.mouse2X0;this.mouse2Y0=a.mouse2Y0;this.timestamp0=a.timestamp0;this.prevDeltaX=a.prevDeltaX;this.prevDeltaY=a.prevDeltaY;this.prevDelta2X=a.prevDelta2X;this.prevDelta2Y=a.prevDelta2Y;this.fx=a.fx;this.fy=a.fy;this.index=a.index;a.zooming&&this.updateSelection();var d=a.mouseX,f=a.mouseY;this.rotate?(d=NaN,this.vvLine&&this.vvLine.hide(),this.hhLine&&e&&(isNaN(a.fy)?this.hhLine.translate(0,a.mouseY):this.fixHLine(a.fy,0))):(f=NaN,this.hhLine&&this.hhLine.hide(),this.vvLine&&c&&(isNaN(a.fx)?this.vvLine.translate(a.mouseX,0):this.fixVLine(a.fx,0)));this.dispatchMovedEvent(d,f,"moved",!0)}})})();(function(){var d=window.AmCharts;d.SimpleChartScrollbar=d.Class({construct:function(a){this.createEvents("zoomed","zoomStarted","zoomEnded");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconHeight=this.dragIconWidth=35;this.dragIcon="dragIconRoundBig";this.dragCursorHover="cursor: cursor: grab; cursor:-moz-grab; cursor:-webkit-grab;";this.dragCursorDown="cursor: cursor: grab; cursor:-moz-grabbing; cursor:-webkit-grabbing;";this.enabled=!0;this.percentStart=this.offset=0;this.percentEnd=1;d.applyTheme(this,a,"SimpleChartScrollbar")},draw:function(){var a=this;a.destroy();if(a.enabled){var b=a.chart.container,c=a.rotate,e=a.chart;e.panRequired=!0;var h=b.set();a.set=h;e.scrollbarsSet.push(h);var f,g;c?(f=a.scrollbarHeight,g=e.plotAreaHeight):(g=a.scrollbarHeight,f=e.plotAreaWidth);a.width=f;if((a.height=g)&&f){var k=d.rect(b,f,g,a.backgroundColor,a.backgroundAlpha,1,a.backgroundColor,a.backgroundAlpha);d.setCN(e,k,"scrollbar-bg");a.bg=k;h.push(k);k=d.rect(b,f,g,"#000",.005);h.push(k);a.invisibleBg=k;k.click(function(){a.handleBgClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()}).touchend(function(){a.handleBgClick()});k=d.rect(b,f,g,a.selectedBackgroundColor,a.selectedBackgroundAlpha);d.setCN(e,k,"scrollbar-bg-selected");a.selectedBG=k;h.push(k);f=d.rect(b,f,g,"#000",.005);a.dragger=f;h.push(f);f.mousedown(function(b){a.handleDragStart(b)}).mouseup(function(){a.handleDragStop()}).mouseover(function(){a.handleDraggerOver()}).mouseout(function(){a.handleMouseOut()}).touchstart(function(b){a.handleDragStart(b)}).touchend(function(){a.handleDragStop()});f=e.pathToImages;g=a.dragIcon.replace(/\.[a-z]*$/i,"");c?(k=f+g+"H"+e.extension,f=a.dragIconWidth,c=a.dragIconHeight):(k=f+g+e.extension,c=a.dragIconWidth,f=a.dragIconHeight);g=b.image(k,0,0,c,f);d.setCN(e,g,"scrollbar-grip-left");k=b.image(k,0,0,c,f);d.setCN(e,k,"scrollbar-grip-right");var l=10,m=20;e.panEventsEnabled&&(l=25,m=a.scrollbarHeight);var n=d.rect(b,l,m,"#000",.005),q=d.rect(b,l,m,"#000",.005);q.translate(-(l-c)/2,-(m-f)/2);n.translate(-(l-c)/2,-(m-f)/2);c=b.set([g,q]);b=b.set([k,n]);a.iconLeft=c;h.push(a.iconLeft);a.iconRight=b;h.push(b);c.mousedown(function(){a.leftDragStart()}).mouseup(function(){a.leftDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(){a.leftDragStart()}).touchend(function(){a.leftDragStop()});
|
28 |
-
b.mousedown(function(){a.rightDragStart()}).mouseup(function(){a.rightDragStop()}).mouseover(function(){a.iconRollOver()}).mouseout(function(){a.iconRollOut()}).touchstart(function(){a.rightDragStart()}).touchend(function(){a.rightDragStop()});d.ifArray(e.chartData)?h.show():h.hide();a.hideDragIcons();a.clipDragger(!1)}h.translate(a.x,a.y);h.node.style.msTouchAction="none";h.node.style.touchAction="none"}},updateScrollbarSize:function(a,b){if(!isNaN(a)&&!isNaN(b)){a=Math.round(a);b=Math.round(b);var c=this.dragger,e,d,f,g,k;this.rotate?(e=0,d=a,f=this.width+1,g=b-a,c.setAttr("height",b-a),c.setAttr("y",d)):(e=a,d=0,f=b-a,g=this.height+1,k=b-a,c.setAttr("x",e),c.setAttr("width",k));this.clipAndUpdate(e,d,f,g)}},update:function(){var a,b=!1,c,e,d=this.x,f=this.y,g=this.dragger,k=this.getDBox();if(k){c=k.x+d;e=k.y+f;var l=k.width,k=k.height,m=this.rotate,n=this.chart,q=this.width,p=this.height,t=n.mouseX,r=n.mouseY;a=this.initialMouse;this.forceClip&&this.clipDragger(!0);if(n.mouseIsOver){this.dragging&&(n=this.initialCoord,m?(a=n+(r-a),0>a&&(a=0),n=p-k,a>n&&(a=n),g.setAttr("y",a)):(a=n+(t-a),0>a&&(a=0),n=q-l,a>n&&(a=n),g.setAttr("x",a)),this.clipDragger(!0));if(this.resizingRight){if(m)if(a=r-e,a+e>p+f&&(a=p-e+f),0>a)this.resizingRight=!1,b=this.resizingLeft=!0;else{if(0===a||isNaN(a))a=.1;g.setAttr("height",a)}else if(a=t-c,a+c>q+d&&(a=q-c+d),0>a)this.resizingRight=!1,b=this.resizingLeft=!0;else{if(0===a||isNaN(a))a=.1;g.setAttr("width",a)}this.clipDragger(!0)}if(this.resizingLeft){if(m)if(c=e,e=r,e<f&&(e=f),isNaN(e)&&(e=f),e>p+f&&(e=p+f),a=!0===b?c-e:k+c-e,0>a)this.resizingRight=!0,this.resizingLeft=!1,g.setAttr("y",c+k-f);else{if(0===a||isNaN(a))a=.1;g.setAttr("y",e-f);g.setAttr("height",a)}else if(e=t,e<d&&(e=d),isNaN(e)&&(e=d),e>q+d&&(e=q+d),a=!0===b?c-e:l+c-e,0>a)this.resizingRight=!0,this.resizingLeft=!1,g.setAttr("x",c+l-d);else{if(0===a||isNaN(a))a=.1;g.setAttr("x",e-d);g.setAttr("width",a)}this.clipDragger(!0)}}}},stopForceClip:function(){this.animating=this.forceClip=!1},clipDragger:function(a){var b=this.getDBox();if(b){var c=b.x,e=b.y,d=b.width,b=b.height,f=!1;if(this.rotate){if(c=0,d=this.width+1,this.clipY!=e||this.clipH!=b)f=!0}else if(e=0,b=this.height+1,this.clipX!=c||this.clipW!=d)f=!0;f&&(this.clipAndUpdate(c,e,d,b),a&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(a,b,c,e){this.clipX=a;this.clipY=b;this.clipW=c;this.clipH=e;this.selectedBG.setAttr("width",c);this.selectedBG.setAttr("height",e);this.selectedBG.translate(a,b);this.updateDragIconPositions();this.maskGraphs(a,b,c,e)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart;a.hideBalloon();var b=this.getDBox(),c=b.x,e=b.y,d=b.width,f=b.height,g,k;this.rotate?(b=e,g=this.height/f,k=1-e/this.height,c=1-(e+f)/this.height):(b=c,g=this.width/d,k=c/this.width,c=(c+d)/this.width);this.fire({type:"zoomed",position:b,chart:a,target:this,multiplier:g,relativeStart:c,relativeEnd:k})}},updateDragIconPositions:function(){var a=this.getDBox(),
|
29 |
-
b=a.x,c=a.y,e=this.iconLeft,d=this.iconRight,f,g,k=this.scrollbarHeight;this.rotate?(f=this.dragIconWidth,g=this.dragIconHeight,e.translate((k-g)/2,c-f/2),d.translate((k-g)/2,c+a.height-f/2)):(f=this.dragIconHeight,g=this.dragIconWidth,e.translate(b-g/2,(k-f)/2),d.translate(b-g/2+a.width,(k-f)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){if(!this.resizingLeft&&!this.resizingRight&&!this.dragging){if(this.hideResizeGrips||
|
30 |
-
!this.resizeEnabled)this.iconLeft.hide(),this.iconRight.hide();this.removeCursors()}},removeCursors:function(){this.chart.setMouseCursor("auto")},fireZoomEvent:function(a){this.fire({type:a,chart:this.chart,target:this})},percentZoom:function(a,b){if(this.dragger&&this.enabled){this.dragger.stop();isNaN(a)&&(a=0);isNaN(b)&&(b=1);var c,e,d;this.rotate?(c=this.height,e=c-c*b,d=c-c*a):(c=this.width,d=c*b,e=c*a);this.updateScrollbarSize(e,d);this.clipDragger(!1);this.percentStart=a;this.percentEnd=b}},destroy:function(){this.clear();d.remove(this.set);d.remove(this.iconRight);d.remove(this.iconLeft)},clear:function(){},handleDragStart:function(){if(this.enabled){this.fireZoomEvent("zoomStarted");var a=this.chart;this.dragger.stop();this.removeCursors();d.isModern&&this.dragger.node.setAttribute("style",this.dragCursorDown);this.dragging=!0;var b=this.getDBox();this.rotate?(this.initialCoord=b.y,this.initialMouse=a.mouseY):(this.initialCoord=b.x,this.initialMouse=a.mouseX)}},handleDragStop:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();d.isModern&&this.dragger.node.setAttribute("style",this.dragCursorHover);this.update();this.fireZoomEvent("zoomEnded")},handleDraggerOver:function(){this.handleMouseOver();d.isModern&&this.dragger.node.setAttribute("style",this.dragCursorHover)},leftDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease();this.fireZoomEvent("zoomEnded")},rightDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease();this.fireZoomEvent("zoomEnded")},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("ns-resize"):this.chart.setMouseCursor("ew-resize");this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){var a=this;if(!a.resizingRight&&!a.resizingLeft){a.zooming=!0;var b,c,e=a.scrollDuration,h=a.dragger;b=a.getDBox();var f=b.height,g=b.width;c=a.chart;var k=a.y,l=a.x,m=a.rotate;m?(b="y",c=c.mouseY-f/2-k,c=d.fitToBounds(c,0,a.height-f)):(b="x",c=c.mouseX-g/2-l,c=d.fitToBounds(c,0,a.width-g));a.updateOnReleaseOnly?(a.skipEvent=!1,h.setAttr(b,c),a.dispatchScrollbarEvent(),a.clipDragger()):(a.animating=!0,c=Math.round(c),m?h.animate({y:c},e,">"):h.animate({x:c},e,">"),a.forceClip=!0,clearTimeout(a.forceTO),a.forceTO=setTimeout(function(){a.stopForceClip.call(a)},5E3*e))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.animating=this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.update()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons();this.removeCursors()}})})();(function(){var d=window.AmCharts;d.ChartScrollbar=d.Class({inherits:d.SimpleChartScrollbar,construct:function(a){this.cname="ChartScrollbar";d.ChartScrollbar.base.construct.call(this,a);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.oppositeAxis=!0;d.applyTheme(this,a,this.cname)},init:function(){var a=this.categoryAxis,b=this.chart,c=this.gridAxis;a||("CategoryAxis"==this.gridAxis.cname?(this.catScrollbar=!0,a=new d.CategoryAxis,a.id="scrollbar"):(a=new d.ValueAxis,a.data=b.chartData,a.id=c.id,a.type=c.type,a.maximumDate=c.maximumDate,a.minimumDate=c.minimumDate,a.minPeriod=c.minPeriod),this.categoryAxis=a);a.chart=b;a.dateFormats=c.dateFormats;a.markPeriodChange=c.markPeriodChange;a.boldPeriodBeginning=c.boldPeriodBeginning;a.labelFunction=c.labelFunction;a.axisItemRenderer=d.RecItem;a.axisRenderer=d.RecAxis;a.guideFillRenderer=d.RecFill;a.inside=!0;a.fontSize=this.fontSize;a.tickLength=0;a.axisAlpha=0;d.isString(this.graph)&&(this.graph=d.getObjById(b.graphs,this.graph));(a=this.graph)&&this.catScrollbar&&(c=this.valueAxis,c||(this.valueAxis=c=new d.ValueAxis,c.visible=!1,c.scrollbar=!0,c.axisItemRenderer=d.RecItem,c.axisRenderer=d.RecAxis,c.guideFillRenderer=d.RecFill,c.labelsEnabled=!1,c.chart=b),b=this.unselectedGraph,b||(b=new d.AmGraph,b.scrollbar=!0,this.unselectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers),b=this.selectedGraph,b||(b=new d.AmGraph,b.scrollbar=!0,this.selectedGraph=b,b.negativeBase=a.negativeBase,b.noStepRisers=a.noStepRisers));this.scrollbarCreated=!0},draw:function(){var a=this;d.ChartScrollbar.base.draw.call(a);if(a.enabled){a.scrollbarCreated||a.init();var b=a.chart,c=b.chartData,e=a.categoryAxis,h=a.rotate,f=a.x,g=a.y,k=a.width,l=a.height,m=a.gridAxis,n=a.set;e.setOrientation(!h);e.parseDates=m.parseDates;"ValueAxis"==a.categoryAxis.cname&&(e.rotate=!h);e.equalSpacing=m.equalSpacing;e.minPeriod=m.minPeriod;e.startOnAxis=m.startOnAxis;e.width=k-1;e.height=l;e.gridCount=a.gridCount;e.gridColor=a.gridColor;e.gridAlpha=a.gridAlpha;e.color=a.color;e.tickLength=0;e.axisAlpha=0;e.autoGridCount=a.autoGridCount;e.parseDates&&!e.equalSpacing&&e.timeZoom(b.firstTime,b.lastTime);e.minimum=a.gridAxis.fullMin;e.maximum=a.gridAxis.fullMax;e.strictMinMax=!0;e.zoom(0,c.length-1);if((m=a.graph)&&a.catScrollbar){var q=a.valueAxis,p=m.valueAxis;q.id=p.id;q.rotate=h;q.setOrientation(h);q.width=k;q.height=l;q.dataProvider=c;q.reversed=p.reversed;q.logarithmic=p.logarithmic;q.gridAlpha=0;q.axisAlpha=0;n.push(q.set);h?(q.y=g,q.x=0):(q.x=f,q.y=0);var f=Infinity,g=-Infinity,t;for(t=0;t<c.length;t++){var r=c[t].axes[p.id].graphs[m.id].values,u;for(u in r)if(r.hasOwnProperty(u)&&"percents"!=u&&"total"!=u){var x=r[u];x<f&&(f=x);x>g&&(g=x)}}Infinity!=f&&(q.minimum=f);-Infinity!=g&&(q.maximum=g+.1*(g-f));f==g&&(--q.minimum,q.maximum+=1);void 0!==a.minimum&&(q.minimum=a.minimum);void 0!==a.maximum&&(q.maximum=a.maximum);q.zoom(0,c.length-1);u=a.unselectedGraph;u.id=m.id;u.bcn="scrollbar-graph-";u.rotate=h;u.chart=b;u.data=c;u.valueAxis=q;u.chart=m.chart;u.categoryAxis=a.categoryAxis;u.periodSpan=m.periodSpan;u.valueField=m.valueField;u.openField=m.openField;u.closeField=m.closeField;u.highField=m.highField;u.lowField=m.lowField;u.lineAlpha=a.graphLineAlpha;u.lineColorR=a.graphLineColor;u.fillAlphas=a.graphFillAlpha;u.fillColorsR=a.graphFillColor;u.connect=m.connect;u.hidden=m.hidden;u.width=k;u.height=l;u.pointPosition=m.pointPosition;u.stepDirection=m.stepDirection;u.periodSpan=m.periodSpan;p=a.selectedGraph;p.id=m.id;p.bcn=u.bcn+"selected-";p.rotate=h;p.chart=b;p.data=c;p.valueAxis=q;p.chart=m.chart;p.categoryAxis=e;p.periodSpan=m.periodSpan;p.valueField=m.valueField;p.openField=m.openField;p.closeField=m.closeField;p.highField=m.highField;p.lowField=m.lowField;p.lineAlpha=a.selectedGraphLineAlpha;p.lineColorR=a.selectedGraphLineColor;p.fillAlphas=a.selectedGraphFillAlpha;p.fillColorsR=a.selectedGraphFillColor;p.connect=m.connect;p.hidden=m.hidden;p.width=k;p.height=l;p.pointPosition=m.pointPosition;p.stepDirection=m.stepDirection;p.periodSpan=m.periodSpan;b=a.graphType;b||(b=m.type);u.type=b;p.type=b;c=c.length-1;u.zoom(0,c);p.zoom(0,c);p.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});u.set.click(function(){a.handleBackgroundClick()}).mouseover(function(){a.handleMouseOver()}).mouseout(function(){a.handleMouseOut()});n.push(u.set);n.push(p.set)}n.push(e.set);n.push(e.labelsSet);a.bg.toBack();a.invisibleBg.toFront();a.dragger.toFront();a.iconLeft.toFront();a.iconRight.toFront()}},timeZoom:function(a,b,c){this.startTime=a;this.endTime=b;this.timeDifference=b-a;this.skipEvent=!d.toBoolean(c);this.zoomScrollbar();this.dispatchScrollbarEvent()},zoom:function(a,b){this.start=a;this.end=b;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.categoryAxis&&"ValueAxis"==this.categoryAxis.cname)d.ChartScrollbar.base.dispatchScrollbarEvent.call(this);else if(this.skipEvent)this.skipEvent=!1;else{var a=this.chart.chartData,b,c,e=this.dragger.getBBox();b=e.x;var h=e.y,f=e.width,e=e.height,g=this.chart;this.rotate?(b=h,c=e):c=f;f={type:"zoomed",target:this};f.chart=g;var k=this.categoryAxis,l=this.stepWidth,h=g.minSelectedTime,e=g.maxSelectedTime,m=!1;if(k.parseDates&&!k.equalSpacing){if(a=g.lastTime,g=g.firstTime,k=Math.round(b/l)+g,b=this.dragging?k+this.timeDifference:Math.round((b+c)/l)+g,k>b&&(k=b),0<h&&b-k<h&&(b=Math.round(k+(b-k)/2),m=Math.round(h/2),k=b-m,b+=m,m=!0),0<e&&b-k>e&&(b=Math.round(k+(b-k)/2),m=Math.round(e/2),k=b-m,b+=m,m=!0),b>a&&(b=a),b-h<k&&(k=b-h),k<g&&(k=g),k+h>b&&(b=k+h),k!=this.startTime||b!=this.endTime)this.startTime=k,this.endTime=b,f.start=k,f.end=b,f.startDate=new Date(k),f.endDate=new Date(b),this.fire(f)}else if(k.startOnAxis||
|
31 |
-
(b+=l/2),c-=this.stepWidth/2,h=k.xToIndex(b),b=k.xToIndex(b+c),h!=this.start||this.end!=b)k.startOnAxis&&(this.resizingRight&&h==b&&b++,this.resizingLeft&&h==b&&(0<h?h--:b=1)),this.start=h,this.end=this.dragging?this.start+this.difference:b,f.start=this.start,f.end=this.end,k.parseDates&&(a[this.start]&&(f.startDate=new Date(a[this.start].time)),a[this.end]&&(f.endDate=new Date(a[this.end].time))),this.fire(f);m&&this.zoomScrollbar(!0)}},zoomScrollbar:function(a){if((!(this.dragging||this.resizingLeft||this.resizingRight||this.animating)||a)&&this.dragger&&this.enabled){var b;a=this.chart;var c=a.chartData,e=this.categoryAxis;e.parseDates&&!e.equalSpacing?(c=e.stepWidth,e=a.firstTime,a=c*(this.startTime-e),b=c*(this.endTime-e)):(a=c[this.start].x[e.id],b=c[this.end].x[e.id],c=e.stepWidth,e.startOnAxis||(e=c/2,a-=e,b+=e));this.stepWidth=c;this.updateScrollbarSize(a,b)}},maskGraphs:function(a,b,c,e){var d=this.selectedGraph;d&&d.set.clipRect(a,b,c,e)},handleDragStart:function(){d.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){d.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}})})();(function(){var d=window.AmCharts;d.AmBalloon=d.Class({construct:function(a){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!0;this.offsetY=6;this.offsetX=1;this.textAlign="center";this.disableMouseEvents=!0;this.deltaSignX=this.deltaSignY=1;d.isModern||(this.offsetY*=1.5);this.sdy=this.sdx=0;d.applyTheme(this,a,this.cname)},draw:function(){var a=this.pointToX,b=this.pointToY;d.isModern||(this.drop=!1);var c=this.chart;d.VML&&(this.fadeOutDuration=0);this.xAnim&&c.stopAnim(this.xAnim);this.yAnim&&c.stopAnim(this.yAnim);this.sdy=this.sdx=0;if(!isNaN(a)){var e=this.follow,h=c.container,f=this.set;d.remove(f);this.removeDiv();f=h.set();f.node.style.pointerEvents="none";this.set=f;this.mainSet?(this.mainSet.push(this.set),this.sdx=this.mainSet.x,this.sdy=this.mainSet.y):c.balloonsSet.push(f);if(this.show){var g=this.l,k=this.t,l=this.r,m=this.b,n=this.balloonColor,q=this.fillColor,p=this.borderColor,t=q;void 0!=n&&(this.adjustBorderColor?t=p=n:q=n);var r=this.horizontalPadding,u=this.verticalPadding,x=this.pointerWidth,z=this.pointerOrientation,v=this.cornerRadius,A=c.fontFamily,y=this.fontSize;void 0==y&&(y=c.fontSize);var n=document.createElement("div"),B=c.classNamePrefix;n.className=B+"-balloon-div";this.className&&(n.className=n.className+" "+B+"-balloon-div-"+this.className);B=n.style;this.disableMouseEvents&&(B.pointerEvents="none");B.position="absolute";var D=this.minWidth,C="";isNaN(D)||(C="min-width:"+(D-2*r)+"px; ");n.innerHTML='<div style="text-align:'+this.textAlign+"; "+C+"max-width:"+this.maxWidth+"px; font-size:"+y+"px; color:"+this.color+"; font-family:"+
|
32 |
-
A+'">'+this.text+"</div>";c.chartDiv.appendChild(n);this.textDiv=n;var J=n.offsetWidth,H=n.offsetHeight;n.clientHeight&&(J=n.clientWidth,H=n.clientHeight);A=H+2*u;C=J+2*r;!isNaN(D)&&C<D&&(C=D);window.opera&&(A+=2);var S=!1,y=this.offsetY;c.handDrawn&&(y+=c.handDrawScatter+2);"H"!=z?(D=a-C/2,b<k+A+10&&"down"!=z?(S=!0,e&&(b+=y),y=b+x,this.deltaSignY=-1):(e&&(b-=y),y=b-A-x,this.deltaSignY=1)):(2*x>A&&(x=A/2),y=b-A/2,a<g+(l-g)/2?(D=a+x,this.deltaSignX=-1):(D=a-C-x,this.deltaSignX=1));y+A>=m&&(y=m-A);
|
33 |
-
y<k&&(y=k);D<g&&(D=g);D+C>l&&(D=l-C);var k=y+u,m=D+r,O=this.shadowAlpha,Q=this.shadowColor,r=this.borderThickness,ia=this.bulletSize,I,u=this.fillAlpha,Z=this.borderAlpha;this.showBullet&&(I=d.circle(h,ia,t,u),f.push(I));this.drop?(g=C/1.6,l=0,"V"==z&&(z="down"),"H"==z&&(z="left"),"down"==z&&(D=a+1,y=b-g-g/3),"up"==z&&(l=180,D=a+1,y=b+g+g/3),"left"==z&&(l=270,D=a+g+g/3+2,y=b),"right"==z&&(l=90,D=a-g-g/3+2,y=b),k=y-H/2+1,m=D-J/2-1,q=d.drop(h,g,l,q,u,r,p,Z)):0<v||0===x?(0<O&&(a=d.rect(h,C,A,q,0,r+1,Q,O,v),d.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),q=d.rect(h,C,A,q,u,r,p,Z,v)):(t=[],v=[],"H"!=z?(g=a-D,g>C-x&&(g=C-x),g<x&&(g=x),t=[0,g-x,a-D,g+x,C,C,0,0],v=S?[0,0,b-y,0,0,A,A,0]:[A,A,b-y,A,A,0,0,A]):(z=b-y,z>A-x&&(z=A-x),z<x&&(z=x),v=[0,z-x,b-y,z+x,A,A,0,0],t=a<g+(l-g)/2?[0,0,D<a?0:a-D,0,0,C,C,0]:[C,C,D+C>a?C:a-D,C,C,0,0,C]),0<O&&(a=d.polygon(h,t,v,q,0,r,Q,O),a.translate(1,1),f.push(a)),q=d.polygon(h,t,v,q,u,r,p,Z));this.bg=q;f.push(q);q.toFront();d.setCN(c,q,"balloon-bg");this.className&&
|
34 |
-
d.setCN(c,q,"balloon-bg-"+this.className);h=1*this.deltaSignX;m+=this.sdx;k+=this.sdy;B.left=m+"px";B.top=k+"px";f.translate(D-h,y,1,!0);q=q.getBBox();this.bottom=y+A+1;this.yPos=q.y+y;I&&I.translate(this.pointToX-D+h,b-y);b=this.animationDuration;0<this.animationDuration&&!e&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY,NaN,!0),f.animate({translate:D-h+","+y},b,"easeOutSine"),n&&(B.left=this.prevTX+"px",B.top=this.prevTY+"px",this.xAnim=c.animate({node:n},"left",this.prevTX,m,b,"easeOutSine","px"),this.yAnim=c.animate({node:n},"top",this.prevTY,k,b,"easeOutSine","px")));this.prevX=D-h;this.prevY=y;this.prevTX=m;this.prevTY=k}}},fixPrevious:function(){this.rPrevX=this.prevX;this.rPrevY=this.prevY;this.rPrevTX=this.prevTX;this.rPrevTY=this.prevTY},restorePrevious:function(){this.prevX=this.rPrevX;this.prevY=this.rPrevY;this.prevTX=this.rPrevTX;this.prevTY=this.rPrevTY},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX-this.sdx,b=this.chart.mouseY-
|
35 |
-
this.sdy;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var e=c.getBBox(),a=a-e.width/2,d=b-e.height-10;a<this.l&&(a=this.l);a>this.r-e.width&&(a=this.r-e.width);d<this.t&&(d=b+10);c.translate(a,d);b=this.textDiv.style;b.left=a+this.horizontalPadding+"px";b.top=d+this.verticalPadding+"px"}}}},changeColor:function(a){this.balloonColor=a},setBounds:function(a,b,c,d){this.l=a;this.t=b;this.r=c;this.b=d;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(a){if(this.text!=a||this.positionChanged)this.text=a,this.isHiding=!1,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),a=this.chart,this.fadeAnim1&&a.stopAnim(this.fadeAnim1),this.fadeAnim2&&a.stopAnim(this.fadeAnim2),this.draw(),this.positionChanged=!1},hide:function(a){var b=this;b.text=void 0;isNaN(a)&&(a=b.fadeOutDuration);var c=b.chart;if(0<a&&!b.isHiding){b.isHiding=!0;b.destroyTO&&clearTimeout(b.destroyTO);b.destroyTO=setTimeout(function(){b.destroy.call(b)},1E3*a);b.follow=!1;b.show=!1;var d=b.set;d&&(d.setAttr("opacity",b.fillAlpha),b.fadeAnim1=d.animate({opacity:0},a,"easeInSine"));b.textDiv&&(b.fadeAnim2=c.animate({node:b.textDiv},"opacity",1,0,a,"easeInSine",""))}else b.show=!1,b.follow=!1,b.destroy()},setPosition:function(a,b){if(a!=this.pointToX||b!=this.pointToY)this.previousX=this.pointToX,this.previousY=this.pointToY,this.pointToX=a,this.pointToY=b,this.positionChanged=!0},followCursor:function(a){var b=this;b.follow=a;clearInterval(b.interval);var c=b.chart.mouseX-b.sdx,d=b.chart.mouseY-b.sdy;!isNaN(c)&&a&&(b.pointToX=c-b.offsetX*b.deltaSignX,b.pointToY=d,b.followMouse(),b.interval=setInterval(function(){b.followMouse.call(b)},40))},removeDiv:function(){if(this.textDiv){var a=this.textDiv.parentNode;a&&a.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);d.remove(this.set);this.removeDiv();this.set=null}})})();(function(){var d=window.AmCharts;d.AmCoordinateChart=d.Class({inherits:d.AmChart,construct:function(a){d.AmCoordinateChart.base.construct.call(this,a);this.theme=a;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;d.applyTheme(this,a,"AmCoordinateChart")},initChart:function(){d.AmCoordinateChart.base.initChart.call(this);this.drawGraphs=!0;var a=this.categoryAxis;a&&(this.categoryAxis=d.processObject(a,d.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();d.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&(this.gridSet.toFront(),this.bulletSet.toFront(),this.balloonsSet.toFront())},createValueAxes:function(){if(0===this.valueAxes.length){var a=new d.ValueAxis;this.addValueAxis(a)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(a){this.chartData=[];if(a)if(0<this.processTimeout){1>this.processCount&&(this.processCount=1);var b=a.length/this.processCount;this.parseCount=Math.ceil(b)-1;for(var c=0;c<b;c++)this.delayParseSerialData(a,c)}else this.parseCount=0,this.parsePartSerialData(a,0,a.length,0);else this.onDataUpdated()},delayParseSerialData:function(a,b){var c=this,d=c.processCount;setTimeout(function(){c.parsePartSerialData.call(c,a,b*d,(b+1)*d,b)},c.processTimeout)},parsePartSerialData:function(a,b,c,e){c>a.length&&(c=a.length);var h=this.graphs,f={},g=this.seriesIdField;g||(g=this.categoryField);var k=!1,l,m=this.categoryAxis,n,q,p;m&&(k=m.parseDates,n=m.forceShowField,p=m.classNameField,q=m.labelColorField,l=m.categoryFunction);var t,r,u={},x;k&&(t=d.extractPeriod(m.minPeriod),r=t.period,t=t.count,x=d.getPeriodDuration(r,t));var z={};this.lookupTable=z;var v,A=this.dataDateFormat,y={};for(v=b;v<c;v++){var B={},D=a[v];b=D[this.categoryField];B.dataContext=D;B.category=l?l(b,D,m):String(b);n&&(B.forceShow=D[n]);p&&(B.className=D[p]);q&&(B.labelColor=D[q]);z[D[g]]=B;if(k&&(m.categoryFunction?b=m.categoryFunction(b,D,m):(!A||b instanceof Date||(b=b.toString()+" |"),b=d.getDate(b,A,m.minPeriod)),b=d.resetDateToMin(b,r,t,m.firstDayOfWeek),B.category=b,B.time=b.getTime(),isNaN(B.time)))continue;var C=this.valueAxes;B.axes={};B.x={};var J;for(J=0;J<C.length;J++){var H=C[J].id;B.axes[H]={};B.axes[H].graphs={};var S;for(S=0;S<h.length;S++){b=h[S];var O=b.id,Q=1.1;isNaN(b.gapPeriod)||(Q=b.gapPeriod);var ia=b.periodValue;if(b.valueAxis.id==H){B.axes[H].graphs[O]={};var I={};I.index=v;var Z=D;b.dataProvider&&(Z=f);I.values=this.processValues(Z,b,ia);!b.connect&&y&&y[O]&&0<Q&&B.time-u[O]>=x*Q&&(y[O].gap=!0);this.processFields(b,I,Z);I.category=B.category;I.serialDataItem=B;I.graph=b;B.axes[H].graphs[O]=I;u[O]=B.time;y[O]=I}}}this.chartData[v]=B}if(this.parseCount==e){for(a=0;a<h.length;a++)b=h[a],b.dataProvider&&this.parseGraphData(b);this.dataChanged=!1;this.dispatchDataUpdated=!0;this.onDataUpdated()}},processValues:function(a,b,c){var e={},h,f=!1;"candlestick"!=b.type&&"ohlc"!=b.type||""===c||(f=!0);for(var g="value error open close low high".split(" "),k=0;k<g.length;k++){var l=g[k];"value"!=l&&"error"!=l&&f&&(c=l.charAt(0).toUpperCase()+l.slice(1));var m=a[b[l+"Field"]+c];null!==m&&(h=Number(m),isNaN(h)||(e[l]=h),"date"==b.valueAxis.type&&void 0!==m&&(h=d.getDate(m,b.chart.dataDateFormat),e[l]=h.getTime()))}return e},parseGraphData:function(a){var b=a.dataProvider,c=a.seriesIdField;c||(c=this.seriesIdField);c||(c=this.categoryField);var d;for(d=0;d<b.length;d++){var h=b[d],f=this.lookupTable[String(h[c])],g=a.valueAxis.id;f&&(g=f.axes[g].graphs[a.id],g.serialDataItem=f,g.values=this.processValues(h,a,a.periodValue),this.processFields(a,g,h))}},addValueAxis:function(a){a.chart=this;this.valueAxes.push(a);this.validateData()},removeValueAxesAndGraphs:function(){var a=this.valueAxes,b;for(b=a.length-1;-1<b;b--)this.removeValueAxis(a[b])},removeValueAxis:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--){var d=b[c];d&&d.valueAxis==a&&this.removeGraph(d)}b=this.valueAxes;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);this.validateData()},addGraph:function(a){this.graphs.push(a);this.chooseGraphColor(a,this.graphs.length-1);this.validateData()},removeGraph:function(a){var b=this.graphs,c;for(c=b.length-1;0<=c;c--)b[c]==a&&(b.splice(c,1),a.destroy());this.validateData()},handleValueAxisZoom:function(){},processValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],c=d.processObject(c,d.ValueAxis,this.theme);a[b]=c;c.chart=this;c.init();this.listenTo(c,"axisIntZoomed",this.handleValueAxisZoom);c.id||(c.id="valueAxisAuto"+b+"_"+(new Date).getTime());void 0===c.usePrefixes&&(c.usePrefixes=this.usePrefixes)}},processGuides:function(){var a=this.guides,b=this.categoryAxis;if(a)for(var c=0;c<a.length;c++){var e=a[c];(void 0!==e.category||void 0!==e.date)&&b&&b.addGuide(e);e.id||(e.id="guideAuto"+c+"_"+(new Date).getTime());var h=e.valueAxis;h?(d.isString(h)&&(h=this.getValueAxisById(h)),h?h.addGuide(e):this.valueAxes[0].addGuide(e)):isNaN(e.value)||this.valueAxes[0].addGuide(e)}},processGraphs:function(){var a=this.graphs,b;this.graphsById={};for(b=0;b<a.length;b++){var c=a[b],c=d.processObject(c,d.AmGraph,this.theme);a[b]=c;this.chooseGraphColor(c,b);c.chart=this;c.init();d.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.id||(c.id="graphAuto"+b+"_"+(new Date).getTime());this.graphsById[c.id]=c}},formatString:function(a,b,c){var e=b.graph,h=e.valueAxis;h.duration&&b.values.value&&(h=d.formatDuration(b.values.value,h.duration,"",h.durationUnits,h.maxInterval,h.numberFormatter),a=a.split("[[value]]").join(h));a=d.massReplace(a,{"[[title]]":e.title,"[[description]]":b.description});a=c?d.fixNewLines(a):d.fixBrakes(a);return a=d.cleanFromEmpty(a)},getBalloonColor:function(a,b,c){var e=a.lineColor,h=a.balloonColor;c&&(h=e);c=a.fillColorsR;"object"==typeof c?e=c[0]:void 0!==c&&(e=c);b.isNegative&&(c=a.negativeLineColor,a=a.negativeFillColors,"object"==typeof a?c=a[0]:void 0!==a&&(c=a),void 0!==c&&(e=c));void 0!==b.color&&(e=b.color);void 0!==b.lineColor&&(e=b.lineColor);b=b.fillColors;void 0!==b&&(e=b,d.ifArray(b)&&(e=b[0]));void 0===h&&(h=e);return h},getGraphById:function(a){return d.getObjById(this.graphs,a)},getValueAxisById:function(a){return d.getObjById(this.valueAxes,a)},processFields:function(a,b,c){if(a.itemColors){var e=a.itemColors,h=b.index;b.color=h<e.length?e[h]:d.randomColor()}e="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className".split(" ");for(h=0;h<e.length;h++){var f=e[h],g=a[f+"Field"];g&&(g=c[g],d.isDefined(g)&&(b[f]=g))}b.dataContext=c},chooseGraphColor:function(a,b){if(a.lineColor)a.lineColorR=a.lineColor;else{var c;c=this.colors.length>b?this.colors[b]:a.lineColorR?a.lineColorR:d.randomColor();a.lineColorR=c}a.fillColorsR=a.fillColors?a.fillColors:a.lineColorR;a.bulletBorderColorR=a.bulletBorderColor?a.bulletBorderColor:a.useLineColorForBulletBorder?a.lineColorR:a.bulletColor;a.bulletColorR=a.bulletColor?a.bulletColor:a.lineColorR;if(c=this.patterns)a.pattern=c[b]},handleLegendEvent:function(a){var b=a.type;a=a.dataItem;if(!this.legend.data&&a){var c=a.hidden,d=a.showBalloon;switch(b){case"clickMarker":this.textClickEnabled&&(d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a));break;case"clickLabel":d?this.hideGraphsBalloon(a):this.showGraphsBalloon(a);break;case"rollOverItem":c||this.highlightGraph(a);break;case"rollOutItem":c||this.unhighlightGraph();break;case"hideItem":this.hideGraph(a);break;case"showItem":this.showGraph(a)}}},highlightGraph:function(a){var b=this.graphs,c,d=.2;this.legend&&(d=this.legend.rollOverGraphAlpha);if(1!=d)for(c=0;c<b.length;c++){var h=b[c];h!=a&&h.changeOpacity(d)}},unhighlightGraph:function(){var a;this.legend&&(a=this.legend.rollOverGraphAlpha);if(1!=a){a=this.graphs;var b;for(b=0;b<a.length;b++)a[b].changeOpacity(1)}},showGraph:function(a){a.switchable&&(a.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(a){a.switchable&&(this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),a.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(a){a.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(a){a.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var a=this.graphs;if(a){var b;for(b=0;b<a.length;b++)a[b].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}})})();(function(){var d=window.AmCharts;d.TrendLine=d.Class({construct:function(a){this.cname="TrendLine";this.createEvents("click");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;d.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.destroy();var b=a.chart,c=b.container,e,h,f,g,k=a.categoryAxis,l=a.initialDate,m=a.initialCategory,n=a.finalDate,q=a.finalCategory,p=a.valueAxis,t=a.valueAxisX,r=a.initialXValue,u=a.finalXValue,x=a.initialValue,z=a.finalValue,v=p.recalculateToPercents,A=b.dataDateFormat;k&&(l&&(l=d.getDate(l,A,"fff"),a.initialDate=l,e=k.dateToCoordinate(l)),m&&(e=k.categoryToCoordinate(m)),n&&(n=d.getDate(n,A,"fff"),a.finalDate=n,h=k.dateToCoordinate(n)),q&&(h=k.categoryToCoordinate(q)));t&&!v&&(isNaN(r)||(e=t.getCoordinate(r)),isNaN(u)||(h=t.getCoordinate(u)));p&&!v&&(isNaN(x)||(f=p.getCoordinate(x)),isNaN(z)||(g=p.getCoordinate(z)));if(!(isNaN(e)||isNaN(h)||isNaN(f)||isNaN(f))){b.rotate?(k=[f,g],g=[e,h]):(k=[e,h],g=[f,g]);l=a.lineColor;f=d.line(c,k,g,l,a.lineAlpha,a.lineThickness,a.dashLength);e=k;h=g;q=k[1]-k[0];p=g[1]-g[0];0===q&&(q=.01);0===p&&(p=.01);m=q/Math.abs(q);n=p/Math.abs(p);p=90*Math.PI/180-Math.asin(q/(q*p/Math.abs(q*p)*Math.sqrt(Math.pow(q,2)+Math.pow(p,2))));q=Math.abs(5*Math.cos(p));p=Math.abs(5*Math.sin(p));e.push(k[1]-m*p,k[0]-m*p);h.push(g[1]+n*q,g[0]+n*q);g=d.polygon(c,e,h,l,.005,0);c=c.set([g,f]);c.translate(b.marginLeftReal,b.marginTopReal);b.trendLinesSet.push(c);d.setCN(b,f,"trend-line");d.setCN(b,f,"trend-line-"+a.id);a.line=f;a.set=c;if(f=a.initialImage)f=d.processObject(f,d.Image,a.theme),f.chart=b,f.draw(),f.translate(e[0]+f.offsetX,h[0]+f.offsetY),c.push(f.set);if(f=a.finalImage)f=d.processObject(f,d.Image,a.theme),f.chart=b,f.draw(),f.translate(e[1]+f.offsetX,h[1]+f.offsetY),c.push(f.set);g.mouseup(function(){a.handleLineClick()}).mouseover(function(){a.handleLineOver()}).mouseout(function(){a.handleLineOut()});g.touchend&&g.touchend(function(){a.handleLineClick()});c.clipRect(0,0,b.plotAreaWidth,b.plotAreaHeight)}},handleLineClick:function(){this.fire({type:"click",trendLine:this,chart:this.chart})},handleLineOver:function(){var a=this.rollOverColor;void 0!==a&&this.line.attr({stroke:a});this.balloonText&&(clearTimeout(this.chart.hoverInt),a=this.line.getBBox(),this.chart.showBalloon(this.balloonText,this.lineColor,!0,this.x+a.x+a.width/2,this.y+a.y+a.height/2))},handleLineOut:function(){this.line.attr({stroke:this.lineColor});this.balloonText&&this.chart.hideBalloon()},destroy:function(){d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.Image=d.Class({construct:function(a){this.cname="Image";this.height=this.width=20;this.rotation=this.offsetY=this.offsetX=0;this.balloonColor=this.color="#000000";this.opacity=1;d.applyTheme(this,a,this.cname)},draw:function(){var a=this;a.set&&a.set.remove();var b=a.chart.container;a.set=b.set();var c,d;a.url?(c=b.image(a.url,0,0,a.width,a.height),d=1):a.svgPath&&(c=b.path(a.svgPath),c.setAttr("fill",a.color),c.setAttr("stroke",a.outlineColor),b=c.getBBox(),d=Math.min(a.width/b.width,a.height/b.height));c&&(c.setAttr("opacity",a.opacity),a.set.rotate(a.rotation),c.translate(-a.width/2,-a.height/2,d),a.balloonText&&c.mouseover(function(){a.chart.showBalloon(a.balloonText,a.balloonColor,!0)}).mouseout(function(){a.chart.hideBalloon()}).touchend(function(){a.chart.hideBalloon()}).touchstart(function(){a.chart.showBalloon(a.balloonText,a.balloonColor,!0)}),a.set.push(c))},translate:function(a,b){this.set&&this.set.translate(a,b)}})})();(function(){var d=window.AmCharts;d.circle=function(a,b,c,e,h,f,g,k,l){0>=b&&(b=.001);if(void 0==h||0===h)h=.01;void 0===f&&(f="#000000");void 0===g&&(g=0);e={fill:c,stroke:f,"fill-opacity":e,"stroke-width":h,"stroke-opacity":g};a=isNaN(l)?a.circle(0,0,b).attr(e):a.ellipse(0,0,b,l).attr(e);k&&a.gradient("radialGradient",[c,d.adjustLuminosity(c,-.6)]);return a};d.text=function(a,b,c,e,h,f,g,k){f||(f="middle");"right"==f&&(f="end");"left"==f&&(f="start");isNaN(k)&&(k=1);void 0!==b&&(b=String(b),d.isIE&&!d.isModern&&(b=b.replace("&","&"),b=b.replace("&","&")));c={fill:c,"font-family":e,"font-size":h+"px",opacity:k};!0===g&&(c["font-weight"]="bold");c["text-anchor"]=f;return a.text(b,c)};d.polygon=function(a,b,c,e,h,f,g,k,l,m,n){isNaN(f)&&(f=.01);isNaN(k)&&(k=h);var q=e,p=!1;"object"==typeof q&&1<q.length&&(p=!0,q=q[0]);void 0===g&&(g=q);h={fill:q,stroke:g,"fill-opacity":h,"stroke-width":f,"stroke-opacity":k};void 0!==n&&0<n&&(h["stroke-dasharray"]=n);n=d.dx;f=d.dy;a.handDrawn&&(c=d.makeHD(b,c,a.handDrawScatter),b=c[0],c=c[1]);g=Math.round;m&&(b[t]=d.roundTo(b[t],5),c[t]=d.roundTo(c[t],5),g=Number);k="M"+(g(b[0])+n)+","+(g(c[0])+f);for(var t=1;t<b.length;t++)m&&(b[t]=d.roundTo(b[t],5),c[t]=d.roundTo(c[t],5)),k+=" L"+(g(b[t])+n)+","+(g(c[t])+f);a=a.path(k+" Z").attr(h);p&&a.gradient("linearGradient",e,l);return a};d.rect=function(a,b,c,e,h,f,g,k,l,m,n){if(isNaN(b)||isNaN(c))return a.set();isNaN(f)&&(f=0);void 0===l&&(l=0);void 0===m&&(m=270);isNaN(h)&&(h=0);var q=e,p=!1;"object"==typeof q&&(q=q[0],p=!0);void 0===g&&(g=q);void 0===k&&(k=h);b=Math.round(b);c=Math.round(c);var t=0,r=0;0>b&&(b=Math.abs(b),t=-b);0>c&&(c=Math.abs(c),r=-c);t+=d.dx;r+=d.dy;h={fill:q,stroke:g,"fill-opacity":h,"stroke-opacity":k};void 0!==n&&0<n&&(h["stroke-dasharray"]=n);a=a.rect(t,r,b,c,l,f).attr(h);p&&a.gradient("linearGradient",e,m);return a};d.bullet=function(a,b,c,e,h,f,g,k,l,m,n,q,p){var t;"circle"==b&&(b="round");switch(b){case"round":t=d.circle(a,c/2,e,h,f,g,k);break;case"square":t=d.polygon(a,[-c/
|
36 |
-
2,c/2,c/2,-c/2],[c/2,c/2,-c/2,-c/2],e,h,f,g,k,m-180,void 0,p);break;case"rectangle":t=d.polygon(a,[-c,c,c,-c],[c/2,c/2,-c/2,-c/2],e,h,f,g,k,m-180,void 0,p);break;case"diamond":t=d.polygon(a,[-c/2,0,c/2,0],[0,-c/2,0,c/2],e,h,f,g,k);break;case"triangleUp":t=d.triangle(a,c,0,e,h,f,g,k);break;case"triangleDown":t=d.triangle(a,c,180,e,h,f,g,k);break;case"triangleLeft":t=d.triangle(a,c,270,e,h,f,g,k);break;case"triangleRight":t=d.triangle(a,c,90,e,h,f,g,k);break;case"bubble":t=d.circle(a,c/2,e,h,f,g,k,!0);break;case"line":t=d.line(a,[-c/2,c/2],[0,0],e,h,f,g,k);break;case"yError":t=a.set();t.push(d.line(a,[0,0],[-c/2,c/2],e,h,f));t.push(d.line(a,[-l,l],[-c/2,-c/2],e,h,f));t.push(d.line(a,[-l,l],[c/2,c/2],e,h,f));break;case"xError":t=a.set(),t.push(d.line(a,[-c/2,c/2],[0,0],e,h,f)),t.push(d.line(a,[-c/2,-c/2],[-l,l],e,h,f)),t.push(d.line(a,[c/2,c/2],[-l,l],e,h,f))}t&&t.pattern(n,NaN,q);return t};d.triangle=function(a,b,c,d,h,f,g,k){if(void 0===f||0===f)f=1;void 0===g&&(g="#000");void 0===k&&(k=0);d={fill:d,stroke:g,"fill-opacity":h,"stroke-width":f,"stroke-opacity":k};b/=2;var l;0===c&&(l=" M"+-b+","+b+" L0,"+-b+" L"+b+","+b+" Z");180==c&&(l=" M"+-b+","+-b+" L0,"+b+" L"+b+","+-b+" Z");90==c&&(l=" M"+-b+","+-b+" L"+b+",0 L"+-b+","+b+" Z");270==c&&(l=" M"+-b+",0 L"+b+","+b+" L"+b+","+-b+" Z");return a.path(l).attr(d)};d.line=function(a,b,c,e,h,f,g,k,l,m,n){if(a.handDrawn&&!n)return d.handDrawnLine(a,b,c,e,h,f,g,k,l,m,n);f={fill:"none","stroke-width":f};void 0!==g&&0<g&&(f["stroke-dasharray"]=g);isNaN(h)||(f["stroke-opacity"]=h);e&&(f.stroke=e);e=Math.round;m&&(e=Number,b[0]=d.roundTo(b[0],5),c[0]=d.roundTo(c[0],5));m=d.dx;h=d.dy;g="M"+(e(b[0])+m)+","+(e(c[0])+h);for(k=1;k<b.length;k++)b[k]=d.roundTo(b[k],5),c[k]=d.roundTo(c[k],5),g+=" L"+(e(b[k])+m)+","+(e(c[k])+h);if(d.VML)return a.path(g,void 0,!0).attr(f);l&&(g+=" M0,0 L0,0");return a.path(g).attr(f)};d.makeHD=function(a,b,c){for(var d=[],h=[],f=1;f<a.length;f++)for(var g=Number(a[f-1]),k=Number(b[f-1]),l=Number(a[f]),m=Number(b[f]),n=Math.round(Math.sqrt(Math.pow(l-g,2)+Math.pow(m-k,2))/50)+1,l=(l-g)/n,m=(m-k)/n,q=0;q<=n;q++){var p=k+q*m+Math.random()*c;d.push(g+q*l+Math.random()*c);h.push(p)}return[d,h]};d.handDrawnLine=function(a,b,c,e,h,f,g,k,l,m){var n,q=a.set();for(n=1;n<b.length;n++)for(var p=[b[n-1],b[n]],t=[c[n-1],c[n]],t=d.makeHD(p,t,a.handDrawScatter),p=t[0],t=t[1],r=1;r<p.length;r++)q.push(d.line(a,[p[r-1],p[r]],[t[r-1],t[r]],e,h,f+Math.random()*a.handDrawThickness-a.handDrawThickness/2,g,k,l,m,!0));return q};d.doNothing=
|
37 |
-
function(a){return a};d.drop=function(a,b,c,d,h,f,g,k){var l=1/180*Math.PI,m=c-20,n=Math.sin(m*l)*b,q=Math.cos(m*l)*b,p=Math.sin((m+40)*l)*b,t=Math.cos((m+40)*l)*b,r=.8*b,u=-b/3,x=b/3;0===c&&(u=-u,x=0);180==c&&(x=0);90==c&&(u=0);270==c&&(u=0,x=-x);c={fill:d,stroke:g,"stroke-width":f,"stroke-opacity":k,"fill-opacity":h};b="M"+n+","+q+" A"+b+","+b+",0,1,1,"+p+","+t+(" A"+r+","+r+",0,0,0,"+(Math.sin((m+20)*l)*b+x)+","+(Math.cos((m+20)*l)*b+u));b+=" A"+r+","+r+",0,0,0,"+n+","+q;return a.path(b,void 0,void 0,"1000,1000").attr(c)};d.wedge=function(a,b,c,e,h,f,g,k,l,m,n,q,p,t){var r=Math.round;f=r(f);g=r(g);k=r(k);var u=r(g/f*k),x=d.VML,z=359.5+f/100;359.94<z&&(z=359.94);h>=z&&(h=z);var v=1/180*Math.PI,z=b+Math.sin(e*v)*k,A=c-Math.cos(e*v)*u,y=b+Math.sin(e*v)*f,B=c-Math.cos(e*v)*g,D=b+Math.sin((e+h)*v)*f,C=c-Math.cos((e+h)*v)*g,J=b+Math.sin((e+h)*v)*k,v=c-Math.cos((e+h)*v)*u,H={fill:d.adjustLuminosity(m.fill,-.2),"stroke-opacity":0,"fill-opacity":m["fill-opacity"]},S=0;180<Math.abs(h)&&(S=1);e=a.set();var O;x&&(z=r(10*z),y=r(10*y),D=r(10*D),J=r(10*J),A=r(10*A),B=r(10*B),C=r(10*C),v=r(10*v),b=r(10*b),l=r(10*l),c=r(10*c),f*=10,g*=10,k*=10,u*=10,1>Math.abs(h)&&1>=Math.abs(D-y)&&1>=Math.abs(C-B)&&(O=!0));h="";var Q;q&&(H["fill-opacity"]=0,H["stroke-opacity"]=m["stroke-opacity"]/2,H.stroke=m.stroke);if(0<l){Q=" M"+z+","+(A+l)+" L"+y+","+(B+l);x?(O||(Q+=" A"+(b-f)+","+(l+c-g)+","+(b+f)+","+(l+c+g)+","+y+","+(B+l)+","+D+","+(C+l)),Q+=" L"+J+","+(v+l),0<k&&(O||(Q+=" B"+(b-k)+","+(l+c-u)+","+(b+k)+","+
|
38 |
-
(l+c+u)+","+J+","+(l+v)+","+z+","+(l+A)))):(Q+=" A"+f+","+g+",0,"+S+",1,"+D+","+(C+l)+" L"+J+","+(v+l),0<k&&(Q+=" A"+k+","+u+",0,"+S+",0,"+z+","+(A+l)));Q+=" Z";var ia=l;x&&(ia/=10);for(var I=0;I<ia;I+=10){var Z=a.path(Q,void 0,void 0,"1000,1000").attr(H);e.push(Z);Z.translate(0,-I)}Q=a.path(" M"+z+","+A+" L"+z+","+(A+l)+" L"+y+","+(B+l)+" L"+y+","+B+" L"+z+","+A+" Z",void 0,void 0,"1000,1000").attr(H);l=a.path(" M"+D+","+C+" L"+D+","+(C+l)+" L"+J+","+(v+l)+" L"+J+","+v+" L"+D+","+C+" Z",void 0,void 0,"1000,1000").attr(H);e.push(Q);e.push(l)}x?(O||(h=" A"+r(b-f)+","+r(c-g)+","+r(b+f)+","+r(c+g)+","+r(y)+","+r(B)+","+r(D)+","+r(C)),g=" M"+r(z)+","+r(A)+" L"+r(y)+","+r(B)+h+" L"+r(J)+","+r(v)):g=" M"+z+","+A+" L"+y+","+B+(" A"+f+","+g+",0,"+S+",1,"+D+","+C)+" L"+J+","+v;0<k&&(x?O||(g+=" B"+(b-k)+","+(c-u)+","+(b+k)+","+(c+u)+","+J+","+v+","+z+","+A):g+=" A"+k+","+u+",0,"+S+",0,"+z+","+A);a.handDrawn&&(k=d.line(a,[z,y],[A,B],m.stroke,m.thickness*Math.random()*a.handDrawThickness,m["stroke-opacity"]),e.push(k));a=a.path(g+" Z",void 0,void 0,"1000,1000").attr(m);if(n){k=[];for(u=0;u<n.length;u++)k.push(d.adjustLuminosity(m.fill,n[u]));"radial"!=t||d.isModern||(k=[]);0<k.length&&a.gradient(t+"Gradient",k)}d.isModern&&"radial"==t&&a.grad&&(a.grad.setAttribute("gradientUnits","userSpaceOnUse"),a.grad.setAttribute("r",f),a.grad.setAttribute("cx",b),a.grad.setAttribute("cy",c));a.pattern(q,NaN,p);e.wedge=a;e.push(a);return e};d.rgb2hex=function(a){return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],10).toString(16)).slice(-2):""};d.adjustLuminosity=function(a,b){a&&-1!=a.indexOf("rgb")&&(a=d.rgb2hex(a));a=String(a).replace(/[^0-9a-f]/gi,"");6>a.length&&(a=String(a[0])+String(a[0])+String(a[1])+String(a[1])+String(a[2])+String(a[2]));b=b||0;var c="#",e,h;for(h=0;3>h;h++)e=parseInt(a.substr(2*h,2),16),e=Math.round(Math.min(Math.max(0,e+e*b),255)).toString(16),c+=("00"+
|
39 |
-
e).substr(e.length);return c}})();(function(){var d=window.AmCharts;d.Bezier=d.Class({construct:function(a,b,c,e,h,f,g,k,l,m,n){var q,p;"object"==typeof g&&1<g.length&&(p=!0,q=g,g=g[0]);"object"==typeof k&&(k=k[0]);0===k&&(g="none");f={fill:g,"fill-opacity":k,"stroke-width":f};void 0!==l&&0<l&&(f["stroke-dasharray"]=l);isNaN(h)||(f["stroke-opacity"]=h);e&&(f.stroke=e);e="M"+Math.round(b[0])+","+Math.round(c[0]);h=[];for(l=0;l<b.length;l++)h.push({x:Number(b[l]),y:Number(c[l])});1<h.length&&(b=this.interpolate(h),e+=this.drawBeziers(b));m?e+=m:d.VML||(e+="M0,0 L0,0");this.path=a.path(e).attr(f);this.node=this.path.node;p&&this.path.gradient("linearGradient",q,n)},interpolate:function(a){var b=[];b.push({x:a[0].x,y:a[0].y});var c=a[1].x-a[0].x,e=a[1].y-a[0].y,h=d.bezierX,f=d.bezierY;b.push({x:a[0].x+c/h,y:a[0].y+e/f});var g;for(g=1;g<a.length-1;g++){var k=a[g-1],l=a[g],e=a[g+1];isNaN(e.x)&&(e=l);isNaN(l.x)&&(l=k);isNaN(k.x)&&(k=l);c=e.x-l.x;e=e.y-k.y;k=l.x-k.x;k>c&&(k=c);b.push({x:l.x-k/h,y:l.y-e/f});b.push({x:l.x,y:l.y});b.push({x:l.x+
|
40 |
-
k/h,y:l.y+e/f})}e=a[a.length-1].y-a[a.length-2].y;c=a[a.length-1].x-a[a.length-2].x;b.push({x:a[a.length-1].x-c/h,y:a[a.length-1].y-e/f});b.push({x:a[a.length-1].x,y:a[a.length-1].y});return b},drawBeziers:function(a){var b="",c;for(c=0;c<(a.length-1)/3;c++)b+=this.drawBezierMidpoint(a[3*c],a[3*c+1],a[3*c+2],a[3*c+3]);return b},drawBezierMidpoint:function(a,b,c,d){var h=Math.round,f=this.getPointOnSegment(a,b,.75),g=this.getPointOnSegment(d,c,.75),k=(d.x-a.x)/16,l=(d.y-a.y)/16,m=this.getPointOnSegment(a,
|
41 |
-
b,.375);a=this.getPointOnSegment(f,g,.375);a.x-=k;a.y-=l;b=this.getPointOnSegment(g,f,.375);b.x+=k;b.y+=l;c=this.getPointOnSegment(d,c,.375);k=this.getMiddle(m,a);f=this.getMiddle(f,g);g=this.getMiddle(b,c);m=" Q"+h(m.x)+","+h(m.y)+","+h(k.x)+","+h(k.y);m+=" Q"+h(a.x)+","+h(a.y)+","+h(f.x)+","+h(f.y);m+=" Q"+h(b.x)+","+h(b.y)+","+h(g.x)+","+h(g.y);return m+=" Q"+h(c.x)+","+h(c.y)+","+h(d.x)+","+h(d.y)},getMiddle:function(a,b){return{x:(a.x+b.x)/2,y:(a.y+b.y)/2}},getPointOnSegment:function(a,b,c){return{x:a.x+
|
42 |
-
(b.x-a.x)*c,y:a.y+(b.y-a.y)*c}}})})();(function(){var d=window.AmCharts;d.AmDraw=d.Class({construct:function(a,b,c,e){d.SVG_NS="http://www.w3.org/2000/svg";d.SVG_XLINK="http://www.w3.org/1999/xlink";d.hasSVG=!!document.createElementNS&&!!document.createElementNS(d.SVG_NS,"svg").createSVGRect;1>b&&(b=10);1>c&&(c=10);this.div=a;this.width=b;this.height=c;this.rBin=document.createElement("div");d.hasSVG?(d.SVG=!0,b=this.createSvgElement("svg"),a.appendChild(b),this.container=b,this.addDefs(e),this.R=new d.SVGRenderer(this)):d.isIE&&d.VMLRenderer&&(d.VML=!0,d.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(b=document.createStyleSheet(),b.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),d.vmlStyleSheet=b):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=a,this.R=new d.VMLRenderer(this,e),this.R.disableSelection(a))},createSvgElement:function(a){return document.createElementNS(d.SVG_NS,a)},circle:function(a,b,c,e){var h=new d.AmDObject("circle",this);h.attr({r:c,cx:a,cy:b});this.addToContainer(h.node,e);return h},ellipse:function(a,b,c,e,h){var f=new d.AmDObject("ellipse",this);f.attr({rx:c,ry:e,cx:a,cy:b});this.addToContainer(f.node,h);return f},setSize:function(a,b){0<a&&0<b&&(this.container.style.width=a+"px",this.container.style.height=b+"px")},rect:function(a,b,c,e,h,f,g){var k=new d.AmDObject("rect",this);d.VML&&(h=Math.round(100*h/Math.min(c,e)),c+=2*f,e+=2*f,k.bw=f,k.node.style.marginLeft=-f,k.node.style.marginTop=-f);1>c&&(c=1);1>e&&(e=1);k.attr({x:a,y:b,width:c,height:e,rx:h,ry:h,"stroke-width":f});this.addToContainer(k.node,g);return k},image:function(a,b,c,e,h,f){var g=new d.AmDObject("image",this);g.attr({x:b,y:c,width:e,height:h});this.R.path(g,a);this.addToContainer(g.node,f);return g},addToContainer:function(a,b){b||(b=this.container);b.appendChild(a)},text:function(a,b,c){return this.R.text(a,b,c)},path:function(a,b,c,e){var h=new d.AmDObject("path",this);e||(e="100,100");h.attr({cs:e});c?h.attr({dd:a}):h.attr({d:a});this.addToContainer(h.node,b);return h},set:function(a){return this.R.set(a)},remove:function(a){if(a){var b=this.rBin;b.appendChild(a);b.innerHTML=""}},renderFix:function(){var a=this.container,b=a.style;b.top="0px";b.left="0px";try{var c=a.getBoundingClientRect(),d=c.left-Math.round(c.left),h=c.top-Math.round(c.top);d&&(b.left=d+"px");h&&(b.top=h+"px")}catch(f){}},update:function(){this.R.update()},addDefs:function(a){if(d.hasSVG){var b=this.createSvgElement("desc"),c=this.container;c.setAttribute("version","1.1");c.style.position="absolute";this.setSize(this.width,this.height);if(a.accessibleTitle){var e=this.createSvgElement("title");e.appendChild(document.createTextNode(a.accessibleTitle));c.appendChild(e)}d.rtl&&(c.setAttribute("direction","rtl"),c.style.left="auto",c.style.right="0px");a&&(a.addCodeCredits&&b.appendChild(document.createTextNode("JavaScript chart by amCharts "+a.version)),c.appendChild(b),a.defs&&(b=this.createSvgElement("defs"),c.appendChild(b),d.parseDefs(a.defs,b),this.defs=b))}}})})();(function(){var d=window.AmCharts;d.AmDObject=d.Class({construct:function(a,b){this.D=b;this.R=b.R;this.node=this.R.create(this,a);this.y=this.x=0;this.scale=1},attr:function(a){this.R.attr(this,a);return this},getAttr:function(a){return this.node.getAttribute(a)},setAttr:function(a,b){this.R.setAttr(this,a,b);return this},clipRect:function(a,b,c,d){this.R.clipRect(this,a,b,c,d)},translate:function(a,b,c,d){d||(a=Math.round(a),b=Math.round(b));this.R.move(this,a,b,c);this.x=a;this.y=b;this.scale=c;this.angle&&this.rotate(this.angle)},rotate:function(a,b){this.R.rotate(this,a,b);this.angle=a},animate:function(a,b,c){for(var e in a)if(a.hasOwnProperty(e)){var h=e,f=a[e];c=d.getEffect(c);this.R.animate(this,h,f,b,c)}},push:function(a){if(a){var b=this.node;b.appendChild(a.node);var c=a.clipPath;c&&b.appendChild(c);(a=a.grad)&&b.appendChild(a)}},text:function(a){this.R.setText(this,a)},remove:function(){this.stop();this.R.remove(this)},clear:function(){var a=this.node;if(a.hasChildNodes())for(;1<=a.childNodes.length;)a.removeChild(a.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;b&&b.appendChild(a)}},toPrevious:function(){var a=this.node;a&&this.prevNextNode&&(a=a.parentNode)&&a.insertBefore(this.prevNextNode,null)},toBack:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;if(b){var c=b.firstChild;c&&b.insertBefore(a,c)}}},mouseover:function(a){this.R.addListener(this,"mouseover",a);return this},mouseout:function(a){this.R.addListener(this,"mouseout",a);return this},click:function(a){this.R.addListener(this,"click",a);return this},dblclick:function(a){this.R.addListener(this,"dblclick",a);return this},mousedown:function(a){this.R.addListener(this,"mousedown",a);return this},mouseup:function(a){this.R.addListener(this,"mouseup",a);return this},touchmove:function(a){this.R.addListener(this,"touchmove",a);return this},touchstart:function(a){this.R.addListener(this,"touchstart",a);return this},touchend:function(a){this.R.addListener(this,"touchend",a);return this},contextmenu:function(a){this.node.addEventListener?this.node.addEventListener("contextmenu",a,!0):this.R.addListener(this,"contextmenu",a);return this},stop:function(){d.removeFromArray(this.R.animations,this.an_translate);d.removeFromArray(this.R.animations,this.an_y);d.removeFromArray(this.R.animations,this.an_x)},length:function(){return this.node.childNodes.length},gradient:function(a,b,c){this.R.gradient(this,a,b,c)},pattern:function(a,b,c){a&&this.R.pattern(this,a,b,c)}})})();(function(){var d=window.AmCharts;d.VMLRenderer=d.Class({construct:function(a,b){this.chart=b;this.D=a;this.cNames={circle:"oval",ellipse:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(a,b){var c;if("group"==b)c=document.createElement("div"),a.type="div";else if("text"==b)c=document.createElement("div"),a.type="text";else if("image"==b)c=document.createElement("img"),a.type="image";else{a.type="shape";a.shapeType=this.cNames[b];c=document.createElement("amvml:"+this.cNames[b]);var d=document.createElement("amvml:stroke");c.appendChild(d);a.stroke=d;var h=document.createElement("amvml:fill");c.appendChild(h);a.fill=h;h.className="amvml";d.className="amvml";c.className="amvml"}c.style.position="absolute";c.style.top=0;c.style.left=0;return c},path:function(a,b){a.node.setAttribute("src",b)},setAttr:function(a,b,c){if(void 0!==c){var e;8===document.documentMode&&(e=!0);var h=a.node,f=a.type,g=h.style;"r"==b&&(g.width=2*c,g.height=2*c);"oval"==a.shapeType&&("rx"==b&&(g.width=2*c),"ry"==b&&(g.height=2*c));"roundrect"==a.shapeType&&("width"!=b&&"height"!=b||--c);"cursor"==b&&(g.cursor=c);"cx"==b&&(g.left=c-d.removePx(g.width)/2);"cy"==b&&(g.top=c-d.removePx(g.height)/2);var k=this.styleMap[b];"width"==k&&0>c&&(c=0);void 0!==k&&(g[k]=c);"text"==f&&("text-anchor"==b&&(a.anchor=c,k=h.clientWidth,"end"==c&&(g.marginLeft=-k+"px"),"middle"==c&&(g.marginLeft=-(k/2)+
|
43 |
-
"px",g.textAlign="center"),"start"==c&&(g.marginLeft="0px")),"fill"==b&&(g.color=c),"font-weight"==b&&(g.fontWeight=c));if(g=a.children)for(k=0;k<g.length;k++)g[k].setAttr(b,c);if("shape"==f){"cs"==b&&(h.style.width="100px",h.style.height="100px",h.setAttribute("coordsize",c));"d"==b&&h.setAttribute("path",this.svgPathToVml(c));"dd"==b&&h.setAttribute("path",c);f=a.stroke;a=a.fill;"stroke"==b&&(e?f.color=c:f.setAttribute("color",c));"stroke-width"==b&&(e?f.weight=c:f.setAttribute("weight",c));"stroke-opacity"==b&&(e?f.opacity=c:f.setAttribute("opacity",c));"stroke-dasharray"==b&&(g="solid",0<c&&3>c&&(g="dot"),3<=c&&6>=c&&(g="dash"),6<c&&(g="longdash"),e?f.dashstyle=g:f.setAttribute("dashstyle",g));if("fill-opacity"==b||"opacity"==b)0===c?e?a.on=!1:a.setAttribute("on",!1):e?a.opacity=c:a.setAttribute("opacity",c);"fill"==b&&(e?a.color=c:a.setAttribute("color",c));"rx"==b&&(e?h.arcSize=c+"%":h.setAttribute("arcsize",c+"%"))}}},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},text:function(a,b,c){var e=new d.AmDObject("text",this.D),h=e.node;h.style.whiteSpace="pre";h.innerHTML=a;this.D.addToContainer(h,c);this.attr(e,b);return e},getBBox:function(a){return this.getBox(a.node)},getBox:function(a){var b=a.offsetLeft,c=a.offsetTop,d=a.offsetWidth,h=a.offsetHeight,f;if(a.hasChildNodes()){var g,k,l;for(l=0;l<a.childNodes.length;l++){f=this.getBox(a.childNodes[l]);var m=f.x;isNaN(m)||(isNaN(g)?g=m:m<g&&(g=m));var n=f.y;isNaN(n)||(isNaN(k)?k=n:n<k&&(k=n));m=f.width+m;isNaN(m)||(d=Math.max(d,m));f=f.height+n;isNaN(f)||(h=Math.max(h,f))}0>g&&(b+=g);0>k&&(c+=k)}return{x:b,y:c,width:d,height:h}},setText:function(a,b){var c=a.node;c&&(c.innerHTML=b);this.setAttr(a,"text-anchor",a.anchor)},addListener:function(a,b,c){a.node["on"+b]=c},move:function(a,b,c){var e=a.node,h=e.style;"text"==a.type&&(c-=d.removePx(h.fontSize)/2-1);"oval"==a.shapeType&&(b-=d.removePx(h.width)/2,c-=d.removePx(h.height)/2);a=a.bw;isNaN(a)||(b-=a,c-=a);isNaN(b)||isNaN(c)||(e.style.left=b+"px",e.style.top=
|
44 |
-
c+"px")},svgPathToVml:function(a){var b=a.split(" ");a="";var c,d=Math.round,h;for(h=0;h<b.length;h++){var f=b[h],g=f.substring(0,1),f=f.substring(1),k=f.split(","),l=d(k[0])+","+d(k[1]);"M"==g&&(a+=" m "+l);"L"==g&&(a+=" l "+l);"Z"==g&&(a+=" x e");if("Q"==g){var m=c.length,n=c[m-1],q=k[0],p=k[1],l=k[2],t=k[3];c=d(c[m-2]/3+2/3*q);n=d(n/3+2/3*p);q=d(2/3*q+l/3);p=d(2/3*p+t/3);a+=" c "+c+","+n+","+q+","+p+","+l+","+t}"A"==g&&(a+=" wa "+f);"B"==g&&(a+=" at "+f);c=k}return a},animate:function(a,b,c,d,h){var f=a.node,g=this.chart;a.animationFinished=!1;if("translate"==b){b=c.split(",");c=b[1];var k=f.offsetTop;g.animate(a,"left",f.offsetLeft,b[0],d,h,"px");g.animate(a,"top",k,c,d,h,"px")}},clipRect:function(a,b,c,d,h){a=a.node;0===b&&0===c?(a.style.width=d+"px",a.style.height=h+"px",a.style.overflow="hidden"):a.style.clip="rect("+c+"px "+(b+d)+"px "+(c+h)+"px "+b+"px)"},rotate:function(a,b,c){if(0!==Number(b)){var e=a.node;a=e.style;c||(c=this.getBGColor(e.parentNode));a.backgroundColor=c;a.paddingLeft=1;c=b*Math.PI/180;var h=Math.cos(c),f=Math.sin(c),g=d.removePx(a.left),k=d.removePx(a.top),l=e.offsetWidth,e=e.offsetHeight;b/=Math.abs(b);a.left=g+l/2-l/2*Math.cos(c)-b*e/2*Math.sin(c)+3;a.top=k-b*l/2*Math.sin(c)+b*e/2*Math.sin(c);a.cssText=a.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+h+"', M12='"+-f+"', M21='"+f+"', M22='"+h+"', sizingmethod='auto expand');"}},getBGColor:function(a){var b="#FFFFFF";if(a.style){var c=a.style.backgroundColor;""!==c?b=c:a.parentNode&&(b=this.getBGColor(a.parentNode))}return b},set:function(a){var b=new d.AmDObject("group",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},gradient:function(a,b,c,d){var h="";"radialGradient"==b&&(b="gradientradial",c.reverse());"linearGradient"==b&&(b="gradient");var f;for(f=0;f<c.length;f++)h+=Math.round(100*f/(c.length-1))+"% "+c[f],f<c.length-1&&(h+=",");a=a.fill;90==d?d=0:270==d?d=180:180==d?d=90:0===d&&(d=270);8===document.documentMode?(a.type=b,a.angle=d):(a.setAttribute("type",b),a.setAttribute("angle",d));h&&(a.colors.value=h)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);this.D.remove(a.node)},disableSelection:function(a){a.onselectstart=function(){return!1};a.style.cursor="default"},pattern:function(a,b,c,e){c=a.node;a=a.fill;var h="none";b.color&&(h=b.color);c.fillColor=h;b=b.url;d.isAbsolute(b)||(b=e+b);8===document.documentMode?(a.type="tile",a.src=b):(a.setAttribute("type","tile"),a.setAttribute("src",b))},update:function(){}})})();(function(){var d=window.AmCharts;d.SVGRenderer=d.Class({construct:function(a){this.D=a;this.animations=[]},create:function(a,b){return document.createElementNS(d.SVG_NS,b)},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},setAttr:function(a,b,c){void 0!==c&&a.node.setAttribute(b,c)},animate:function(a,b,c,e,h){a.animationFinished=!1;var f=a.node;a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);"translate"==b?(f=(f=f.getAttribute("transform"))?String(f).substring(10,f.length-1):"0,0",f=f.split(", ").join(" "),f=f.split(" ").join(","),0===f&&(f="0,0")):f=Number(f.getAttribute(b));c={obj:a,frame:0,attribute:b,from:f,to:c,time:e,effect:h};this.animations.push(c);a["an_"+b]=c},update:function(){var a,b=this.animations;for(a=b.length-1;0<=a;a--){var c=b[a],e=c.time*d.updateRate,h=c.frame+1,f=c.obj,g=c.attribute,k,l,m;h<=e?(c.frame++,"translate"==g?(k=c.from.split(","),g=Number(k[0]),k=Number(k[1]),isNaN(k)&&(k=0),l=c.to.split(","),m=Number(l[0]),l=Number(l[1]),m=0===m-g?m:Math.round(d[c.effect](0,h,g,m-g,e)),c=0===l-k?l:Math.round(d[c.effect](0,h,k,l-k,e)),g="transform",c="translate("+m+","+c+")"):(l=Number(c.from),k=Number(c.to),m=k-l,c=d[c.effect](0,h,l,m,e),isNaN(c)&&(c=k),0===m&&this.animations.splice(a,1)),this.setAttr(f,g,c)):("translate"==g?(l=c.to.split(","),m=Number(l[0]),l=Number(l[1]),f.translate(m,l)):(k=Number(c.to),this.setAttr(f,g,k)),f.animationFinished=!0,this.animations.splice(a,1))}},getBBox:function(a){if(a=a.node)try{return a.getBBox()}catch(b){}return{width:0,height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(d.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,e,h){var f=a.node,g=a.clipPath;g&&this.D.remove(g);var k=f.parentNode;k&&(f=document.createElementNS(d.SVG_NS,"clipPath"),g=d.getUniqueId(),f.setAttribute("id",g),this.D.rect(b,c,e,h,0,0,f),k.appendChild(f),b="#",d.baseHref&&!d.isIE&&(b=this.removeTarget(window.location.href)+b),this.setAttr(a,"clip-path","url("+b+g+")"),this.clipPathC++,a.clipPath=f)},text:function(a,b,c){var e=new d.AmDObject("text",this.D);a=String(a).split("\n");var h=d.removePx(b["font-size"]),f;for(f=0;f<a.length;f++){var g=this.create(null,"tspan");g.appendChild(document.createTextNode(a[f]));g.setAttribute("y",(h+2)*f+Math.round(h/2));g.setAttribute("x",0);e.node.appendChild(g)}e.node.setAttribute("y",Math.round(h/2));this.attr(e,b);this.D.addToContainer(e.node,c);return e},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},move:function(a,b,c,d){isNaN(b)&&(b=0);isNaN(c)&&(c=0);b="translate("+b+","+c+")";d&&(b=b+" scale("+d+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),d="rotate("+b+")";c&&(d=c+" "+d);this.setAttr(a,"transform",d)},set:function(a){var b=new d.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,e){var h=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(d.SVG_NS,b);f=d.getUniqueId();b.setAttribute("id",f);if(!isNaN(e)){var g=0,k=0,l=0,m=0;90==e?l=100:270==e?m=100:180==e?g=100:0===e&&(k=100);b.setAttribute("x1",g+"%");b.setAttribute("x2",k+"%");b.setAttribute("y1",l+"%");b.setAttribute("y2",m+"%")}for(e=0;e<c.length;e++)g=document.createElementNS(d.SVG_NS,"stop"),k=100*e/(c.length-1),0===e&&(k=0),g.setAttribute("offset",k+"%"),g.setAttribute("stop-color",c[e]),b.appendChild(g);h.parentNode.appendChild(b);c="#";d.baseHref&&!d.isIE&&(c=this.removeTarget(window.location.href)+
|
45 |
-
c);h.setAttribute("fill","url("+c+f+")");a.grad=b},removeTarget:function(a){return a.split("#")[0]},pattern:function(a,b,c,e){var h=a.node;isNaN(c)&&(c=1);var f=a.patternNode;f&&this.D.remove(f);var f=document.createElementNS(d.SVG_NS,"pattern"),g=d.getUniqueId(),k=b;b.url&&(k=b.url);d.isAbsolute(k)||-1!=k.indexOf("data:image")||(k=e+k);e=Number(b.width);isNaN(e)&&(e=4);var l=Number(b.height);isNaN(l)&&(l=4);e/=c;l/=c;c=b.x;isNaN(c)&&(c=0);var m=-Math.random()*Number(b.randomX);isNaN(m)||(c=m);m=b.y;isNaN(m)&&(m=0);var n=-Math.random()*Number(b.randomY);isNaN(n)||(m=n);f.setAttribute("id",g);f.setAttribute("width",e);f.setAttribute("height",l);f.setAttribute("patternUnits","userSpaceOnUse");f.setAttribute("xlink:href",k);b.color&&(n=document.createElementNS(d.SVG_NS,"rect"),n.setAttributeNS(null,"height",e),n.setAttributeNS(null,"width",l),n.setAttributeNS(null,"fill",b.color),f.appendChild(n));this.D.image(k,0,0,e,l,f).translate(c,m);k="#";d.baseHref&&!d.isIE&&(k=this.removeTarget(window.location.href)+
|
46 |
-
k);h.setAttribute("fill","url("+k+g+")");a.patternNode=f;h.parentNode.appendChild(f)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}})})();(function(){var d=window.AmCharts;d.AmLegend=d.Class({construct:function(a){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;d.applyTheme(this,a,this.cname)},setData:function(a){this.legendData=a;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var a=this.legendData;this.enabled&&(d.ifArray(a)||d.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var a=this.chart,b=this.position,c=this.width,e=a.divRealWidth,h=a.divRealHeight,f=this.div,g=this.legendData;this.data&&(g=this.data);isNaN(this.fontSize)&&(this.fontSize=a.fontSize);this.maxColumnsReal=this.maxColumns;if("right"==b||"left"==b)this.maxColumnsReal=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=a.marginRight;this.marginLeft=a.marginLeft;var k=a.autoMarginOffset;"bottom"==b?(this.marginBottom=k,this.marginTop=0):(this.marginTop=k,this.marginBottom=0)}c=void 0!==c?d.toCoordinate(c,e):"right"!=b&&"left"!=b?a.realWidth:0<this.ieW?this.ieW:a.realWidth;"outside"==b?(c=f.offsetWidth,h=f.offsetHeight,f.clientHeight&&(c=f.clientWidth,h=f.clientHeight)):(isNaN(c)||(f.style.width=c+"px"),f.className="amChartsLegend "+a.classNamePrefix+"-legend-div");this.divWidth=c;(b=this.container)?(b.container.innerHTML="",f.appendChild(b.container),b.width=c,b.height=h,b.setSize(c,h),b.addDefs(a)):b=new d.AmDraw(f,c,h,a);this.container=b;this.lx=0;this.ly=8;h=this.markerSize;h>this.fontSize&&(this.ly=h/2-1);0<h&&(this.lx+=h+this.markerLabelGap);this.titleWidth=0;if(h=this.title)h=d.text(this.container,h,this.color,a.fontFamily,this.fontSize,"start",!0),d.setCN(a,h,"legend-title"),h.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),a=h.getBBox(),this.titleWidth=a.width+15,this.titleHeight=a.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(a=0;a<g.length;a++)this.createEntry(g[a]);for(a=this.index=0;a<g.length;a++)this.createValue(g[a])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var a=this.position,b=this.marginLeft+this.titleWidth,c=this.marginRight,e=this.marginTop,h=this.marginBottom,f=this.horizontalGap,g=this.div,k=this.divWidth,l=this.maxColumnsReal,m=this.verticalGap,n=this.spacing,q=k-c-b,p=0,t=0,r=this.container;this.set&&this.set.remove();var u=r.set();this.set=u;var x=r.set();u.push(x);var z=this.entries,v,A;for(A=0;A<z.length;A++){v=z[A].getBBox();var y=v.width;y>p&&(p=y);v=v.height;v>t&&(t=v)}var y=t=0,B=f,D=0,C=0;for(A=0;A<z.length;A++){var J=z[A];this.reversedOrder&&(J=z[z.length-A-1]);v=J.getBBox();var H;this.equalWidths?H=y*(p+n+this.markerLabelGap):(H=B,B=B+v.width+f+n);v.height>C&&(C=v.height);H+v.width>q&&0<A&&0!==y&&(t++,H=y=0,B=H+v.width+f+n,D=D+C+m,C=0);J.translate(H,D);y++;!isNaN(l)&&y>=l&&(y=0,t++,D=D+C+m,B=f,C=0);x.push(J)}v=x.getBBox();l=v.height+2*m-1;"left"==a||"right"==a?(n=v.width+2*f,k=n+b+c,g.style.width=k+"px",this.ieW=k):n=k-b-c-1;c=d.polygon(this.container,[0,n,n,0],[0,0,l,l],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);d.setCN(this.chart,c,"legend-bg");u.push(c);u.translate(b,e);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(n-v.width)/2:"right"==this.align&&(b=f+n-v.width);x.translate(b,m+1);this.titleHeight>l&&(l=this.titleHeight);a=l+e+h+1;0>a&&(a=0);a>this.chart.divRealHeight&&(g.style.top="0px");g.style.height=Math.round(a)+"px";r.setSize(this.divWidth,a)},createEntry:function(a){if(!1!==a.visibleInLegend&&!a.hideFromLegend){var b=this.chart,c=a.markerType;a.legendEntryWidth=this.markerSize;c||(c=this.markerType);var e=a.color,h=
|
47 |
-
a.alpha;a.legendKeyColor&&(e=a.legendKeyColor());a.legendKeyAlpha&&(h=a.legendKeyAlpha());var f;!0===a.hidden&&(f=e=this.markerDisabledColor);var g=a.pattern,k=a.customMarker;k||(k=this.customMarker);var l=this.container,m=this.markerSize,n=0,q=0,p=m/2;if(this.useGraphSettings){c=a.type;this.switchType=void 0;if("line"==c||"step"==c||"smoothedLine"==c||"ohlc"==c)g=l.set(),a.hidden||(e=a.lineColorR,f=a.bulletBorderColorR),n=d.line(l,[0,2*m],[m/2,m/2],e,a.lineAlpha,a.lineThickness,a.dashLength),d.setCN(b,n,"graph-stroke"),g.push(n),a.bullet&&(a.hidden||(e=a.bulletColorR),n=d.bullet(l,a.bullet,a.bulletSize,e,a.bulletAlpha,a.bulletBorderThickness,f,a.bulletBorderAlpha))&&(d.setCN(b,n,"graph-bullet"),n.translate(m+1,m/2),g.push(n)),p=0,n=m,q=m/3;else{var t;a.getGradRotation&&(t=a.getGradRotation(),0===t&&(t=180));n=a.fillColorsR;!0===a.hidden&&(n=e);if(g=this.createMarker("rectangle",n,a.fillAlphas,a.lineThickness,e,a.lineAlpha,t,g,a.dashLength))p=m,g.translate(p,m/2);n=m}d.setCN(b,g,"graph-"+c);d.setCN(b,g,"graph-"+a.id)}else if(k)g=l.image(k,0,0,m,m);else{var r;isNaN(this.gradientRotation)||(r=180+this.gradientRotation);(g=this.createMarker(c,e,h,void 0,void 0,void 0,r,g))&&g.translate(m/2,m/2)}d.setCN(b,g,"legend-marker");this.addListeners(g,a);l=l.set([g]);this.switchable&&a.switchable&&l.setAttr("cursor","pointer");void 0!==a.id&&d.setCN(b,l,"legend-item-"+a.id);d.setCN(b,l,a.className,!0);f=this.switchType;var u;f&&"none"!=f&&0<m&&("x"==f?(u=this.createX(),u.translate(m/2,m/2)):u=this.createV(),u.dItem=a,!0!==a.hidden?"x"==f?u.hide():u.show():"x"!=f&&u.hide(),this.switchable||u.hide(),this.addListeners(u,a),a.legendSwitch=u,l.push(u),d.setCN(b,u,"legend-switch"));f=this.color;a.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(f=this.selectedColor);this.useMarkerColorForLabels&&(f=e);!0===a.hidden&&(f=this.markerDisabledColor);e=d.massReplace(this.labelText,{"[[title]]":a.title});t=this.fontSize;g&&(m<=t&&(m=m/2+this.ly-t/2+(t+2-m)/2-q,g.translate(p,m),u&&u.translate(u.x,
|
48 |
-
m)),a.legendEntryWidth=g.getBBox().width);var x;e&&(e=d.fixBrakes(e),a.legendTextReal=e,x=this.labelWidth,x=isNaN(x)?d.text(this.container,e,f,b.fontFamily,t,"start"):d.wrappedText(this.container,e,f,b.fontFamily,t,"start",!1,x,0),d.setCN(b,x,"legend-label"),x.translate(this.lx+n,this.ly),l.push(x),b=x.getBBox().width,this.maxLabelWidth<b&&(this.maxLabelWidth=b));this.entries[this.index]=l;a.legendEntry=this.entries[this.index];a.legendMarker=g;a.legendLabel=x;this.index++}},addListeners:function(a,b){var c=this;a&&a.mouseover(function(a){c.rollOverMarker(b,a)}).mouseout(function(a){c.rollOutMarker(b,a)}).click(function(a){c.clickMarker(b,a)})},rollOverMarker:function(a,b){this.switchable&&this.dispatch("rollOverMarker",a,b);this.dispatch("rollOverItem",a,b)},rollOutMarker:function(a,b){this.switchable&&this.dispatch("rollOutMarker",a,b);this.dispatch("rollOutItem",a,b)},clickMarker:function(a,b){this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b));this.dispatch("clickMarker",a,b)},rollOverLabel:function(a,b){a.hidden||(this.textClickEnabled&&a.legendLabel&&a.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",a,b))},rollOutLabel:function(a,b){if(!a.hidden){if(this.textClickEnabled&&a.legendLabel){var c=this.color;void 0!==this.selectedColor&&a.showBalloon&&(c=this.selectedColor);this.useMarkerColorForLabels&&(c=a.lineColor,void 0===c&&(c=a.color));a.legendLabel.attr({fill:c})}this.dispatch("rollOutItem",a,b)}},clickLabel:function(a,b){this.textClickEnabled?a.hidden||this.dispatch("clickLabel",a,b):this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b))},dispatch:function(a,b,c){a={type:a,dataItem:b,target:this,event:c,chart:this.chart};this.chart&&this.chart.handleLegendEvent(a);this.fire(a)},createValue:function(a){var b=this,c=b.fontSize,e=b.chart;if(!1!==a.visibleInLegend&&!a.hideFromLegend){var h=b.maxLabelWidth;b.forceWidth&&(h=b.labelWidth);b.equalWidths||(b.valueAlign="left");"left"==b.valueAlign&&(h=a.legendEntry.getBBox().width);var f=h;if(b.valueText&&0<b.valueWidth){var g=b.color;b.useMarkerColorForValues&&(g=a.color,a.legendKeyColor&&(g=a.legendKeyColor()));!0===a.hidden&&(g=b.markerDisabledColor);var k=b.valueText,h=h+b.lx+b.markerLabelGap+b.valueWidth,l="end";"left"==b.valueAlign&&(h-=b.valueWidth,l="start");g=d.text(b.container,k,g,b.chart.fontFamily,c,l);d.setCN(e,g,"legend-value");g.translate(h,b.ly);b.entries[b.index].push(g);f+=b.valueWidth+2*b.markerLabelGap;g.dItem=a;b.valueLabels.push(g)}b.index++;e=b.markerSize;e<c+7&&(e=c+7,d.VML&&(e+=3));c=b.container.rect(a.legendEntryWidth,0,f,e,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});c.dItem=a;b.entries[b.index-1].push(c);c.mouseover(function(c){b.rollOverLabel(a,c)}).mouseout(function(c){b.rollOutLabel(a,c)}).click(function(c){b.clickLabel(a,c)})}},createV:function(){var a=this.markerSize;return d.polygon(this.container,[a/5,a/2,a-a/5,a/2],[a/3,a-a/5,a/5,a/1.7],this.switchColor)},createX:function(){var a=(this.markerSize-4)/2,b={stroke:this.switchColor,
|
49 |
-
"stroke-width":3},c=this.container,e=d.line(c,[-a,a],[-a,a]).attr(b),a=d.line(c,[-a,a],[a,-a]).attr(b);return this.container.set([e,a])},createMarker:function(a,b,c,e,h,f,g,k,l){var m=this.markerSize,n=this.container;h||(h=this.markerBorderColor);h||(h=b);isNaN(e)&&(e=this.markerBorderThickness);isNaN(f)&&(f=this.markerBorderAlpha);return d.bullet(n,a,m,b,c,e,h,f,m,g,k,this.chart.path,l)},validateNow:function(){this.invalidateSize()},updateValues:function(){var a=this.valueLabels,b=this.chart,c,e=this.data;if(a)for(c=0;c<a.length;c++){var h=a[c],f=h.dItem,g=" ";if(e)f.value?h.text(f.value):h.text("");else{var k;if(void 0!==f.type){k=f.currentDataItem;var l=this.periodValueText;f.legendPeriodValueText&&(l=f.legendPeriodValueText);k?(g=this.valueText,f.legendValueText&&(g=f.legendValueText),g=b.formatString(g,k)):l&&b.formatPeriodString&&(l=d.massReplace(l,{"[[title]]":f.title}),g=b.formatPeriodString(l,f))}else g=b.formatString(this.valueText,f);if(l=this.valueFunction){var m=f;k&&(m=k);g=l(m,g)}var n;k?n=b.getBalloonColor(f,k):f.legendKeyColor&&(n=f.legendKeyColor());h.text(g);this.useMarkerColorForValues&&h.setAttr("fill",n);if(this.useMarkerColorForLabels){if(h=f.legendMarker)h.setAttr("fill",n),h.setAttr("stroke",n);(f=f.legendLabel)&&f.setAttr("fill",n)}}}},renderFix:function(){if(!d.VML&&this.enabled){var a=this.container;a&&a.renderFix()}},destroy:function(){this.div.innerHTML="";d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.formatMilliseconds=function(a,b){if(-1!=a.indexOf("fff")){var c=b.getMilliseconds(),d=String(c);10>c&&(d="00"+c);10<=c&&100>c&&(d="0"+c);a=a.replace(/fff/g,d)}return a};d.extractPeriod=function(a){var b=d.stripNumbers(a),c=1;b!=a&&(c=Number(a.slice(0,a.indexOf(b))));return{period:b,count:c}};d.getDate=function(a,b,c){return a instanceof Date?d.newDate(a,c):b&&isNaN(a)?d.stringToDate(a,b):new Date(a)};d.daysInMonth=function(a){return(new Date(a.getYear(),a.getMonth()+
|
50 |
-
1,0)).getDate()};d.newDate=function(a,b){return b&&-1==b.indexOf("fff")?new Date(a):new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds())};d.resetDateToMin=function(a,b,c,e){void 0===e&&(e=1);var h,f,g,k,l,m,n;d.useUTC?(h=a.getUTCFullYear(),f=a.getUTCMonth(),g=a.getUTCDate(),k=a.getUTCHours(),l=a.getUTCMinutes(),m=a.getUTCSeconds(),n=a.getUTCMilliseconds(),a=a.getUTCDay()):(h=a.getFullYear(),f=a.getMonth(),g=a.getDate(),k=a.getHours(),l=a.getMinutes(),m=a.getSeconds(),n=a.getMilliseconds(),a=a.getDay());switch(b){case"YYYY":h=Math.floor(h/c)*c;f=0;g=1;n=m=l=k=0;break;case"MM":f=Math.floor(f/c)*c;g=1;n=m=l=k=0;break;case"WW":g=a>=e?g-a+e:g-(7+a)+e;n=m=l=k=0;break;case"DD":n=m=l=k=0;break;case"hh":k=Math.floor(k/c)*c;n=m=l=0;break;case"mm":l=Math.floor(l/c)*c;n=m=0;break;case"ss":m=Math.floor(m/c)*c;n=0;break;case"fff":n=Math.floor(n/c)*c}d.useUTC?(a=new Date,a.setUTCFullYear(h,f,g),a.setUTCHours(k,l,m,n)):a=new Date(h,f,g,k,l,m,n);return a};d.getPeriodDuration=function(a,b){void 0===b&&(b=1);var c;switch(a){case"YYYY":c=316224E5;break;case"MM":c=26784E5;break;case"WW":c=6048E5;break;case"DD":c=864E5;break;case"hh":c=36E5;break;case"mm":c=6E4;break;case"ss":c=1E3;break;case"fff":c=1}return c*b};d.intervals={s:{nextInterval:"ss",contains:1E3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};d.getMaxInterval=function(a,b){var c=d.intervals;return a>=c[b].contains?(a=Math.round(a/c[b].contains),b=c[b].nextInterval,d.getMaxInterval(a,b)):"ss"==b?c[b].nextInterval:b};d.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");d.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");d.monthNames="January February March April May June July August September October November December".split(" ");d.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");d.getWeekNumber=function(a){a=new Date(a);a.setHours(0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));var b=new Date(a.getFullYear(),0,1);return Math.ceil(((a-b)/864E5+1)/7)};d.stringToDate=function(a,b){var c={},e=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},
|
51 |
-
{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],h=!0,f=b.indexOf("AA");-1!=f&&(a.substr(f,2),"pm"==a.toLowerCase&&(h=!1));var f=b,g,k,l;for(l=0;l<e.length;l++)k=e[l].period,c[k]=0,"date"==k&&(c[k]=1);for(l=0;l<e.length;l++)if(g=e[l].pattern,k=e[l].period,-1!=b.indexOf(g)){var m=d.getFromDateString(g,a,f);b=b.replace(g,"");if("KK"==g||"K"==g||"LL"==g||"L"==g)h||(m+=12);c[k]=m}d.useUTC?(e=new Date,e.setUTCFullYear(c.year,c.month,c.date),e.setUTCHours(c.hours,c.minutes,c.seconds,c.milliseconds)):e=new Date(c.year,c.month,c.date,c.hours,c.minutes,c.seconds,c.milliseconds);return e};d.getFromDateString=function(a,b,c){if(void 0!==b)return c=c.indexOf(a),b=String(b),b=b.substr(c,a.length),"0"==b.charAt(0)&&(b=b.substr(1,b.length-1)),b=Number(b),isNaN(b)&&(b=0),-1!=a.indexOf("M")&&b--,b};d.formatDate=function(a,b,c){c||(c=d);var e,h,f,g,k,l,m,n,q=d.getWeekNumber(a);d.useUTC?(e=a.getUTCFullYear(),h=a.getUTCMonth(),f=a.getUTCDate(),g=a.getUTCDay(),k=a.getUTCHours(),l=a.getUTCMinutes(),m=a.getUTCSeconds(),n=a.getUTCMilliseconds()):(e=a.getFullYear(),h=a.getMonth(),f=a.getDate(),g=a.getDay(),k=a.getHours(),l=a.getMinutes(),m=a.getSeconds(),n=a.getMilliseconds());var p=String(e).substr(2,2),t="0"+g;b=b.replace(/W/g,q);q=k;24==q&&(q=0);var r=q;10>r&&(r="0"+r);b=b.replace(/JJ/g,r);b=b.replace(/J/g,q);r=k;0===r&&(r=24,-1!=b.indexOf("H")&&(f--,0===f&&(e=new Date(a),e.setDate(e.getDate()-1),h=e.getMonth(),f=e.getDate(),e=e.getFullYear())));a=h+1;9>h&&(a="0"+a);q=f;10>f&&(q="0"+f);var u=r;10>u&&(u="0"+u);b=b.replace(/HH/g,u);b=b.replace(/H/g,r);r=k;11<r&&(r-=12);u=r;10>u&&(u="0"+u);b=b.replace(/KK/g,u);b=b.replace(/K/g,r);r=k;0===r&&(r=12);12<r&&(r-=12);u=r;10>u&&(u="0"+u);b=b.replace(/LL/g,u);b=b.replace(/L/g,r);r=l;10>r&&(r="0"+r);b=b.replace(/NN/g,r);b=b.replace(/N/g,l);l=m;10>l&&(l="0"+l);b=b.replace(/SS/g,l);b=b.replace(/S/g,m);m=n;10>m&&(m="00"+m);100>m&&(m="0"+m);l=n;10>l&&(l="00"+l);b=b.replace(/QQQ/g,m);b=b.replace(/QQ/g,l);b=b.replace(/Q/g,n);b=12>k?b.replace(/A/g,c.amString):b.replace(/A/g,c.pmString);b=b.replace(/YYYY/g,"@IIII@");b=b.replace(/YY/g,"@II@");b=b.replace(/MMMM/g,"@XXXX@");b=b.replace(/MMM/g,"@XXX@");b=b.replace(/MM/g,"@XX@");b=b.replace(/M/g,"@X@");b=b.replace(/DD/g,"@RR@");b=b.replace(/D/g,"@R@");b=b.replace(/EEEE/g,"@PPPP@");b=b.replace(/EEE/g,"@PPP@");b=b.replace(/EE/g,"@PP@");b=b.replace(/E/g,"@P@");b=b.replace(/@IIII@/g,e);b=b.replace(/@II@/g,p);b=b.replace(/@XXXX@/g,c.monthNames[h]);b=b.replace(/@XXX@/g,c.shortMonthNames[h]);b=b.replace(/@XX@/g,a);b=b.replace(/@X@/g,h+1);b=b.replace(/@RR@/g,q);b=b.replace(/@R@/g,f);b=b.replace(/@PPPP@/g,c.dayNames[g]);b=b.replace(/@PPP@/g,c.shortDayNames[g]);b=b.replace(/@PP@/g,t);return b=b.replace(/@P@/g,g)};d.changeDate=function(a,b,c,e,h){if(d.useUTC)return d.changeUTCDate(a,b,c,e,h);var f=-1;void 0===e&&(e=!0);void 0===h&&(h=!1);!0===e&&(f=1);switch(b){case"YYYY":a.setFullYear(a.getFullYear()+c*f);e||h||a.setDate(a.getDate()+1);break;case"MM":b=a.getMonth();a.setMonth(a.getMonth()+c*f);a.getMonth()>b+c*f&&a.setDate(a.getDate()-1);e||h||a.setDate(a.getDate()+1);break;case"DD":a.setDate(a.getDate()+c*f);break;case"WW":a.setDate(a.getDate()+c*f*7);break;case"hh":a.setHours(a.getHours()+c*f);break;case"mm":a.setMinutes(a.getMinutes()+c*f);break;case"ss":a.setSeconds(a.getSeconds()+
|
52 |
-
c*f);break;case"fff":a.setMilliseconds(a.getMilliseconds()+c*f)}return a};d.changeUTCDate=function(a,b,c,d,h){var f=-1;void 0===d&&(d=!0);void 0===h&&(h=!1);!0===d&&(f=1);switch(b){case"YYYY":a.setUTCFullYear(a.getUTCFullYear()+c*f);d||h||a.setUTCDate(a.getUTCDate()+1);break;case"MM":b=a.getUTCMonth();a.setUTCMonth(a.getUTCMonth()+c*f);a.getUTCMonth()>b+c*f&&a.setUTCDate(a.getUTCDate()-1);d||h||a.setUTCDate(a.getUTCDate()+1);break;case"DD":a.setUTCDate(a.getUTCDate()+c*f);break;case"WW":a.setUTCDate(a.getUTCDate()+
|
53 |
-
c*f*7);break;case"hh":a.setUTCHours(a.getUTCHours()+c*f);break;case"mm":a.setUTCMinutes(a.getUTCMinutes()+c*f);break;case"ss":a.setUTCSeconds(a.getUTCSeconds()+c*f);break;case"fff":a.setUTCMilliseconds(a.getUTCMilliseconds()+c*f)}return a}})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/ammap.js
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
(function(){var d;window.AmCharts?d=window.AmCharts:(d={},window.AmCharts=d,d.themes={},d.maps={},d.inheriting={},d.charts=[],d.onReadyArray=[],d.useUTC=!1,d.updateRate=60,d.uid=0,d.lang={},d.translations={},d.mapTranslations={},d.windows={},d.initHandlers=[],d.amString="am",d.pmString="pm");d.Class=function(a){var b=function(){arguments[0]!==d.inheriting&&(this.events={},this.construct.apply(this,arguments))};a.inherits?(b.prototype=new a.inherits(d.inheriting),b.base=a.inherits.prototype,delete a.inherits):(b.prototype.createEvents=function(){for(var a=0;a<arguments.length;a++)this.events[arguments[a]]=[]},b.prototype.listenTo=function(a,b,c){this.removeListener(a,b,c);a.events[b].push({handler:c,scope:this})},b.prototype.addListener=function(a,b,c){this.removeListener(this,a,b);a&&this.events[a]&&this.events[a].push({handler:b,scope:c})},b.prototype.removeListener=function(a,b,c){if(a&&a.events&&(a=a.events[b]))for(b=a.length-1;0<=b;b--)a[b].handler===c&&a.splice(b,1)},b.prototype.fire=function(a){for(var b=this.events[a.type],c=0;c<b.length;c++){var d=b[c];d.handler.call(d.scope,a)}});for(var c in a)b.prototype[c]=a[c];return b};d.addChart=function(a){window.requestAnimationFrame?d.animationRequested||(d.animationRequested=!0,window.requestAnimationFrame(d.update)):d.updateInt||(d.updateInt=setInterval(function(){d.update()},Math.round(1E3/d.updateRate)));d.charts.push(a)};d.removeChart=function(a){for(var b=d.charts,c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1);0===b.length&&d.updateInt&&(clearInterval(d.updateInt),d.updateInt=NaN)};d.isModern=!0;d.getIEVersion=function(){var a=0,b,c;"Microsoft Internet Explorer"==navigator.appName&&(b=navigator.userAgent,c=/MSIE ([0-9]{1,}[.0-9]{0,})/,null!==c.exec(b)&&(a=parseFloat(RegExp.$1)));return a};d.applyLang=function(a,b){var c=d.translations;b.dayNames=d.extend({},d.dayNames);b.shortDayNames=d.extend({},d.shortDayNames);b.monthNames=d.extend({},d.monthNames);b.shortMonthNames=d.extend({},d.shortMonthNames);b.amString="am";b.pmString="pm";c&&(c=c[a])&&(d.lang=c,c.monthNames&&(b.dayNames=d.extend({},c.dayNames),b.shortDayNames=d.extend({},c.shortDayNames),b.monthNames=d.extend({},c.monthNames),b.shortMonthNames=d.extend({},c.shortMonthNames)),c.am&&(b.amString=c.am),c.pm&&(b.pmString=c.pm));d.amString=b.amString;d.pmString=b.amString};d.IEversion=d.getIEVersion();9>d.IEversion&&0<d.IEversion&&(d.isModern=!1,d.isIE=!0);d.dx=0;d.dy=0;if(document.addEventListener||window.opera)d.isNN=!0,d.isIE=!1,d.dx=.5,d.dy=.5;document.attachEvent&&(d.isNN=!1,d.isIE=!0,d.isModern||(d.dx=0,d.dy=0));window.chrome&&(d.chrome=!0);d.handleMouseUp=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleReleaseOutside&&e.handleReleaseOutside(a)}};d.handleMouseMove=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];e&&e.handleMouseMove&&e.handleMouseMove(a)}};d.handleWheel=function(a){for(var b=d.charts,c=0;c<b.length;c++){var e=b[c];if(e&&e.mouseIsOver){e.mouseWheelScrollEnabled||e.mouseWheelZoomEnabled?e.handleWheel&&e.handleWheel(a):a.stopPropagation&&a.stopPropagation();break}}};d.resetMouseOver=function(){for(var a=d.charts,b=0;b<a.length;b++){var c=a[b];c&&(c.mouseIsOver=!1)}};d.ready=function(a){d.onReadyArray.push(a)};d.handleLoad=function(){d.isReady=!0;for(var a=d.onReadyArray,b=0;b<a.length;b++){var c=a[b];isNaN(d.processDelay)?c():setTimeout(c,d.processDelay*b)}};d.addInitHandler=function(a,b){d.initHandlers.push({method:a,types:b})};d.callInitHandler=function(a){var b=d.initHandlers;if(d.initHandlers)for(var c=0;c<b.length;c++){var e=b[c];e.types?d.isInArray(e.types,a.type)&&e.method(a):e.method(a)}};d.getUniqueId=function(){d.uid++;return"AmChartsEl-"+d.uid};d.isNN&&(document.addEventListener("mousemove",d.handleMouseMove),document.addEventListener("mouseup",d.handleMouseUp,!0),window.addEventListener("load",d.handleLoad,!0),window.addEventListener("DOMMouseScroll",d.handleWheel,!0),document.addEventListener("mousewheel",d.handleWheel,!0));d.isIE&&(document.attachEvent("onmousemove",d.handleMouseMove),document.attachEvent("onmouseup",d.handleMouseUp),window.attachEvent("onload",d.handleLoad),document.attachEvent("onmousewheel",d.handleWheel));d.clear=function(){var a=d.charts;if(a)for(var b=a.length-1;0<=b;b--)a[b].clear();d.updateInt&&clearInterval(d.updateInt);d.charts=[];d.isNN&&(document.removeEventListener("mousemove",d.handleMouseMove,!0),document.removeEventListener("mouseup",d.handleMouseUp,!0),window.removeEventListener("load",d.handleLoad,!0),window.removeEventListener("DOMMouseScroll",d.handleWheel,!0),document.removeEventListener("mousewheel",d.handleWheel,!0));d.isIE&&(document.detachEvent("onmousemove",d.handleMouseMove),document.detachEvent("onmouseup",d.handleMouseUp),window.detachEvent("onload",d.handleLoad))};d.makeChart=function(a,b,c){var e=b.type,g=b.theme;d.isString(g)&&(g=d.themes[g],b.theme=g);var f;switch(e){case"serial":f=new d.AmSerialChart(g);break;case"xy":f=new d.AmXYChart(g);break;case"pie":f=new d.AmPieChart(g);break;case"radar":f=new d.AmRadarChart(g);break;case"gauge":f=new d.AmAngularGauge(g);break;case"funnel":f=new d.AmFunnelChart(g);break;case"map":f=new d.AmMap(g);break;case"stock":f=new d.AmStockChart(g);break;case"gantt":f=new d.AmGanttChart(g)}d.extend(f,b);d.isReady?isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c):d.ready(function(){isNaN(c)?f.write(a):setTimeout(function(){d.realWrite(f,a)},c)});return f};d.realWrite=function(a,b){a.write(b)};d.updateCount=0;d.validateAt=Math.round(d.updateRate/10);d.update=function(){var a=d.charts;d.updateCount++;var b=!1;d.updateCount==d.validateAt&&(b=!0,d.updateCount=0);if(a)for(var c=a.length-1;0<=c;c--)a[c].update&&a[c].update(),b&&(a[c].autoResize?a[c].validateSize&&a[c].validateSize():a[c].premeasure&&a[c].premeasure());window.requestAnimationFrame&&window.requestAnimationFrame(d.update)};d.bezierX=3;d.bezierY=6;"complete"==document.readyState&&d.handleLoad()})();(function(){var d=window.AmCharts;d.toBoolean=function(a,b){if(void 0===a)return b;switch(String(a).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return!!a}};d.removeFromArray=function(a,b){var c;if(void 0!==b&&void 0!==a)for(c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1)};d.getPath=function(){var a=document.getElementsByTagName("script");if(a)for(var b=0;b<a.length;b++){var c=a[b].src;if(-1!==c.search(/\/(amcharts|ammap)\.js/))return c.replace(/\/(amcharts|ammap)\.js.*/,"/")}};d.normalizeUrl=function(a){return""!==a&&-1===a.search(/\/$/)?a+"/":a};d.isAbsolute=function(a){return 0===a.search(/^http[s]?:|^\//)};d.isInArray=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};d.getDecimals=function(a){var b=0;isNaN(a)||(a=String(a),-1!=a.indexOf("e-")?b=Number(a.split("-")[1]):-1!=a.indexOf(".")&&(b=a.split(".")[1].length));return b};d.wordwrap=function(a,b,c,e){var g,f,h,k;a+="";if(1>b)return a;g=-1;for(a=(k=a.split(/\r\n|\n|\r/)).length;++g<a;k[g]+=h){h=k[g];for(k[g]="";h.length>b;k[g]+=d.trim(h.slice(0,f))+((h=h.slice(f)).length?c:""))f=2==e||(f=h.slice(0,b+1).match(/\S*(\s)?$/))[1]?b:f.input.length-f[0].length||1==e&&b||f.input.length+(f=h.slice(b).match(/^\S*/))[0].length;h=d.trim(h)}return k.join(c)};d.trim=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};d.wrappedText=function(a,b,c,e,g,f,h,k){var l=d.text(a,b,c,e,g,f,h);if(l){var m=l.getBBox();if(m.width>k){var n="\n";d.isModern||(n="<br>");k=Math.floor(k/(m.width/
|
2 |
-
b.length));2<k&&(k-=2);b=d.wordwrap(b,k,n,!0);l.remove();l=d.text(a,b,c,e,g,f,h)}}return l};d.getStyle=function(a,b){var c="";if(document.defaultView&&document.defaultView.getComputedStyle)try{c=document.defaultView.getComputedStyle(a,"").getPropertyValue(b)}catch(e){}else a.currentStyle&&(b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),c=a.currentStyle[b]);return c};d.removePx=function(a){if(void 0!==a)return Number(a.substring(0,a.length-2))};d.getURL=function(a,b){if(a)if("_self"!=b&&b)if("_top"==b&&window.top)window.top.location.href=a;else if("_parent"==b&&window.parent)window.parent.location.href=a;else if("_blank"==b)window.open(a);else{var c=document.getElementsByName(b)[0];c?c.src=a:(c=d.windows[b])?c.opener&&!c.opener.closed?c.location.href=a:d.windows[b]=window.open(a):d.windows[b]=window.open(a)}else window.location.href=a};d.ifArray=function(a){return a&&"object"==typeof a&&0<a.length?!0:!1};d.callMethod=function(a,b){var c;for(c=0;c<b.length;c++){var e=b[c];if(e){if(e[a])e[a]();var d=e.length;if(0<d){var f;for(f=0;f<d;f++){var h=e[f];if(h&&h[a])h[a]()}}}}};d.toNumber=function(a){return"number"==typeof a?a:Number(String(a).replace(/[^0-9\-.]+/g,""))};d.toColor=function(a){if(""!==a&&void 0!==a)if(-1!=a.indexOf(",")){a=a.split(",");var b;for(b=0;b<a.length;b++){var c=a[b].substring(a[b].length-6,a[b].length);a[b]="#"+c}}else a=a.substring(a.length-6,a.length),a="#"+a;return a};d.toCoordinate=function(a,b,c){var e;void 0!==a&&(a=String(a),c&&c<b&&(b=c),e=Number(a),-1!=a.indexOf("!")&&(e=b-Number(a.substr(1))),-1!=a.indexOf("%")&&(e=b*Number(a.substr(0,a.length-1))/100));return e};d.fitToBounds=function(a,b,c){a<b&&(a=b);a>c&&(a=c);return a};d.isDefined=function(a){return void 0===a?!1:!0};d.stripNumbers=function(a){return a.replace(/[0-9]+/g,"")};d.roundTo=function(a,b){if(0>b)return a;var c=Math.pow(10,b);return Math.round(a*c)/c};d.toFixed=function(a,b){var c=String(Math.round(a*Math.pow(10,b)));if(0<b){var e=c.length;if(e<b){var d;for(d=0;d<b-e;d++)c="0"+c}e=c.substring(0,
|
3 |
-
c.length-b);""===e&&(e=0);return e+"."+c.substring(c.length-b,c.length)}return String(c)};d.formatDuration=function(a,b,c,e,g,f){var h=d.intervals,k=f.decimalSeparator;if(a>=h[b].contains){var l=a-Math.floor(a/h[b].contains)*h[b].contains;"ss"==b?(l=d.formatNumber(l,f),1==l.split(k)[0].length&&(l="0"+l)):l=d.roundTo(l,f.precision);("mm"==b||"hh"==b)&&10>l&&(l="0"+l);c=l+""+e[b]+""+c;a=Math.floor(a/h[b].contains);b=h[b].nextInterval;return d.formatDuration(a,b,c,e,g,f)}"ss"==b&&(a=d.formatNumber(a,f),1==a.split(k)[0].length&&(a="0"+a));("mm"==b||"hh"==b)&&10>a&&(a="0"+a);c=a+""+e[b]+""+c;if(h[g].count>h[b].count)for(a=h[b].count;a<h[g].count;a++)b=h[b].nextInterval,"ss"==b||"mm"==b||"hh"==b?c="00"+e[b]+""+c:"DD"==b&&(c="0"+e[b]+""+c);":"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));return c};d.formatNumber=function(a,b,c,e,g){a=d.roundTo(a,b.precision);isNaN(c)&&(c=b.precision);var f=b.decimalSeparator;b=b.thousandsSeparator;var h;h=0>a?"-":"";a=Math.abs(a);var k=String(a),l=!1;-1!=k.indexOf("e")&&(l=!0);0<=c&&!l&&(k=d.toFixed(a,c));var m="";if(l)m=k;else{var k=k.split("."),l=String(k[0]),n;for(n=l.length;0<=n;n-=3)m=n!=l.length?0!==n?l.substring(n-3,n)+b+m:l.substring(n-3,n)+m:l.substring(n-3,n);void 0!==k[1]&&(m=m+f+k[1]);void 0!==c&&0<c&&"0"!=m&&(m=d.addZeroes(m,f,c))}m=h+m;""===h&&!0===e&&0!==a&&(m="+"+m);!0===g&&(m+="%");return m};d.addZeroes=function(a,b,c){a=a.split(b);void 0===a[1]&&0<c&&(a[1]="0");return a[1].length<c?(a[1]+="0",d.addZeroes(a[0]+b+a[1],b,c)):void 0!==a[1]?a[0]+b+a[1]:a[0]};d.scientificToNormal=function(a){var b;a=String(a).split("e");var c;if("-"==a[1].substr(0,1)){b="0.";for(c=0;c<Math.abs(Number(a[1]))-1;c++)b+="0";b+=a[0].split(".").join("")}else{var e=0;b=a[0].split(".");b[1]&&(e=b[1].length);b=a[0].split(".").join("");for(c=0;c<Math.abs(Number(a[1]))-e;c++)b+="0"}return b};d.toScientific=function(a,b){if(0===a)return"0";var c=Math.floor(Math.log(Math.abs(a))*Math.LOG10E),e=String(e).split(".").join(b);return String(e)+"e"+c};d.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};d.hitTest=function(a,b,c){var e=!1,g=a.x,f=a.x+a.width,h=a.y,k=a.y+a.height,l=d.isInRectangle;e||(e=l(g,h,b));e||(e=l(g,k,b));e||(e=l(f,h,b));e||(e=l(f,k,b));e||!0===c||(e=d.hitTest(b,a,!0));return e};d.isInRectangle=function(a,b,c){return a>=c.x-5&&a<=c.x+c.width+5&&b>=c.y-5&&b<=c.y+c.height+5?!0:!1};d.isPercents=function(a){if(-1!=String(a).indexOf("%"))return!0};d.formatValue=function(a,b,c,e,g,f,h,k){if(b){void 0===g&&(g="");var l;for(l=0;l<c.length;l++){var m=c[l],n=b[m];void 0!==n&&(n=f?d.addPrefix(n,k,h,e):d.formatNumber(n,e),a=a.replace(new RegExp("\\[\\["+g+""+m+"\\]\\]","g"),n))}}return a};d.formatDataContextValue=function(a,b){if(a){var c=a.match(/\[\[.*?\]\]/g),e;for(e=0;e<c.length;e++){var d=c[e],d=d.substr(2,d.length-4);void 0!==b[d]&&(a=a.replace(new RegExp("\\[\\["+d+"\\]\\]","g"),b[d]))}}return a};d.massReplace=function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var e=b[c];void 0===e&&(e="");a=a.replace(c,e)}return a};d.cleanFromEmpty=function(a){return a.replace(/\[\[[^\]]*\]\]/g,"")};d.addPrefix=function(a,b,c,e,g){var f=d.formatNumber(a,e),h="",k,l,m;if(0===a)return"0";0>a&&(h="-");a=Math.abs(a);if(1<a)for(k=b.length-1;-1<k;k--){if(a>=b[k].number&&(l=a/b[k].number,m=Number(e.precision),1>m&&(m=1),c=d.roundTo(l,m),m=d.formatNumber(c,{precision:-1,decimalSeparator:e.decimalSeparator,thousandsSeparator:e.thousandsSeparator}),!g||l==c)){f=h+""+m+""+b[k].prefix;break}}else for(k=0;k<c.length;k++)if(a<=c[k].number){l=a/c[k].number;m=Math.abs(Math.floor(Math.log(l)*Math.LOG10E));l=d.roundTo(l,m);f=h+""+l+""+c[k].prefix;break}return f};d.remove=function(a){a&&a.remove()};d.getEffect=function(a){">"==a&&(a="easeOutSine");"<"==a&&(a="easeInSine");"elastic"==a&&(a="easeOutElastic");return a};d.getObjById=function(a,b){var c,e;for(e=0;e<a.length;e++){var d=a[e];if(d.id==b){c=d;break}}return c};d.applyTheme=function(a,b,c){b||(b=d.theme);b&&b[c]&&d.extend(a,b[c])};d.isString=function(a){return"string"==typeof a?!0:!1};d.extend=function(a,b,c){var e;a||(a={});for(e in b)c?a.hasOwnProperty(e)||(a[e]=b[e]):a[e]=b[e];return a};d.copyProperties=function(a,b){for(var c in a)a.hasOwnProperty(c)&&"events"!=c&&void 0!==a[c]&&"function"!=typeof a[c]&&"cname"!=c&&(b[c]=a[c])};d.processObject=function(a,b,c,e){if(!1===a instanceof b&&(a=e?d.extend(new b(c),a):d.extend(a,new b(c),!0),a.listeners))for(var g in a.listeners)b=a.listeners[g],a.addListener(b.event,b.method);return a};d.fixNewLines=function(a){var b=RegExp("\\n","g");a&&(a=a.replace(b,"<br />"));return a};d.fixBrakes=function(a){if(d.isModern){var b=RegExp("<br>","g");a&&(a=a.replace(b,"\n"))}else a=d.fixNewLines(a);return a};d.deleteObject=function(a,b){if(a){if(void 0===b||null===b)b=20;if(0!==b)if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c<a.length;c++)d.deleteObject(a[c],b-1),a[c]=null;else if(a&&!a.tagName)try{for(c in a)a[c]&&("object"==typeof a[c]&&d.deleteObject(a[c],b-1),"function"!=typeof a[c]&&(a[c]=null))}catch(e){}}};d.bounce=function(a,b,c,e,d){return(b/=d)<1/2.75?7.5625*e*b*b+c:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+.9375)+c:e*(7.5625*(b-=2.625/2.75)*b+.984375)+c};d.easeInOutQuad=function(a,b,c,e,d){b/=d/2;if(1>b)return e/2*b*b+c;b--;return-e/2*(b*(b-2)-1)+c};d.easeInSine=function(a,b,c,e,d){return-e*Math.cos(b/d*(Math.PI/2))+e+c};d.easeOutSine=function(a,b,c,e,d){return e*Math.sin(b/d*(Math.PI/2))+c};d.easeOutElastic=function(a,b,c,e,d){a=1.70158;var f=0,h=e;if(0===b)return c;if(1==(b/=d))return c+e;f||(f=.3*d);h<Math.abs(e)?(h=e,a=f/4):a=f/(2*Math.PI)*Math.asin(e/h);return h*Math.pow(2,-10*b)*Math.sin(2*(b*d-a)*Math.PI/f)+e+c};d.fixStepE=function(a){a=a.toExponential(0).split("e");var b=Number(a[1]);9==Number(a[0])&&b++;return d.generateNumber(1,b)};d.generateNumber=function(a,b){var c="",e;e=0>b?Math.abs(b)-1:Math.abs(b);var d;for(d=0;d<e;d++)c+="0";return 0>b?Number("0."+c+String(a)):Number(String(a)+c)};d.setCN=function(a,b,c,e){if(a.addClassNames&&b&&(b=b.node)&&c){var d=b.getAttribute("class");a=a.classNamePrefix+"-";e&&(a="");d?b.setAttribute("class",d+" "+a+c):b.setAttribute("class",a+c)}};d.parseDefs=function(a,b){for(var c in a){var e=typeof a[c];if(0<a[c].length&&"object"==e)for(var g=0;g<a[c].length;g++)e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c][g],e);else"object"==e?(e=document.createElementNS(d.SVG_NS,c),b.appendChild(e),d.parseDefs(a[c],e)):b.setAttribute(c,a[c])}}})();(function(){var d=window.AmCharts;d.AmDraw=d.Class({construct:function(a,b,c,e){d.SVG_NS="http://www.w3.org/2000/svg";d.SVG_XLINK="http://www.w3.org/1999/xlink";d.hasSVG=!!document.createElementNS&&!!document.createElementNS(d.SVG_NS,"svg").createSVGRect;1>b&&(b=10);1>c&&(c=10);this.div=a;this.width=b;this.height=c;this.rBin=document.createElement("div");d.hasSVG?(d.SVG=!0,b=this.createSvgElement("svg"),a.appendChild(b),this.container=b,this.addDefs(e),this.R=new d.SVGRenderer(this)):d.isIE&&d.VMLRenderer&&(d.VML=!0,d.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(b=document.createStyleSheet(),b.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),d.vmlStyleSheet=b):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=a,this.R=new d.VMLRenderer(this,e),this.R.disableSelection(a))},createSvgElement:function(a){return document.createElementNS(d.SVG_NS,a)},circle:function(a,b,c,e){var g=new d.AmDObject("circle",this);g.attr({r:c,cx:a,cy:b});this.addToContainer(g.node,e);return g},ellipse:function(a,b,c,e,g){var f=new d.AmDObject("ellipse",this);f.attr({rx:c,ry:e,cx:a,cy:b});this.addToContainer(f.node,g);return f},setSize:function(a,b){0<a&&0<b&&(this.container.style.width=a+"px",this.container.style.height=b+"px")},rect:function(a,b,c,e,g,f,h){var k=new d.AmDObject("rect",this);d.VML&&(g=Math.round(100*g/Math.min(c,e)),c+=2*f,e+=2*f,k.bw=f,k.node.style.marginLeft=-f,k.node.style.marginTop=-f);1>c&&(c=1);1>e&&(e=1);k.attr({x:a,y:b,width:c,height:e,rx:g,ry:g,"stroke-width":f});this.addToContainer(k.node,h);return k},image:function(a,b,c,e,g,f){var h=new d.AmDObject("image",this);h.attr({x:b,y:c,width:e,height:g});this.R.path(h,a);this.addToContainer(h.node,f);return h},addToContainer:function(a,b){b||(b=this.container);b.appendChild(a)},text:function(a,b,c){return this.R.text(a,b,c)},path:function(a,b,c,e){var g=new d.AmDObject("path",this);e||(e="100,100");g.attr({cs:e});c?g.attr({dd:a}):g.attr({d:a});this.addToContainer(g.node,b);return g},set:function(a){return this.R.set(a)},remove:function(a){if(a){var b=this.rBin;b.appendChild(a);b.innerHTML=""}},renderFix:function(){var a=this.container,b=a.style;b.top="0px";b.left="0px";try{var c=a.getBoundingClientRect(),e=c.left-Math.round(c.left),d=c.top-Math.round(c.top);e&&(b.left=e+"px");d&&(b.top=d+"px")}catch(f){}},update:function(){this.R.update()},addDefs:function(a){if(d.hasSVG){var b=this.createSvgElement("desc"),c=this.container;c.setAttribute("version","1.1");c.style.position="absolute";this.setSize(this.width,this.height);if(a.accessibleTitle){var e=this.createSvgElement("title");e.appendChild(document.createTextNode(a.accessibleTitle));c.appendChild(e)}d.rtl&&(c.setAttribute("direction","rtl"),c.style.left="auto",c.style.right="0px");a&&(a.addCodeCredits&&b.appendChild(document.createTextNode("JavaScript chart by amCharts "+a.version)),c.appendChild(b),a.defs&&(b=this.createSvgElement("defs"),c.appendChild(b),d.parseDefs(a.defs,b),this.defs=b))}}})})();(function(){var d=window.AmCharts;d.AmDObject=d.Class({construct:function(a,b){this.D=b;this.R=b.R;this.node=this.R.create(this,a);this.y=this.x=0;this.scale=1},attr:function(a){this.R.attr(this,a);return this},getAttr:function(a){return this.node.getAttribute(a)},setAttr:function(a,b){this.R.setAttr(this,a,b);return this},clipRect:function(a,b,c,e){this.R.clipRect(this,a,b,c,e)},translate:function(a,b,c,e){e||(a=Math.round(a),b=Math.round(b));this.R.move(this,a,b,c);this.x=a;this.y=b;this.scale=c;this.angle&&this.rotate(this.angle)},rotate:function(a,b){this.R.rotate(this,a,b);this.angle=a},animate:function(a,b,c){for(var e in a)if(a.hasOwnProperty(e)){var g=e,f=a[e];c=d.getEffect(c);this.R.animate(this,g,f,b,c)}},push:function(a){if(a){var b=this.node;b.appendChild(a.node);var c=a.clipPath;c&&b.appendChild(c);(a=a.grad)&&b.appendChild(a)}},text:function(a){this.R.setText(this,a)},remove:function(){this.stop();this.R.remove(this)},clear:function(){var a=this.node;if(a.hasChildNodes())for(;1<=a.childNodes.length;)a.removeChild(a.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;b&&b.appendChild(a)}},toPrevious:function(){var a=this.node;a&&this.prevNextNode&&(a=a.parentNode)&&a.insertBefore(this.prevNextNode,null)},toBack:function(){var a=this.node;if(a){this.prevNextNode=a.nextSibling;var b=a.parentNode;if(b){var c=b.firstChild;c&&b.insertBefore(a,c)}}},mouseover:function(a){this.R.addListener(this,"mouseover",a);return this},mouseout:function(a){this.R.addListener(this,"mouseout",a);return this},click:function(a){this.R.addListener(this,"click",a);return this},dblclick:function(a){this.R.addListener(this,"dblclick",a);return this},mousedown:function(a){this.R.addListener(this,"mousedown",a);return this},mouseup:function(a){this.R.addListener(this,"mouseup",a);return this},touchmove:function(a){this.R.addListener(this,"touchmove",a);return this},touchstart:function(a){this.R.addListener(this,"touchstart",a);return this},touchend:function(a){this.R.addListener(this,"touchend",a);return this},contextmenu:function(a){this.node.addEventListener?this.node.addEventListener("contextmenu",a,!0):this.R.addListener(this,"contextmenu",a);return this},stop:function(){d.removeFromArray(this.R.animations,this.an_translate);d.removeFromArray(this.R.animations,this.an_y);d.removeFromArray(this.R.animations,this.an_x)},length:function(){return this.node.childNodes.length},gradient:function(a,b,c){this.R.gradient(this,a,b,c)},pattern:function(a,b,c){a&&this.R.pattern(this,a,b,c)}})})();(function(){var d=window.AmCharts;d.SVGRenderer=d.Class({construct:function(a){this.D=a;this.animations=[]},create:function(a,b){return document.createElementNS(d.SVG_NS,b)},attr:function(a,b){for(var c in b)b.hasOwnProperty(c)&&this.setAttr(a,c,b[c])},setAttr:function(a,b,c){void 0!==c&&a.node.setAttribute(b,c)},animate:function(a,b,c,e,g){a.animationFinished=!1;var f=a.node;a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);"translate"==b?(f=(f=f.getAttribute("transform"))?String(f).substring(10,f.length-1):"0,0",f=f.split(", ").join(" "),f=f.split(" ").join(","),0===f&&(f="0,0")):f=Number(f.getAttribute(b));c={obj:a,frame:0,attribute:b,from:f,to:c,time:e,effect:g};this.animations.push(c);a["an_"+b]=c},update:function(){var a,b=this.animations;for(a=b.length-1;0<=a;a--){var c=b[a],e=c.time*d.updateRate,g=c.frame+1,f=c.obj,h=c.attribute,k,l,m;g<=e?(c.frame++,"translate"==h?(k=c.from.split(","),h=Number(k[0]),k=Number(k[1]),isNaN(k)&&(k=0),l=c.to.split(","),m=Number(l[0]),l=Number(l[1]),m=0===m-h?m:Math.round(d[c.effect](0,g,h,m-h,e)),c=0===l-k?l:Math.round(d[c.effect](0,g,k,l-k,e)),h="transform",c="translate("+m+","+c+")"):(l=Number(c.from),k=Number(c.to),m=k-l,c=d[c.effect](0,g,l,m,e),isNaN(c)&&(c=k),0===m&&this.animations.splice(a,1)),this.setAttr(f,h,c)):("translate"==h?(l=c.to.split(","),m=Number(l[0]),l=Number(l[1]),f.translate(m,l)):(k=Number(c.to),this.setAttr(f,h,k)),f.animationFinished=!0,this.animations.splice(a,1))}},getBBox:function(a){if(a=a.node)try{return a.getBBox()}catch(b){}return{width:0,height:0,x:0,y:0}},path:function(a,b){a.node.setAttributeNS(d.SVG_XLINK,"xlink:href",b)},clipRect:function(a,b,c,e,g){var f=a.node,h=a.clipPath;h&&this.D.remove(h);var k=f.parentNode;k&&(f=document.createElementNS(d.SVG_NS,"clipPath"),h=d.getUniqueId(),f.setAttribute("id",h),this.D.rect(b,c,e,g,0,0,f),k.appendChild(f),b="#",d.baseHref&&!d.isIE&&(b=this.removeTarget(window.location.href)+b),this.setAttr(a,"clip-path","url("+b+h+")"),this.clipPathC++,a.clipPath=f)},text:function(a,b,c){var e=new d.AmDObject("text",this.D);a=String(a).split("\n");var g=d.removePx(b["font-size"]),f;for(f=0;f<a.length;f++){var h=this.create(null,"tspan");h.appendChild(document.createTextNode(a[f]));h.setAttribute("y",(g+2)*f+Math.round(g/2));h.setAttribute("x",0);e.node.appendChild(h)}e.node.setAttribute("y",Math.round(g/2));this.attr(e,b);this.D.addToContainer(e.node,c);return e},setText:function(a,b){var c=a.node;c&&(c.removeChild(c.firstChild),c.appendChild(document.createTextNode(b)))},move:function(a,b,c,e){isNaN(b)&&(b=0);isNaN(c)&&(c=0);b="translate("+b+","+c+")";e&&(b=b+" scale("+e+")");this.setAttr(a,"transform",b)},rotate:function(a,b){var c=a.node.getAttribute("transform"),e="rotate("+b+")";c&&(e=c+" "+e);this.setAttr(a,"transform",e)},set:function(a){var b=new d.AmDObject("g",this.D);this.D.container.appendChild(b.node);if(a){var c;for(c=0;c<a.length;c++)b.push(a[c])}return b},addListener:function(a,b,c){a.node["on"+b]=c},gradient:function(a,b,c,e){var g=a.node,f=a.grad;f&&this.D.remove(f);b=document.createElementNS(d.SVG_NS,b);f=d.getUniqueId();b.setAttribute("id",f);if(!isNaN(e)){var h=0,k=0,l=0,m=0;90==e?l=100:270==e?m=100:180==e?h=100:0===e&&(k=100);b.setAttribute("x1",h+"%");b.setAttribute("x2",k+"%");b.setAttribute("y1",l+"%");b.setAttribute("y2",m+"%")}for(e=0;e<c.length;e++)h=document.createElementNS(d.SVG_NS,"stop"),k=100*e/(c.length-1),0===e&&(k=0),h.setAttribute("offset",k+"%"),h.setAttribute("stop-color",c[e]),b.appendChild(h);g.parentNode.appendChild(b);c="#";d.baseHref&&!d.isIE&&(c=this.removeTarget(window.location.href)+
|
4 |
-
c);g.setAttribute("fill","url("+c+f+")");a.grad=b},removeTarget:function(a){return a.split("#")[0]},pattern:function(a,b,c,e){var g=a.node;isNaN(c)&&(c=1);var f=a.patternNode;f&&this.D.remove(f);var f=document.createElementNS(d.SVG_NS,"pattern"),h=d.getUniqueId(),k=b;b.url&&(k=b.url);d.isAbsolute(k)||-1!=k.indexOf("data:image")||(k=e+k);e=Number(b.width);isNaN(e)&&(e=4);var l=Number(b.height);isNaN(l)&&(l=4);e/=c;l/=c;c=b.x;isNaN(c)&&(c=0);var m=-Math.random()*Number(b.randomX);isNaN(m)||(c=m);m=b.y;isNaN(m)&&(m=0);var n=-Math.random()*Number(b.randomY);isNaN(n)||(m=n);f.setAttribute("id",h);f.setAttribute("width",e);f.setAttribute("height",l);f.setAttribute("patternUnits","userSpaceOnUse");f.setAttribute("xlink:href",k);b.color&&(n=document.createElementNS(d.SVG_NS,"rect"),n.setAttributeNS(null,"height",e),n.setAttributeNS(null,"width",l),n.setAttributeNS(null,"fill",b.color),f.appendChild(n));this.D.image(k,0,0,e,l,f).translate(c,m);k="#";d.baseHref&&!d.isIE&&(k=this.removeTarget(window.location.href)+
|
5 |
-
k);g.setAttribute("fill","url("+k+h+")");a.patternNode=f;g.parentNode.appendChild(f)},remove:function(a){a.clipPath&&this.D.remove(a.clipPath);a.grad&&this.D.remove(a.grad);a.patternNode&&this.D.remove(a.patternNode);this.D.remove(a.node)}})})();(function(){var d=window.AmCharts;d.AmChart=d.Class({construct:function(a){this.svgIcons=this.tapToActivate=!0;this.theme=a;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.20.3";d.addChart(this);this.createEvents("buildStarted","dataUpdated","init","rendered","drawn","failed","resized","animationFinished");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.autoResize=!0;this.autoDisplay=!1;this.addCodeCredits=this.accessible=!0;this.touchStartTime=this.touchClickDuration=0;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var b=document.createElement("div"),c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.chartDiv=b;b=document.createElement("div");c=b.style;c.overflow="hidden";c.position="relative";c.textAlign="left";this.legendDiv=b;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.handDrawThickness=1;this.prefixesOfBigNumbers=[{number:1E3,prefix:"k"},{number:1E6,prefix:"M"},{number:1E9,prefix:"G"},{number:1E12,prefix:"T"},{number:1E15,prefix:"P"},{number:1E18,prefix:"E"},{number:1E21,prefix:"Z"},{number:1E24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1E-24,prefix:"y"},{number:1E-21,prefix:"z"},{number:1E-18,prefix:"a"},{number:1E-15,prefix:"f"},{number:1E-12,prefix:"p"},{number:1E-9,prefix:"n"},{number:1E-6,prefix:"\u03bc"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new d.AmBalloon(this.theme);this.balloon.chart=this;this.processTimeout=0;this.processCount=1E3;this.animatable=[];d.applyTheme(this,a,"AmChart")},drawChart:function(){0<this.realWidth&&0<this.realHeight&&(this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr(),this.renderFix(),this.chartDiv&&(this.boundingRect=this.chartDiv.getBoundingClientRect()))},makeAccessible:function(a,b){this.accessible&&a&&(a.setAttr("role","img"),a.setAttr("aria-label",b))},drawBackground:function(){d.remove(this.background);var a=this.container,b=this.backgroundColor,c=this.backgroundAlpha,e=this.set;d.isModern||0!==c||(c=.001);var g=this.updateWidth();this.realWidth=g;var f=this.updateHeight();this.realHeight=f;b=d.polygon(a,[0,g-1,g-1,0],[0,0,f-1,f-1],b,c,1,this.borderColor,this.borderAlpha);d.setCN(this,b,"bg");this.background=b;e.push(b);if(b=this.backgroundImage)a=a.image(b,0,0,g,f),d.setCN(this,b,"bg-image"),this.bgImg=a,e.push(a)},drawTitles:function(a){var b=this.titles;this.titleHeight=0;if(d.ifArray(b)){var c=20,e;for(e=0;e<b.length;e++){var g=b[e],g=d.processObject(g,d.Title,this.theme);if(!1!==g.enabled){var f=g.color;void 0===f&&(f=this.color);var h=g.size;isNaN(h)&&(h=this.fontSize+2);isNaN(g.alpha);var k=this.marginLeft,l=!0;void 0!==g.bold&&(l=g.bold);f=d.wrappedText(this.container,g.text,f,this.fontFamily,h,"middle",l,this.realWidth-35);f.translate(k+(this.realWidth-this.marginRight-k)/2,c);f.node.style.pointerEvents="none";g.sprite=f;d.setCN(this,f,"title");g.id&&d.setCN(this,f,"title-"+g.id);f.attr({opacity:g.alpha});c+=f.getBBox().height+5;a?f.remove():this.freeLabelsSet.push(f)}}this.titleHeight=c-10}},write:function(a){var b=this;if(b.listeners)for(var c=
|
6 |
-
0;c<b.listeners.length;c++){var e=b.listeners[c];b.addListener(e.event,e.method)}b.fire({type:"buildStarted",chart:b});b.afterWriteTO&&clearTimeout(b.afterWriteTO);0<b.processTimeout?b.afterWriteTO=setTimeout(function(){b.afterWrite.call(b,a)},b.processTimeout):b.afterWrite(a)},afterWrite:function(a){if(a="object"!=typeof a?document.getElementById(a):a){for(;a.firstChild;)a.removeChild(a.firstChild);this.div=a;a.style.overflow="hidden";a.style.textAlign="left";var b=this.chartDiv,c=this.legendDiv,e=this.legend,g=c.style,f=b.style;this.measure();this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;var h,k=document.createElement("div");h=k.style;h.position="relative";this.containerDiv=k;k.className=this.classNamePrefix+"-main-div";b.className=this.classNamePrefix+"-chart-div";a.appendChild(k);var l=this.exportConfig;l&&d.AmExport&&!this.AmExport&&(this.AmExport=new d.AmExport(this,l));this.amExport&&d.AmExport&&(this.AmExport=d.extend(this.amExport,new d.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(e){e=this.addLegend(e,e.divId);if(e.enabled)switch(g.left=null,g.top=null,g.right=null,f.left=null,f.right=null,f.top=null,g.position="relative",f.position="relative",e.position){case"bottom":k.appendChild(b);k.appendChild(c);break;case"top":k.appendChild(c);k.appendChild(b);break;case"absolute":h.width=a.style.width;h.height=a.style.height;g.position="absolute";f.position="absolute";void 0!==e.left&&(g.left=e.left+"px");void 0!==e.right&&(g.right=e.right+"px");void 0!==e.top&&(g.top=e.top+"px");void 0!==e.bottom&&(g.bottom=e.bottom+"px");e.marginLeft=0;e.marginRight=0;k.appendChild(b);k.appendChild(c);break;case"right":h.width=a.style.width;h.height=a.style.height;g.position="relative";f.position="absolute";k.appendChild(b);k.appendChild(c);break;case"left":h.width=a.style.width;h.height=a.style.height;g.position="absolute";f.position="relative";k.appendChild(b);k.appendChild(c);break;case"outside":k.appendChild(b)}else k.appendChild(b);this.prevLegendPosition=e.position}else k.appendChild(b);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){d.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme);window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=d.getPath());void 0===this.path&&(this.path="amcharts/");this.path=d.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(d.callInitHandler(this),this.initHC=!0);d.applyLang(this.language,this);var a=this.numberFormatter;a&&(isNaN(a.precision)||(this.precision=a.precision),void 0!==a.thousandsSeparator&&(this.thousandsSeparator=a.thousandsSeparator),void 0!==a.decimalSeparator&&(this.decimalSeparator=a.decimalSeparator));(a=this.percentFormatter)&&!isNaN(a.precision)&&(this.percentPrecision=a.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.destroy();(a=this.container)?(a.container.innerHTML="",a.width=this.realWidth,a.height=this.realHeight,a.addDefs(this),this.chartDiv.appendChild(a.container)):a=new d.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);this.container=a;this.extension=".png";this.svgIcons&&d.SVG&&(this.extension=".svg");this.checkDisplay();a.chart=this;d.VML||d.SVG?(a.handDrawn=this.handDrawn,a.handDrawScatter=this.handDrawScatter,a.handDrawThickness=this.handDrawThickness,d.remove(this.set),this.set=a.set(),d.remove(this.gridSet),this.gridSet=a.set(),d.remove(this.cursorLineSet),this.cursorLineSet=a.set(),d.remove(this.graphsBehindSet),this.graphsBehindSet=a.set(),d.remove(this.bulletBehindSet),this.bulletBehindSet=a.set(),d.remove(this.columnSet),this.columnSet=a.set(),d.remove(this.graphsSet),this.graphsSet=a.set(),d.remove(this.trendLinesSet),this.trendLinesSet=a.set(),d.remove(this.axesSet),this.axesSet=a.set(),d.remove(this.cursorSet),this.cursorSet=a.set(),d.remove(this.scrollbarsSet),this.scrollbarsSet=a.set(),d.remove(this.bulletSet),this.bulletSet=a.set(),d.remove(this.freeLabelsSet),this.freeLabelsSet=a.set(),d.remove(this.axesLabelsSet),this.axesLabelsSet=a.set(),d.remove(this.balloonsSet),this.balloonsSet=a.set(),d.remove(this.plotBalloonsSet),this.plotBalloonsSet=a.set(),d.remove(this.zoomButtonSet),this.zoomButtonSet=a.set(),d.remove(this.zbSet),this.zbSet=null,d.remove(this.linkSet),this.linkSet=a.set()):this.fire({type:"failed",chart:this})},premeasure:function(){var a=this.div;if(a){try{this.boundingRect=this.chartDiv.getBoundingClientRect()}catch(e){}var b=a.offsetWidth,c=a.offsetHeight;a.clientHeight&&(b=a.clientWidth,c=a.clientHeight);if(b!=this.mw||c!=this.mh)this.mw=b,this.mh=c,this.measure()}},measure:function(){var a=this.div;if(a){var b=this.chartDiv,c=a.offsetWidth,e=a.offsetHeight,g=this.container;a.clientHeight&&(c=a.clientWidth,e=a.clientHeight);var f=d.removePx(d.getStyle(a,"padding-left")),h=d.removePx(d.getStyle(a,"padding-right")),k=d.removePx(d.getStyle(a,"padding-top")),l=d.removePx(d.getStyle(a,"padding-bottom"));isNaN(f)||(c-=f);isNaN(h)||(c-=h);isNaN(k)||(e-=k);isNaN(l)||(e-=l);f=a.style;a=f.width;f=f.height;-1!=a.indexOf("px")&&(c=d.removePx(a));-1!=f.indexOf("px")&&(e=d.removePx(f));e=Math.round(e);c=Math.round(c);a=Math.round(d.toCoordinate(this.width,c));f=Math.round(d.toCoordinate(this.height,e));(c!=this.previousWidth||e!=this.previousHeight)&&0<a&&0<f&&(b.style.width=a+"px",b.style.height=f+"px",b.style.padding=0,g&&g.setSize(a,f),this.balloon=d.processObject(this.balloon,d.AmBalloon,this.theme));this.balloon.setBounds&&this.balloon.setBounds(2,2,a-2,f);this.balloon.chart=this;this.realWidth=a;this.realHeight=f;this.divRealWidth=c;this.divRealHeight=e}},checkDisplay:function(){if(this.autoDisplay&&this.container){var a=d.rect(this.container,10,10),b=a.getBBox();0===b.width&&0===b.height&&(this.divRealHeight=this.divRealWidth=this.realHeight=this.realWidth=0,this.previousWidth=this.previousHeight=NaN);a.remove()}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.legend&&this.legend.destroy()},clearTimeOuts:function(){var a=this.timeOuts;if(a){var b;for(b=0;b<a.length;b++)clearTimeout(a[b])}this.timeOuts=[]},clear:function(a){try{document.removeEventListener("touchstart",this.docfn1,!0),document.removeEventListener("touchend",this.docfn2,!0)}catch(b){}d.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));a||d.removeChart(this);if(a=this.div)for(;a.firstChild;)a.removeChild(a.firstChild);this.legend&&this.legend.destroy();this.AmExport&&this.AmExport.clear&&this.AmExport.clear()},setMouseCursor:function(a){"auto"==a&&d.isNN&&(a="default");this.chartDiv.style.cursor=a;this.legendDiv.style.cursor=a},redrawLabels:function(){this.labels=[];var a=this.allLabels;this.createLabelsSet();var b;for(b=0;b<a.length;b++)this.drawLabel(a[b])},drawLabel:function(a){var b=this;if(b.container&&!1!==a.enabled){a=d.processObject(a,d.Label,b.theme);var c=a.y,e=a.text,g=a.align,f=a.size,h=a.color,k=a.rotation,l=a.alpha,m=a.bold,n=d.toCoordinate(a.x,b.realWidth),c=d.toCoordinate(c,b.realHeight);n||(n=0);c||(c=0);void 0===h&&(h=b.color);isNaN(f)&&(f=b.fontSize);g||(g="start");"left"==g&&(g="start");"right"==g&&(g="end");"center"==g&&(g="middle",k?c=b.realHeight-c+c/2:n=b.realWidth/2-n);void 0===l&&(l=1);void 0===k&&(k=0);c+=f/2;e=d.text(b.container,e,h,b.fontFamily,f,g,m,l);e.translate(n,c);d.setCN(b,e,"label");a.id&&d.setCN(b,e,"label-"+a.id);0!==k&&e.rotate(k);a.url?(e.setAttr("cursor","pointer"),e.click(function(){d.getURL(a.url,b.urlTarget)})):e.node.style.pointerEvents="none";b.labelsSet.push(e);b.labels.push(e)}},addLabel:function(a,b,c,e,d,f,h,k,l,m){a={x:a,y:b,text:c,align:e,size:d,color:f,alpha:k,rotation:h,bold:l,url:m,enabled:!0};this.container&&this.drawLabel(a);this.allLabels.push(a)},clearLabels:function(){var a=this.labels,b;for(b=a.length-1;0<=b;b--)a[b].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var a=this.divRealHeight,b=this.legend;if(b){var c=this.legendDiv.offsetHeight,b=b.position;if("top"==b||"bottom"==b){a-=c;if(0>a||isNaN(a))a=0;this.chartDiv.style.height=a+"px"}}return a},updateWidth:function(){var a=this.divRealWidth,b=this.divRealHeight,c=this.legend;if(c){var e=this.legendDiv,d=e.offsetWidth;isNaN(c.width)||(d=c.width);c.ieW&&(d=c.ieW);var f=e.offsetHeight,e=e.style,h=this.chartDiv.style,c=c.position;if("right"==c||"left"==c){a-=d;if(0>a||isNaN(a))a=0;h.width=a+"px";this.balloon.setBounds(2,2,a-2,this.realHeight);"left"==c?(h.left=d+"px",e.left="0px"):(h.left="0px",e.left=a+"px");b>f&&(e.top=(b-f)/2+"px")}}return a},getTitleHeight:function(){this.drawTitles(!0);
|
7 |
-
return this.titleHeight},addTitle:function(a,b,c,e,d){isNaN(b)&&(b=this.fontSize+2);a={text:a,size:b,color:c,alpha:e,bold:d,enabled:!0};this.titles.push(a);return a},handleWheel:function(a){var b=0;a||(a=window.event);a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);b&&this.handleWheelReal(b,a.shiftKey);a.preventDefault&&a.preventDefault()},handleWheelReal:function(){},handleDocTouchStart:function(){this.hideBalloonReal();this.handleMouseMove();this.tmx=this.mouseX;this.tmy=this.mouseY;this.touchStartTime=(new Date).getTime()},handleDocTouchEnd:function(){-.5<this.tmx&&this.tmx<this.divRealWidth+1&&0<this.tmy&&this.tmy<this.divRealHeight?(this.handleMouseMove(),4>Math.abs(this.mouseX-this.tmx)&&4>Math.abs(this.mouseY-this.tmy)?(this.tapped=!0,this.panRequired&&this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="none",this.chartDiv.style.touchAction="none")):this.mouseIsOver||this.resetTouchStyle()):(this.tapped=!1,this.resetTouchStyle())},resetTouchStyle:function(){this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="auto",this.chartDiv.style.touchAction="auto")},checkTouchDuration:function(a){var b=this,c=(new Date).getTime();if(a)if(a.touches)b.isTouchEvent=!0;else if(!b.isTouchEvent)return!0;if(c-b.touchStartTime>b.touchClickDuration)return!0;setTimeout(function(){b.resetTouchDuration()},300)},resetTouchDuration:function(){this.isTouchEvent=!1},checkTouchMoved:function(){if(4<Math.abs(this.mouseX-this.tmx)||4<Math.abs(this.mouseY-this.tmy))return!0},addListeners:function(){var a=this,b=a.chartDiv;document.addEventListener?("ontouchstart"in document.documentElement&&(b.addEventListener("touchstart",function(b){a.handleTouchStart.call(a,b)},!0),b.addEventListener("touchmove",function(b){a.handleMouseMove.call(a,b)},!0),b.addEventListener("touchend",function(b){a.handleTouchEnd.call(a,b)},!0),a.docfn1=function(b){a.handleDocTouchStart.call(a,b)},a.docfn2=function(b){a.handleDocTouchEnd.call(a,b)},document.addEventListener("touchstart",a.docfn1,!0),document.addEventListener("touchend",a.docfn2,!0)),b.addEventListener("mousedown",function(b){a.mouseIsOver=!0;a.handleMouseMove.call(a,b);a.handleMouseDown.call(a,b);a.handleDocTouchStart.call(a,b)},!0),b.addEventListener("mouseover",function(b){a.handleMouseOver.call(a,b)},!0),b.addEventListener("mouseout",function(b){a.handleMouseOut.call(a,b)},!0),b.addEventListener("mouseup",function(b){a.handleDocTouchEnd.call(a,b)},!0)):(b.attachEvent("onmousedown",function(b){a.handleMouseDown.call(a,b)}),b.attachEvent("onmouseover",function(b){a.handleMouseOver.call(a,b)}),b.attachEvent("onmouseout",function(b){a.handleMouseOut.call(a,b)}))},dispDUpd:function(){this.skipEvents||(this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,this.fire({type:"dataUpdated",chart:this})),this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),this.chartRendered||(this.fire({type:"rendered",chart:this}),this.chartRendered=!0),this.fire({type:"drawn",chart:this}));this.skipEvents=!1},validateSize:function(){var a=this;a.premeasure();a.checkDisplay();if(a.divRealWidth!=a.previousWidth||a.divRealHeight!=a.previousHeight){var b=a.legend;if(0<a.realWidth&&0<a.realHeight){a.sizeChanged=!0;if(b){a.legendInitTO&&clearTimeout(a.legendInitTO);var c=setTimeout(function(){b.invalidateSize()},10);a.timeOuts.push(c);a.legendInitTO=c}a.marginsUpdated=!1;clearTimeout(a.initTO);c=setTimeout(function(){a.initChart()},10);a.timeOuts.push(c);a.initTO=c}a.renderFix();b&&b.renderFix&&b.renderFix();clearTimeout(a.resizedTO);a.resizedTO=setTimeout(function(){a.fire({type:"resized",chart:a})},10);a.previousHeight=a.divRealHeight;a.previousWidth=a.divRealWidth}},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var a=this;a.marginsUpdated=!1;clearTimeout(a.validateTO);var b=setTimeout(function(){a.validateSize()},5);a.timeOuts.push(b);a.validateTO=b},validateData:function(a){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated=!1,this.initChart(a))},validateNow:function(a,b){this.initTO&&clearTimeout(this.initTO);a&&(this.dataChanged=!0,this.marginsUpdated=!1);this.skipEvents=b;this.chartRendered=!1;var c=this.legend;c&&c.position!=this.prevLegendPosition&&(this.previousWidth=this.mw=0,c.invalidateSize&&(c.invalidateSize(),this.validateSize()));this.write(this.div)},showItem:function(a){a.hidden=!1;this.initChart()},hideItem:function(a){a.hidden=!0;this.initChart()},hideBalloon:function(){var a=this;clearTimeout(a.hoverInt);clearTimeout(a.balloonTO);a.hoverInt=setTimeout(function(){a.hideBalloonReal.call(a)},a.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var a=this.balloon;a&&a.hide&&a.hide()},showBalloon:function(a,b,c,e,d){var f=this;clearTimeout(f.balloonTO);clearTimeout(f.hoverInt);f.balloonTO=setTimeout(function(){f.showBalloonReal.call(f,a,b,c,e,d)},1)},showBalloonReal:function(a,b,c,e,d){this.handleMouseMove();var f=this.balloon;f.enabled&&(f.followCursor(!1),f.changeColor(b),!c||f.fixedPosition?(f.setPosition(e,d),isNaN(e)||isNaN(d)?f.followCursor(!0):f.followCursor(!1)):f.followCursor(!0),a&&f.showBalloon(a))},handleMouseOver:function(){this.outTO&&clearTimeout(this.outTO);d.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(){var a=this;d.resetMouseOver();a.outTO&&clearTimeout(a.outTO);a.outTO=setTimeout(function(){a.handleMouseOutReal()},10)},handleMouseOutReal:function(){this.mouseIsOver=!1},handleMouseMove:function(a){a||(a=window.event);this.mouse2Y=this.mouse2X=NaN;var b,c,e,d;if(a){if(a.touches){var f=a.touches.item(1);f&&this.panEventsEnabled&&this.boundingRect&&(e=f.clientX-this.boundingRect.left,d=f.clientY-this.boundingRect.top);a=a.touches.item(0);if(!a)return}else this.wasTouched=!1;this.boundingRect&&a.clientX&&(b=a.clientX-this.boundingRect.left,c=a.clientY-this.boundingRect.top);isNaN(e)?this.mouseX=b:(this.mouseX=Math.min(b,e),this.mouse2X=Math.max(b,e));isNaN(d)?this.mouseY=c:(this.mouseY=Math.min(c,d),this.mouse2Y=Math.max(c,d))}},handleTouchStart:function(a){this.hideBalloonReal();a&&(a.touches&&this.tapToActivate&&!this.tapped||!this.panRequired)||(this.handleMouseMove(a),this.handleMouseDown(a))},handleTouchEnd:function(a){this.wasTouched=!0;this.handleMouseMove(a);d.resetMouseOver();this.handleReleaseOutside(a)},handleReleaseOutside:function(){this.handleDocTouchEnd.call(this)},handleMouseDown:function(a){d.resetMouseOver();this.mouseIsOver=!0;a&&a.preventDefault&&(this.panEventsEnabled?a.preventDefault():a.touches||a.preventDefault())},addLegend:function(a,b){a=d.processObject(a,d.AmLegend,this.theme);a.divId=b;a.ieW=0;var c;c="object"!=typeof b&&b?document.getElementById(b):b;this.legend=a;a.chart=this;c?(a.div=c,a.position="outside",a.autoMargins=!1):a.div=this.legendDiv;return a},removeLegend:function(){this.legend=void 0;this.previousWidth=0;this.legendDiv.innerHTML=""},handleResize:function(){(d.isPercents(this.width)||d.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!d.VML){var a=this.container;a&&a.renderFix()}},getSVG:function(){if(d.hasSVG)return this.container},animate:function(a,b,c,e,g,f,h){a["an_"+b]&&d.removeFromArray(this.animations,a["an_"+b]);c={obj:a,frame:0,attribute:b,from:c,to:e,time:g,effect:f,suffix:h};a["an_"+b]=c;this.animations.push(c);return c},setLegendData:function(a){var b=this.legend;b&&b.setData(a)},stopAnim:function(a){d.removeFromArray(this.animations,a)},updateAnimations:function(){var a;this.container&&this.container.update();if(this.animations)for(a=this.animations.length-1;0<=a;a--){var b=this.animations[a],c=d.updateRate*b.time,e=b.frame+1,g=b.obj,f=b.attribute;if(e<=c){b.frame++;var h=Number(b.from),k=Number(b.to)-h,c=d[b.effect](0,e,h,k,c);0===k?(this.animations.splice(a,1),g.node.style[f]=Number(b.to)+b.suffix):g.node.style[f]=c+b.suffix}else g.node.style[f]=Number(b.to)+b.suffix,g.animationFinished=!0,this.animations.splice(a,1)}},update:function(){this.updateAnimations();var a=this.animatable;if(0<a.length){for(var b=!0,c=a.length-1;0<=c;c--){var e=a[c];e&&(e.animationFinished?a.splice(c,1):b=!1)}b&&(this.fire({type:"animationFinished",chart:this}),this.animatable=[])}},inIframe:function(){try{return window.self!==window.top}catch(a){return!0}},brr:function(){if(!this.hideCredits){var a="amcharts.com",b=window.location.hostname.split("."),c;2<=b.length&&(c=b[b.length-2]+"."+b[b.length-1]);this.amLink&&(b=this.amLink.parentNode)&&b.removeChild(this.amLink);b=this.creditsPosition;if(c!=a||!0===this.inIframe()){var a="http://www."+a,e=c=0,d=this.realWidth,f=this.realHeight,h=this.type;if("serial"==h||"xy"==h||"gantt"==h)c=this.marginLeftReal,e=this.marginTopReal,d=c+this.plotAreaWidth,f=e+this.plotAreaHeight;var h=a+"/javascript-charts/",k="JavaScript charts",l="";"ammap"==this.product&&(h=a+"/javascript-maps/",k="Interactive JavaScript maps",l="JS map by amCharts");a=document.createElement("a");l=document.createTextNode(l);a.setAttribute("href",h);a.setAttribute("title",k);this.urlTarget&&a.setAttribute("target",this.urlTarget);a.appendChild(l);this.chartDiv.appendChild(a);this.amLink=a;h=a.style;h.position="absolute";h.textDecoration="none";h.color=this.color;h.fontFamily=this.fontFamily;h.fontSize="11px";h.opacity=.7;h.display="block";var k=a.offsetWidth,a=a.offsetHeight,l=5+c,m=e+5;"bottom-left"==b&&(l=5+c,m=f-a-3);"bottom-right"==b&&(l=d-k-5,m=f-a-3);"top-right"==b&&(l=d-k-5,m=e+5);h.left=l+"px";h.top=m+"px"}}}});d.Slice=d.Class({construct:function(){}});d.SerialDataItem=d.Class({construct:function(){}});d.GraphDataItem=d.Class({construct:function(){}});d.Guide=d.Class({construct:function(a){this.cname="Guide";d.applyTheme(this,a,this.cname)}});d.Title=d.Class({construct:function(a){this.cname="Title";d.applyTheme(this,a,this.cname)}});d.Label=d.Class({construct:function(a){this.cname="Label";d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.AmBalloon=d.Class({construct:function(a){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!0;this.offsetY=6;this.offsetX=1;this.textAlign="center";this.disableMouseEvents=!0;this.deltaSignX=this.deltaSignY=1;d.isModern||(this.offsetY*=1.5);this.sdy=this.sdx=0;d.applyTheme(this,a,this.cname)},draw:function(){var a=this.pointToX,b=this.pointToY;d.isModern||(this.drop=!1);var c=this.chart;d.VML&&(this.fadeOutDuration=0);this.xAnim&&c.stopAnim(this.xAnim);this.yAnim&&c.stopAnim(this.yAnim);this.sdy=this.sdx=0;if(!isNaN(a)){var e=this.follow,g=c.container,f=this.set;d.remove(f);this.removeDiv();f=g.set();f.node.style.pointerEvents="none";this.set=f;this.mainSet?(this.mainSet.push(this.set),this.sdx=this.mainSet.x,this.sdy=this.mainSet.y):c.balloonsSet.push(f);if(this.show){var h=this.l,k=this.t,l=this.r,m=this.b,n=this.balloonColor,q=this.fillColor,t=this.borderColor,r=q;void 0!=n&&(this.adjustBorderColor?r=t=n:q=n);var p=this.horizontalPadding,u=this.verticalPadding,A=this.pointerWidth,x=this.pointerOrientation,z=this.cornerRadius,v=c.fontFamily,B=this.fontSize;void 0==B&&(B=c.fontSize);var n=document.createElement("div"),C=c.classNamePrefix;n.className=C+"-balloon-div";this.className&&(n.className=n.className+" "+C+"-balloon-div-"+this.className);C=n.style;this.disableMouseEvents&&(C.pointerEvents="none");C.position="absolute";var w=this.minWidth,y="";isNaN(w)||(y="min-width:"+(w-2*p)+"px; ");n.innerHTML='<div style="text-align:'+this.textAlign+"; "+y+"max-width:"+this.maxWidth+"px; font-size:"+B+"px; color:"+this.color+"; font-family:"+
|
8 |
-
v+'">'+this.text+"</div>";c.chartDiv.appendChild(n);this.textDiv=n;var F=n.offsetWidth,E=n.offsetHeight;n.clientHeight&&(F=n.clientWidth,E=n.clientHeight);v=E+2*u;y=F+2*p;!isNaN(w)&&y<w&&(y=w);window.opera&&(v+=2);var H=!1,B=this.offsetY;c.handDrawn&&(B+=c.handDrawScatter+2);"H"!=x?(w=a-y/2,b<k+v+10&&"down"!=x?(H=!0,e&&(b+=B),B=b+A,this.deltaSignY=-1):(e&&(b-=B),B=b-v-A,this.deltaSignY=1)):(2*A>v&&(A=v/2),B=b-v/2,a<h+(l-h)/2?(w=a+A,this.deltaSignX=-1):(w=a-y-A,this.deltaSignX=1));B+v>=m&&(B=m-v);
|
9 |
-
B<k&&(B=k);w<h&&(w=h);w+y>l&&(w=l-y);var k=B+u,m=w+p,G=this.shadowAlpha,D=this.shadowColor,p=this.borderThickness,K=this.bulletSize,J,u=this.fillAlpha,L=this.borderAlpha;this.showBullet&&(J=d.circle(g,K,r,u),f.push(J));this.drop?(h=y/1.6,l=0,"V"==x&&(x="down"),"H"==x&&(x="left"),"down"==x&&(w=a+1,B=b-h-h/3),"up"==x&&(l=180,w=a+1,B=b+h+h/3),"left"==x&&(l=270,w=a+h+h/3+2,B=b),"right"==x&&(l=90,w=a-h-h/3+2,B=b),k=B-E/2+1,m=w-F/2-1,q=d.drop(g,h,l,q,u,p,t,L)):0<z||0===A?(0<G&&(a=d.rect(g,y,v,q,0,p+1,D,G,z),d.isModern?a.translate(1,1):a.translate(4,4),f.push(a)),q=d.rect(g,y,v,q,u,p,t,L,z)):(r=[],z=[],"H"!=x?(h=a-w,h>y-A&&(h=y-A),h<A&&(h=A),r=[0,h-A,a-w,h+A,y,y,0,0],z=H?[0,0,b-B,0,0,v,v,0]:[v,v,b-B,v,v,0,0,v]):(x=b-B,x>v-A&&(x=v-A),x<A&&(x=A),z=[0,x-A,b-B,x+A,v,v,0,0],r=a<h+(l-h)/2?[0,0,w<a?0:a-w,0,0,y,y,0]:[y,y,w+y>a?y:a-w,y,y,0,0,y]),0<G&&(a=d.polygon(g,r,z,q,0,p,D,G),a.translate(1,1),f.push(a)),q=d.polygon(g,r,z,q,u,p,t,L));this.bg=q;f.push(q);q.toFront();d.setCN(c,q,"balloon-bg");this.className&&
|
10 |
-
d.setCN(c,q,"balloon-bg-"+this.className);g=1*this.deltaSignX;m+=this.sdx;k+=this.sdy;C.left=m+"px";C.top=k+"px";f.translate(w-g,B,1,!0);q=q.getBBox();this.bottom=B+v+1;this.yPos=q.y+B;J&&J.translate(this.pointToX-w+g,b-B);b=this.animationDuration;0<this.animationDuration&&!e&&!isNaN(this.prevX)&&(f.translate(this.prevX,this.prevY,NaN,!0),f.animate({translate:w-g+","+B},b,"easeOutSine"),n&&(C.left=this.prevTX+"px",C.top=this.prevTY+"px",this.xAnim=c.animate({node:n},"left",this.prevTX,m,b,"easeOutSine","px"),this.yAnim=c.animate({node:n},"top",this.prevTY,k,b,"easeOutSine","px")));this.prevX=w-g;this.prevY=B;this.prevTX=m;this.prevTY=k}}},fixPrevious:function(){this.rPrevX=this.prevX;this.rPrevY=this.prevY;this.rPrevTX=this.prevTX;this.rPrevTY=this.prevTY},restorePrevious:function(){this.prevX=this.rPrevX;this.prevY=this.rPrevY;this.prevTX=this.rPrevTX;this.prevTY=this.rPrevTY},followMouse:function(){if(this.follow&&this.show){var a=this.chart.mouseX-this.offsetX*this.deltaSignX-this.sdx,b=this.chart.mouseY-
|
11 |
-
this.sdy;this.pointToX=a;this.pointToY=b;if(a!=this.previousX||b!=this.previousY)if(this.previousX=a,this.previousY=b,0===this.cornerRadius)this.draw();else{var c=this.set;if(c){var e=c.getBBox(),a=a-e.width/2,d=b-e.height-10;a<this.l&&(a=this.l);a>this.r-e.width&&(a=this.r-e.width);d<this.t&&(d=b+10);c.translate(a,d);b=this.textDiv.style;b.left=a+this.horizontalPadding+"px";b.top=d+this.verticalPadding+"px"}}}},changeColor:function(a){this.balloonColor=a},setBounds:function(a,b,c,e){this.l=a;this.t=b;this.r=c;this.b=e;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(a){if(this.text!=a||this.positionChanged)this.text=a,this.isHiding=!1,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),a=this.chart,this.fadeAnim1&&a.stopAnim(this.fadeAnim1),this.fadeAnim2&&a.stopAnim(this.fadeAnim2),this.draw(),this.positionChanged=!1},hide:function(a){var b=this;b.text=void 0;isNaN(a)&&(a=b.fadeOutDuration);var c=b.chart;if(0<a&&!b.isHiding){b.isHiding=!0;b.destroyTO&&clearTimeout(b.destroyTO);b.destroyTO=setTimeout(function(){b.destroy.call(b)},1E3*a);b.follow=!1;b.show=!1;var e=b.set;e&&(e.setAttr("opacity",b.fillAlpha),b.fadeAnim1=e.animate({opacity:0},a,"easeInSine"));b.textDiv&&(b.fadeAnim2=c.animate({node:b.textDiv},"opacity",1,0,a,"easeInSine",""))}else b.show=!1,b.follow=!1,b.destroy()},setPosition:function(a,b){if(a!=this.pointToX||b!=this.pointToY)this.previousX=this.pointToX,this.previousY=this.pointToY,this.pointToX=a,this.pointToY=b,this.positionChanged=!0},followCursor:function(a){var b=this;b.follow=a;clearInterval(b.interval);var c=b.chart.mouseX-b.sdx,e=b.chart.mouseY-b.sdy;!isNaN(c)&&a&&(b.pointToX=c-b.offsetX*b.deltaSignX,b.pointToY=e,b.followMouse(),b.interval=setInterval(function(){b.followMouse.call(b)},40))},removeDiv:function(){if(this.textDiv){var a=this.textDiv.parentNode;a&&a.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);d.remove(this.set);this.removeDiv();this.set=null}})})();(function(){var d=window.AmCharts;d.circle=function(a,b,c,e,g,f,h,k,l){0>=b&&(b=.001);if(void 0==g||0===g)g=.01;void 0===f&&(f="#000000");void 0===h&&(h=0);e={fill:c,stroke:f,"fill-opacity":e,"stroke-width":g,"stroke-opacity":h};a=isNaN(l)?a.circle(0,0,b).attr(e):a.ellipse(0,0,b,l).attr(e);k&&a.gradient("radialGradient",[c,d.adjustLuminosity(c,-.6)]);return a};d.text=function(a,b,c,e,g,f,h,k){f||(f="middle");"right"==f&&(f="end");"left"==f&&(f="start");isNaN(k)&&(k=1);void 0!==b&&(b=String(b),d.isIE&&!d.isModern&&(b=b.replace("&","&"),b=b.replace("&","&")));c={fill:c,"font-family":e,"font-size":g+"px",opacity:k};!0===h&&(c["font-weight"]="bold");c["text-anchor"]=f;return a.text(b,c)};d.polygon=function(a,b,c,e,g,f,h,k,l,m,n){isNaN(f)&&(f=.01);isNaN(k)&&(k=g);var q=e,t=!1;"object"==typeof q&&1<q.length&&(t=!0,q=q[0]);void 0===h&&(h=q);g={fill:q,stroke:h,"fill-opacity":g,"stroke-width":f,"stroke-opacity":k};void 0!==n&&0<n&&(g["stroke-dasharray"]=n);n=d.dx;f=d.dy;a.handDrawn&&(c=d.makeHD(b,c,a.handDrawScatter),b=c[0],c=c[1]);h=Math.round;m&&(b[r]=d.roundTo(b[r],5),c[r]=d.roundTo(c[r],5),h=Number);k="M"+(h(b[0])+n)+","+(h(c[0])+f);for(var r=1;r<b.length;r++)m&&(b[r]=d.roundTo(b[r],5),c[r]=d.roundTo(c[r],5)),k+=" L"+(h(b[r])+n)+","+(h(c[r])+f);a=a.path(k+" Z").attr(g);t&&a.gradient("linearGradient",e,l);return a};d.rect=function(a,b,c,e,g,f,h,k,l,m,n){if(isNaN(b)||isNaN(c))return a.set();isNaN(f)&&(f=0);void 0===l&&(l=0);void 0===m&&(m=270);isNaN(g)&&(g=0);var q=e,t=!1;"object"==typeof q&&(q=q[0],t=!0);void 0===h&&(h=q);void 0===k&&(k=g);b=Math.round(b);c=Math.round(c);var r=0,p=0;0>b&&(b=Math.abs(b),r=-b);0>c&&(c=Math.abs(c),p=-c);r+=d.dx;p+=d.dy;g={fill:q,stroke:h,"fill-opacity":g,"stroke-opacity":k};void 0!==n&&0<n&&(g["stroke-dasharray"]=n);a=a.rect(r,p,b,c,l,f).attr(g);t&&a.gradient("linearGradient",e,m);return a};d.bullet=function(a,b,c,e,g,f,h,k,l,m,n,q,t){var r;"circle"==b&&(b="round");switch(b){case"round":r=d.circle(a,c/2,e,g,f,h,k);break;case"square":r=d.polygon(a,[-c/
|
12 |
-
2,c/2,c/2,-c/2],[c/2,c/2,-c/2,-c/2],e,g,f,h,k,m-180,void 0,t);break;case"rectangle":r=d.polygon(a,[-c,c,c,-c],[c/2,c/2,-c/2,-c/2],e,g,f,h,k,m-180,void 0,t);break;case"diamond":r=d.polygon(a,[-c/2,0,c/2,0],[0,-c/2,0,c/2],e,g,f,h,k);break;case"triangleUp":r=d.triangle(a,c,0,e,g,f,h,k);break;case"triangleDown":r=d.triangle(a,c,180,e,g,f,h,k);break;case"triangleLeft":r=d.triangle(a,c,270,e,g,f,h,k);break;case"triangleRight":r=d.triangle(a,c,90,e,g,f,h,k);break;case"bubble":r=d.circle(a,c/2,e,g,f,h,k,!0);break;case"line":r=d.line(a,[-c/2,c/2],[0,0],e,g,f,h,k);break;case"yError":r=a.set();r.push(d.line(a,[0,0],[-c/2,c/2],e,g,f));r.push(d.line(a,[-l,l],[-c/2,-c/2],e,g,f));r.push(d.line(a,[-l,l],[c/2,c/2],e,g,f));break;case"xError":r=a.set(),r.push(d.line(a,[-c/2,c/2],[0,0],e,g,f)),r.push(d.line(a,[-c/2,-c/2],[-l,l],e,g,f)),r.push(d.line(a,[c/2,c/2],[-l,l],e,g,f))}r&&r.pattern(n,NaN,q);return r};d.triangle=function(a,b,c,e,d,f,h,k){if(void 0===f||0===f)f=1;void 0===h&&(h="#000");void 0===k&&(k=0);e={fill:e,stroke:h,"fill-opacity":d,"stroke-width":f,"stroke-opacity":k};b/=2;var l;0===c&&(l=" M"+-b+","+b+" L0,"+-b+" L"+b+","+b+" Z");180==c&&(l=" M"+-b+","+-b+" L0,"+b+" L"+b+","+-b+" Z");90==c&&(l=" M"+-b+","+-b+" L"+b+",0 L"+-b+","+b+" Z");270==c&&(l=" M"+-b+",0 L"+b+","+b+" L"+b+","+-b+" Z");return a.path(l).attr(e)};d.line=function(a,b,c,e,g,f,h,k,l,m,n){if(a.handDrawn&&!n)return d.handDrawnLine(a,b,c,e,g,f,h,k,l,m,n);f={fill:"none","stroke-width":f};void 0!==h&&0<h&&(f["stroke-dasharray"]=h);isNaN(g)||(f["stroke-opacity"]=g);e&&(f.stroke=e);e=Math.round;m&&(e=Number,b[0]=d.roundTo(b[0],5),c[0]=d.roundTo(c[0],5));m=d.dx;g=d.dy;h="M"+(e(b[0])+m)+","+(e(c[0])+g);for(k=1;k<b.length;k++)b[k]=d.roundTo(b[k],5),c[k]=d.roundTo(c[k],5),h+=" L"+(e(b[k])+m)+","+(e(c[k])+g);if(d.VML)return a.path(h,void 0,!0).attr(f);l&&(h+=" M0,0 L0,0");return a.path(h).attr(f)};d.makeHD=function(a,b,c){for(var e=[],d=[],f=1;f<a.length;f++)for(var h=Number(a[f-1]),k=Number(b[f-1]),l=Number(a[f]),m=Number(b[f]),n=Math.round(Math.sqrt(Math.pow(l-h,2)+Math.pow(m-k,2))/50)+1,l=(l-h)/n,m=(m-k)/n,q=0;q<=n;q++){var t=k+q*m+Math.random()*c;e.push(h+q*l+Math.random()*c);d.push(t)}return[e,d]};d.handDrawnLine=function(a,b,c,e,g,f,h,k,l,m){var n,q=a.set();for(n=1;n<b.length;n++)for(var t=[b[n-1],b[n]],r=[c[n-1],c[n]],r=d.makeHD(t,r,a.handDrawScatter),t=r[0],r=r[1],p=1;p<t.length;p++)q.push(d.line(a,[t[p-1],t[p]],[r[p-1],r[p]],e,g,f+Math.random()*a.handDrawThickness-a.handDrawThickness/2,h,k,l,m,!0));return q};d.doNothing=
|
13 |
-
function(a){return a};d.drop=function(a,b,c,e,d,f,h,k){var l=1/180*Math.PI,m=c-20,n=Math.sin(m*l)*b,q=Math.cos(m*l)*b,t=Math.sin((m+40)*l)*b,r=Math.cos((m+40)*l)*b,p=.8*b,u=-b/3,A=b/3;0===c&&(u=-u,A=0);180==c&&(A=0);90==c&&(u=0);270==c&&(u=0,A=-A);c={fill:e,stroke:h,"stroke-width":f,"stroke-opacity":k,"fill-opacity":d};b="M"+n+","+q+" A"+b+","+b+",0,1,1,"+t+","+r+(" A"+p+","+p+",0,0,0,"+(Math.sin((m+20)*l)*b+A)+","+(Math.cos((m+20)*l)*b+u));b+=" A"+p+","+p+",0,0,0,"+n+","+q;return a.path(b,void 0,void 0,"1000,1000").attr(c)};d.wedge=function(a,b,c,e,g,f,h,k,l,m,n,q,t,r){var p=Math.round;f=p(f);h=p(h);k=p(k);var u=p(h/f*k),A=d.VML,x=359.5+f/100;359.94<x&&(x=359.94);g>=x&&(g=x);var z=1/180*Math.PI,x=b+Math.sin(e*z)*k,v=c-Math.cos(e*z)*u,B=b+Math.sin(e*z)*f,C=c-Math.cos(e*z)*h,w=b+Math.sin((e+g)*z)*f,y=c-Math.cos((e+g)*z)*h,F=b+Math.sin((e+g)*z)*k,z=c-Math.cos((e+g)*z)*u,E={fill:d.adjustLuminosity(m.fill,-.2),"stroke-opacity":0,"fill-opacity":m["fill-opacity"]},H=0;180<Math.abs(g)&&(H=1);e=a.set();var G;A&&(x=p(10*x),B=p(10*B),w=p(10*w),F=p(10*F),v=p(10*v),C=p(10*C),y=p(10*y),z=p(10*z),b=p(10*b),l=p(10*l),c=p(10*c),f*=10,h*=10,k*=10,u*=10,1>Math.abs(g)&&1>=Math.abs(w-B)&&1>=Math.abs(y-C)&&(G=!0));g="";var D;q&&(E["fill-opacity"]=0,E["stroke-opacity"]=m["stroke-opacity"]/2,E.stroke=m.stroke);if(0<l){D=" M"+x+","+(v+l)+" L"+B+","+(C+l);A?(G||(D+=" A"+(b-f)+","+(l+c-h)+","+(b+f)+","+(l+c+h)+","+B+","+(C+l)+","+w+","+(y+l)),D+=" L"+F+","+(z+l),0<k&&(G||(D+=" B"+(b-k)+","+(l+c-u)+","+(b+k)+","+
|
14 |
-
(l+c+u)+","+F+","+(l+z)+","+x+","+(l+v)))):(D+=" A"+f+","+h+",0,"+H+",1,"+w+","+(y+l)+" L"+F+","+(z+l),0<k&&(D+=" A"+k+","+u+",0,"+H+",0,"+x+","+(v+l)));D+=" Z";var K=l;A&&(K/=10);for(var J=0;J<K;J+=10){var L=a.path(D,void 0,void 0,"1000,1000").attr(E);e.push(L);L.translate(0,-J)}D=a.path(" M"+x+","+v+" L"+x+","+(v+l)+" L"+B+","+(C+l)+" L"+B+","+C+" L"+x+","+v+" Z",void 0,void 0,"1000,1000").attr(E);l=a.path(" M"+w+","+y+" L"+w+","+(y+l)+" L"+F+","+(z+l)+" L"+F+","+z+" L"+w+","+y+" Z",void 0,void 0,"1000,1000").attr(E);e.push(D);e.push(l)}A?(G||(g=" A"+p(b-f)+","+p(c-h)+","+p(b+f)+","+p(c+h)+","+p(B)+","+p(C)+","+p(w)+","+p(y)),h=" M"+p(x)+","+p(v)+" L"+p(B)+","+p(C)+g+" L"+p(F)+","+p(z)):h=" M"+x+","+v+" L"+B+","+C+(" A"+f+","+h+",0,"+H+",1,"+w+","+y)+" L"+F+","+z;0<k&&(A?G||(h+=" B"+(b-k)+","+(c-u)+","+(b+k)+","+(c+u)+","+F+","+z+","+x+","+v):h+=" A"+k+","+u+",0,"+H+",0,"+x+","+v);a.handDrawn&&(k=d.line(a,[x,B],[v,C],m.stroke,m.thickness*Math.random()*a.handDrawThickness,m["stroke-opacity"]),e.push(k));a=a.path(h+" Z",void 0,void 0,"1000,1000").attr(m);if(n){k=[];for(u=0;u<n.length;u++)k.push(d.adjustLuminosity(m.fill,n[u]));"radial"!=r||d.isModern||(k=[]);0<k.length&&a.gradient(r+"Gradient",k)}d.isModern&&"radial"==r&&a.grad&&(a.grad.setAttribute("gradientUnits","userSpaceOnUse"),a.grad.setAttribute("r",f),a.grad.setAttribute("cx",b),a.grad.setAttribute("cy",c));a.pattern(q,NaN,t);e.wedge=a;e.push(a);return e};d.rgb2hex=function(a){return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],10).toString(16)).slice(-2):""};d.adjustLuminosity=function(a,b){a&&-1!=a.indexOf("rgb")&&(a=d.rgb2hex(a));a=String(a).replace(/[^0-9a-f]/gi,"");6>a.length&&(a=String(a[0])+String(a[0])+String(a[1])+String(a[1])+String(a[2])+String(a[2]));b=b||0;var c="#",e,g;for(g=0;3>g;g++)e=parseInt(a.substr(2*g,2),16),e=Math.round(Math.min(Math.max(0,e+e*b),255)).toString(16),c+=("00"+
|
15 |
-
e).substr(e.length);return c}})();(function(){var d=window.AmCharts;d.AmLegend=d.Class({construct:function(a){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;d.applyTheme(this,a,this.cname)},setData:function(a){this.legendData=a;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var a=this.legendData;this.enabled&&(d.ifArray(a)||d.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var a=this.chart,b=this.position,c=this.width,e=a.divRealWidth,g=a.divRealHeight,f=this.div,h=this.legendData;this.data&&(h=this.data);isNaN(this.fontSize)&&(this.fontSize=a.fontSize);this.maxColumnsReal=this.maxColumns;if("right"==b||"left"==b)this.maxColumnsReal=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=a.marginRight;this.marginLeft=a.marginLeft;var k=a.autoMarginOffset;"bottom"==b?(this.marginBottom=k,this.marginTop=0):(this.marginTop=k,this.marginBottom=0)}c=void 0!==c?d.toCoordinate(c,e):"right"!=b&&"left"!=b?a.realWidth:0<this.ieW?this.ieW:a.realWidth;"outside"==b?(c=f.offsetWidth,g=f.offsetHeight,f.clientHeight&&(c=f.clientWidth,g=f.clientHeight)):(isNaN(c)||(f.style.width=c+"px"),f.className="amChartsLegend "+a.classNamePrefix+"-legend-div");this.divWidth=c;(b=this.container)?(b.container.innerHTML="",f.appendChild(b.container),b.width=c,b.height=g,b.setSize(c,g),b.addDefs(a)):b=new d.AmDraw(f,c,g,a);this.container=b;this.lx=0;this.ly=8;g=this.markerSize;g>this.fontSize&&(this.ly=g/2-1);0<g&&(this.lx+=g+this.markerLabelGap);this.titleWidth=0;if(g=this.title)g=d.text(this.container,g,this.color,a.fontFamily,this.fontSize,"start",!0),d.setCN(a,g,"legend-title"),g.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),a=g.getBBox(),this.titleWidth=a.width+15,this.titleHeight=a.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(a=0;a<h.length;a++)this.createEntry(h[a]);for(a=this.index=0;a<h.length;a++)this.createValue(h[a])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var a=this.position,b=this.marginLeft+this.titleWidth,c=this.marginRight,e=this.marginTop,g=this.marginBottom,f=this.horizontalGap,h=this.div,k=this.divWidth,l=this.maxColumnsReal,m=this.verticalGap,n=this.spacing,q=k-c-b,t=0,r=0,p=this.container;this.set&&this.set.remove();var u=p.set();this.set=u;var A=p.set();u.push(A);var x=this.entries,z,v;for(v=0;v<x.length;v++){z=x[v].getBBox();var B=z.width;B>t&&(t=B);z=z.height;z>r&&(r=z)}var B=r=0,C=f,w=0,y=0;for(v=0;v<x.length;v++){var F=x[v];this.reversedOrder&&(F=x[x.length-v-1]);z=F.getBBox();var E;this.equalWidths?E=B*(t+n+this.markerLabelGap):(E=C,C=C+z.width+f+n);z.height>y&&(y=z.height);E+z.width>q&&0<v&&0!==B&&(r++,E=B=0,C=E+z.width+f+n,w=w+y+m,y=0);F.translate(E,w);B++;!isNaN(l)&&B>=l&&(B=0,r++,w=w+y+m,C=f,y=0);A.push(F)}z=A.getBBox();l=z.height+2*m-1;"left"==a||"right"==a?(n=z.width+2*f,k=n+b+c,h.style.width=k+"px",this.ieW=k):n=k-b-c-1;c=d.polygon(this.container,[0,n,n,0],[0,0,l,l],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);d.setCN(this.chart,c,"legend-bg");u.push(c);u.translate(b,e);c.toBack();b=f;if("top"==a||"bottom"==a||"absolute"==a||"outside"==a)"center"==this.align?b=f+(n-z.width)/2:"right"==this.align&&(b=f+n-z.width);A.translate(b,m+1);this.titleHeight>l&&(l=this.titleHeight);a=l+e+g+1;0>a&&(a=0);a>this.chart.divRealHeight&&(h.style.top="0px");h.style.height=Math.round(a)+"px";p.setSize(this.divWidth,a)},createEntry:function(a){if(!1!==a.visibleInLegend&&!a.hideFromLegend){var b=this.chart,c=a.markerType;a.legendEntryWidth=this.markerSize;c||(c=this.markerType);var e=a.color,g=
|
16 |
-
a.alpha;a.legendKeyColor&&(e=a.legendKeyColor());a.legendKeyAlpha&&(g=a.legendKeyAlpha());var f;!0===a.hidden&&(f=e=this.markerDisabledColor);var h=a.pattern,k=a.customMarker;k||(k=this.customMarker);var l=this.container,m=this.markerSize,n=0,q=0,t=m/2;if(this.useGraphSettings){c=a.type;this.switchType=void 0;if("line"==c||"step"==c||"smoothedLine"==c||"ohlc"==c)h=l.set(),a.hidden||(e=a.lineColorR,f=a.bulletBorderColorR),n=d.line(l,[0,2*m],[m/2,m/2],e,a.lineAlpha,a.lineThickness,a.dashLength),d.setCN(b,n,"graph-stroke"),h.push(n),a.bullet&&(a.hidden||(e=a.bulletColorR),n=d.bullet(l,a.bullet,a.bulletSize,e,a.bulletAlpha,a.bulletBorderThickness,f,a.bulletBorderAlpha))&&(d.setCN(b,n,"graph-bullet"),n.translate(m+1,m/2),h.push(n)),t=0,n=m,q=m/3;else{var r;a.getGradRotation&&(r=a.getGradRotation(),0===r&&(r=180));n=a.fillColorsR;!0===a.hidden&&(n=e);if(h=this.createMarker("rectangle",n,a.fillAlphas,a.lineThickness,e,a.lineAlpha,r,h,a.dashLength))t=m,h.translate(t,m/2);n=m}d.setCN(b,h,"graph-"+c);d.setCN(b,h,"graph-"+a.id)}else if(k)h=l.image(k,0,0,m,m);else{var p;isNaN(this.gradientRotation)||(p=180+this.gradientRotation);(h=this.createMarker(c,e,g,void 0,void 0,void 0,p,h))&&h.translate(m/2,m/2)}d.setCN(b,h,"legend-marker");this.addListeners(h,a);l=l.set([h]);this.switchable&&a.switchable&&l.setAttr("cursor","pointer");void 0!==a.id&&d.setCN(b,l,"legend-item-"+a.id);d.setCN(b,l,a.className,!0);f=this.switchType;var u;f&&"none"!=f&&0<m&&("x"==f?(u=this.createX(),u.translate(m/2,m/2)):u=this.createV(),u.dItem=a,!0!==a.hidden?"x"==f?u.hide():u.show():"x"!=f&&u.hide(),this.switchable||u.hide(),this.addListeners(u,a),a.legendSwitch=u,l.push(u),d.setCN(b,u,"legend-switch"));f=this.color;a.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(f=this.selectedColor);this.useMarkerColorForLabels&&(f=e);!0===a.hidden&&(f=this.markerDisabledColor);e=d.massReplace(this.labelText,{"[[title]]":a.title});r=this.fontSize;h&&(m<=r&&(m=m/2+this.ly-r/2+(r+2-m)/2-q,h.translate(t,m),u&&u.translate(u.x,
|
17 |
-
m)),a.legendEntryWidth=h.getBBox().width);var A;e&&(e=d.fixBrakes(e),a.legendTextReal=e,A=this.labelWidth,A=isNaN(A)?d.text(this.container,e,f,b.fontFamily,r,"start"):d.wrappedText(this.container,e,f,b.fontFamily,r,"start",!1,A,0),d.setCN(b,A,"legend-label"),A.translate(this.lx+n,this.ly),l.push(A),b=A.getBBox().width,this.maxLabelWidth<b&&(this.maxLabelWidth=b));this.entries[this.index]=l;a.legendEntry=this.entries[this.index];a.legendMarker=h;a.legendLabel=A;this.index++}},addListeners:function(a,b){var c=this;a&&a.mouseover(function(a){c.rollOverMarker(b,a)}).mouseout(function(a){c.rollOutMarker(b,a)}).click(function(a){c.clickMarker(b,a)})},rollOverMarker:function(a,b){this.switchable&&this.dispatch("rollOverMarker",a,b);this.dispatch("rollOverItem",a,b)},rollOutMarker:function(a,b){this.switchable&&this.dispatch("rollOutMarker",a,b);this.dispatch("rollOutItem",a,b)},clickMarker:function(a,b){this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b));this.dispatch("clickMarker",a,b)},rollOverLabel:function(a,b){a.hidden||(this.textClickEnabled&&a.legendLabel&&a.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",a,b))},rollOutLabel:function(a,b){if(!a.hidden){if(this.textClickEnabled&&a.legendLabel){var c=this.color;void 0!==this.selectedColor&&a.showBalloon&&(c=this.selectedColor);this.useMarkerColorForLabels&&(c=a.lineColor,void 0===c&&(c=a.color));a.legendLabel.attr({fill:c})}this.dispatch("rollOutItem",a,b)}},clickLabel:function(a,b){this.textClickEnabled?a.hidden||this.dispatch("clickLabel",a,b):this.switchable&&(!0===a.hidden?this.dispatch("showItem",a,b):this.dispatch("hideItem",a,b))},dispatch:function(a,b,c){a={type:a,dataItem:b,target:this,event:c,chart:this.chart};this.chart&&this.chart.handleLegendEvent(a);this.fire(a)},createValue:function(a){var b=this,c=b.fontSize,e=b.chart;if(!1!==a.visibleInLegend&&!a.hideFromLegend){var g=b.maxLabelWidth;b.forceWidth&&(g=b.labelWidth);b.equalWidths||(b.valueAlign="left");"left"==b.valueAlign&&(g=a.legendEntry.getBBox().width);var f=g;if(b.valueText&&0<b.valueWidth){var h=b.color;b.useMarkerColorForValues&&(h=a.color,a.legendKeyColor&&(h=a.legendKeyColor()));!0===a.hidden&&(h=b.markerDisabledColor);var k=b.valueText,g=g+b.lx+b.markerLabelGap+b.valueWidth,l="end";"left"==b.valueAlign&&(g-=b.valueWidth,l="start");h=d.text(b.container,k,h,b.chart.fontFamily,c,l);d.setCN(e,h,"legend-value");h.translate(g,b.ly);b.entries[b.index].push(h);f+=b.valueWidth+2*b.markerLabelGap;h.dItem=a;b.valueLabels.push(h)}b.index++;e=b.markerSize;e<c+7&&(e=c+7,d.VML&&(e+=3));c=b.container.rect(a.legendEntryWidth,0,f,e,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});c.dItem=a;b.entries[b.index-1].push(c);c.mouseover(function(c){b.rollOverLabel(a,c)}).mouseout(function(c){b.rollOutLabel(a,c)}).click(function(c){b.clickLabel(a,c)})}},createV:function(){var a=this.markerSize;return d.polygon(this.container,[a/5,a/2,a-a/5,a/2],[a/3,a-a/5,a/5,a/1.7],this.switchColor)},createX:function(){var a=(this.markerSize-4)/2,b={stroke:this.switchColor,
|
18 |
-
"stroke-width":3},c=this.container,e=d.line(c,[-a,a],[-a,a]).attr(b),a=d.line(c,[-a,a],[a,-a]).attr(b);return this.container.set([e,a])},createMarker:function(a,b,c,e,g,f,h,k,l){var m=this.markerSize,n=this.container;g||(g=this.markerBorderColor);g||(g=b);isNaN(e)&&(e=this.markerBorderThickness);isNaN(f)&&(f=this.markerBorderAlpha);return d.bullet(n,a,m,b,c,e,g,f,m,h,k,this.chart.path,l)},validateNow:function(){this.invalidateSize()},updateValues:function(){var a=this.valueLabels,b=this.chart,c,e=this.data;if(a)for(c=0;c<a.length;c++){var g=a[c],f=g.dItem,h=" ";if(e)f.value?g.text(f.value):g.text("");else{var k;if(void 0!==f.type){k=f.currentDataItem;var l=this.periodValueText;f.legendPeriodValueText&&(l=f.legendPeriodValueText);k?(h=this.valueText,f.legendValueText&&(h=f.legendValueText),h=b.formatString(h,k)):l&&b.formatPeriodString&&(l=d.massReplace(l,{"[[title]]":f.title}),h=b.formatPeriodString(l,f))}else h=b.formatString(this.valueText,f);if(l=this.valueFunction){var m=f;k&&(m=k);h=l(m,h)}var n;k?n=b.getBalloonColor(f,k):f.legendKeyColor&&(n=f.legendKeyColor());g.text(h);this.useMarkerColorForValues&&g.setAttr("fill",n);if(this.useMarkerColorForLabels){if(g=f.legendMarker)g.setAttr("fill",n),g.setAttr("stroke",n);(f=f.legendLabel)&&f.setAttr("fill",n)}}}},renderFix:function(){if(!d.VML&&this.enabled){var a=this.container;a&&a.renderFix()}},destroy:function(){this.div.innerHTML="";d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.AmMap=d.Class({inherits:d.AmChart,construct:function(a){this.cname="AmMap";this.type="map";this.theme=a;this.svgNotSupported="This browser doesn't support SVG. Use Chrome, Firefox, Internet Explorer 9 or later.";this.createEvents("rollOverMapObject","rollOutMapObject","clickMapObject","mouseDownMapObject","selectedObjectChanged","homeButtonClicked","zoomCompleted","dragCompleted","positionChanged","writeDevInfo","click");this.zoomDuration=.6;this.zoomControl=new d.ZoomControl(a);this.fitMapToContainer=!0;this.mouseWheelZoomEnabled=this.backgroundZoomsToTop=!1;this.allowClickOnSelectedObject=this.useHandCursorOnClickableOjects=this.showBalloonOnSelectedObject=!0;this.showObjectsAfterZoom=this.wheelBusy=!1;this.zoomOnDoubleClick=this.useObjectColorForBalloon=!0;this.allowMultipleDescriptionWindows=!1;this.dragMap=this.centerMap=this.linesAboveImages=!0;this.colorSteps=5;this.forceNormalize=!1;this.showAreasInList=!0;this.showLinesInList=this.showImagesInList=!1;this.areasProcessor=new d.AreasProcessor(this);this.areasSettings=new d.AreasSettings(a);this.imagesProcessor=new d.ImagesProcessor(this);this.imagesSettings=new d.ImagesSettings(a);this.linesProcessor=new d.LinesProcessor(this);this.linesSettings=new d.LinesSettings(a);this.initialTouchZoom=1;this.showDescriptionOnHover=!1;d.AmMap.base.construct.call(this,a);this.creditsPosition="bottom-left";this.product="ammap";this.areasClasses={};d.applyTheme(this,a,this.cname)},initChart:function(){this.zoomInstantly=!0;var a=this.container;this.panRequired=!0;if(this.sizeChanged&&d.hasSVG&&this.chartCreated){this.freeLabelsSet&&this.freeLabelsSet.remove();this.freeLabelsSet=a.set();this.container.setSize(this.realWidth,this.realHeight);this.resizeMap();this.drawBackground();this.redrawLabels();this.drawTitles();this.processObjects();this.rescaleObjects();this.zoomControl.init(this,a);this.drawBg();var b=this.smallMap;b&&b.init(this,a);(b=this.valueLegend)&&b.init(this,a);this.sizeChanged=!1;this.zoomToLongLat(this.zLevelTemp,this.zLongTemp,this.zLatTemp,!0);this.previousWidth=this.realWidth;this.previousHeight=this.realHeight;this.updateSmallMap();this.linkSet.toFront();this.zoomControl.update&&this.zoomControl.update()}else(d.AmMap.base.initChart.call(this),d.hasSVG)?(this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,a=this.legend)&&(a.position="absolute",a.invalidateSize()),this.createDescriptionsDiv(),this.svgAreas=[],this.svgAreasById={},this.drawChart()):(this.chartDiv.style.textAlign="",this.chartDiv.setAttribute("class","ammapAlert"),this.chartDiv.innerHTML=this.svgNotSupported,this.fire({type:"failed",chart:this}))},storeTemp:function(){if(d.hasSVG&&0<this.realWidth&&0<this.realHeight){var a=this.mapContainer.getBBox();0<a.width&&0<a.height&&(a=this.zoomLongitude(),isNaN(a)||(this.zLongTemp=a),a=this.zoomLatitude(),isNaN(a)||(this.zLatTemp=a),a=this.zoomLevel(),isNaN(a)||(this.zLevelTemp=a))}},invalidateSize:function(){this.storeTemp();d.AmMap.base.invalidateSize.call(this)},validateSize:function(){this.storeTemp();d.AmMap.base.validateSize.call(this)},handleWheelReal:function(a){if(!this.wheelBusy){this.stopAnimation();var b=this.zoomLevel(),c=this.zoomControl,e=c.zoomFactor;this.wheelBusy=!0;a=d.fitToBounds(0<a?b*e:b/e,c.minZoomLevel,c.maxZoomLevel);e=this.mouseX/this.mapWidth;c=this.mouseY/this.mapHeight;e=(this.zoomX()-e)*(a/b)+e;b=(this.zoomY()-c)*(a/b)+c;this.zoomTo(a,e,b)}},addLegend:function(a,b){a.position="absolute";a.autoMargins=!1;a.valueWidth=0;a.switchable=!1;d.AmMap.base.addLegend.call(this,a,b);void 0===a.enabled&&(a.enabled=!0);return a},handleLegendEvent:function(){},createDescriptionsDiv:function(){if(!this.descriptionsDiv){var a=document.createElement("div"),b=a.style;b.position="absolute";b.left="0px";b.top="0px";this.descriptionsDiv=a}this.containerDiv.appendChild(this.descriptionsDiv)},drawChart:function(){d.AmMap.base.drawChart.call(this);var a=this.dataProvider;this.dataProvider=a=d.extend(a,new d.MapData,!0);this.areasSettings=d.processObject(this.areasSettings,d.AreasSettings,this.theme);this.imagesSettings=d.processObject(this.imagesSettings,d.ImagesSettings,this.theme);this.linesSettings=d.processObject(this.linesSettings,d.LinesSettings,this.theme);var b=this.container;this.mapContainer&&this.mapContainer.remove();this.mapContainer=b.set();this.graphsSet.push(this.mapContainer);var c;a.map&&(c=d.maps[a.map]);a.mapVar&&(c=a.mapVar);c?(this.svgData=c.svg,this.getBounds(),this.buildEverything()):(a=a.mapURL)&&this.loadXml(a);this.balloonsSet.toFront()},drawBg:function(){var a=this;a.background.click(function(){a.handleBackgroundClick()});a.background.mouseover(function(){a.rollOutMapObject(a.previouslyHovered)})},buildEverything:function(){if(0<this.realWidth&&0<this.realHeight){var a=this.container,b=this.dataProvider;this.projection||(this.projection=b.projection,this.projection||(this.projection="equirectangular"));var c=this.projection;c&&(this.projectionFunction=d[c]);this.projectionFunction||(this.projectionFunction=d.equirectangular);this.dpProjectionFunction=d[b.projection];this.dpProjectionFunction||(this.dpProjectionFunction=d.equirectangular);this.zoomControl=d.processObject(this.zoomControl,d.ZoomControl,this.theme);this.zoomControl.init(this,a);this.drawBg();this.buildSVGMap();this.projectionFunction&&c!=b.projection||this.forceNormalize?(this.normalizeMap(),this.changeProjection()):this.fixMapPosition();if(c=this.smallMap)c=d.processObject(c,d.SmallMap,this.theme),c.init(this,a),this.smallMap=c;isNaN(b.zoomX)&&isNaN(b.zoomY)&&isNaN(b.zoomLatitude)&&isNaN(b.zoomLongitude)&&(this.centerMap?(c=this.xyToCoordinates(this.mapWidth/2,this.mapHeight/2),b.zoomLongitudeC=c.longitude,b.zoomLatitudeC=c.latitude):(b.zoomX=0,b.zoomY=0),this.zoomInstantly=!0);this.selectObject(this.dataProvider);this.processAreas();if(b=this.valueLegend)this.valueLegend=b=d.processObject(b,d.ValueLegend,this.theme),b.init(this,a);this.objectList&&(a=this.objectList=d.processObject(this.objectList,d.ObjectList))&&(this.clearObjectList(),a.init(this));this.dispDUpd();this.updateSmallMap();this.linkSet.toFront()}else this.cleanChart()},hideGroup:function(a){this.showHideGroup(a,!1)},showGroup:function(a){this.showHideGroup(a,!0)},showHideGroup:function(a,b){this.showHideReal(this.imagesProcessor.allObjects,a,b);this.showHideReal(this.areasProcessor.allObjects,a,b);this.showHideReal(this.linesProcessor.allObjects,a,b)},showHideReal:function(a,b,c){var e;for(e=0;e<a.length;e++){var d=a[e];if(d.groupId==b){var f=d.displayObject;f&&(c?(d.hidden=!1,f.show()):(d.hidden=!0,f.hide()))}}},makeObjectAccessible:function(a){if(a.accessibleLabel){var b=this.formatString(a.accessibleLabel,a);a.displayObject&&this.makeAccessible(a.displayObject,b)}},update:function(){d.hasSVG&&(d.AmMap.base.update.call(this),this.zoomControl&&this.zoomControl.update&&this.zoomControl.update())},animateMap:function(){var a=this;a.totalFrames=a.zoomDuration*d.updateRate;a.totalFrames+=1;a.frame=0;a.tweenPercent=0;a.balloon.hide(0);setTimeout(function(){a.updateSize.call(a)},1E3/d.updateRate)},updateSize:function(){var a=this,b=a.totalFrames;a.preventHover=!0;a.frame<=b?(a.frame++,b=d.easeOutSine(0,a.frame,0,1,b),1<=b?(b=1,a.preventHover=!1,a.wheelBusy=!1):window.requestAnimationFrame?window.requestAnimationFrame(function(){a.updateSize.call(a)}):setTimeout(function(){a.updateSize.call(a)},1E3/d.updateRate),.8<b&&(a.preventHover=!1)):(b=1,a.preventHover=!1,a.wheelBusy=!1);a.tweenPercent=b;a.rescaleMapAndObjects()},rescaleMapAndObjects:function(){var a=this.initialScale,b=this.initialX,c=this.initialY,e=this.tweenPercent,a=a+(this.finalScale-a)*e;this.mapContainer.translate(b+
|
19 |
-
(this.finalX-b)*e,c+(this.finalY-c)*e,a,!0);if(this.areasSettings.adjustOutlineThickness){for(var b=this.svgAreas,d=0;d<b.length;d++)(c=b[d])&&c.setAttr("stroke-width",this.areasSettings.outlineThickness/a/this.mapScale);if(b=this.dataProvider.areas)for(d=0;d<b.length;d++){var c=b[d],f=c.displayObject;f&&f.setAttr("stroke-width",c.outlineThicknessReal/a/this.mapScale)}}this.rescaleObjects();this.positionChanged();this.updateSmallMap();1==e&&this.fire({type:"zoomCompleted",chart:this})},updateSmallMap:function(){this.smallMap&&this.smallMap.update()},rescaleObjects:function(){var a=this.mapContainer.scale,b=this.imagesProcessor.objectsToResize,c;for(c=0;c<b.length;c++){var e=b[c].image;e.translate(e.x,e.y,b[c].scale/a,!0)}b=this.imagesProcessor.labelsToReposition;for(c=0;c<b.length;c++)e=b[c],e.imageLabel&&this.imagesProcessor.positionLabel(e.imageLabel,e,e.labelPositionReal);b=this.linesProcessor;if(e=b.linesToResize)for(c=0;c<e.length;c++){var d=e[c];d.line.setAttr("stroke-width",d.thickness/a)}b=b.objectsToResize;for(c=0;c<b.length;c++)e=b[c],e.translate(e.x,e.y,1/a,!0)},handleTouchEnd:function(a){this.initialDistance=NaN;this.mouseIsDown=this.isDragging=!1;d.AmMap.base.handleTouchEnd.call(this,a)},handleMouseDown:function(a){d.resetMouseOver();this.mouseIsDown=this.mouseIsOver=!0;this.balloon.hide(0);a&&this.mouseIsOver&&a.preventDefault&&this.panEventsEnabled&&a.preventDefault();if(this.chartCreated&&!this.preventHover&&(this.initialTouchZoom=this.zoomLevel(),this.dragMap&&(this.stopAnimation(),this.mapContainerClickX=this.mapContainer.x,this.mapContainerClickY=this.mapContainer.y),a||(a=window.event),a.shiftKey&&!0===this.developerMode&&this.getDevInfo(),a&&a.touches)){var b=this.mouseX,c=this.mouseY,e=a.touches.item(1);e&&this.panEventsEnabled&&this.boundingRect&&(a=e.clientX-this.boundingRect.left,e=e.clientY-this.boundingRect.top,this.middleXP=(b+(a-b)/2)/this.realWidth,this.middleYP=(c+(e-c)/2)/this.realHeight,this.initialDistance=Math.sqrt(Math.pow(a-b,2)+Math.pow(e-c,2)))}},stopDrag:function(){this.isDragging=
|
20 |
-
!1},handleReleaseOutside:function(){if(d.isModern){var a=this;d.AmMap.base.handleReleaseOutside.call(a);a.mouseIsDown=!1;setTimeout(function(){a.resetPinch.call(a)},100);if(!a.preventHover){a.stopDrag();var b=a.zoomControl;b&&b.draggerUp&&b.draggerUp();a.mapWasDragged=!1;var b=a.mapContainer,c=a.mapContainerClickX,e=a.mapContainerClickY;isNaN(c)||isNaN(e)||!(2<Math.abs(b.x-c)||Math.abs(b.y-e))||(a.mapWasDragged=!0,b={type:"dragCompleted",zoomX:a.zoomX(),zoomY:a.zoomY(),zoomLevel:a.zoomLevel(),chart:a},a.fire(b));(a.mouseIsOver&&!a.mapWasDragged&&!a.skipClick||a.wasTouched&&4>Math.abs(a.mouseX-a.tmx)&&4>Math.abs(a.mouseY-a.tmy))&&a.fire({type:"click",x:a.mouseX,y:a.mouseY,chart:a});a.mapContainerClickX=NaN;a.mapContainerClickY=NaN;a.objectWasClicked=!1;a.zoomOnDoubleClick&&a.mouseIsOver&&(b=(new Date).getTime(),200>b-a.previousClickTime&&40<b-a.previousClickTime&&a.doDoubleClickZoom(),a.previousClickTime=b)}a.wasTouched=!1}},resetPinch:function(){this.mapWasPinched=!1},handleMouseMove:function(a){var b=this;d.AmMap.base.handleMouseMove.call(b,a);if(!a||!a.touches||!b.tapToActivate||b.tapped){b.panEventsEnabled&&b.mouseIsOver&&a&&a.preventDefault&&a.preventDefault();var c=b.previuosMouseX,e=b.previuosMouseY,g=b.mouseX,f=b.mouseY,h=b.zoomControl;isNaN(c)&&(c=g);isNaN(e)&&(e=f);b.mouse2X=NaN;b.mouse2Y=NaN;a&&a.touches&&(a=a.touches.item(1))&&b.panEventsEnabled&&b.boundingRect&&(b.mouse2X=a.clientX-b.boundingRect.left,b.mouse2Y=a.clientY-b.boundingRect.top);if(a=b.mapContainer){var k=b.mouse2X,l=b.mouse2Y;b.pinchTO&&clearTimeout(b.pinchTO);b.pinchTO=setTimeout(function(){b.resetPinch.call(b)},1E3);var m=b.realHeight,n=b.realWidth,q=b.mapWidth,t=b.mapHeight;b.mouseIsDown&&b.dragMap&&(5<Math.abs(b.previuosMouseX-b.mouseX)||5<Math.abs(b.previuosMouseY-b.mouseY))&&(b.isDragging=!0);if(!isNaN(k)){b.stopDrag();var r=Math.sqrt(Math.pow(k-g,2)+Math.pow(l-f,2)),p=b.initialDistance;isNaN(p)&&(p=Math.sqrt(Math.pow(k-g,2)+Math.pow(l-f,2)));if(!isNaN(p)){var k=b.initialTouchZoom*r/p,k=d.fitToBounds(k,h.minZoomLevel,h.maxZoomLevel),h=b.zoomLevel(),p=b.middleXP,l=b.middleYP,r=m/t,u=n/q,p=(b.zoomX()-p*u)*(k/h)+p*u,l=(b.zoomY()-l*r)*(k/h)+l*r;.1<Math.abs(k-h)&&(b.zoomTo(k,p,l,!0),b.mapWasPinched=!0,clearTimeout(b.pinchTO))}}k=a.scale;b.isDragging&&(b.balloon.hide(0),b.positionChanged(),c=a.x+(g-c),e=a.y+(f-e),b.preventDragOut&&(t=-t*k+m/2,m/=2,c=d.fitToBounds(c,-q*k+n/2,n/2),e=d.fitToBounds(e,t,m)),isNaN(c)||isNaN(e)||(a.translate(c,e,k,!0),b.updateSmallMap()));b.previuosMouseX=g;b.previuosMouseY=f}}},selectObject:function(a,b){var c=this;a||(a=c.dataProvider);a.isOver=!1;var e=a.linkToObject;d.isString(e)&&(e=c.getObjectById(e));a.useTargetsZoomValues&&e&&(a.zoomX=e.zoomX,a.zoomY=e.zoomY,a.zoomLatitude=e.zoomLatitude,a.zoomLongitude=e.zoomLongitude,a.zoomLevel=e.zoomLevel);var g=c.selectedObject;g&&c.returnInitialColor(g);c.selectedObject=a;var f=!1,h,k;"MapArea"==a.objectType&&(a.autoZoomReal&&(f=!0),h=c.areasSettings.selectedOutlineColor,k=c.areasSettings.selectedOutlineThickness);if(e&&!f&&(d.isString(e)&&(e=c.getObjectById(e)),isNaN(a.zoomLevel)&&isNaN(a.zoomX)&&isNaN(a.zoomY))){if(c.extendMapData(e))return;c.selectObject(e);return}c.allowMultipleDescriptionWindows||c.closeAllDescriptions();clearTimeout(c.selectedObjectTimeOut);clearTimeout(c.processObjectsTimeOut);e=c.zoomDuration;!f&&isNaN(a.zoomLevel)&&isNaN(a.zoomX)&&isNaN(a.zoomY)?(c.showDescriptionAndGetUrl(),b||c.processObjects()):(c.selectedObjectTimeOut=setTimeout(function(){c.showDescriptionAndGetUrl.call(c)},1E3*e+200),c.showObjectsAfterZoom)?b||(c.processObjectsTimeOut=setTimeout(function(){c.processObjects.call(c)},1E3*e+200)):b||c.processObjects();e=a.displayObject;f=a.selectedColorReal;"MapImage"==a.objectType&&(h=c.imagesSettings.selectedOutlineColor,k=c.imagesSettings.selectedOutlineThickness,e=a.image);if(e){if(d.setCN(c,e,"selected-object"),a.bringForwardOnHover&&a.displayObject.toFront(),!a.preserveOriginalAttributes){e.setAttr("stroke",a.outlineColorReal);void 0!==f&&e.setAttr("fill",f);void 0!==h&&e.setAttr("stroke",h);void 0!==k&&e.setAttr("stroke-width",k);if("MapLine"==a.objectType){var l=a.lineSvg;l&&l.setAttr("stroke",f);if(l=a.arrowSvg)l.setAttr("fill",f),l.setAttr("stroke",f)}if(l=a.imageLabel){var m=a.selectedLabelColorReal;void 0!==m&&l.setAttr("fill",m)}a.selectable||(e.setAttr("cursor","default"),l&&l.setAttr("cursor","default"))}}else c.returnInitialColorReal(a);if(e=a.groupId)for(l=a.groupArray,l||(l=c.getGroupById(e),a.groupArray=l),m=0;m<l.length;m++){var n=l[m];n.isOver=!1;e=n.displayObject;"MapImage"==n.objectType&&(e=n.image);if(e){var q=n.selectedColorReal;void 0!==q&&e.setAttr("fill",q);void 0!==h&&e.setAttr("stroke",h);void 0!==k&&e.setAttr("stroke-width",k);"MapLine"==n.objectType&&((e=n.lineSvg)&&e.setAttr("stroke",f),e=n.arrowSvg)&&(e.setAttr("fill",f),e.setAttr("stroke",f))}}c.zoomToSelectedObject();g!=a&&c.fire({type:"selectedObjectChanged",chart:c})},returnInitialColor:function(a,b){this.returnInitialColorReal(a);b&&(a.isFirst=!1);if(this.selectedObject.bringForwardOnHover){var c=this.selectedObject.displayObject;c&&c.toFront()}if(c=a.groupId){var c=this.getGroupById(c),e;for(e=0;e<c.length;e++)this.returnInitialColorReal(c[e]),b&&(c[e].isFirst=!1)}},closeAllDescriptions:function(){this.descriptionsDiv.innerHTML=""},returnInitialColorReal:function(a){a.isOver=!1;var b=a.displayObject;if(b){b.toPrevious();if("MapImage"==a.objectType){var c=a.tempScale;isNaN(c)||b.translate(b.x,b.y,c,!0);a.tempScale=NaN;b=a.image}c=a.colorReal;if("MapLine"==a.objectType){var e=a.lineSvg;e&&e.setAttr("stroke",c);if(e=a.arrowSvg)e.setAttr("fill",c),e.setAttr("stroke",c)}var e=a.alphaReal,d=a.outlineAlphaReal,f=a.outlineThicknessReal,h=a.outlineColorReal;if(a.showAsSelected){var c=a.selectedColorReal,k,l;"MapImage"==a.objectType&&(k=this.imagesSettings.selectedOutlineColor,l=this.imagesSettings.selectedOutlineThickness);"MapArea"==a.objectType&&(k=this.areasSettings.selectedOutlineColor,l=this.areasSettings.selectedOutlineThickness);void 0!==k&&(h=k);void 0!==l&&(f=l)}"bubble"==a.type&&(c=void 0);void 0!==c&&b.setAttr("fill",c);if(k=a.image)k.setAttr("fill",c),k.setAttr("stroke",h),k.setAttr("stroke-width",f),k.setAttr("fill-opacity",e),k.setAttr("stroke-opacity",d);"MapArea"==a.objectType&&(c=1,this.areasSettings.adjustOutlineThickness&&(c=this.zoomLevel()*this.mapScale),b.setAttr("stroke",h),b.setAttr("stroke-width",f/c),b.setAttr("fill-opacity",e),b.setAttr("stroke-opacity",d));(c=a.pattern)&&b.pattern(c,this.mapScale,this.path);(b=a.imageLabel)&&!a.labelInactive&&(a.showAsSelected&&void 0!==a.selectedLabelColor?b.setAttr("fill",a.selectedLabelColor):b.setAttr("fill",a.labelColorReal))}},zoomToRectangle:function(a,b,c,e){var g=this.realWidth,f=this.realHeight,h=this.mapSet.scale,k=this.zoomControl,g=d.fitToBounds(c/g>e/f?.8*g/(c*h):.8*f/(e*h),k.minZoomLevel,k.maxZoomLevel);this.zoomToMapXY(g,(a+c/2)*h,(b+e/2)*h)},zoomToLatLongRectangle:function(a,b,c,e){var g=this.dataProvider,f=this.zoomControl,h=Math.abs(c-a),k=Math.abs(b-e),l=Math.abs(g.rightLongitude-g.leftLongitude),g=Math.abs(g.topLatitude-g.bottomLatitude),f=d.fitToBounds(h/l>k/g?.8*l/
|
21 |
-
h:.8*g/k,f.minZoomLevel,f.maxZoomLevel);this.zoomToLongLat(f,a+(c-a)/2,e+(b-e)/2)},getGroupById:function(a){var b=[];this.getGroup(this.imagesProcessor.allObjects,a,b);this.getGroup(this.linesProcessor.allObjects,a,b);this.getGroup(this.areasProcessor.allObjects,a,b);return b},zoomToGroup:function(a){a="object"==typeof a?a:this.getGroupById(a);var b,c,e,d,f;for(f=0;f<a.length;f++){var h=a[f].displayObject;if(h){var k=h.getBBox(),h=k.y,l=k.y+k.height,m=k.x,k=k.x+k.width;if(h<b||isNaN(b))b=h;if(l>d||
|
22 |
-
isNaN(d))d=l;if(m<c||isNaN(c))c=m;if(k>e||isNaN(e))e=k}}c+=this.diffX;e+=this.diffX;d+=this.diffY;b+=this.diffY;this.zoomToRectangle(c,b,e-c,d-b)},getGroup:function(a,b,c){if(a){var e;for(e=0;e<a.length;e++){var d=a[e];d.groupId==b&&c.push(d)}}},zoomToStageXY:function(a,b,c,e){if(!this.objectWasClicked){var g=this.zoomControl;a=d.fitToBounds(a,g.minZoomLevel,g.maxZoomLevel);var g=this.zoomLevel(),f=this.mapSet.getBBox();b=this.xyToCoordinates((b-this.mapContainer.x)/g-f.x*this.mapScale,(c-this.mapContainer.y)/
|
23 |
-
g-f.y*this.mapScale);this.zoomToLongLat(a,b.longitude,b.latitude,e)}},zoomToLongLat:function(a,b,c,d){b=this.coordinatesToXY(b,c);this.zoomToMapXY(a,b.x,b.y,d)},zoomToMapXY:function(a,b,c,d){var g=this.mapWidth,f=this.mapHeight;this.zoomTo(a,-(b/g)*a+this.realWidth/g/2,-(c/f)*a+this.realHeight/f/2,d)},zoomToObject:function(a){if(a){var b=a.zoomLatitude,c=a.zoomLongitude;isNaN(a.zoomLatitudeC)||(b=a.zoomLatitudeC);isNaN(a.zoomLongitudeC)||(c=a.zoomLongitudeC);var e=a.zoomLevel,g=this.zoomInstantly,f=a.zoomX,h=a.zoomY,k=this.realWidth,l=this.realHeight;isNaN(e)||(isNaN(b)||isNaN(c)?this.zoomTo(e,f,h,g):this.zoomToLongLat(e,c,b,g));this.zoomInstantly=!1;"MapImage"==a.objectType&&isNaN(a.zoomX)&&isNaN(a.zoomY)&&isNaN(a.zoomLatitude)&&isNaN(a.zoomLongitude)&&!isNaN(a.latitude)&&!isNaN(a.longitude)&&this.zoomToLongLat(a.zoomLevel,a.longitude,a.latitude);"MapArea"==a.objectType&&(g=a.displayObject.getBBox(),f=this.mapScale,b=(g.x+this.diffX)*f,c=(g.y+this.diffY)*f,e=g.width*f,g=g.height*f,k=a.autoZoomReal&&isNaN(a.zoomLevel)?e/k>g/l?.8*k/e:.8*l/g:a.zoomLevel,l=this.zoomControl,k=d.fitToBounds(k,l.minZoomLevel,l.maxZoomLevel),isNaN(a.zoomX)&&isNaN(a.zoomY)&&isNaN(a.zoomLatitude)&&isNaN(a.zoomLongitude)&&this.zoomToMapXY(k,b+e/2,c+g/2));this.zoomControl.update()}},zoomToSelectedObject:function(){this.zoomToObject(this.selectedObject)},zoomTo:function(a,b,c,e){var g=this.zoomControl;a=d.fitToBounds(a,g.minZoomLevel,g.maxZoomLevel);g=this.zoomLevel();isNaN(b)&&(b=this.realWidth/this.mapWidth,b=(this.zoomX()-.5*b)*(a/g)+.5*b);isNaN(c)&&(c=this.realHeight/this.mapHeight,c=(this.zoomY()-.5*c)*(a/g)+.5*c);this.stopAnimation();isNaN(a)||(g=this.mapContainer,this.initialX=g.x,this.initialY=g.y,this.initialScale=g.scale,this.finalX=this.mapWidth*b,this.finalY=this.mapHeight*c,this.finalScale=a,this.finalX!=this.initialX||this.finalY!=this.initialY||this.finalScale!=this.initialScale?e?(this.tweenPercent=1,this.rescaleMapAndObjects(),this.wheelBusy=!1):this.animateMap():this.wheelBusy=!1)},loadXml:function(a){var b;window.XMLHttpRequest&&(b=new XMLHttpRequest);b.overrideMimeType&&b.overrideMimeType("text/xml");b.open("GET",a,!1);b.send();this.parseXMLObject(b.responseXML);this.svgData&&this.buildEverything()},stopAnimation:function(){this.frame=this.totalFrames},processObjects:function(){var a=this.selectedObject;if(0<a.images.length||0<a.areas.length||0<a.lines.length||a==this.dataProvider){var b=this.container,c=this.stageImagesContainer;c&&c.remove();this.stageImagesContainer=c=b.set();this.trendLinesSet.push(c);var d=this.stageLinesContainer;d&&d.remove();this.stageLinesContainer=d=b.set();this.trendLinesSet.push(d);var g=this.mapImagesContainer;g&&g.remove();this.mapImagesContainer=g=b.set();this.mapContainer.push(g);var f=this.mapLinesContainer;f&&f.remove();this.mapLinesContainer=f=b.set();this.mapContainer.push(f);this.linesAboveImages?(g.toFront(),c.toFront(),f.toFront(),d.toFront()):(f.toFront(),d.toFront(),g.toFront(),c.toFront());a&&(this.imagesProcessor.reset(),this.linesProcessor.reset(),this.linesAboveImages?(this.imagesProcessor.process(a),this.linesProcessor.process(a)):(this.linesProcessor.process(a),this.imagesProcessor.process(a)));this.rescaleObjects()}},processAreas:function(){this.areasProcessor.process(this.dataProvider)},buildSVGMap:function(){d.remove(this.mapSet);var a=this.svgData.g.path,b=this.container,c=b.set();this.svgAreas=[];this.svgAreasById={};void 0===a.length&&(a=[a]);var e;for(e=0;e<a.length;e++){var g=a[e],f=g.d,h=g.title;g.titleTr&&(h=g.titleTr);var k=b.path(f);k.id=g.id;if(this.areasSettings.preserveOriginalAttributes){k.customAttr={};for(var l in g)"d"!=l&&"id"!=l&&"title"!=l&&(k.customAttr[l]=g[l])}k.path=f;this.svgAreasById[g.id]={area:k,title:h,className:g["class"]};this.svgAreas.push(k);c.push(k)}this.mapSet=c;this.mapContainer.push(c);this.resizeMap()},centerAlign:function(){},setProjection:function(a){this.projection=a;this.chartCreated=!1;this.buildEverything()},addObjectEventListeners:function(a,b){var c=this;a.mousedown(function(a){c.mouseDownMapObject(b,a)}).mouseup(function(a){c.clickMapObject(b,a)}).mouseover(function(a){c.balloonX=NaN;c.rollOverMapObject(b,!0,a)}).mouseout(function(a){c.balloonX=NaN;c.rollOutMapObject(b,a)}).touchend(function(a){4>Math.abs(c.mouseX-c.tmx)&&4>Math.abs(c.mouseY-c.tmy)&&(c.tapped=!0);c.tapToActivate&&!c.tapped||c.mapWasDragged||c.mapWasPinched||(c.balloonX=NaN,c.rollOverMapObject(b,!0,a),c.clickMapObject(b,a))}).touchstart(function(a){c.tmx=c.mouseX;c.tmy=c.mouseY;c.mouseDownMapObject(b,a)})},checkIfSelected:function(a){var b=this.selectedObject;if(b==a)return!0;if(b=b.groupId){var b=this.getGroupById(b),c;for(c=0;c<b.length;c++)if(b[c]==a)return!0}return!1},clearMap:function(){this.chartDiv.innerHTML="";this.clearObjectList()},clearObjectList:function(){var a=this.objectList;a&&a.div&&(a.div.innerHTML="")},checkIfLast:function(a){if(a){var b=a.parentNode;if(b&&b.lastChild==a)return!0}return!1},showAsRolledOver:function(a){var b=a.displayObject;if(!a.showAsSelected&&b&&!a.isOver){b.node.onmouseout=function(){};b.node.onmouseover=function(){};b.node.onclick=function(){};!a.isFirst&&a.bringForwardOnHover&&(b.toFront(),a.isFirst=!0);var c=a.rollOverColorReal,e;a.preserveOriginalAttributes&&(c=void 0);void 0==c&&(isNaN(a.rollOverBrightnessReal)||(c=d.adjustLuminosity(a.colorReal,a.rollOverBrightnessReal/100)));if(void 0!=c)if("MapImage"==a.objectType)(e=a.image)&&e.setAttr("fill",c);else if("MapLine"==a.objectType){if((e=a.lineSvg)&&e.setAttr("stroke",c),e=a.arrowSvg)e.setAttr("fill",c),e.setAttr("stroke",c)}else b.setAttr("fill",c);(c=a.imageLabel)&&!a.labelInactive&&(e=a.labelRollOverColorReal,void 0!=e&&c.setAttr("fill",e));c=a.rollOverOutlineColorReal;void 0!=c&&("MapImage"==a.objectType?(e=a.image)&&e.setAttr("stroke",c):b.setAttr("stroke",c));"MapImage"==a.objectType?(c=this.imagesSettings.rollOverOutlineThickness,(e=a.image)&&(isNaN(c)||e.setAttr("stroke-width",c))):(c=this.areasSettings.rollOverOutlineThickness,isNaN(c)||b.setAttr("stroke-width",c));if("MapArea"==a.objectType){c=this.areasSettings;e=a.rollOverAlphaReal;isNaN(e)||b.setAttr("fill-opacity",e);e=c.rollOverOutlineAlpha;isNaN(e)||b.setAttr("stroke-opacity",e);e=1;this.areasSettings.adjustOutlineThickness&&(e=this.zoomLevel()*this.mapScale);var g=c.rollOverOutlineThickness;isNaN(g)||b.setAttr("stroke-width",g/e);(c=c.rollOverPattern)&&b.pattern(c,this.mapScale,this.path)}"MapImage"==a.objectType&&(c=a.rollOverScaleReal,isNaN(c)||1==c||(e=b.scale,isNaN(e)&&(e=1),a.tempScale=e,b.translate(b.x,b.y,e*c,!0)));this.useHandCursorOnClickableOjects&&this.checkIfClickable(a)&&b.setAttr("cursor","pointer");a.mouseEnabled&&this.addObjectEventListeners(b,a);a.isOver=!0}},rollOverMapObject:function(a,b,c){if(this.chartCreated){this.handleMouseMove();var d=this.previouslyHovered;d&&d!=a?(!1===this.checkIfSelected(d)&&(this.returnInitialColor(d,!0),this.previouslyHovered=null),this.balloon.hide(0)):clearTimeout(this.hoverInt);if(!this.preventHover){if(!1===this.checkIfSelected(a)){if(d=a.groupId){var d=this.getGroupById(d),g;for(g=0;g<d.length;g++)d[g]!=a&&this.showAsRolledOver(d[g])}this.showAsRolledOver(a)}else(d=a.displayObject)&&(this.allowClickOnSelectedObject?d.setAttr("cursor","pointer"):d.setAttr("cursor","default"));this.showDescriptionOnHover?this.showDescription(a):!this.showBalloonOnSelectedObject&&this.checkIfSelected(a)||!1===b||(g=this.balloon,this.balloon.fixedPosition=!1,b=a.colorReal,d="",void 0!==b&&this.useObjectColorForBalloon||(b=g.fillColor),(g=a.balloonTextReal)&&(d=this.formatString(g,a)),this.balloonLabelFunction&&(d=this.balloonLabelFunction(a,this)),"MapArea"!=a.objectType&&(this.balloonX=NaN),d&&""!==d&&this.showBalloon(d,b,!1,this.balloonX,this.balloonY));this.fire({type:"rollOverMapObject",mapObject:a,chart:this,event:c});this.previouslyHovered=a}}},longitudeToX:function(a){return(this.longitudeToCoordinate(a)+this.diffX*this.mapScale)*this.zoomLevel()+this.mapContainer.x},latitudeToY:function(a){return(this.latitudeToCoordinate(a)+this.diffY*this.mapScale)*this.zoomLevel()+this.mapContainer.y},latitudeToStageY:function(a){return this.latitudeToCoordinate(a)*this.zoomLevel()+this.mapContainer.y+this.diffY*this.mapScale},longitudeToStageX:function(a){return this.longitudeToCoordinate(a)*this.zoomLevel()+this.mapContainer.x+this.diffX*this.mapScale},stageXToLongitude:function(a){a=(a-this.mapContainer.x)/this.zoomLevel();return this.coordinateToLongitude(a)},stageYToLatitude:function(a){a=(a-this.mapContainer.y)/this.zoomLevel();return this.coordinateToLatitude(a)},rollOutMapObject:function(a,b){this.hideBalloon();a&&this.chartCreated&&a.isOver&&(this.checkIfSelected(a)||this.returnInitialColor(a),this.fire({type:"rollOutMapObject",mapObject:a,chart:this,event:b}))},formatString:function(a,
|
24 |
-
b){var c=this.nf,e=this.pf,g=b.title;b.titleTr&&(g=b.titleTr);void 0==g&&(g="");var f=b.value,f=isNaN(f)?"":d.formatNumber(f,c),c=b.percents,c=isNaN(c)?"":d.formatNumber(c,e),e=b.description;void 0==e&&(e="");var h=b.customData;void 0==h&&(h="");return a=d.massReplace(a,{"[[title]]":g,"[[value]]":f,"[[percent]]":c,"[[description]]":e,"[[customData]]":h})},mouseDownMapObject:function(a,b){this.fire({type:"mouseDownMapObject",mapObject:a,chart:this,event:b})},clickMapObject:function(a,b){var c=this;b&&(b.touches||isNaN(a.zoomLevel)&&isNaN(a.zoomX)&&isNaN(a.zoomY)||c.hideBalloon());if(c.chartCreated&&!c.preventHover&&c.checkTouchDuration(b)&&!c.mapWasDragged&&c.checkIfClickable(a)&&!c.mapWasPinched){c.selectObject(a);var d=c.zoomLevel(),g=c.mapSet.getBBox(),d=c.xyToCoordinates((c.mouseX-c.mapContainer.x)/d-g.x*c.mapScale,(c.mouseY-c.mapContainer.y)/d-g.y*c.mapScale);c.clickLatitude=d.latitude;c.clickLongitude=d.longitude;b&&b.touches&&setTimeout(function(){c.showBalloonAfterZoom.call(c)},1E3*
|
25 |
-
c.zoomDuration);c.fire({type:"clickMapObject",mapObject:a,chart:c,event:b});c.objectWasClicked=!0}},showBalloonAfterZoom:function(){this.balloonX=this.longitudeToX(this.clickLongitude);this.balloonY=this.latitudeToY(this.clickLatitude);this.rollOverMapObject(this.selectedObject,!0)},checkIfClickable:function(a){var b=this.allowClickOnSelectedObject;return this.selectedObject==a&&b?!0:this.selectedObject!=a||b?!0===a.selectable||"MapArea"==a.objectType&&a.autoZoomReal||a.url||a.linkToObject||0<a.images.length||0<a.lines.length||!isNaN(a.zoomLevel)||!isNaN(a.zoomX)||!isNaN(a.zoomY)||a.description?!0:!1:!1},resizeMap:function(){var a=this.mapSet;if(a){var b=1,c=a.getBBox(),d=this.realWidth,g=this.realHeight,f=c.width,c=c.height;this.fitMapToContainer&&(b=f/d>c/g?d/f:g/c);a.translate(0,0,b,!0);this.mapScale=b;this.mapHeight=c*b;this.mapWidth=f*b}},zoomIn:function(){var a=this.zoomLevel()*this.zoomControl.zoomFactor;this.zoomTo(a)},zoomOut:function(){var a=this.zoomLevel()/this.zoomControl.zoomFactor;this.zoomTo(a)},
|
26 |
-
moveLeft:function(){var a=this.zoomX()+this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),a,this.zoomY())},moveRight:function(){var a=this.zoomX()-this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),a,this.zoomY())},moveUp:function(){var a=this.zoomY()+this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),this.zoomX(),a)},moveDown:function(){var a=this.zoomY()-this.zoomControl.panStepSize;this.zoomTo(this.zoomLevel(),this.zoomX(),a)},zoomX:function(){return this.mapSet?Math.round(1E4*this.mapContainer.x/this.mapWidth)/1E4:NaN},zoomY:function(){return this.mapSet?Math.round(1E4*this.mapContainer.y/this.mapHeight)/1E4:NaN},goHome:function(){this.selectObject(this.dataProvider);this.fire({type:"homeButtonClicked",chart:this})},zoomLevel:function(){return Math.round(1E5*this.mapContainer.scale)/1E5},showDescriptionAndGetUrl:function(){var a=this.selectedObject;if(a){this.showDescription();var b=a.url;if(b)d.getURL(b,a.urlTarget);else if(b=a.linkToObject){if(d.isString(b)){var c=this.getObjectById(b);
|
27 |
-
if(c){this.selectObject(c);return}}b&&a.passZoomValuesToTarget&&(b.zoomLatitude=this.zoomLatitude(),b.zoomLongitude=this.zoomLongitude(),b.zoomLevel=this.zoomLevel());this.extendMapData(b)||this.selectObject(b)}}},extendMapData:function(a){var b=a.objectType;if("MapImage"!=b&&"MapArea"!=b&&"MapLine"!=b)return d.extend(a,new d.MapData,!0),this.dataProvider=a,this.zoomInstantly=!0,this.validateData(),!0},showDescription:function(a){a||(a=this.selectedObject);this.allowMultipleDescriptionWindows||this.closeAllDescriptions();if(a.description){var b=a.descriptionWindow;b&&b.close();b=new d.DescriptionWindow;a.descriptionWindow=b;var c=a.descriptionWindowWidth,e=a.descriptionWindowHeight,g=a.descriptionWindowLeft,f=a.descriptionWindowTop,h=a.descriptionWindowRight,k=a.descriptionWindowBottom;isNaN(h)||(g=this.realWidth-h);isNaN(k)||(f=this.realHeight-k);var l=a.descriptionWindowX;isNaN(l)||(g=l);l=a.descriptionWindowY;isNaN(l)||(f=l);isNaN(g)&&(g=this.mouseX,g=g>this.realWidth/2?g-c-20:g+20);isNaN(f)&&(f=this.mouseY);b.maxHeight=e;l=a.title;a.titleTr&&(l=a.titleTr);b.show(this,this.descriptionsDiv,a.description,l);a=b.div.style;a.position="absolute";a.width=c+"px";a.maxHeight=e+"px";isNaN(k)||(f-=b.div.offsetHeight);isNaN(h)||(g-=b.div.offsetWidth);a.left=g+"px";a.top=f+"px"}},parseXMLObject:function(a){var b={root:{}};this.parseXMLNode(b,"root",a);this.svgData=b.root.svg;this.getBounds()},getBounds:function(){var a=this.dataProvider;try{var b=this.svgData.defs["amcharts:ammap"];a.leftLongitude=Number(b.leftLongitude);a.rightLongitude=Number(b.rightLongitude);a.topLatitude=Number(b.topLatitude);a.bottomLatitude=Number(b.bottomLatitude);a.projection=b.projection;var c=b.wrappedLongitudes;c&&(a.rightLongitude+=360);a.wrappedLongitudes=c}catch(d){}},recalcLongitude:function(a){return this.dataProvider.wrappedLongitudes?a<this.dataProvider.leftLongitude?Number(a)+360:a:a},latitudeToCoordinate:function(a){var b,c=this.dataProvider;if(this.mapSet){b=c.topLatitude;var d=c.bottomLatitude;"mercator"==c.projection&&(a=this.mercatorLatitudeToCoordinate(a),b=this.mercatorLatitudeToCoordinate(b),d=this.mercatorLatitudeToCoordinate(d));b=(a-b)/(d-b)*this.mapHeight}return b},longitudeToCoordinate:function(a){a=this.recalcLongitude(a);var b,c=this.dataProvider;this.mapSet&&(b=c.leftLongitude,b=(a-b)/(c.rightLongitude-b)*this.mapWidth);return b},mercatorLatitudeToCoordinate:function(a){89.5<a&&(a=89.5);-89.5>a&&(a=-89.5);a=d.degreesToRadians(a);return d.radiansToDegrees(.5*Math.log((1+Math.sin(a))/(1-Math.sin(a)))/2)},zoomLatitude:function(){if(this.mapContainer){var a=
|
28 |
-
this.mapSet.getBBox(),b=(-this.mapContainer.x+this.previousWidth/2)/this.zoomLevel()-a.x*this.mapScale,a=(-this.mapContainer.y+this.previousHeight/2)/this.zoomLevel()-a.y*this.mapScale;return this.xyToCoordinates(b,a).latitude}},zoomLongitude:function(){if(this.mapContainer){var a=this.mapSet.getBBox(),b=(-this.mapContainer.x+this.previousWidth/2)/this.zoomLevel()-a.x*this.mapScale,a=(-this.mapContainer.y+this.previousHeight/2)/this.zoomLevel()-a.y*this.mapScale;return this.xyToCoordinates(b,a).longitude}},
|
29 |
-
getAreaCenterLatitude:function(a){a=a.displayObject.getBBox();var b=this.mapScale,c=this.mapSet.getBBox();return this.xyToCoordinates((a.x+a.width/2+this.diffX)*b-c.x*b,(a.y+a.height/2+this.diffY)*b-c.y*b).latitude},getAreaCenterLongitude:function(a){a=a.displayObject.getBBox();var b=this.mapScale,c=this.mapSet.getBBox();return this.xyToCoordinates((a.x+a.width/2+this.diffX)*b-c.x*b,(a.y+a.height/2+this.diffY)*b-c.y*b).longitude},milesToPixels:function(a){var b=this.dataProvider;return this.mapWidth/
|
30 |
-
(b.rightLongitude-b.leftLongitude)*a/69.172},kilometersToPixels:function(a){var b=this.dataProvider;return this.mapWidth/(b.rightLongitude-b.leftLongitude)*a/111.325},handleBackgroundClick:function(){if(this.backgroundZoomsToTop&&!this.mapWasDragged){var a=this.dataProvider;if(this.checkIfClickable(a))this.clickMapObject(a);else{var b=a.zoomX,c=a.zoomY,d=a.zoomLongitude,g=a.zoomLatitude,a=a.zoomLevel;isNaN(b)||isNaN(c)||this.zoomTo(a,b,c);isNaN(d)||isNaN(g)||this.zoomToLongLat(a,d,g,!0)}}},parseXMLNode:function(a,b,c,d){void 0===d&&(d="");var g,f,h;if(c){var k=c.childNodes.length;for(g=0;g<k;g++){f=c.childNodes[g];var l=f.nodeName,m=f.nodeValue?this.trim(f.nodeValue):"",n=!1;f.attributes&&0<f.attributes.length&&(n=!0);if(0!==f.childNodes.length||""!==m||!1!==n)if(3==f.nodeType||4==f.nodeType){if(""!==m){f=0;for(h in a[b])a[b].hasOwnProperty(h)&&f++;f?a[b]["#text"]=m:a[b]=m}}else if(1==f.nodeType){var q;void 0!==a[b][l]?void 0===a[b][l].length?(q=a[b][l],a[b][l]=[],a[b][l].push(q),a[b][l].push({}),q=a[b][l][1]):"object"==typeof a[b][l]&&(a[b][l].push({}),q=a[b][l][a[b][l].length-1]):(a[b][l]={},q=a[b][l]);if(f.attributes&&f.attributes.length)for(m=0;m<f.attributes.length;m++)q[f.attributes[m].name]=f.attributes[m].value;void 0!==a[b][l].length?this.parseXMLNode(a[b][l],a[b][l].length-1,f,d+" "):this.parseXMLNode(a[b],l,f,d+" ")}}f=0;c="";for(h in a[b])"#text"==h?c=a[b][h]:f++;0===f&&void 0===a[b].length&&(a[b]=c)}},doDoubleClickZoom:function(){if(!this.mapWasDragged){var a=this.zoomLevel()*this.zoomControl.zoomFactor;this.zoomToStageXY(a,this.mouseX,this.mouseY)}},getDevInfo:function(){var a=this.zoomLevel(),b=this.mapSet.getBBox(),b=this.xyToCoordinates((this.mouseX-this.mapContainer.x)/a-b.x*this.mapScale,(this.mouseY-this.mapContainer.y)/a-b.y*this.mapScale),a={chart:this,type:"writeDevInfo",zoomLevel:a,zoomX:this.zoomX(),zoomY:this.zoomY(),zoomLatitude:this.zoomLatitude(),zoomLongitude:this.zoomLongitude(),latitude:b.latitude,longitude:b.longitude,left:this.mouseX,top:this.mouseY,right:this.realWidth-this.mouseX,
|
31 |
-
bottom:this.realHeight-this.mouseY,percentLeft:Math.round(this.mouseX/this.realWidth*100)+"%",percentTop:Math.round(this.mouseY/this.realHeight*100)+"%",percentRight:Math.round((this.realWidth-this.mouseX)/this.realWidth*100)+"%",percentBottom:Math.round((this.realHeight-this.mouseY)/this.realHeight*100)+"%"},b="zoomLevel:"+a.zoomLevel+", zoomLongitude:"+a.zoomLongitude+", zoomLatitude:"+a.zoomLatitude+"\n",b=b+("zoomX:"+a.zoomX+", zoomY:"+a.zoomY+"\n"),b=b+("latitude:"+a.latitude+", longitude:"+
|
32 |
-
a.longitude+"\n"),b=b+("left:"+a.left+", top:"+a.top+"\n"),b=b+("right:"+a.right+", bottom:"+a.bottom+"\n"),b=b+("left:"+a.percentLeft+", top:"+a.percentTop+"\n"),b=b+("right:"+a.percentRight+", bottom:"+a.percentBottom+"\n");a.str=b;this.fire(a);return a},getXY:function(a,b,c){void 0!==a&&(-1!=String(a).indexOf("%")?(a=Number(a.split("%").join("")),c&&(a=100-a),a=Number(a)*b/100):c&&(a=b-a));return a},getObjectById:function(a){var b=this.dataProvider;if(b.areas){var c=this.getObject(a,b.areas);if(c)return c}if(c=this.getObject(a,b.images))return c;if(a=this.getObject(a,b.lines))return a},getObject:function(a,b){if(b){var c;for(c=0;c<b.length;c++){var d=b[c];if(d.id==a)return d;if(d.areas){var g=this.getObject(a,d.areas);if(g)return g}if(g=this.getObject(a,d.images))return g;if(d=this.getObject(a,d.lines))return d}}},parseData:function(){var a=this.dataProvider;this.processObject(a.areas,a,"area");this.processObject(a.images,a,"image");this.processObject(a.lines,a,"line")},processObject:function(a,b,c){if(a){var e;for(e=0;e<a.length;e++){var g=a[e];g.parentObject=b;"area"==c&&d.extend(g,new d.MapArea(this.theme),!0);"image"==c&&(g=d.extend(g,new d.MapImage(this.theme),!0));"line"==c&&(g=d.extend(g,new d.MapLine(this.theme),!0));a[e]=g;g.areas&&this.processObject(g.areas,g,"area");g.images&&this.processObject(g.images,g,"image");g.lines&&this.processObject(g.lines,g,"line")}}},positionChanged:function(){var a={type:"positionChanged",zoomX:this.zoomX(),zoomY:this.zoomY(),zoomLevel:this.zoomLevel(),chart:this};this.fire(a)},getX:function(a,b){return this.getXY(a,this.realWidth,b)},getY:function(a,b){return this.getXY(a,this.realHeight,b)},trim:function(a){if(a){var b;for(b=0;b<a.length;b++)if(-1===" \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(b))){a=a.substring(b);break}for(b=a.length-1;0<=b;b--)if(-1===" \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(b))){a=a.substring(0,b+1);break}return-1===" \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(0))?a:""}},destroy:function(){d.AmMap.base.destroy.call(this)},x2c:function(a){var b=this.dataProvider.leftLongitude;return Math.round(this.unscaledMapWidth*(a-b)/(this.dataProvider.rightLongitude-b)*100)/100},y2c:function(a){var b=this.dataProvider.topLatitude;return Math.round(this.unscaledMapHeight*(a-b)/(this.dataProvider.bottomLatitude-
|
33 |
-
b)*100)/100},normalize:function(a){if(!a.pathsArray){var b;if(a.normalized)b=a.normalized;else{var c=d.normalizePath(a.node);b=a.node.getAttribute("d");a.normalized=b;c.maxX>this.maxMapX&&(this.maxMapX=c.maxX);c.minX<this.minMapX&&(this.minMapX=c.minX);c.maxY>this.maxMapY&&(this.maxMapY=c.maxY);c.minY<this.minMapY&&(this.minMapY=c.minY)}a.node.setAttribute("d",b)}},redraw:function(a){var b=a.normalized,b=b.split(" Z").join(""),b=b.split("M");a.pathsArray=[];for(var c=0;c<b.length;c++){var d=b[c];
|
34 |
-
if(d){for(var d=d.split("L"),g=[],f=0;f<d.length;f++)if(d[f]){var h=d[f].split(" "),h=this.xyToCoordinates(Number(h[1]),Number(h[2]),this.dpProjectionFunction,this.sourceMapWidth,this.sourceMapHeight);g.push([h.longitude,h.latitude])}a.pathsArray.push(g)}}b="";for(c=0;c<a.pathsArray.length;c++)b+=this.redrawArea(a.pathsArray[c]);a.node.setAttribute("d",b);a.path=b},redrawArea:function(a){for(var b=!1,c="",e=0;e<a.length;e++){var g=a[e][0],f=a[e][1],h=d.degreesToRadians(a[e][0]),k=d.degreesToRadians(a[e][1]),k=this.projectionFunction(h,k),h=d.roundTo(this.x2c(d.radiansToDegrees(k[0])),3),k=d.roundTo(this.y2c(d.radiansToDegrees(k[1])),3);h<this.minMapXX&&(this.minMapXX=h,this.leftLongLat={longitude:g,latitude:f});h>this.maxMapXX&&(this.maxMapXX=h,this.rightLongLat={longitude:g,latitude:f});k<this.minMapYY&&(this.minMapYY=k,this.topLongLat={longitude:g,latitude:f});k>this.maxMapYY&&(this.maxMapYY=k,this.bottomLongLat={longitude:g,latitude:f});b?c+=" L ":(c+=" M ",b=!0);c+=h+" "+k}return c+" Z "},normalizeMap:function(){var a=d.degreesToRadians(this.dataProvider.leftLongitude),b=d.degreesToRadians(this.dataProvider.rightLongitude),c=d.degreesToRadians(this.dataProvider.topLatitude),e=d.degreesToRadians(this.dataProvider.bottomLatitude),g=a+(b-a)/2,f=c+(e-c)/2,h=this.dpProjectionFunction(g,c)[1],k=this.dpProjectionFunction(g,e)[1],l=this.dpProjectionFunction(a,f)[0],m=this.dpProjectionFunction(b,f)[0],c=d.equirectangular(g,c),e=d.equirectangular(g,e),h=(c[1]-e[1])/(h-k),a=d.equirectangular(a,f),b=d.equirectangular(b,f),
|
35 |
-
l=(a[0]-b[0])/(l-m);this.minMapX=Infinity;this.maxMapX=-Infinity;this.minMapY=Infinity;this.maxMapY=-Infinity;for(m=0;m<this.svgAreas.length;m++)this.normalize(this.svgAreas[m]);this.sourceMapHeight=Math.abs(this.maxMapY-this.minMapY);this.sourceMapWidth=Math.abs(this.maxMapX-this.minMapX);this.unscaledMapWidth=this.sourceMapWidth*l;this.unscaledMapHeight=this.sourceMapHeight*h;this.diffY=this.diffX=0},fixMapPosition:function(){var a=d.degreesToRadians(this.dataProvider.leftLongitude),b=d.degreesToRadians(this.dataProvider.rightLongitude),
|
36 |
-
c=d.degreesToRadians(this.dataProvider.topLatitude),e=d.degreesToRadians(this.dataProvider.bottomLatitude),g=a+(b-a)/2,f=c+(e-c)/2,h=this.dpProjectionFunction(g,c)[1],k=this.dpProjectionFunction(g,e)[1],l=this.dpProjectionFunction(a,f)[0],m=this.dpProjectionFunction(b,f)[0];this.sourceMapHeight=this.mapHeight/this.mapScale;this.sourceMapWidth=this.mapWidth/this.mapScale;this.unscaledMapWidth=(a-b)/(l-m)*this.sourceMapWidth;this.unscaledMapHeight=(c-e)/(h-k)*this.sourceMapHeight;b=this.coordinatesToXY(d.radiansToDegrees(g),
|
37 |
-
d.radiansToDegrees(c));a=this.coordinatesToXY(d.radiansToDegrees(a),d.radiansToDegrees(f));c=f=Infinity;for(e=0;e<this.svgAreas.length;e++)g=this.svgAreas[e].getBBox(),g.y<f&&(f=g.y),g.x<c&&(c=g.x);this.diffY=b.y/this.mapScale-f;this.diffX=a.x/this.mapScale-c;for(e=0;e<this.svgAreas.length;e++)this.svgAreas[e].translate(this.diffX,this.diffY)},changeProjection:function(){this.minMapXX=Infinity;this.maxMapXX=-Infinity;this.minMapYY=Infinity;this.maxMapYY=-Infinity;this.projectionChanged=!1;for(var a=0;a<this.svgAreas.length;a++)this.redraw(this.svgAreas[a]);this.projectionChanged=!0;this.resizeMap()},coordinatesToXY:function(a,b){var c,e;c=!1;this.dataProvider&&(c=this.dataProvider.wrappedLongitudes);this.projectionFunction&&!c?(e=this.projectionFunction(d.degreesToRadians(a),d.degreesToRadians(b)),c=this.mapScale*d.roundTo(this.x2c(d.radiansToDegrees(e[0])),3),e=this.mapScale*d.roundTo(this.y2c(d.radiansToDegrees(e[1])),3)):(c=this.longitudeToCoordinate(a),e=this.latitudeToCoordinate(b));return{x:c,y:e}},coordinatesToStageXY:function(a,b){var c=this.coordinatesToXY(a,b),d=c.x*this.zoomLevel()+this.mapContainer.x,c=c.y*this.zoomLevel()+this.mapContainer.y;return{x:d,y:c}},stageXYToCoordinates:function(a,b){var c=this.mapSet.getBBox(),d=(a-this.mapContainer.x)/this.zoomLevel()-c.x*this.mapScale,c=(b-this.mapContainer.y)/this.zoomLevel()-c.y*this.mapScale;return this.xyToCoordinates(d,c)},xyToCoordinates:function(a,b,c,e,g){var f;isNaN(e)&&(e=this.mapWidth);isNaN(g)&&(g=this.mapHeight);c||(c=this.projectionFunction);
|
38 |
-
if(f=c.invert){var h=this.dataProvider.leftLongitude,k=this.dataProvider.rightLongitude,l=this.dataProvider.topLatitude,m=this.dataProvider.bottomLatitude,n=h+(k-h)/2,q=l+(m-l)/2,l=d.radiansToDegrees(c(d.degreesToRadians(n),d.degreesToRadians(l))[1]),m=d.radiansToDegrees(c(d.degreesToRadians(n),d.degreesToRadians(m))[1]),h=d.radiansToDegrees(c(d.degreesToRadians(h),d.degreesToRadians(q))[0]),k=d.radiansToDegrees(c(d.degreesToRadians(k),d.degreesToRadians(q))[0]);this.projectionChanged&&(l=d.radiansToDegrees(c(d.degreesToRadians(this.topLongLat.longitude),
|
39 |
-
d.degreesToRadians(this.topLongLat.latitude))[1]),m=d.radiansToDegrees(c(d.degreesToRadians(this.bottomLongLat.longitude),d.degreesToRadians(this.bottomLongLat.latitude))[1]),h=d.radiansToDegrees(c(d.degreesToRadians(this.leftLongLat.longitude),d.degreesToRadians(this.leftLongLat.latitude))[0]),k=d.radiansToDegrees(c(d.degreesToRadians(this.rightLongLat.longitude),d.degreesToRadians(this.rightLongLat.latitude))[0]));a=d.degreesToRadians(a/e*(k-h)+h);b=d.degreesToRadians(b/g*(m-l)+l);b=f(a,b);f=d.radiansToDegrees(b[0]);b=d.radiansToDegrees(b[1])}else f=this.coordinateToLongitude(a),b=this.coordinateToLatitude(b);return{longitude:d.roundTo(f,4),latitude:d.roundTo(b,4)}},coordinateToLatitude:function(a,b){var c;void 0===b&&(b=this.mapHeight);if(this.mapSet){var e=this.dataProvider,g=e.bottomLatitude;c=e.topLatitude;"mercator"==e.projection?(e=this.mercatorLatitudeToCoordinate(g),c=this.mercatorLatitudeToCoordinate(c),c=2*d.degreesToRadians(a*(e-c)/b+c),c=d.radiansToDegrees(2*Math.atan(Math.exp(c))-.5*Math.PI)):c=
|
40 |
-
a/b*(g-c)+c}return Math.round(1E6*c)/1E6},coordinateToLongitude:function(a,b){var c,d=this.dataProvider;void 0===b&&(b=this.mapWidth);this.mapSet&&(c=a/b*(d.rightLongitude-d.leftLongitude)+d.leftLongitude);return Math.round(1E6*c)/1E6}})})();(function(){var d=window.AmCharts;d.ZoomControl=d.Class({construct:function(a){this.cname="ZoomControl";this.panStepSize=.1;this.zoomFactor=2;this.maxZoomLevel=64;this.minZoomLevel=1;this.panControlEnabled=!1;this.zoomControlEnabled=!0;this.buttonRollOverColor="#DADADA";this.buttonFillColor="#FFFFFF";this.buttonFillAlpha=1;this.buttonBorderColor="#000000";this.buttonBorderAlpha=.1;this.buttonIconAlpha=this.buttonBorderThickness=1;this.gridColor=this.buttonIconColor="#000000";this.homeIconFile="homeIcon.gif";
|
41 |
-
this.gridBackgroundColor="#000000";this.draggerAlpha=this.gridAlpha=this.gridBackgroundAlpha=0;this.draggerSize=this.buttonSize=31;this.iconSize=11;this.homeButtonEnabled=!0;this.buttonCornerRadius=2;this.gridHeight=5;this.roundButtons=!0;this.top=this.left=10;d.applyTheme(this,a,this.cname)},init:function(a,b){var c=this;c.chart=a;d.remove(c.set);var e=b.set();d.setCN(a,e,"zoom-control");var g=c.buttonSize,f=c.zoomControlEnabled,h=c.panControlEnabled,k=c.buttonFillColor,l=c.buttonFillAlpha,m=c.buttonBorderThickness,n=c.buttonBorderColor,q=c.buttonBorderAlpha,t=c.buttonCornerRadius,r=c.buttonRollOverColor,p=c.gridHeight,u=c.zoomFactor,A=c.minZoomLevel,x=c.maxZoomLevel,z=c.buttonIconAlpha,v=c.buttonIconColor,B=c.roundButtons,C=a.svgIcons,w=a.getX(c.left),y=a.getY(c.top);isNaN(c.right)||(w=a.getX(c.right,!0),w=h?w-3*g:w-g);isNaN(c.bottom)||(y=a.getY(c.bottom,!0),f&&(y-=p+3*g),y=h?y-3*g:c.homeButtonEnabled?y-.5*g:y+g);e.translate(w,y);c.previousDY=NaN;var F,w=g/4-1;if(f){F=b.set();d.setCN(a,F,"zoom-control-zoom");e.push(F);c.set=e;c.zoomSet=F;5<p&&(f=d.rect(b,g+6,p+2*g+6,c.gridBackgroundColor,c.gridBackgroundAlpha,0,0,0,4),d.setCN(a,f,"zoom-bg"),f.translate(-3,-3),f.mouseup(function(){c.handleBgUp()}).touchend(function(){c.handleBgUp()}),F.push(f));var E=g;B&&(E=g/1.5);c.draggerSize=E;var H=Math.log(x/A)/Math.log(u)+1;1E3<H&&(H=1E3);var f=p/H,G,D=b.set();D.translate((g-E)/2+1,1,NaN,!0);F.push(D);for(G=1;G<H;G++)y=g+G*f,y=d.line(b,[1,E-2],[y,y],c.gridColor,c.gridAlpha,1),d.setCN(a,y,"zoom-grid"),D.push(y);
|
42 |
-
y=new d.SimpleButton;y.setDownHandler(c.draggerDown,c);y.setClickHandler(c.draggerUp,c);y.init(b,E,f,k,l,m,n,q,t,r);d.setCN(a,y.set,"zoom-dragger");F.push(y.set);y.set.setAttr("opacity",c.draggerAlpha);c.dragger=y.set;c.previousY=NaN;y=new d.SimpleButton;C?(E=b.set(),H=d.line(b,[-w,w],[0,0],v,z,1),G=d.line(b,[0,0],[-w,w],v,z,1),E.push(H),E.push(G),y.svgIcon=E):y.setIcon(a.pathToImages+"plus.gif",c.iconSize);y.setClickHandler(a.zoomIn,a);y.init(b,g,g,k,l,m,n,q,t,r,z,v,B);d.setCN(a,y.set,"zoom-in");F.push(y.set);y=new d.SimpleButton;C?y.svgIcon=d.line(b,[-w,w],[0,0],v,z,1):y.setIcon(a.pathToImages+"minus.gif",c.iconSize);y.setClickHandler(a.zoomOut,a);y.init(b,g,g,k,l,m,n,q,t,r,z,v,B);y.set.translate(0,p+g);d.setCN(a,y.set,"zoom-out");F.push(y.set);p-=f;x=Math.log(x/100)/Math.log(u);c.realStepSize=p/(x-Math.log(A/100)/Math.log(u));c.realGridHeight=p;c.stepMax=x}h&&(h=b.set(),d.setCN(a,h,"zoom-control-pan"),e.push(h),F&&F.translate(g,4*g),u=new d.SimpleButton,C?u.svgIcon=d.line(b,[w/5,-w+w/5,
|
43 |
-
w/5],[-w,0,w],v,z,1):u.setIcon(a.pathToImages+"panLeft.gif",c.iconSize),u.setClickHandler(a.moveLeft,a),u.init(b,g,g,k,l,m,n,q,t,r,z,v,B),u.set.translate(0,g),d.setCN(a,u.set,"pan-left"),h.push(u.set),u=new d.SimpleButton,C?u.svgIcon=d.line(b,[-w/5,w-w/5,-w/5],[-w,0,w],v,z,1):u.setIcon(a.pathToImages+"panRight.gif",c.iconSize),u.setClickHandler(a.moveRight,a),u.init(b,g,g,k,l,m,n,q,t,r,z,v,B),u.set.translate(2*g,g),d.setCN(a,u.set,"pan-right"),h.push(u.set),u=new d.SimpleButton,C?u.svgIcon=d.line(b,[-w,0,w],[w/5,-w+w/5,w/5],v,z,1):u.setIcon(a.pathToImages+"panUp.gif",c.iconSize),u.setClickHandler(a.moveUp,a),u.init(b,g,g,k,l,m,n,q,t,r,z,v,B),u.set.translate(g,0),d.setCN(a,u.set,"pan-up"),h.push(u.set),u=new d.SimpleButton,C?u.svgIcon=d.line(b,[-w,0,w],[-w/5,w-w/5,-w/5],v,z,1):u.setIcon(a.pathToImages+"panDown.gif",c.iconSize),u.setClickHandler(a.moveDown,a),u.init(b,g,g,k,l,m,n,q,t,r,z,v,B),u.set.translate(g,2*g),d.setCN(a,u.set,"pan-down"),h.push(u.set),e.push(h));c.homeButtonEnabled&&(h=new d.SimpleButton,C?h.svgIcon=d.polygon(b,[-w,0,w,w-1,w-1,2,2,-2,-2,-w+1,-w+1],[0,-w,0,0,w-1,w-1,2,2,w-1,w-1,0],v,z,1,v,z):h.setIcon(a.pathToImages+c.homeIconFile,c.iconSize),h.setClickHandler(a.goHome,a),c.panControlEnabled&&(q=l=0),h.init(b,g,g,k,l,m,n,q,t,r,z,v,B),c.panControlEnabled?h.set.translate(g,g):F&&F.translate(0,1.5*g),d.setCN(a,h.set,"pan-home"),e.push(h.set));c.update()},draggerDown:function(){this.chart.stopDrag();this.isDragging=!0},draggerUp:function(){this.isDragging=!1},handleBgUp:function(){var a=this.chart;a.zoomTo(100*Math.pow(this.zoomFactor,this.stepMax-(a.mouseY-this.zoomSet.y-this.set.y-this.buttonSize-this.realStepSize/2)/this.realStepSize))},update:function(){var a;a=this.zoomFactor;var b=this.realStepSize,c=this.stepMax,e=this.dragger,g=this.buttonSize,f,h=this.chart;h&&(this.isDragging?(h.stopDrag(),f=e.y+(h.mouseY-this.previousY),f=d.fitToBounds(f,g,this.realGridHeight+g),h.zoomTo(100*Math.pow(a,c-(f-g)/b),NaN,NaN,!0)):(a=Math.log(h.zoomLevel()/100)/Math.log(a),f=(c-a)*b+g),this.previousY=
|
44 |
-
h.mouseY,this.previousDY!=f&&e&&(e.translate((this.buttonSize-this.draggerSize)/2,f),this.previousDY=f))}})})();(function(){var d=window.AmCharts;d.SimpleButton=d.Class({construct:function(){},init:function(a,b,c,e,g,f,h,k,l,m,n,q,t){var r=this;r.rollOverColor=m;r.color=e;r.container=a;m=a.set();r.set=m;t?(b/=2,e=d.circle(a,b,e,g,f,h,k),e.translate(b,b)):e=d.rect(a,b,c,e,g,f,h,k,l);m.push(e);g=r.iconPath;var p;g&&(p=r.iconSize,f=(b-p)/2,t&&(f=(2*b-p)/2),p=a.image(g,f,(c-p)/2,p,p));r.svgIcon&&(p=r.svgIcon,t?p.translate(b,b):p.translate(b/2,b/2));m.setAttr("cursor","pointer");p&&(m.push(p),p.setAttr("opacity",
|
45 |
-
n),p.node.style.pointerEvents="none");e.mousedown(function(){r.handleDown()}).touchstart(function(){r.handleDown()}).mouseup(function(){r.handleUp()}).touchend(function(){r.handleUp()}).mouseover(function(){r.handleOver()}).mouseout(function(){r.handleOut()});r.bg=e},setIcon:function(a,b){this.iconPath=a;this.iconSize=b},setClickHandler:function(a,b){this.clickHandler=a;this.scope=b},setDownHandler:function(a,b){this.downHandler=a;this.scope=b},handleUp:function(){var a=this.clickHandler;a&&a.call(this.scope)},handleDown:function(){var a=this.downHandler;a&&a.call(this.scope)},handleOver:function(){this.container.chart.skipClick=!0;this.bg.setAttr("fill",this.rollOverColor)},handleOut:function(){this.container.chart.skipClick=!1;this.bg.setAttr("fill",this.color)}})})();(function(){var d=window.AmCharts;d.SmallMap=d.Class({construct:function(a){this.cname="SmallMap";this.mapColor="#e6e6e6";this.rectangleColor="#FFFFFF";this.top=this.right=10;this.minimizeButtonWidth=23;this.backgroundColor="#9A9A9A";this.backgroundAlpha=1;this.borderColor="#FFFFFF";this.iconColor="#000000";this.borderThickness=3;this.borderAlpha=1;this.size=.2;this.enabled=!0;d.applyTheme(this,a,this.cname)},init:function(a,b){var c=this;if(c.enabled){c.chart=a;c.container=b;c.width=a.realWidth*c.size;c.height=a.realHeight*c.size;d.remove(c.mapSet);d.remove(c.allSet);d.remove(c.set);var e=b.set();c.set=e;d.setCN(a,e,"small-map");var g=b.set();c.allSet=g;e.push(g);c.buildSVGMap();var f=c.borderThickness,h=c.borderColor,k=d.rect(b,c.width+f,c.height+f,c.backgroundColor,c.backgroundAlpha,f,h,c.borderAlpha);d.setCN(a,k,"small-map-bg");k.translate(-f/2,-f/2);g.push(k);k.toBack();var l,m,k=c.minimizeButtonWidth,n=new d.SimpleButton,q=k/2;a.svgIcons?n.svgIcon=d.line(b,[-q/2,0,q/2],[-q/4,q/4,-q/
|
46 |
-
4],c.iconColor,1,1):n.setIcon(a.pathToImages+"arrowDown.gif",k);n.setClickHandler(c.minimize,c);n.init(b,k,k,h,1,1,h,1);d.setCN(a,n.set,"small-map-down");n=n.set;c.downButtonSet=n;e.push(n);var t=new d.SimpleButton;a.svgIcons?t.svgIcon=d.line(b,[-q/2,0,q/2],[q/4,-q/4,q/4],c.iconColor,1,1):t.setIcon(a.pathToImages+"arrowUp.gif",k);t.setClickHandler(c.maximize,c);t.init(b,k,k,h,1,1,h,1);d.setCN(a,t.set,"small-map-up");h=t.set;c.upButtonSet=h;h.hide();e.push(h);var r,p;isNaN(c.top)||(l=a.getY(c.top)+
|
47 |
-
f,p=0);isNaN(c.bottom)||(l=a.getY(c.bottom,!0)-c.height-f,p=c.height-k+f/2);isNaN(c.left)||(m=a.getX(c.left)+f,r=-f/2);isNaN(c.right)||(m=a.getX(c.right,!0)-c.width-f,r=c.width-k+f/2);f=b.set();f.clipRect(1,1,c.width,c.height);g.push(f);c.rectangleC=f;e.translate(m,l);n.translate(r,p);h.translate(r,p);g.mouseup(function(){c.handleMouseUp()});c.drawRectangle()}else d.remove(c.allSet),d.remove(c.downButtonSet),d.remove(c.upButtonSet)},minimize:function(){this.downButtonSet.hide();this.upButtonSet.show();this.allSet.hide()},maximize:function(){this.downButtonSet.show();this.upButtonSet.hide();this.allSet.show()},buildSVGMap:function(){var a=this.chart,b={fill:this.mapColor,stroke:this.mapColor,"stroke-opacity":1},c=this.container,e=c.set();d.setCN(a,e,"small-map-image");var g;for(g=0;g<a.svgAreas.length;g++){var f=c.path(a.svgAreas[g].path).attr(b);e.push(f)}this.allSet.push(e);b=e.getBBox();c=this.size*a.mapScale;g=-b.x*c;var f=-b.y*c,h=0,k=0;a.centerMap&&(h=(this.width-b.width*c)/2,k=(this.height-
|
48 |
-
b.height*c)/2);this.mapWidth=b.width*c;this.mapHeight=b.height*c;this.dx=h;this.dy=k;e.translate(g+h,f+k,c);this.mapSet=e},update:function(){var a=this.chart;if(a){var b=a.zoomLevel(),c=this.width,d=this.height,g=c/(a.realWidth*b),f=a.mapContainer.getBBox(),c=c/b,d=d/b,h=this.rectangle;h.translate(-(a.mapContainer.x+f.x*b)*g+this.dx,-(a.mapContainer.y+f.y*b)*g+this.dy);0<c&&0<d&&(h.setAttr("width",Math.ceil(c+1)),h.setAttr("height",Math.ceil(d+1)));this.rWidth=c;this.rHeight=d}},drawRectangle:function(){var a=
|
49 |
-
this.rectangle;d.remove(a);a=d.rect(this.container,10,10,"#000",0,1,this.rectangleColor,1);d.setCN(this.chart,a,"small-map-rectangle");this.rectangleC.push(a);this.rectangle=a},handleMouseUp:function(){var a=this.chart,b=a.zoomLevel();a.zoomTo(b,-((a.mouseX-this.set.x-this.dx-this.rWidth/2)/this.mapWidth)*b,-((a.mouseY-this.set.y-this.dy-this.rHeight/2)/this.mapHeight)*b)}})})();(function(){var d=window.AmCharts;d.AreasProcessor=d.Class({construct:function(a){this.chart=a},process:function(a){this.updateAllAreas();this.allObjects=[];a=a.areas;var b=this.chart,c=a.length,d,g,f=0,h=!1,k=!1,l=0;for(d=0;d<c;d++)if(g=a[d],g=g.value,!isNaN(g)){if(!1===h||h<g)h=g;if(!1===k||k>g)k=g;f+=Math.abs(g);l++}this.minValue=k;this.maxValue=h;isNaN(b.minValue)||(this.minValue=b.minValue);isNaN(b.maxValue)||(this.maxValue=b.maxValue);b.maxValueReal=h;b.minValueReal=k;for(d=0;d<c;d++)g=a[d],
|
50 |
-
isNaN(g.value)?g.percents=void 0:(g.percents=(g.value-k)/f*100,k==h&&(g.percents=100));for(d=0;d<c;d++)g=a[d],this.createArea(g)},updateAllAreas:function(){var a=this.chart,b=a.areasSettings,c=b.unlistedAreasColor,e=b.unlistedAreasAlpha,g=b.unlistedAreasOutlineColor,f=b.unlistedAreasOutlineAlpha,h=a.svgAreas,k=a.dataProvider,l=k.areas,m={},n;for(n=0;n<l.length;n++)m[l[n].id]=l[n];for(n=0;n<h.length;n++){l=h[n];if(b.preserveOriginalAttributes){if(l.customAttr)for(var q in l.customAttr)l.setAttr(q,
|
51 |
-
l.customAttr[q])}else{void 0!=c&&l.setAttr("fill",c);isNaN(e)||l.setAttr("fill-opacity",e);void 0!=g&&l.setAttr("stroke",g);isNaN(f)||l.setAttr("stroke-opacity",f);var t=b.outlineThickness;b.adjustOutlineThickness&&(t=t/a.zoomLevel()/a.mapScale);l.setAttr("stroke-width",t)}d.setCN(a,l,"map-area-unlisted");k.getAreasFromMap&&!m[l.id]&&(t=new d.MapArea(a.theme),t.parentObject=k,t.id=l.id,k.areas.push(t))}},createArea:function(a){var b=this.chart,c=b.svgAreasById[a.id],e=b.areasSettings;if(c&&c.className){var g=
|
52 |
-
b.areasClasses[c.className];g&&(e=d.processObject(g,d.AreasSettings,b.theme))}var f=e.color,h=e.alpha,k=e.outlineThickness,l=e.rollOverColor,m=e.selectedColor,n=e.rollOverAlpha,q=e.rollOverBrightness,t=e.outlineColor,r=e.outlineAlpha,p=e.balloonText,u=e.selectable,A=e.pattern,x=e.rollOverOutlineColor,z=e.bringForwardOnHover,v=e.preserveOriginalAttributes;this.allObjects.push(a);a.chart=b;a.baseSettings=e;a.autoZoomReal=void 0==a.autoZoom?e.autoZoom:a.autoZoom;g=a.color;void 0==g&&(g=f);var B=a.alpha;isNaN(B)&&(B=h);h=a.rollOverAlpha;isNaN(h)&&(h=n);isNaN(h)&&(h=B);n=a.rollOverColor;void 0==n&&(n=l);l=a.pattern;void 0==l&&(l=A);A=a.selectedColor;void 0==A&&(A=m);m=a.balloonText;void 0===m&&(m=p);void 0==e.colorSolid||isNaN(a.value)||(p=Math.floor((a.value-this.minValue)/((this.maxValue-this.minValue)/b.colorSteps)),p==b.colorSteps&&p--,p*=1/(b.colorSteps-1),this.maxValue==this.minValue&&(p=1),a.colorReal=d.getColorFade(g,e.colorSolid,p));void 0!=a.color&&(a.colorReal=a.color);void 0==a.selectable&&
|
53 |
-
(a.selectable=u);void 0==a.colorReal&&(a.colorReal=f);f=a.outlineColor;void 0==f&&(f=t);t=a.outlineAlpha;isNaN(t)&&(t=r);r=a.outlineThickness;isNaN(r)&&(r=k);k=a.rollOverOutlineColor;void 0==k&&(k=x);x=a.rollOverBrightness;void 0==x&&(x=q);void 0==a.bringForwardOnHover&&(a.bringForwardOnHover=z);void 0==a.preserveOriginalAttributes&&(a.preserveOriginalAttributes=v);isNaN(e.selectedBrightness)||(A=d.adjustLuminosity(a.colorReal,e.selectedBrightness/100));a.alphaReal=B;a.rollOverColorReal=n;a.rollOverAlphaReal=h;a.balloonTextReal=m;a.selectedColorReal=A;a.outlineColorReal=f;a.outlineAlphaReal=t;a.rollOverOutlineColorReal=k;a.outlineThicknessReal=r;a.patternReal=l;a.rollOverBrightnessReal=x;a.accessibleLabel||(a.accessibleLabel=e.accessibleLabel);d.processDescriptionWindow(e,a);if(c&&(q=c.area,z=c.title,a.enTitle=c.title,z&&!a.title&&(a.title=z),(c=b.language)?(z=d.mapTranslations)&&(c=z[c])&&c[a.enTitle]&&(a.titleTr=c[a.enTitle]):a.titleTr=void 0,q)){a.displayObject=q;a.mouseEnabled&&b.addObjectEventListeners(q,a);var C;void 0!=g&&(C=g);void 0!=a.colorReal&&(C=a.showAsSelected||b.selectedObject==a?a.selectedColorReal:a.colorReal);q.node.setAttribute("class","");d.setCN(b,q,"map-area");d.setCN(b,q,"map-area-"+q.id);e.adjustOutlineThickness&&(r=r/b.zoomLevel()/b.mapScale);a.preserveOriginalAttributes||(q.setAttr("fill",C),q.setAttr("stroke",f),q.setAttr("stroke-opacity",t),q.setAttr("stroke-width",r),q.setAttr("fill-opacity",B));b.makeObjectAccessible(a);l&&q.pattern(l,b.mapScale,b.path);a.hidden&&q.hide()}}})})();(function(){var d=window.AmCharts;d.AreasSettings=d.Class({construct:function(a){this.cname="AreasSettings";this.alpha=1;this.autoZoom=!1;this.balloonText="[[title]]";this.color="#FFCC00";this.colorSolid="#990000";this.unlistedAreasAlpha=1;this.unlistedAreasColor="#DDDDDD";this.outlineColor="#FFFFFF";this.outlineThickness=this.outlineAlpha=1;this.selectedColor=this.rollOverOutlineColor="#CC0000";this.unlistedAreasOutlineColor="#FFFFFF";this.unlistedAreasOutlineAlpha=1;this.descriptionWindowWidth=
|
54 |
-
250;this.bringForwardOnHover=this.adjustOutlineThickness=!0;this.accessibleLabel="[[title]] [[value]] [[description]]";d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.ImagesProcessor=d.Class({construct:function(a){this.chart=a;this.reset()},process:function(a){var b=a.images,c;for(c=0;c<b.length;c++){var d=b[c];this.createImage(d,c);d.parentArray=b}this.counter=c;a.parentObject&&a.remainVisible&&this.process(a.parentObject)},createImage:function(a,b){a=d.processObject(a,d.MapImage);isNaN(b)&&(this.counter++,b=this.counter);var c=this.chart,e=c.container,g=c.mapImagesContainer,f=c.stageImagesContainer,h=c.imagesSettings;a.remove&&a.remove();var k=h.color,l=h.alpha,m=h.rollOverColor,n=h.rollOverOutlineColor,q=h.selectedColor,t=h.balloonText,r=h.outlineColor,p=h.outlineAlpha,u=h.outlineThickness,A=h.selectedScale,x=h.rollOverScale,z=h.selectable,v=h.labelPosition,B=h.labelColor,C=h.labelFontSize,w=h.bringForwardOnHover,y=h.labelRollOverColor,F=h.rollOverBrightness,E=h.selectedLabelColor;a.index=b;a.chart=c;a.baseSettings=c.imagesSettings;var H=e.set();a.displayObject=H;var G=a.color;void 0==G&&(G=k);k=a.alpha;isNaN(k)&&(k=l);void 0==a.bringForwardOnHover&&(a.bringForwardOnHover=w);l=a.outlineAlpha;isNaN(l)&&(l=p);p=a.rollOverColor;void 0==p&&(p=m);m=a.selectedColor;void 0==m&&(m=q);q=a.balloonText;void 0===q&&(q=t);t=a.outlineColor;void 0==t&&(t=r);a.outlineColorReal=t;r=a.outlineThickness;isNaN(r)&&(r=u);(u=a.labelPosition)||(u=v);v=a.labelColor;void 0==v&&(v=B);B=a.labelRollOverColor;void 0==B&&(B=y);y=a.selectedLabelColor;void 0==y&&(y=E);E=a.labelFontSize;isNaN(E)&&(E=C);C=a.selectedScale;isNaN(C)&&(C=A);A=a.rollOverScale;isNaN(A)&&(A=x);x=a.rollOverBrightness;void 0==x&&(x=F);void 0==a.selectable&&(a.selectable=z);a.colorReal=G;isNaN(h.selectedBrightness)||(m=d.adjustLuminosity(a.colorReal,h.selectedBrightness/100));a.alphaReal=k;a.rollOverColorReal=p;a.balloonTextReal=q;a.selectedColorReal=m;a.labelColorReal=v;a.labelRollOverColorReal=B;a.selectedLabelColorReal=y;a.labelFontSizeReal=E;a.labelPositionReal=u;a.selectedScaleReal=C;a.rollOverScaleReal=A;a.rollOverOutlineColorReal=n;a.rollOverBrightnessReal=x;a.accessibleLabel||(a.accessibleLabel=h.accessibleLabel);d.processDescriptionWindow(h,a);a.centeredReal=void 0==a.centered?h.centered:a.centered;F=a.type;x=a.imageURL;A=a.svgPath;C=a.width;E=a.height;n=a.scale;isNaN(a.percentWidth)||(C=a.percentWidth/100*c.realWidth);isNaN(a.percentHeight)||(E=a.percentHeight/100*c.realHeight);var D;x||F||A||(F="circle",C=1,l=k=0);p=z=0;h=a.selectedColorReal;if(F){isNaN(C)&&(C=10);isNaN(E)&&(E=10);"kilometers"==a.widthAndHeightUnits&&(C=c.kilometersToPixels(a.width),E=c.kilometersToPixels(a.height));"miles"==a.widthAndHeightUnits&&(C=c.milesToPixels(a.width),E=c.milesToPixels(a.height));if("circle"==F||"bubble"==F)E=C;D=this.createPredefinedImage(G,t,r,F,C,E);p=z=0;a.centeredReal?(isNaN(a.right)||(z=C*n),isNaN(a.bottom)||(p=E*n)):(z=C*n/2,p=E*n/2);D.translate(z,p,n,!0)}else x?(isNaN(C)&&(C=10),isNaN(E)&&(E=10),D=e.image(x,0,0,C,E),D.node.setAttribute("preserveAspectRatio","none"),D.setAttr("opacity",k),a.centeredReal&&(z=isNaN(a.right)?-C/2:C/2,p=isNaN(a.bottom)?-E/2:E/2,D.translate(z,p,NaN,!0))):A&&(D=e.path(A),F=D.getBBox(),a.centeredReal?(z=-F.x*n-F.width*n/2,isNaN(a.right)||(z=-z),p=-F.y*n-F.height*n/2,isNaN(a.bottom)||(p=-p)):z=p=0,D.translate(z,p,n,!0),D.x=z,D.y=p);D&&(H.push(D),a.image=D,D.setAttr("stroke-opacity",l),D.setAttr("stroke-width",r),D.setAttr("stroke",t),D.setAttr("fill-opacity",k),D.setAttr("fill",G),d.setCN(c,D,"map-image"),void 0!=a.id&&d.setCN(c,D,"map-image-"+a.id));G=a.labelColorReal;!a.showAsSelected&&c.selectedObject!=a||void 0==h||(D.setAttr("fill",h),G=a.selectedLabelColorReal);D=null;void 0!==a.label&&(D=d.text(e,a.label,G,c.fontFamily,a.labelFontSizeReal,a.labelAlign),d.setCN(c,D,"map-image-label"),void 0!==a.id&&d.setCN(c,D,"map-image-label-"+a.id),G=a.labelBackgroundAlpha,(k=a.labelBackgroundColor)&&0<G&&(l=D.getBBox(),e=d.rect(e,l.width+16,l.height+10,k,G),d.setCN(c,e,"map-image-label-background"),void 0!=a.id&&d.setCN(c,e,"map-image-label-background-"+a.id),H.push(e),a.labelBG=e),a.imageLabel=D,H.push(D),d.setCN(c,H,"map-image-container"),void 0!=a.id&&d.setCN(c,H,"map-image-container-"+a.id));e=isNaN(a.latitude)||isNaN(a.longitude)?!0:!1;a.lineId&&(D=this.chart.getObjectById(a.lineId))&&0<D.longitudes.length&&(e=!1);e?f.push(H):g.push(H);H&&(H.rotation=a.rotation,isNaN(a.rotation)||H.rotate(a.rotation));this.updateSizeAndPosition(a);a.mouseEnabled&&c.addObjectEventListeners(H,a);a.hidden&&H.hide();a.animateAlongLine&&setTimeout(function(){a.animateAlong.call(a)},100);return a},updateSizeAndPosition:function(a){var b=this.chart,c=a.displayObject,e=b.getX(a.left),g=b.getY(a.top),f,h=a.image.getBBox();isNaN(a.right)||(e=b.getX(a.right,!0)-h.width*a.scale);isNaN(a.bottom)||(g=b.getY(a.bottom,!0)-h.height*a.scale);var k=a.longitude,l=a.latitude,m=a.positionOnLine,h=this.objectsToResize;this.allSvgObjects.push(c);this.allObjects.push(a);a.arrays.push({arr:this.allSvgObjects,el:c});a.arrays.push({arr:this.allObjects,el:a});var n=a.imageLabel,q=this.chart.zoomLevel(),t,r;a.lineId&&(a.line=this.chart.getObjectById(a.lineId));b.makeObjectAccessible(a);if(a.line&&a.line.getCoordinates){a.line.chart=b;var p=a.line.getCoordinates(m,a.lineSegment);p&&(k=b.coordinateToLongitude(p.x),l=b.coordinateToLatitude(p.y),t=p.x,r=p.y,a.animateAngle&&(f=d.radiansToDegrees(p.angle)))}isNaN(f)||c.rotate(f+a.extraAngle);if(!isNaN(e)&&!isNaN(g))c.translate(e,g,NaN,!0);else if(!isNaN(l)&&!isNaN(k))if(g=b.coordinatesToXY(k,l),e=g.x,g=g.y,isNaN(t)||(e=t),isNaN(r)||(g=r),a.fixedSize){t=1;if(a.showAsSelected||b.selectedObject==a)t=a.selectedScaleReal;b=a.positionScale;isNaN(b)?b=0:(--b,b*=1-2*Math.abs(m-.5));m={image:c,scale:t+b};h.push(m);a.arrays.push({arr:h,el:m});c.translate(e,g,t/q+b,!0)}else c.translate(e,g,NaN,!0),n&&(this.labelsToReposition.push(a),a.arrays.push({arr:this.labelsToReposition,el:a}));this.positionLabel(n,a,a.labelPositionReal)},positionLabel:function(a,b,c){if(a){var d=b.image,g=0,f=0,h=0,k=0;d&&(k=d.getBBox(),f=d.y,g=d.x,h=k.width,k=k.height,b.svgPath&&(h*=b.scale,k*=b.scale));var d=a.getBBox(),l=d.width,m=d.height;"right"==c&&(g+=h+l/2+5,f+=k/2-2);"left"==c&&(g+=-l/2-5,f+=k/2-2);"top"==c&&(f-=m/2+3,g+=h/2);"bottom"==c&&(f+=k+m/2,g+=h/2);"middle"==c&&(g+=h/2,f+=k/2);a.translate(g+b.labelShiftX,f+b.labelShiftY,NaN,!0);b.labelBG&&b.labelBG.translate(g-d.width/2+b.labelShiftX-9,f+b.labelShiftY-d.height/2-3,NaN,!0)}},createPredefinedImage:function(a,b,c,e,g,f){var h=this.chart.container,k;switch(e){case"circle":k=d.circle(h,g/2,a,1,c,b,1);break;case"rectangle":k=d.polygon(h,[-g/2,g/2,g/2,-g/2],[f/2,f/2,-f/2,-f/2],a,1,c,b,1,0,!0);break;case"bubble":k=d.circle(h,g/2,a,1,c,b,1,!0);break;case"hexagon":g/=Math.sqrt(3),k=d.polygon(h,[.866*g,0*g,-.866*g,-.866*g,0*g,.866*g],[.5*g,1*g,.5*g,-.5*g,-1*g,-.5*g],a,1,c,b,1)}return k},reset:function(){this.objectsToResize=[];this.allSvgObjects=[];this.allObjects=[];this.allLabels=[];this.labelsToReposition=[]}})})();(function(){var d=window.AmCharts;d.ImagesSettings=d.Class({construct:function(a){this.cname="ImagesSettings";this.balloonText="[[title]]";this.alpha=1;this.borderAlpha=0;this.borderThickness=1;this.labelPosition="right";this.labelColor="#000000";this.labelFontSize=11;this.color="#000000";this.labelRollOverColor="#00CC00";this.centered=!0;this.rollOverScale=this.selectedScale=1;this.descriptionWindowWidth=250;this.bringForwardOnHover=!0;this.outlineColor="transparent";this.adjustAnimationSpeed=!1;this.baseAnimationDistance=500;this.pauseDuration=0;this.easingFunction=d.easeInOutQuad;this.animationDuration=3;this.positionScale=1;this.accessibleLabel="[[title]] [[description]]";d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.LinesProcessor=d.Class({construct:function(a){this.chart=a;this.reset()},process:function(a){var b=a.lines,c;for(c=0;c<b.length;c++){var d=b[c];this.createLine(d,c);d.parentArray=b}this.counter=c;a.parentObject&&a.remainVisible&&this.process(a.parentObject)},createLine:function(a,b){a=d.processObject(a,d.MapLine);isNaN(b)&&(this.counter++,b=this.counter);a.index=b;a.remove&&a.remove();var c=this.chart,e=c.linesSettings,g=this.objectsToResize,f=c.mapLinesContainer,h=c.stageLinesContainer,k=e.thickness,l=e.dashLength,m=e.arrow,n=e.arrowSize,q=e.arrowColor,t=e.arrowAlpha,r=e.color,p=e.alpha,u=e.rollOverColor,A=e.selectedColor,x=e.rollOverAlpha,z=e.balloonText,v=e.bringForwardOnHover,B=e.arc,C=e.rollOverBrightness,w=c.container;a.chart=c;a.baseSettings=e;var y=w.set();a.displayObject=y;this.allSvgObjects.push(y);a.arrays.push({arr:this.allSvgObjects,el:y});this.allObjects.push(a);a.arrays.push({arr:this.allObjects,el:a});a.mouseEnabled&&c.addObjectEventListeners(y,a);if(a.remainVisible||c.selectedObject==a.parentObject){var F=a.thickness;isNaN(F)&&(F=k);k=a.dashLength;isNaN(k)&&(k=l);l=a.color;void 0==l&&(l=r);r=a.alpha;isNaN(r)&&(r=p);p=a.rollOverAlpha;isNaN(p)&&(p=x);isNaN(p)&&(p=r);x=a.rollOverColor;void 0==x&&(x=u);u=a.selectedColor;void 0==u&&(u=A);A=a.balloonText;void 0===A&&(A=z);z=a.arc;isNaN(z)&&(z=B);B=a.arrow;if(!B||"none"==B&&"none"!=m)B=m;m=a.arrowColor;void 0==m&&(m=q);void 0==m&&(m=l);q=a.arrowAlpha;isNaN(q)&&(q=t);isNaN(q)&&(q=r);t=a.arrowSize;isNaN(t)&&(t=n);n=a.rollOverBrightness;void 0==n&&(n=C);a.colorReal=l;isNaN(e.selectedBrightness)||(u=d.adjustLuminosity(a.colorReal,e.selectedBrightness/100));a.alphaReal=r;a.rollOverColorReal=x;a.rollOverAlphaReal=p;a.balloonTextReal=A;a.selectedColorReal=u;a.thicknessReal=F;a.rollOverBrightnessReal=n;a.accessibleLabel||(a.accessibleLabel=e.accessibleLabel);void 0===a.shiftArrow&&(a.shiftArrow=e.shiftArrow);void 0==a.bringForwardOnHover&&(a.bringForwardOnHover=v);d.processDescriptionWindow(e,a);v=this.processCoordinates(a.x,c.realWidth);C=this.processCoordinates(a.y,c.realHeight);n=a.longitudes;e=a.latitudes;p=n.length;if(0<p)for(v=[],C=[],x=0;x<p;x++)A=c.coordinatesToXY(n[x],e[x]),v.push(A.x),C.push(A.y);if(0<v.length){a.segments=v.length;d.dx=0;d.dy=0;var E,H,G,p=10*(1-Math.abs(z));10<=p&&(p=NaN);1>p&&(p=1);a.arcRadius=[];a.distances=[];n=c.mapContainer.scale;if(isNaN(p)){for(p=0;p<v.length-1;p++)H=Math.sqrt(Math.pow(v[p+1]-v[p],2)+Math.pow(C[p+1]-C[p],2)),a.distances[p]=H;p=d.line(w,v,C,l,1,F/n,k,!1,!1,!0);l=d.line(w,v,C,l,.001,5/n,k,!1,!1,!0);p.setAttr("stroke-linecap","round")}else{x=1;0>z&&(x=0);A={fill:"none",stroke:l,"stroke-opacity":1,"stroke-width":F/n,"fill-opacity":0,"stroke-linecap":"round"};void 0!==k&&0<k&&(A["stroke-dasharray"]=k);for(var k="",D=0;D<v.length-1;D++){var K=v[D],J=v[D+1],L=C[D],O=C[D+1];H=Math.sqrt(Math.pow(J-K,2)+Math.pow(O-L,2));G=H/2*p;E=270+180*Math.acos(H/2/G)/Math.PI;isNaN(E)&&(E=270);if(K<J){var P=K,K=J,J=P,P=L,L=O,O=P;E=-E}0<z&&(E=-E);k+="M"+
|
55 |
-
K+","+L+"A"+G+","+G+",0,0,"+x+","+J+","+O;a.arcRadius[D]=G;a.distances[D]=H}p=w.path(k).attr(A);l=w.path(k).attr({"fill-opacity":0,stroke:l,"stroke-width":5/n,"stroke-opacity":.001,fill:"none"})}d.setCN(c,p,"map-line");void 0!=a.id&&d.setCN(c,p,"map-line-"+a.id);d.dx=.5;d.dy=.5;y.push(p);y.push(l);p.setAttr("opacity",r);if("none"!=B){var I,M,N;if("end"==B||"both"==B)x=v[v.length-1],D=C[C.length-1],1<v.length?(A=v[v.length-2],I=C[C.length-2]):(A=x,I=D),I=180*Math.atan((D-I)/(x-A))/Math.PI,isNaN(E)||
|
56 |
-
(I+=E),M=x,N=D,I=0>x-A?I-90:I+90;r=[-t/2-.5,-.5,t/2-.5];k=[t,-.5,t];a.shiftArrow&&"middle"!=B&&(k=[0,1.2*-t,0]);"both"==B&&(t=d.polygon(w,r,k,m,q,1,m,q,void 0,!0),y.push(t),t.translate(M,N,1/n,!0),isNaN(I)||t.rotate(I),d.setCN(c,p,"map-line-arrow"),void 0!=a.id&&d.setCN(c,p,"map-line-arrow-"+a.id),a.fixedSize&&g.push(t));if("start"==B||"both"==B)t=v[0],N=C[0],1<v.length?(x=v[1],M=C[1]):(x=t,M=N),I=180*Math.atan((N-M)/(t-x))/Math.PI,isNaN(E)||(I-=E),M=t,I=0>t-x?I-90:I+90;"middle"==B&&(x=v[v.length-
|
57 |
-
1],D=C[C.length-1],1<v.length?(A=v[v.length-2],I=C[C.length-2]):(A=x,I=D),M=A+(x-A)/2,N=I+(D-I)/2,I=180*Math.atan((D-I)/(x-A))/Math.PI,isNaN(E)||(E=H/2,G-=Math.sqrt(G*G-E*E),0>z&&(G=-G),E=Math.sin(I/180*Math.PI),-1==E&&(E=1),M-=E*G,N+=Math.cos(I/180*Math.PI)*G),I=0>x-A?I-90:I+90);t=d.polygon(w,r,k,m,q,1,m,q,void 0,!0);d.setCN(c,p,"map-line-arrow");void 0!=a.id&&d.setCN(c,p,"map-line-arrow-"+a.id);y.push(t);t.translate(M,N,1/n,!0);isNaN(I)||t.rotate(I);a.fixedSize&&(g.push(t),a.arrays.push({arr:g,
|
58 |
-
el:t}));a.arrowSvg=t}a.fixedSize&&p&&(g={line:p,thickness:F},this.linesToResize.push(g),a.arrays.push({arr:this.linesToResize,el:g}),g={line:l,thickness:5},this.linesToResize.push(g),a.arrays.push({arr:this.linesToResize,el:g}));a.lineSvg=p;a.showAsSelected&&!isNaN(u)&&p.setAttr("stroke",u);0<e.length?f.push(y):h.push(y);a.hidden&&y.hide();c.makeObjectAccessible(a)}}},processCoordinates:function(a,b){var c=[],d;for(d=0;d<a.length;d++){var g=a[d],f=Number(g);isNaN(f)&&(f=Number(g.replace("%",""))*b/100);isNaN(f)||c.push(f)}return c},reset:function(){this.objectsToResize=[];this.allSvgObjects=[];this.allObjects=[];this.linesToResize=[]}})})();(function(){var d=window.AmCharts;d.LinesSettings=d.Class({construct:function(a){this.cname="LinesSettings";this.balloonText="[[title]]";this.thickness=1;this.dashLength=0;this.arrowSize=10;this.arrowAlpha=1;this.arrow="none";this.color="#990000";this.descriptionWindowWidth=250;this.bringForwardOnHover=!0;d.applyTheme(this,a,this.cname)}})})();(function(){var d=window.AmCharts;d.MapObject=d.Class({construct:function(a){this.fixedSize=this.mouseEnabled=!0;this.images=[];this.lines=[];this.areas=[];this.remainVisible=!0;this.passZoomValuesToTarget=!1;this.objectType=this.cname;d.applyTheme(this,a,"MapObject");this.arrays=[]},deleteObject:function(){this.remove();this.parentArray&&d.removeFromArray(this.parentArray,this);if(this.arrays)for(var a=0;a<this.arrays.length;a++)d.removeFromArray(this.arrays[a].arr,this.arrays[a].el);this.arrays=[]}})})();(function(){var d=window.AmCharts;d.MapArea=d.Class({inherits:d.MapObject,construct:function(a){this.cname="MapArea";d.MapArea.base.construct.call(this,a);d.applyTheme(this,a,this.cname)},validate:function(){this.chart.areasProcessor.createArea(this)}})})();(function(){var d=window.AmCharts;d.MapLine=d.Class({inherits:d.MapObject,construct:function(a){this.cname="MapLine";this.longitudes=[];this.latitudes=[];this.x=[];this.y=[];this.segments=0;this.arrow="none";d.MapLine.base.construct.call(this,a);d.applyTheme(this,a,this.cname)},validate:function(){this.chart.linesProcessor.createLine(this)},remove:function(){var a=this.displayObject;a&&a.remove()},getCoordinates:function(a,b){isNaN(b)&&(b=0);if(!isNaN(a)){var c,e,g,f,h,k;if(1<this.longitudes.length){e=this.chart.coordinatesToXY(this.longitudes[b],this.latitudes[b]);var l=this.chart.coordinatesToXY(this.longitudes[b+1],this.latitudes[b+1]);c=e.x;g=l.x;e=e.y;f=l.y}else 1<this.x.length&&(c=this.x[b],g=this.x[b+1],e=this.y[b],f=this.y[b+1]);l=Math.sqrt(Math.pow(g-c,2)+Math.pow(f-e,2));c<g&&!isNaN(this.arc)&&0!==this.arc&&(a=1-a);h=c+(g-c)*a;k=e+(f-e)*a;var m=Math.atan2(f-e,g-c);if(!isNaN(this.arc)&&0!==this.arc&&this.arcRadius){var n=0;c<g&&(n=c,c=g,g=n,n=e,e=f,f=n,n=Math.PI);k=this.arcRadius[b];0>this.arc&&(l=-l);h=c+(g-c)/2+Math.sqrt(k*k-l/2*(l/2))*(e-f)/l;var q=e+(f-e)/2+Math.sqrt(k*k-l/2*(l/2))*(g-c)/l;c=180*Math.atan2(e-q,c-h)/Math.PI;g=180*Math.atan2(f-q,g-h)/Math.PI;180<g-c&&(g-=360);m=d.degreesToRadians(c+(g-c)*a);h+=k*Math.cos(m);k=q+k*Math.sin(m);m=0<this.arc?m+Math.PI/2:m-Math.PI/2;m+=n}this.distance=l;return{x:h,y:k,angle:m}}},fixToStage:function(){if(0<this.latitudes.length){this.y=[];for(var a=0;a<this.latitudes.length;a++){var b=this.chart.coordinatesToStageXY(this.longitudes[a],
|
59 |
-
this.latitudes[a]);this.y.push(b.y);this.x.push(b.x)}this.latitudes=[];this.longitudes=[]}this.validate()},fixToMap:function(){if(0<this.y.length){this.latitudes=[];for(var a=0;a<this.y.length;a++){var b=this.chart.stageXYToCoordinates(this.x[a],this.y[a]);this.latitudes.push(b.latitude);this.longitudes.push(b.longitude)}this.y=[];this.x=[]}this.validate()}})})();(function(){var d=window.AmCharts;d.MapImage=d.Class({inherits:d.MapObject,construct:function(a){this.cname="MapImage";this.scale=1;this.widthAndHeightUnits="pixels";this.labelShiftY=this.labelShiftX=0;this.positionOnLine=.5;this.direction=1;this.lineSegment=this.extraAngle=0;this.animateAngle=!0;this.createEvents("animationStart","animationEnd");d.MapImage.base.construct.call(this,a);d.applyTheme(this,a,this.cname)},validate:function(){this.chart.imagesProcessor.createImage(this)},updatePosition:function(){this.chart.imagesProcessor.updateSizeAndPosition(this)},remove:function(){var a=this.displayObject;a&&a.remove();(a=this.imageLabel)&&a.remove()},animateTo:function(a,b,c,d){isNaN(c)||(this.animationDuration=c);d&&(this.easingFunction=d);this.finalX=a;this.finalY=b;isNaN(this.longitude)||(this.initialX=this.longitude);isNaN(this.left)||(this.initialX=this.left);isNaN(this.right)||(this.initialX=this.right);isNaN(this.latitude)||(this.initialY=this.latitude);isNaN(this.top)||(this.initialY=this.top);isNaN(this.bottom)||(this.initialY=this.bottom);this.animatingAlong=!1;this.animate()},animateAlong:function(a,b,c){1==this.positionOnLine&&this.flipDirection&&(this.direction=-1,this.extraAngle=180);isNaN(b)||(this.animationDuration=b);c&&(this.easingFunction=c);a&&(this.line=this.chart.getObjectById(a));this.animateAlongLine=this.line;this.animatingAlong=!0;this.animate()},animate:function(){var a=this,b=a.chart.imagesSettings,c=a.animationDuration;isNaN(c)&&(c=b.animationDuration);a.totalFrames=c*d.updateRate;c=1;a.line&&b.adjustAnimationSpeed&&(a.line.distances&&(c=a.line.distances[a.lineSegment]*a.chart.zoomLevel(),c=Math.abs(c/b.baseAnimationDistance)),a.totalFrames=Math.round(c*a.totalFrames));a.frame=0;a.clearTO();a.timeOut=setTimeout(function(){a.update.call(a)},1E3/d.updateRate);a.fire({type:"animationStart",chart:a.chart,image:this,lineSegment:a.lineSegment,direction:a.direction})},clearTO:function(){this.timeOut&&clearTimeout(this.timeOut)},update:function(){var a=this;a.updatePosition();var b=Math.round(1E3/d.updateRate),c=a.chart.imagesSettings,e=a.easingFunction;e||(e=c.easingFunction);a.frame++;c=a.totalFrames;a.frame<=c?(e=e(0,a.frame,0,1,c),-1==a.direction&&(e=1-e),a.animatingAlong?a.positionOnLine=e:(c=a.initialX+(a.finalX-a.initialX)*e,isNaN(a.longitude)||(a.longitude=c),isNaN(a.left)||(a.left=c),isNaN(a.right)||(a.right=c),e=a.initialY+(a.finalY-a.initialY)*e,isNaN(a.latitude)||(a.latitude=e),isNaN(a.top)||(a.top=e),isNaN(a.bottom)||(a.bottom=e)),a.clearTO(),window.requestAnimationFrame?window.requestAnimationFrame(function(){a.update.call(a)}):a.timeOut=setTimeout(function(){a.update.call(a)},b)):(a.fire({type:"animationEnd",chart:a.chart,image:this,lineSegment:a.lineSegment,direction:a.direction}),a.animatingAlong&&(1==a.direction?a.lineSegment<a.line.segments-2?(a.lineSegment++,a.delayAnimateAlong(),a.positionOnLine=0):a.flipDirection?(a.direction=-1,a.extraAngle=180,a.delayAnimateAlong()):a.loop&&(a.delayAnimateAlong(),a.lineSegment=0):0<a.lineSegment?(a.lineSegment--,a.delayAnimateAlong(),a.positionOnLine=0):a.loop&&a.flipDirection?(a.direction=1,a.extraAngle=0,a.delayAnimateAlong()):a.loop&&a.delayAnimateAlong()))},delayAnimateAlong:function(){var a=this;a.clearTO();a.animateAlongLine&&(a.timeOut=setTimeout(function(){a.animateAlong.call(a)},1E3*a.chart.imagesSettings.pauseDuration))},fixToStage:function(){if(!isNaN(this.longitude)){var a=this.chart.coordinatesToStageXY(this.longitude,this.latitude);this.left=a.x;this.top=a.y;this.latitude=this.longitude=void 0}this.validate()},fixToMap:function(){if(!isNaN(this.left)){var a=this.chart.stageXYToCoordinates(this.left,this.top);this.longitude=a.longitude;this.latitude=a.latitude;this.top=this.left=void 0}this.validate()}})})();(function(){var d=window.AmCharts;d.degreesToRadians=function(a){return a/180*Math.PI};d.radiansToDegrees=function(a){return a/Math.PI*180};d.getColorFade=function(a,b,c){var e=d.hex2RGB(b);b=e[0];var g=e[1],e=e[2],f=d.hex2RGB(a);a=f[0];var h=f[1],f=f[2];a+=Math.round((b-a)*c);h+=Math.round((g-h)*c);f+=Math.round((e-f)*c);return"rgb("+a+","+h+","+f+")"};d.hex2RGB=function(a){return[parseInt(a.substring(1,3),16),parseInt(a.substring(3,5),16),parseInt(a.substring(5,7),16)]};d.processDescriptionWindow=function(a,b){isNaN(b.descriptionWindowX)&&(b.descriptionWindowX=a.descriptionWindowX);isNaN(b.descriptionWindowY)&&(b.descriptionWindowY=a.descriptionWindowY);isNaN(b.descriptionWindowLeft)&&(b.descriptionWindowLeft=a.descriptionWindowLeft);isNaN(b.descriptionWindowRight)&&(b.descriptionWindowRight=a.descriptionWindowRight);isNaN(b.descriptionWindowTop)&&(b.descriptionWindowTop=a.descriptionWindowTop);isNaN(b.descriptionWindowBottom)&&(b.descriptionWindowBottom=a.descriptionWindowBottom);isNaN(b.descriptionWindowWidth)&&(b.descriptionWindowWidth=a.descriptionWindowWidth);isNaN(b.descriptionWindowHeight)&&(b.descriptionWindowHeight=a.descriptionWindowHeight)};d.normalizePath=function(a){for(var b="",c=d.parsePath(a.getAttribute("d")),e,g,f=Infinity,h=-Infinity,k=Infinity,l=-Infinity,m=0;m<c.length;m++){var n=c[m],q=n.letter,t=n.x,n=n.y;"h"==q&&(q="L",t+=e,n=g);"H"==q&&(q="L",n=g);"v"==q&&(q="L",t=e,n+=g);"V"==q&&(q="L",t=e);if("m"===q||"l"===q)q=q.toUpperCase(),t+=e,n+=g;t=d.roundTo(t,3);n=d.roundTo(n,3);e=t;g=n;t>h&&(h=t);t<f&&(f=t);n>l&&(l=n);n<k&&(k=n);b="z"==q.toLowerCase()?b+"Z ":b+(q+" "+t+" "+n+" ")}a.setAttribute("d",b);return{minX:f,maxX:h,minY:k,maxY:l}};d.mercatorLatitudeToRadians=function(a){return Math.log(Math.tan(Math.PI/4+d.degreesToRadians(a)/2))};d.parsePath=function(a){a=a.match(/([MmLlHhVvZz]{1}[0-9.,\-\s]*)/g);for(var b=[],c=0;c<a.length;c++){var d=a[c].match(/([MmLlHhVvZz]{1})|([0-9.\-]+)/g),g={letter:d[0]};switch(d[0]){case "Z":case "Z":case "z":break;case "V":case "v":g.y=Number(d[1]);
|
60 |
-
break;case"H":case"h":g.x=Number(d[1]);break;default:g.x=Number(d[1]),g.y=Number(d[2])}b.push(g)}return b};d.acos=function(a){return 1<a?0:-1>a?Math.PI:Math.acos(a)};d.asin=function(a){return 1<a?Math.PI/2:-1>a?-Math.PI/2:Math.asin(a)};d.sinci=function(a){return a?a/Math.sin(a):1};d.asqrt=function(a){return 0<a?Math.sqrt(a):0};d.winkel3=function(a,b){var c=d.aitoff(a,b);return[(c[0]+a/Math.PI*2)/2,(c[1]+b)/2]};d.winkel3.invert=function(a,b){var c=a,e=b,g=25,f=Math.PI/2;do var h=Math.cos(e),k=Math.sin(e),
|
61 |
-
l=Math.sin(2*e),m=k*k,n=h*h,q=Math.sin(c),t=Math.cos(c/2),r=Math.sin(c/2),p=r*r,u=1-n*t*t,A=u?d.acos(h*t)*Math.sqrt(x=1/u):x=0,x,u=.5*(2*A*h*r+c/f)-a,z=.5*(A*k+e)-b,v=.5*x*(n*p+A*h*t*m)+.5/f,B=x*(q*l/4-A*k*r),k=.125*x*(l*r-A*k*n*q),m=.5*x*(m*t+A*p*h)+.5,h=B*k-m*v,B=(z*B-u*m)/h,u=(u*k-z*v)/h,c=c-B,e=e-u;while((1E-6<Math.abs(B)||1E-6<Math.abs(u))&&0<--g);return[c,e]};d.aitoff=function(a,b){var c=Math.cos(b),e=d.sinci(d.acos(c*Math.cos(a/=2)));return[2*c*Math.sin(a)*e,Math.sin(b)*e]};d.orthographic=
|
62 |
-
function(a,b){return[Math.cos(b)*Math.sin(a),Math.sin(b)]};d.equirectangular=function(a,b){return[a,b]};d.equirectangular.invert=function(a,b){return[a,b]};d.eckert5=function(a,b){var c=Math.PI;return[a*(1+Math.cos(b))/Math.sqrt(2+c),2*b/Math.sqrt(2+c)]};d.eckert5.invert=function(a,b){var c=Math.sqrt(2+Math.PI),d=b*c/2;return[c*a/(1+Math.cos(d)),d]};d.eckert6=function(a,b){for(var c=Math.PI,d=(1+c/2)*Math.sin(b),g=0,f=Infinity;10>g&&1E-5<Math.abs(f);g++)b-=f=(b+Math.sin(b)-d)/(1+Math.cos(b));d=Math.sqrt(2+
|
63 |
-
c);return[a*(1+Math.cos(b))/d,2*b/d]};d.eckert6.invert=function(a,b){var c=1+Math.PI/2,e=Math.sqrt(c/2);return[2*a*e/(1+Math.cos(b*=e)),d.asin((b+Math.sin(b))/c)]};d.mercator=function(a,b){b>=Math.PI/2-.02&&(b=Math.PI/2-.02);b<=-Math.PI/2+.02&&(b=-Math.PI/2+.02);return[a,Math.log(Math.tan(Math.PI/4+b/2))]};d.mercator.invert=function(a,b){return[a,2*Math.atan(Math.exp(b))-Math.PI/2]};d.miller=function(a,b){return[a,1.25*Math.log(Math.tan(Math.PI/4+.4*b))]};d.miller.invert=function(a,b){return[a,2.5*
|
64 |
-
Math.atan(Math.exp(.8*b))-.625*Math.PI]};d.eckert3=function(a,b){var c=Math.PI,d=Math.sqrt(c*(4+c));return[2/d*a*(1+Math.sqrt(1-4*b*b/(c*c))),4/d*b]};d.eckert3.invert=function(a,b){var c=Math.PI,e=Math.sqrt(c*(4+c))/2;return[a*e/(1+d.asqrt(1-b*b*(4+c)/(4*c))),b*e/2]}})();(function(){var d=window.AmCharts;d.MapData=d.Class({inherits:d.MapObject,construct:function(){this.cname="MapData";d.MapData.base.construct.call(this);this.projection="mercator";this.topLatitude=90;this.bottomLatitude=-90;this.leftLongitude=-180;this.rightLongitude=180;this.zoomLevel=1;this.getAreasFromMap=!1}})})();(function(){var d=window.AmCharts;d.DescriptionWindow=d.Class({construct:function(){},show:function(a,b,c,d){var g=this,f=document.createElement("div");f.style.position="absolute";var h=a.classNamePrefix+"-description-";f.className="ammapDescriptionWindow "+h+"div";g.div=f;b.appendChild(f);var k=".gif";a.svgIcons&&(k=".svg");var l=document.createElement("img");l.className="ammapDescriptionWindowCloseButton "+h+"close-img";l.src=a.pathToImages+"xIcon"+k;l.style.cssFloat="right";l.style.cursor="pointer";
|
65 |
-
l.onclick=function(){g.close()};l.onmouseover=function(){l.src=a.pathToImages+"xIconH"+k};l.onmouseout=function(){l.src=a.pathToImages+"xIcon"+k};f.appendChild(l);b=document.createElement("div");b.className="ammapDescriptionTitle "+h+"title-div";b.onmousedown=function(){g.div.style.zIndex=1E3};f.appendChild(b);d=document.createTextNode(d);b.appendChild(d);d=b.offsetHeight;b=document.createElement("div");b.className="ammapDescriptionText "+h+"text-div";b.style.maxHeight=g.maxHeight-d-20+"px";f.appendChild(b);b.innerHTML=c},close:function(){try{this.div.parentNode.removeChild(this.div)}catch(a){}}})})();(function(){var d=window.AmCharts;d.ValueLegend=d.Class({construct:function(a){this.cname="ValueLegend";this.enabled=!0;this.showAsGradient=!1;this.minValue=0;this.height=12;this.width=200;this.bottom=this.left=10;this.borderColor="#FFFFFF";this.borderAlpha=this.borderThickness=1;this.color="#000000";this.fontSize=11;d.applyTheme(this,a,this.cname)},init:function(a,b){if(this.enabled){var c=a.areasSettings.color,e=a.areasSettings.colorSolid,g=a.colorSteps;d.remove(this.set);var f=b.set();this.set=f;d.setCN(a,f,"value-legend");var h=0,k=this.minValue,l=this.fontSize,m=a.fontFamily,n=this.color;void 0==k&&(k=a.minValueReal);void 0!==k&&(h=d.text(b,k,n,m,l,"left"),h.translate(0,l/2-1),d.setCN(a,h,"value-legend-min-label"),f.push(h),h=h.getBBox().height);k=this.maxValue;void 0===k&&(k=a.maxValueReal);void 0!==k&&(h=d.text(b,k,n,m,l,"right"),h.translate(this.width,l/2-1),d.setCN(a,h,"value-legend-max-label"),f.push(h),h=h.getBBox().height);if(this.showAsGradient)c=d.rect(b,this.width,this.height,[c,e],1,this.borderThickness,this.borderColor,1,0,0),d.setCN(a,c,"value-legend-gradient"),c.translate(0,h),f.push(c);else for(l=this.width/g,m=0;m<g;m++)n=d.getColorFade(c,e,1*m/(g-1)),n=d.rect(b,l,this.height,n,1,this.borderThickness,this.borderColor,1),d.setCN(a,n,"value-legend-color"),d.setCN(a,n,"value-legend-color-"+m),n.translate(l*m,h),f.push(n);e=c=0;g=f.getBBox();h=a.getY(this.bottom,!0);l=a.getY(this.top);m=a.getX(this.right,!0);n=a.getX(this.left);isNaN(l)||(c=l);isNaN(h)||(c=h-g.height);isNaN(n)||(e=n);isNaN(m)||(e=m-g.width);f.translate(e,c)}else d.remove(this.set)}})})();(function(){var d=window.AmCharts;d.ObjectList=d.Class({construct:function(a){this.divId=a},init:function(a){this.chart=a;var b=this.divId;this.container&&(b=this.container);this.div="object"!=typeof b?document.getElementById(b):b;b=document.createElement("div");b.className="ammapObjectList "+a.classNamePrefix+"-object-list-div";this.div.appendChild(b);this.addObjects(a.dataProvider,b)},addObjects:function(a,b){var c=this.chart,d=document.createElement("ul");d.className=c.classNamePrefix+"-object-list-ul";var g;if(a.areas)for(g=0;g<a.areas.length;g++){var f=a.areas[g];void 0===f.showInList&&(f.showInList=c.showAreasInList);this.addObject(f,d)}if(a.images)for(g=0;g<a.images.length;g++)f=a.images[g],void 0===f.showInList&&(f.showInList=c.showImagesInList),this.addObject(f,d);if(a.lines)for(g=0;g<a.lines.length;g++)f=a.lines[g],void 0===f.showInList&&(f.showInList=c.showLinesInList),this.addObject(f,d);0<d.childNodes.length&&b.appendChild(d)},addObject:function(a,b){var c=this;if(a.showInList&&void 0!==a.title){var d=c.chart,g=document.createElement("li");g.className=d.classNamePrefix+"-object-list-li";var f=a.titleTr;f||(f=a.title);var f=document.createTextNode(f),h=document.createElement("a");h.className=d.classNamePrefix+"-object-list-a";h.appendChild(f);g.appendChild(h);b.appendChild(g);this.addObjects(a,g);h.onmouseover=function(){c.chart.rollOverMapObject(a,!1)};h.onmouseout=function(){c.chart.rollOutMapObject(a)};h.onclick=function(){c.chart.clickMapObject(a)}}}})})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/dataloader.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
AmCharts.translations.dataLoader={},AmCharts.addInitHandler(function(a){function e(b,d,g,h){void 0===h&&(h="dataProvider"),g.showCurtain&&l(void 0,g.noStyles),c.remaining++,c.percentLoaded[b]=0,void 0!==g.progress&&"function"==typeof g.progress&&void 0===g._progress&&(g._progress=g.progress,g.progress=function(a){c.percentLoaded[b]=a;var d=0,e=0;for(var f in c.percentLoaded)c.percentLoaded.hasOwnProperty(f)&&(e++,d+=c.percentLoaded[f]);var h=Math.round(d/e*100)/100;g._progress.call(this,h,Math.round(100*a)/100,b)}),AmCharts.loadFile(b,g,function(i){if(!1===i)n(g.error,g,a),k(AmCharts.__("Error loading the file",a.language)+": "+b,!1,g);else{switch(void 0===g.format&&(g.format="json"),g.format=g.format.toLowerCase(),g.format){case"json":if(d[h]=AmCharts.parseJSON(i),!1===d[h])return n(g.error,g,a),k(AmCharts.__("Error parsing JSON file",a.language)+": "+c.url,!1,g),void(d[h]=[]);d[h]=f(d[h],g),n(g.load,g,a);break;case"csv":if(d[h]=AmCharts.parseCSV(i,g),!1===d[h])return n(g.error,g,a),k(AmCharts.__("Error parsing CSV file",a.language)+": "+c.url,!1,g),void(d[h]=[]);d[h]=f(d[h],g),n(g.load,g,a);break;default:return n(g.error,g,a),void k(AmCharts.__("Unsupported data format",a.language)+": "+g.format,!1,g.noStyles)}if(c.remaining--,0===c.remaining&&(n(g.complete,a),g.async))if("map"===a.type)a.validateNow(!0),m();else if("gauge"!==a.type&&a.addListener("dataUpdated",function(b){"stock"!==a.type||g.reloading||void 0===a.periodSelector||a.periodSelector.setDefaultPeriod(),m(),a.events.dataUpdated.pop()}),a.validateData(),"gauge"===a.type&&m(),c.startDuration)if("stock"===a.type){a.panelsSettings.startDuration=c.startDuration;for(var j=0;j<a.panels.length;j++)a.panels[j].startDuration=c.startDuration,a.panels[j].animateAgain()}else a.startDuration=c.startDuration,void 0!==a.animateAgain&&a.animateAgain();g.reload&&(g.timeout&&clearTimeout(g.timeout),g.timeout=setTimeout(e,1e3*g.reload,b,d,g),g.reloading=!0)}})}function f(b,d){if(void 0===d.postProcess||!h(d.postProcess))return b;try{return d.postProcess.call(c,b,d,a)}catch(e){return k(AmCharts.__("Error loading file",a.language)+": "+d.url,!1,d),b}}function g(a){return"object"==typeof a}function h(a){return"function"==typeof a}function i(a){for(var b in d)d.hasOwnProperty(b)&&j(a,b,d[b])}function j(a,b,c){void 0===a[b]&&(a[b]=c)}function k(a,b,c){c.showErrors?l(a,c.noStyles):(m(),console.log(a))}function l(b,d){m(),void 0===b&&(b=AmCharts.__("Loading data...",a.language));var e=document.createElement("div");if(e.setAttribute("id",a.div.id+"-curtain"),e.className="amcharts-dataloader-curtain",!0!==d){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width=(void 0!==a.realWidth?a.realWidth:a.divRealWidth)+"px",e.style.height=(void 0!==a.realHeight?a.realHeight:a.divRealHeight)+"px",e.style.textAlign="center",e.style.display="table",e.style.fontSize="20px";try{e.style.background="rgba(255, 255, 255, 0.3)"}catch(f){e.style.background="rgb(255, 255, 255)"}e.innerHTML='<div style="display: table-cell; vertical-align: middle;">'+b+"</div>"}else e.innerHTML=b;a.containerDiv.appendChild(e),c.curtain=e}function m(){try{void 0!==c.curtain&&a.containerDiv.removeChild(c.curtain)}catch(b){}c.curtain=void 0}function n(a,b,d,e){"function"==typeof a&&a.call(c,b,d,e)}void 0!==a.dataLoader&&g(a.dataLoader)||(a.dataLoader={});var b=a.version.split(".");if(!(Number(b[0])<3||3===Number(b[0])&&Number(b[1])<13)){var c=a.dataLoader;c.remaining=0,c.percentLoaded={};var d={async:!0,format:"json",showErrors:!0,showCurtain:!0,noStyles:!1,reload:0,timestamp:!1,delimiter:",",skip:0,skipEmpty:!0,emptyAs:void 0,useColumnNames:!1,init:!1,progress:!1,reverse:!1,reloading:!1,complete:!1,error:!1,headers:[],chart:a};c.loadData=function(){if("stock"===a.type)setTimeout(function(){0>a.panelsSettings.startDuration&&(c.startDuration=a.panelsSettings.startDuration,a.panelsSettings.startDuration=0);for(var b=0;b<a.dataSets.length;b++){var d=a.dataSets[b];void 0!==d.dataLoader&&void 0!==d.dataLoader.url&&(n(d.dataLoader.init,d.dataLoader,a),d.dataProvider=[],i(d.dataLoader),e(d.dataLoader.url,d,d.dataLoader,"dataProvider")),void 0!==d.eventDataLoader&&void 0!==d.eventDataLoader.url&&(n(d.eventDataLoader.init,d.eventDataLoader,a),d.events=[],i(d.eventDataLoader),e(d.eventDataLoader.url,d,d.eventDataLoader,"stockEvents"))}},100);else{if(n(c.init,c,a),i(c),void 0===c.url)return;void 0!==a.startDuration&&0<a.startDuration&&(c.startDuration=a.startDuration,a.startDuration=0),"gauge"===a.type?(void 0===a.arrows&&(a.arrows=[]),e(c.url,a,c,"arrows")):(void 0===a.dataProvider&&(a.dataProvider="map"===a.type?{}:[]),e(c.url,a,c,"dataProvider"))}},c.loadData()}},["pie","serial","xy","funnel","radar","gauge","gantt","stock","map"]),void 0===AmCharts.__&&(AmCharts.__=function(a,b){return void 0!==b&&void 0!==AmCharts.translations.dataLoader[b]&&void 0!==AmCharts.translations.dataLoader[b][a]?AmCharts.translations.dataLoader[b][a]:a}),AmCharts.loadFile=function(a,b,c){"object"!=typeof b&&(b={}),void 0===b.async&&(b.async=!0);var d;d=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");try{d.open("GET",b.timestamp?AmCharts.timestampUrl(a):a,b.async)}catch(e){c.call(this,!1)}if(void 0!==b.headers&&b.headers.length)for(var f=0;f<b.headers.length;f++){var g=b.headers[f];d.setRequestHeader(g.key,g.value)}void 0!==b.progress&&"function"==typeof b.progress&&(d.onprogress=function(a){var c=a.loaded/a.total*100;b.progress.call(this,c)}),d.onreadystatechange=function(){4===d.readyState&&404===d.status?c.call(this,!1):4===d.readyState&&200===d.status&&c.call(this,d.responseText)};try{d.send()}catch(e){c.call(this,!1)}},AmCharts.parseJSON=function(response){try{return void 0!==JSON?JSON.parse(response):eval(response)}catch(e){return!1}},AmCharts.parseCSV=function(a,b){var f,g,c=AmCharts.CSVToArray(a,b.delimiter),d=[],e=[];if(b.useColumnNames){e=c.shift();for(var h=0;h<e.length;h++)f=e[h].replace(/^\s+|\s+$/gm,""),""===f&&(f="col"+h),e[h]=f;0<b.skip&&b.skip--}for(g=0;g<b.skip;g++)c.shift();for(var i;i=b.reverse?c.pop():c.shift();)if(!b.skipEmpty||1!==i.length||""!==i[0]){var j={};for(g=0;g<i.length;g++)f=void 0===e[g]?"col"+g:e[g],j[f]=""===i[g]?b.emptyAs:i[g];d.push(j)}return d},AmCharts.CSVToArray=function(a,b){b=b||",";for(var c=new RegExp("(\\"+b+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+b+"\\r\\n]*))","gi"),d=[[]],e=null;e=c.exec(a);){var f=e[1];f.length&&f!==b&&d.push([]);var g;g=e[2]?e[2].replace(new RegExp('""',"g"),'"'):e[3],d[d.length-1].push(g)}return d},AmCharts.timestampUrl=function(a){var b=a.split("?");return 1===b.length?b[1]=(new Date).getTime():b[1]+="&"+(new Date).getTime(),b.join("?")};
|
|
inc/js/gawd_admin.js
CHANGED
@@ -102,356 +102,8 @@ function gawd_compare() {
|
|
102 |
jQuery('#opacity_div').show();
|
103 |
jQuery('#loading_div').show();
|
104 |
}
|
105 |
-
}).done(function (data)
|
106 |
-
|
107 |
-
jQuery('#opacity_div').hide();
|
108 |
-
jQuery('#loading_div').hide();
|
109 |
-
var data = JSON.parse(data);
|
110 |
-
data_of_compared = data;
|
111 |
-
var data_compare = [];
|
112 |
-
var __data = JSON.parse(JSON.stringify(_data));
|
113 |
-
for (var i = 0; i < __data.chart_data.length; i++) {
|
114 |
-
var row = __data.chart_data[i];
|
115 |
-
|
116 |
-
// var __metrics = Object.keys(row);
|
117 |
-
var __metrics = [];
|
118 |
-
for(key in row){
|
119 |
-
__metrics.push(key);
|
120 |
-
}
|
121 |
-
|
122 |
-
if (typeof data.chart_data[i] != 'undefined') {
|
123 |
-
for (var j = 0; j < __metrics.length; j++) {
|
124 |
-
if (__metrics[j] == "color" || __metrics[j] == "No")
|
125 |
-
continue;
|
126 |
-
if(__metrics[j].indexOf('compare') == -1){
|
127 |
-
row[__metrics[j] + ' compare'] = data.chart_data[i][__metrics[j]];
|
128 |
-
}
|
129 |
-
}
|
130 |
-
}
|
131 |
-
data_compare.push(row);
|
132 |
-
}
|
133 |
-
var data_sum = data.data_sum;
|
134 |
-
var _data_sum = _data.data_sum;
|
135 |
-
var dataSums = {};
|
136 |
-
var d_second_start_date = start_date_compare;
|
137 |
-
var d_second_end_date = end_date_compare;
|
138 |
-
jQuery('#second_end_date').val(end_date_compare);
|
139 |
-
jQuery('#second_start_date').val(start_date_compare);
|
140 |
-
jQuery('#second_data_sum').val(JSON.stringify(data_sum));
|
141 |
-
jQuery('#first_data_sum').val(JSON.stringify(_data_sum));
|
142 |
-
if(dimension == 'pagePath' || dimension == 'landingPagePath'){
|
143 |
-
jQuery('#dimension').val(dimension);
|
144 |
-
jQuery('#second_data').val(JSON.stringify(data.chart_data));
|
145 |
-
jQuery('#first_data').val(JSON.stringify(_data.chart_data));
|
146 |
-
gawd_draw_table_pages_compare(JSON.stringify(_data.chart_data),JSON.stringify(data.chart_data), dimension, data_sum, _data_sum,start_date_compare,end_date_compare);
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
if (dimension != "pagePath" && dimension != "landingPagePath") {
|
150 |
-
|
151 |
-
for (metric in data_sum) {
|
152 |
-
var dataSum = {};
|
153 |
-
dataSum[metric] = _data_sum[metric];
|
154 |
-
dataSum[metric + " compare"] = data_sum[metric];
|
155 |
-
dataSums[metric] = dataSum;
|
156 |
-
}
|
157 |
-
metric = jQuery("#gawd_metric").val();
|
158 |
-
var metric_compare_export = metric + ' compare';
|
159 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
160 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
161 |
-
metric = metric.replace(/ +/g, ' ');
|
162 |
-
var metric_export = metric;
|
163 |
-
var metric_compare = metric + ' compare';
|
164 |
-
/* metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
165 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
166 |
-
metric_compare = metric_compare.replace(/ +/g, ' '); */
|
167 |
-
var percent = (dataSums[metric][metric] - dataSums[metric][metric + " compare"])/dataSums[metric][metric + " compare"]*100;
|
168 |
-
percent = isNaN(percent) ? 0 : isFinite(percent) ? percent : 0;
|
169 |
-
percent = percent.toFixed(2)
|
170 |
-
var metric_value = parseInt(dataSums[metric][metric]).toLocaleString();
|
171 |
-
var metric_compare_value = parseInt(dataSums[metric][metric + " compare"]);
|
172 |
-
if(metric + " compare" == 'Avg Session Duration compare' || metric + " compare" == 'Avg Page Load Time compare' || metric + " compare" == 'Avg Server Response Time compare' || metric + " compare" == 'Avg Redirection Time compare' || metric + " compare" == 'Avg Page Download Time compare'){
|
173 |
-
metric_compare_value = sec_to_normal(metric_compare_value);
|
174 |
-
}
|
175 |
-
else if(metric + " compare" == 'Percent New Sessions compare' || metric + " compare" == 'Bounce Rate compare'){
|
176 |
-
metric_compare_value = metric_compare_value + '%';
|
177 |
-
}
|
178 |
-
if(metric == 'Avg Session Duration' || metric == 'Avg Page Load Time' || metric == 'Avg Server Response Time' || metric == 'Avg Redirection Time' || metric == 'Avg Page Download Time'){
|
179 |
-
metric_value = sec_to_normal(metric_value);
|
180 |
-
}
|
181 |
-
else if(metric == 'Percent New Sessions' || metric == 'Bounce Rate'){
|
182 |
-
metric_value = metric_value + '%';
|
183 |
-
}
|
184 |
-
//percent = percent.substring(0, percent.indexOf(".") + 2);
|
185 |
-
var percent_color = percent < 0 || metric == 'bounceRate' ? "gawd_red" : "gawd_green";
|
186 |
-
jQuery(".sum_box").remove();
|
187 |
-
jQuery("._sum_box").remove();
|
188 |
-
var sumBox = "<div class='sum_box'>";
|
189 |
-
var metric_title = metric == 'Percent New Sessions' ? '% New Sessions' : metric;
|
190 |
-
sumBox += "<div class='box_left'>";
|
191 |
-
sumBox += "<div class='box_title'>" + metric_title + "</div>";
|
192 |
-
sumBox += "<div class='" + percent_color + "'>" + percent + " % </div>";
|
193 |
-
sumBox += "</div>";
|
194 |
-
sumBox += "<div class='vs_image_small'>";
|
195 |
-
sumBox += "<img src='" + gawd_admin.gawd_plugin_url + "/assets/vs_rev.png'>";
|
196 |
-
sumBox += "</div>";
|
197 |
-
sumBox += "<div class='box_right'>";
|
198 |
-
sumBox += "<div class='box_value'>" + metric_value + "</div>" + "<div class='box_value'>" + metric_compare_value + "</div>";
|
199 |
-
sumBox += "</div>";
|
200 |
-
sumBox += "<div class='clear'></div>";
|
201 |
-
sumBox += "</div>";
|
202 |
-
jQuery('#chartdiv').after(sumBox);
|
203 |
-
if (dimension == 'goals') {
|
204 |
-
dimension = 'date';
|
205 |
-
}
|
206 |
-
jQuery("#chartdiv").show();
|
207 |
-
dimension = dimension == 'date' || dimension == 'siteSpeed' || dimension == 'adsense' || dimension == 'sales_performance' ? filter_type == '' ? 'date' : filter_type : dimension;
|
208 |
-
//dimension = dimension == 'siteSpeed' || dimension == 'adsense' ? 'date' : dimension;
|
209 |
-
var dimension_export = dimension;
|
210 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim();
|
211 |
-
dimension = dimension.charAt(0).toUpperCase() + dimension.slice(1);
|
212 |
-
_data_compare = data_compare;
|
213 |
-
var duration = "";
|
214 |
-
var durationUnits = "";
|
215 |
-
if(metric == 'Avg Session Duration'){
|
216 |
-
duration = "ss";
|
217 |
-
durationUnits = {
|
218 |
-
"mm": "m ",
|
219 |
-
"ss": "s"
|
220 |
-
};
|
221 |
-
}
|
222 |
-
var chartOptions = {
|
223 |
-
"dataProvider": data_compare,
|
224 |
-
"type": "serial",
|
225 |
-
"theme": "light",
|
226 |
-
"percentPrecision": 1,
|
227 |
-
"precision": 0,
|
228 |
-
"export": {
|
229 |
-
"enabled": true
|
230 |
-
},
|
231 |
-
"dataDateFormat": "YYYY-MM-DD",
|
232 |
-
"valueAxes": [{
|
233 |
-
"id": "g1",
|
234 |
-
"axisAlpha": 0.4,
|
235 |
-
"position": "left",
|
236 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
237 |
-
"ignoreAxisWidth": false,
|
238 |
-
"duration": duration,
|
239 |
-
"durationUnits": durationUnits,
|
240 |
-
'minimum': 0,
|
241 |
-
"boldLabels": true,
|
242 |
-
|
243 |
-
},{
|
244 |
-
"id": "g2",
|
245 |
-
"axisAlpha": 0.4,
|
246 |
-
"position": "right",
|
247 |
-
"title": metric + ' compare' == "Percent New Sessions compare" ? '% New Sessions compare' : metric + ' compare',
|
248 |
-
"ignoreAxisWidth": false,
|
249 |
-
"duration": duration,
|
250 |
-
"durationUnits": durationUnits,
|
251 |
-
'minimum': 0,
|
252 |
-
"boldLabels": true,
|
253 |
-
|
254 |
-
}],
|
255 |
-
"graphs": [{
|
256 |
-
"type": chartType,
|
257 |
-
"fillAlphas": fillAlphas,
|
258 |
-
"valueAxis": "g1",
|
259 |
-
"bullet": "round",
|
260 |
-
"bulletBorderAlpha": 1,
|
261 |
-
"bulletColor": "#FFFFFF",
|
262 |
-
"bulletSize": 5,
|
263 |
-
"balloonText": "",
|
264 |
-
"balloonFunction": function (graphDataItem, graph) {
|
265 |
-
var dimension = jQuery("#gawd_tab").val();
|
266 |
-
if(dimension.indexOf("custom_") > -1){
|
267 |
-
customReport = true;
|
268 |
-
dimension = dimension.substring(7);
|
269 |
-
}
|
270 |
-
var metric = jQuery("#gawd_metric").val();
|
271 |
-
var metric_compare = metric + " compare";
|
272 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
273 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
274 |
-
metric = metric.replace(/ +/g, ' ');
|
275 |
-
var date = graphDataItem.dataContext[dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1)]
|
276 |
-
date = typeof date == 'undefined' ? graphDataItem.category : date;
|
277 |
-
date = date == 0 ? dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1) : date;
|
278 |
-
var week = weekdays[new Date(graphDataItem.category).getDay()];
|
279 |
-
week = dimension != 'date' && dimension != 'week' && dimension != 'month' && dimension != 'siteSpeed' && dimension != 'sales_performance' ? '' : week;
|
280 |
-
if (filter_type == 'week' || filter_type == 'month') {
|
281 |
-
week = '';
|
282 |
-
date = graphDataItem.category;
|
283 |
-
}
|
284 |
-
/* var date_compare = graphDataItem.dataContext[(dimension+' compare').replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + (dimension+' compare').replace(/([A-Z])/g, " $1").trim().slice(1)]
|
285 |
-
date_compare = typeof date_compare == 'undefined' ? graphDataItem.category : date_compare;
|
286 |
-
date_compare = date_compare == 0 ? (dimension+' compare').replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + (dimension+' compare').replace(/([A-Z])/g, " $1").trim().slice(1) : date_compare;
|
287 |
-
*/
|
288 |
-
var week_compare = filter_type != '' ? weekdays[new Date(graphDataItem.dataContext[(filter_type+' compare').replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + (filter_type+' compare').replace(/([A-Z])/g, " $1").trim().slice(1)]).getDay()] : weekdays[new Date(graphDataItem.dataContext[((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension)+' compare').replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + ((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension)+' compare').replace(/([A-Z])/g, " $1").trim().slice(1)]).getDay()];
|
289 |
-
var date_compare = filter_type != '' ? graphDataItem.dataContext[(filter_type+' compare').replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + (filter_type+' compare').replace(/([A-Z])/g, " $1").trim().slice(1)] : graphDataItem.dataContext[((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension) + 'compare' ).replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + ((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension)+' compare').replace(/([A-Z])/g, " $1").trim().slice(1)]
|
290 |
-
//week_compare = dimension+' compare' != 'date compare' && dimension+' compare' != 'week compare' && dimension+' compare' != 'month compare' ? '' : week_compare;
|
291 |
-
if(typeof date_compare === 'undefined'){
|
292 |
-
date_compare = graphDataItem.dataContext[((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension)).replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + ((dimension == 'siteSpeed' || dimension == 'sales_performance' ? 'Date' : dimension)).replace(/([A-Z])/g, " $1").trim().slice(1)]
|
293 |
-
}
|
294 |
-
if (filter_type == 'week' || filter_type == 'month') {
|
295 |
-
week_compare = '';
|
296 |
-
//date_compare = graphDataItem.category;
|
297 |
-
}
|
298 |
-
|
299 |
-
var metric_value = graphDataItem.dataContext[metric];
|
300 |
-
metric_value = metric_value.toString().indexOf(".") > 0 ? metric_value.toFixed(2) : metric_value;
|
301 |
-
var metric_value_change = metric_value;
|
302 |
-
if(metric == 'Avg Session Duration' || metric == 'Avg Page Load Time' || metric == 'Avg Server Response Time' || metric == 'Avg Redirection Time' || metric == 'Avg Page Download Time'){
|
303 |
-
metric_value = sec_to_normal(metric_value);
|
304 |
-
}
|
305 |
-
if(dimension == "sessionDurationBucket"){
|
306 |
-
date = date == '1801' ? date + '+ seconds' : date + " sessions";
|
307 |
-
}
|
308 |
-
var compare = '';
|
309 |
-
if (metric_compare != 0) {
|
310 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
311 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
312 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
313 |
-
var metric_compare_value = typeof graphDataItem.dataContext[metric_compare] == 'undefined' ? '' : graphDataItem.dataContext[metric_compare];
|
314 |
-
metric_compare_value = metric_compare_value.toString().indexOf(".") > 0 ? metric_compare_value.toFixed(3) : metric_compare_value;
|
315 |
-
var metric_compare_value_change = metric_compare_value;
|
316 |
-
if(metric_compare == 'Avg Session Duration compare' || metric + " compare" == 'Avg Page Load Time compare' || metric + " compare" == 'Avg Server Response Time compare' || metric + " compare" == 'Avg Redirection Time compare' || metric + " compare" == 'Avg Page Download Time compare'){
|
317 |
-
metric_compare_value = sec_to_normal(metric_compare_value);
|
318 |
-
}
|
319 |
-
metric_compare_value = metric_compare == "Bounce Rate compare" || metric_compare == "Percent New Sessions compare" ? metric_compare_value +'%' : metric_compare_value;
|
320 |
-
|
321 |
-
var compare = date_compare ? ( date_compare.toString().indexOf("GMT") > -1 ? '' : metric_compare + ': ' + metric_compare_value.toLocaleString() ) : '';
|
322 |
-
}
|
323 |
-
metric_value = metric == "Bounce Rate" || metric == "Percent New Sessions" ? parseFloat(metric_value).toLocaleString() +'%' : metric != 'Avg Session Duration' ? parseFloat(metric_value).toLocaleString() : metric_value;
|
324 |
-
|
325 |
-
if(date_compare) {
|
326 |
-
date_compare = date_compare.toString().indexOf("GMT") > -1 ? '' : date_compare;
|
327 |
-
}
|
328 |
-
else {
|
329 |
-
date_compare = '';
|
330 |
-
}
|
331 |
-
date = date.toString().indexOf('GMT') > -1 ? '' : date;
|
332 |
-
week = typeof week == 'undefined' ? '' : week != '' ? week + ', ' : '';
|
333 |
-
week_compare = typeof week_compare == 'undefined' ? '' : week_compare != '' ? week_compare + ', ' : '';
|
334 |
-
if(gawd_admin.default_date_format == 'ymd_without_week'){
|
335 |
-
week = '';
|
336 |
-
week_compare = '';
|
337 |
-
}
|
338 |
-
else if(gawd_admin.default_date_format == 'month_name_without_week' || gawd_admin.default_date_format == 'month_name_with_week'){
|
339 |
-
var dates = date.split('-');
|
340 |
-
var dates_compare = date_compare.split('-');
|
341 |
-
if(typeof dates != 'undefined' && typeof dates_compare != 'undefined' && dates.length>2 && dates_compare.length>2){
|
342 |
-
dates[2] = dates[2].indexOf('0') == 0 ? dates[2].substring(1) : dates[2];
|
343 |
-
dates[1] = dates[1].indexOf('0') == 0 ? dates[1].substring(1) : dates[1];
|
344 |
-
date = monthnames[dates[1]] + ' ' + dates[2] + ', ' + dates[0];
|
345 |
-
dates_compare[2] = dates_compare[2].indexOf('0') == 0 ? dates_compare[2].substring(1) : dates_compare[2];
|
346 |
-
dates_compare[1] = dates_compare[1].indexOf('0') == 0 ? dates_compare[1].substring(1) : dates_compare[1];
|
347 |
-
date_compare = monthnames[dates_compare[1]] + ' ' + dates_compare[2] + ', ' + dates_compare[0];
|
348 |
-
}
|
349 |
-
|
350 |
-
if(gawd_admin.default_date_format == 'month_name_without_week'){
|
351 |
-
week = '';
|
352 |
-
week_compare = '';
|
353 |
-
}
|
354 |
-
}
|
355 |
-
var change_percent = (((metric_value_change - metric_compare_value_change )/metric_compare_value_change)*100).toFixed(2);
|
356 |
-
change_percent = isNaN(change_percent) ? '100%' : isFinite(change_percent) ? change_percent + "%" : '100%';
|
357 |
-
change_percent = metric_value_change == 0 && metric_compare_value_change == 0 ? 0 : change_percent + "%";
|
358 |
-
var metric_compare_class = compare != "" ? "class='chart_point_hover_metric_compare'" : '';
|
359 |
-
return "<div style='word-break:break-word; margin:10px; text-align:left'>" + week + "<span style='font-size:11px'>" + date + "</span><br><span class='chart_point_hover_metric' style='font-size:11px'>" + metric + ': ' + metric_value + "</span><br>" + week_compare + "<span style='font-size:11px'>" + date_compare + "</span><br><span style='font-size:11px'><span style='font-size:11px' " + metric_compare_class + ">" + compare + "</span><br><span>change: "+change_percent+"</span></div>"
|
360 |
-
},
|
361 |
-
//"hideBulletsCount": 50,
|
362 |
-
"lineThickness": 5,
|
363 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
364 |
-
"useLineColorForBulletBorder": true,
|
365 |
-
"valueField": metric,
|
366 |
-
}, {
|
367 |
-
"type": chartType,
|
368 |
-
"fillAlphas": fillAlphas,
|
369 |
-
"valueAxis": "g2",
|
370 |
-
"bullet": "round",
|
371 |
-
"bulletBorderAlpha": 1,
|
372 |
-
"bulletColor": "#FFFFFF",
|
373 |
-
"bulletSize": 5,
|
374 |
-
"showBalloon": true,
|
375 |
-
"balloonText": "",
|
376 |
-
//"hideBulletsCount": 50,
|
377 |
-
|
378 |
-
"lineThickness": 2,
|
379 |
-
"title": metric + ' compare' == "Percent New Sessions compare" ? '% New Sessions compare' : metric + ' compare',
|
380 |
-
"useLineColorForBulletBorder": true,
|
381 |
-
"valueField": metric + ' compare',
|
382 |
-
"duration": duration,
|
383 |
-
"durationUnits": durationUnits,
|
384 |
-
}],
|
385 |
-
"chartCursor": {
|
386 |
-
"pan": false,
|
387 |
-
"valueLineEnabled": false,
|
388 |
-
"valueLineBalloonEnabled": false,
|
389 |
-
"cursorAlpha": 1,
|
390 |
-
"cursorColor": "#258cbb",
|
391 |
-
"limitToGraph": "g1",
|
392 |
-
"valueLineAlpha": 0.2
|
393 |
-
},
|
394 |
-
"categoryField": dimension,
|
395 |
-
"categoryAxis": {
|
396 |
-
"autoRotateCount": 10,
|
397 |
-
"autoRotateAngle": 45,
|
398 |
-
"parseDates": parseDates,
|
399 |
-
"dashLength": 1,
|
400 |
-
"minorGridEnabled": true,
|
401 |
-
"labelFunction": function(valueText, serialDataItem, categoryAxis) {
|
402 |
-
if(typeof valueText != 'undefined'){
|
403 |
-
if (valueText.length > 15)
|
404 |
-
return valueText.substring(0, 15) + '...';
|
405 |
-
else
|
406 |
-
return valueText;
|
407 |
-
}
|
408 |
-
},
|
409 |
-
"boldLabels":true,
|
410 |
-
},
|
411 |
-
"legend": {
|
412 |
-
'switchable': false
|
413 |
-
},
|
414 |
-
"zoomControl": {
|
415 |
-
"zoomControlEnabled": false
|
416 |
-
}
|
417 |
-
}
|
418 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
419 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
420 |
-
valueAxes["maximum"] = 100;
|
421 |
-
}
|
422 |
-
if(typeof chartOptions["valueAxes"][1] != "undefined" && (metric + ' compare' == "Percent New Sessions compare" || metric + ' compare' == "Bounce Rate compare")){
|
423 |
-
var valueAxes = chartOptions["valueAxes"][1];
|
424 |
-
valueAxes["maximum"] = 100;
|
425 |
-
}
|
426 |
-
var chart_compare = AmCharts.makeChart("chartdiv", chartOptions);
|
427 |
-
//CANVAS//
|
428 |
-
jQuery("#chartdiv").find('a').remove();
|
429 |
-
jQuery('svg').find('desc').remove();
|
430 |
-
var svg = document.getElementsByTagName('svg')[0];
|
431 |
-
var canvas = document.getElementById("canvass");
|
432 |
-
draw_canvas(svg, canvas);
|
433 |
-
url = canvas.toDataURL();
|
434 |
-
//CANVAS URL//
|
435 |
-
var tab_name = window.location.href.split('tab=');
|
436 |
-
|
437 |
-
d_start_date = start_date_compare;
|
438 |
-
d_end_date = end_date_compare;
|
439 |
-
d_metric_export = metric_export;
|
440 |
-
d_metric_compare_export = metric_compare_export;
|
441 |
-
d_dimension_export = dimension_export;
|
442 |
-
d_tab_name = tab_name;
|
443 |
-
d_filter_type = filter_type;
|
444 |
-
|
445 |
-
if (metric_compare == 0) {
|
446 |
-
//jQuery('.amChartsLegend svg g g g:last-child').hide();
|
447 |
-
}
|
448 |
-
jQuery("#chartdiv").find('a').hide();
|
449 |
-
jQuery("#gbox_griddiv").remove();
|
450 |
-
var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
451 |
-
jQuery('.gawd_chart_conteiner').append(grid);
|
452 |
-
gawd_draw_table(JSON.stringify(data_compare), metric, metric + ' compare', dimension, dataSums);
|
453 |
-
}
|
454 |
-
})
|
455 |
}
|
456 |
function gawd_draw_analytics_compact(metric, metric_compare, dimension, chart_type, chart_id) {
|
457 |
var _end_date = (moment().subtract(1, 'day')).format("YYYY-MM-DD");
|
@@ -490,327 +142,7 @@ function gawd_draw_analytics_compact(metric, metric_compare, dimension, chart_ty
|
|
490 |
jQuery('#' + chart_id).closest(".postbox").find('.opacity_div_compact').show();
|
491 |
jQuery('#' + chart_id).closest(".postbox").find('.loading_div_compact').show();
|
492 |
}
|
493 |
-
}).done(function (result)
|
494 |
-
jQuery('.opacity_div_compact').hide();
|
495 |
-
jQuery('.loading_div_compact').hide();
|
496 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim();
|
497 |
-
dimension = dimension.charAt(0).toUpperCase() + dimension.slice(1);
|
498 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
499 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
500 |
-
metric = metric.replace(/ +/g, ' ');
|
501 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
502 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
503 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
504 |
-
if(dimension == 'Date'){
|
505 |
-
var data = JSON.parse(result);
|
506 |
-
var c = '';
|
507 |
-
var duration = "";
|
508 |
-
var durationUnits = "";
|
509 |
-
if(metric == 'Avg Session Duration'){
|
510 |
-
duration = "ss";
|
511 |
-
durationUnits = {
|
512 |
-
"mm": "m ",
|
513 |
-
"ss": "s"
|
514 |
-
};
|
515 |
-
}
|
516 |
-
if (metric_compare != '' && metric_compare != 0) {
|
517 |
-
var _duration = '';
|
518 |
-
var _durationUnits = '';
|
519 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, "$1").trim();
|
520 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
521 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
522 |
-
metric_compare_title = /* ' vs ' + */ metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1) == "Percent New Sessions" ? '% New Sessions' : metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
523 |
-
if(metric_compare == 'Avg Session Duration'){
|
524 |
-
_duration = "ss";
|
525 |
-
_durationUnits = {
|
526 |
-
"mm": "m ",
|
527 |
-
"ss": "s"
|
528 |
-
};
|
529 |
-
}
|
530 |
-
c = {
|
531 |
-
"id": "g2",
|
532 |
-
"axisAlpha": 0.4,
|
533 |
-
"position": "right",
|
534 |
-
"title": metric_compare_title,
|
535 |
-
"ignoreAxisWidth": false,
|
536 |
-
"duration": _duration,
|
537 |
-
"durationUnits": _durationUnits,
|
538 |
-
'minimum': 0
|
539 |
-
};
|
540 |
-
|
541 |
-
}
|
542 |
-
else{
|
543 |
-
if(chart_id == 'gawd_date_meta')
|
544 |
-
setTimeout(function(){jQuery('#gawd_date_meta .amChartsLegend svg g g g:last-child').hide()},1);
|
545 |
-
}
|
546 |
-
jQuery("#_sum_comp_" + chart_id).remove();
|
547 |
-
jQuery('#_sum_comp_' + chart_id).remove();
|
548 |
-
|
549 |
-
if(typeof data.data_sum != 'undefined'){
|
550 |
-
var float = '';
|
551 |
-
if (metric_compare != '' && metric_compare != 0){
|
552 |
-
float="style='float:left'";
|
553 |
-
var total = data.data_sum[metric_compare];
|
554 |
-
var avg = '';
|
555 |
-
var diff = ((new Date(end_date).getTime() - new Date(start_date).getTime()) / 3600 / 24 / 1000)+1;
|
556 |
-
var show_hide = 'gawd_show_total';
|
557 |
-
if(metric == 'Bounce Rate' || metric == 'Percent New Sessions' || metric == 'Pageviews Per Session'){
|
558 |
-
avg = parseFloat(total).toFixed(2);
|
559 |
-
if(metric != 'Pageviews Per Session'){
|
560 |
-
avg = avg + '%';
|
561 |
-
}
|
562 |
-
show_hide = 'gawd_hide_total';
|
563 |
-
}
|
564 |
-
else if(metric_compare == 'Avg Session Duration'){
|
565 |
-
avg = sec_to_normal(avg);
|
566 |
-
show_hide = 'gawd_hide_total';
|
567 |
-
}
|
568 |
-
else{
|
569 |
-
//avg = Math.ceil(total/diff);
|
570 |
-
avg = parseFloat(total/diff).toFixed(2);
|
571 |
-
}
|
572 |
-
var percent_color = total == 0 || metric_compare == 'Bounce Rate' ? "gawd_red" : "gawd_green";
|
573 |
-
var sumBox = "<div class='_sum_box' id='_sum_comp_" + chart_id + "'>";
|
574 |
-
metric_compare_title = metric_compare == 'Percent New Sessions' ? '% New Sessions' : metric_compare;
|
575 |
-
sumBox += "<div class='box_metric'>" + metric_compare_title + "</div>"
|
576 |
-
sumBox += "<div class='_box_left " + show_hide + "'>";
|
577 |
-
sumBox += "<div class='box_title'>Total</div>";
|
578 |
-
sumBox += "<div class='" + percent_color + "'>" + parseInt(total) + "</div>";
|
579 |
-
sumBox += "</div>";
|
580 |
-
|
581 |
-
sumBox += "<div class='_box_right'>";
|
582 |
-
sumBox += "<div class='box_title'>Average</div>";
|
583 |
-
sumBox += "<div class='" + percent_color + "'>" + avg + "</div>";
|
584 |
-
sumBox += "</div>";
|
585 |
-
sumBox += "<div class='clear'></div>";
|
586 |
-
sumBox += "</div>";
|
587 |
-
sumBox += "<div class='clear'></div>";
|
588 |
-
jQuery('#'+chart_id).after(sumBox);
|
589 |
-
}
|
590 |
-
var total = data.data_sum[metric];
|
591 |
-
var avg = '';
|
592 |
-
var diff = ((new Date(end_date).getTime() - new Date(start_date).getTime()) / 3600 / 24 / 1000)+1;
|
593 |
-
var show_hide = 'gawd_show_total';
|
594 |
-
if(metric == 'Bounce Rate' || metric == 'Percent New Sessions' || metric == 'Pageviews Per Session'){
|
595 |
-
avg = parseFloat(total).toFixed(2);
|
596 |
-
if(metric != 'Pageviews Per Session'){
|
597 |
-
avg = avg + '%';
|
598 |
-
}
|
599 |
-
show_hide = 'gawd_hide_total';
|
600 |
-
}
|
601 |
-
else if(metric == 'Avg Session Duration'){
|
602 |
-
avg = sec_to_normal(avg);
|
603 |
-
show_hide = 'gawd_hide_total';
|
604 |
-
}
|
605 |
-
else{
|
606 |
-
//avg = Math.ceil(total/diff);
|
607 |
-
avg = parseFloat(total/diff).toFixed(2);
|
608 |
-
}
|
609 |
-
var percent_color = total == 0 || metric == 'Bounce Rate' ? "gawd_red" : "gawd_green";
|
610 |
-
jQuery('#_sum_' + chart_id).remove();
|
611 |
-
var sumBox = "<div " + float + " class='_sum_box' id='_sum_" + chart_id + "'>";
|
612 |
-
var metric_title = metric == 'Percent New Sessions' ? '% New Sessions' : metric;
|
613 |
-
sumBox += "<div class='box_metric'>" + metric_title + "</div>"
|
614 |
-
sumBox += "<div class='_box_left " + show_hide + "'>";
|
615 |
-
sumBox += "<div class='box_title'>Total</div>";
|
616 |
-
sumBox += "<div class='" + percent_color + "'>" + parseInt(total) + "</div>";
|
617 |
-
sumBox += "</div>";
|
618 |
-
|
619 |
-
sumBox += "<div class='_box_right'>";
|
620 |
-
sumBox += "<div class='box_title'>Average</div>";
|
621 |
-
sumBox += "<div class='" + percent_color + "'>" + avg + "</div>";
|
622 |
-
sumBox += "</div>";
|
623 |
-
sumBox += "<div class='clear'></div>";
|
624 |
-
sumBox += "</div>";
|
625 |
-
jQuery('#'+chart_id).after(sumBox);
|
626 |
-
}
|
627 |
-
|
628 |
-
data = data.chart_data;
|
629 |
-
|
630 |
-
AmCharts.addInitHandler(function(chart) {
|
631 |
-
var maxDP = {};
|
632 |
-
var max = 0;
|
633 |
-
for(var i = 0; i < data.length; i++) {
|
634 |
-
var dp = data[i];
|
635 |
-
if (dp[metric] > max) {
|
636 |
-
maxDP = dp;
|
637 |
-
max = dp[metric];
|
638 |
-
}
|
639 |
-
}
|
640 |
-
maxDP.color = "#cc2525";
|
641 |
-
}, ["serial"]);
|
642 |
-
var chartOptions = {
|
643 |
-
"dataProvider": data,
|
644 |
-
"type": "serial",
|
645 |
-
"theme": "light",
|
646 |
-
"percentPrecision": 1,
|
647 |
-
"precision": 0,
|
648 |
-
"export": {
|
649 |
-
"enabled": true
|
650 |
-
},
|
651 |
-
"dataDateFormat": "YYYY-MM-DD",
|
652 |
-
"valueAxes": [{
|
653 |
-
"id": "g1",
|
654 |
-
"axisAlpha": 0.4,
|
655 |
-
"position": "left",
|
656 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
657 |
-
"ignoreAxisWidth": false,
|
658 |
-
"duration": duration,
|
659 |
-
"durationUnits": durationUnits,
|
660 |
-
'minimum':0,
|
661 |
-
"boldLabels": true,
|
662 |
-
},c],
|
663 |
-
"graphs": [{
|
664 |
-
"type": chart_type,
|
665 |
-
"fillAlphas": fillAlphas,
|
666 |
-
"valueAxis": "g1",
|
667 |
-
"bullet": "round",
|
668 |
-
"bulletBorderAlpha": 1,
|
669 |
-
"bulletColor": "#FFFFFF",
|
670 |
-
"bulletSize": 5,
|
671 |
-
"balloonFunction": function (graphDataItem, graph) {
|
672 |
-
//var metric = jQuery("#gawd_metric_compact").val();
|
673 |
-
//var metric_compare = jQuery("#gawd_metric_compare_compact").val();
|
674 |
-
metric = metric.replace(/([A-Z])/g, "$1").trim();
|
675 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
676 |
-
metric = metric.replace(/ +/g, ' ');
|
677 |
-
var filter_type = jQuery("#gawd_filter_val").val();
|
678 |
-
|
679 |
-
var week = weekdays[new Date(graphDataItem.category).getDay()];
|
680 |
-
|
681 |
-
var date = graphDataItem.dataContext[dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1)]
|
682 |
-
if (filter_type == 'week' || filter_type == 'month') {
|
683 |
-
week = '';
|
684 |
-
date = graphDataItem.category;
|
685 |
-
}
|
686 |
-
date = typeof date == 'undefined' ? graphDataItem.category : date;
|
687 |
-
date = date == 0 ? dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1) : date;
|
688 |
-
week = dimension != 'Date' && dimension != 'week' && dimension != 'month' ? '' : week + ', ';
|
689 |
-
|
690 |
-
var metric_value = typeof graphDataItem.dataContext[metric] != 'undefined' ? graphDataItem.dataContext[metric].toLocaleString() : '';
|
691 |
-
if(metric == 'Avg Session Duration'){
|
692 |
-
metric_value = sec_to_normal(metric_value);
|
693 |
-
}
|
694 |
-
else if(metric == 'Bounce Rate' || metric == 'Percent New Sessions'){
|
695 |
-
metric_value = parseFloat(metric_value).toFixed(2) + '%';
|
696 |
-
}
|
697 |
-
if(dimension == "sessionDurationBucket"){
|
698 |
-
date = date == '1801' ? date + '+ seconds' : date + " seconds";
|
699 |
-
}
|
700 |
-
var compare = '';
|
701 |
-
if (metric_compare != 0) {
|
702 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, "$1").trim();
|
703 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
704 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
705 |
-
var metric_compare_value = graphDataItem.dataContext[metric_compare];
|
706 |
-
if(typeof metric_compare_value != 'undefined'){
|
707 |
-
metric_compare_value = metric_compare_value.toString().indexOf(".") > 0 ? metric_compare_value.toLocaleString() : metric_compare_value.toLocaleString();
|
708 |
-
}
|
709 |
-
else{
|
710 |
-
metric_compare_value = '';
|
711 |
-
}
|
712 |
-
if(metric_compare == 'Avg Session Duration'){
|
713 |
-
metric_compare_value = sec_to_normal(metric_compare_value);
|
714 |
-
}
|
715 |
-
else if(metric_compare == 'Bounce Rate' || metric_compare == 'Percent New Sessions'){
|
716 |
-
metric_compare_value = parseFloat(metric_compare_value).toFixed(2) + '%';
|
717 |
-
}
|
718 |
-
var compare = metric_compare + ': ' + metric_compare_value;
|
719 |
-
}
|
720 |
-
var metric_compare_class = compare != "" ? "class='chart_point_hover_metric_compare'" : '';
|
721 |
-
if(gawd_admin.default_date_format == 'ymd_without_week'){
|
722 |
-
week = '';
|
723 |
-
}
|
724 |
-
else if(gawd_admin.default_date_format == 'month_name_without_week' || gawd_admin.default_date_format == 'month_name_with_week'){
|
725 |
-
var dates = date.split('-');
|
726 |
-
if(typeof dates != 'undefined' && dates.length>2){
|
727 |
-
dates[2] = dates[2].indexOf('0') == 0 ? dates[2].substring(1) : dates[2];
|
728 |
-
dates[1] = dates[1].indexOf('0') == 0 ? dates[1].substring(1) : dates[1];
|
729 |
-
date = monthnames[dates[1]] + ' ' + dates[2] + ', ' + dates[0];
|
730 |
-
}
|
731 |
-
if(gawd_admin.default_date_format == 'month_name_without_week'){
|
732 |
-
week = '';
|
733 |
-
}
|
734 |
-
}
|
735 |
-
return "<div style='margin:10px; text-align:left'>" + week + " <span style='font-size:11px'>" + date + "</span><br><span class='chart_point_hover_metric' style='font-size:11px'>" + metric + ': ' + metric_value + "</span><br><span " + metric_compare_class + " style='font-size:11px'>" + compare + "</span></div>"
|
736 |
-
},
|
737 |
-
//"hideBulletsCount": 50,
|
738 |
-
"lineThickness": 5,
|
739 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
740 |
-
"useLineColorForBulletBorder": true,
|
741 |
-
"valueField": metric,
|
742 |
-
},
|
743 |
-
{"type": chart_type,
|
744 |
-
"fillAlphas": fillAlphas,
|
745 |
-
"valueAxis": "g2",
|
746 |
-
"bullet": "round",
|
747 |
-
"bulletBorderAlpha": 1,
|
748 |
-
"bulletColor": "#FFFFFF",
|
749 |
-
"bulletSize": 5,
|
750 |
-
"showBalloon": true,
|
751 |
-
"balloonText": "",
|
752 |
-
//"hideBulletsCount": 50,
|
753 |
-
"lineThickness": 2,
|
754 |
-
"title": metric_compare == "Percent New Sessions" ? '% New Sessions' : metric_compare,
|
755 |
-
"useLineColorForBulletBorder": true,
|
756 |
-
"valueField": metric_compare
|
757 |
-
}],
|
758 |
-
"chartCursor": {
|
759 |
-
"pan": true,
|
760 |
-
"valueLineEnabled": true,
|
761 |
-
"valueLineBalloonEnabled": true,
|
762 |
-
"cursorAlpha": 1,
|
763 |
-
"cursorColor": "#258cbb",
|
764 |
-
"limitToGraph": "g1",
|
765 |
-
"valueLineAlpha": 0.2
|
766 |
-
},
|
767 |
-
"categoryField": dimension,
|
768 |
-
"categoryAxis": {
|
769 |
-
"autoRotateCount": 3,
|
770 |
-
"autoRotateAngle": rotateAngle,
|
771 |
-
"parseDates": parseDates,
|
772 |
-
"dashLength": 1,
|
773 |
-
"minorGridEnabled": true,
|
774 |
-
"boldLabels": true,
|
775 |
-
"gridCount":70,
|
776 |
-
"autoGridCount": false,
|
777 |
-
"labelColorField": "color",
|
778 |
-
"labelFunction": function(valueText, serialDataItem, categoryAxis) {
|
779 |
-
if(typeof valueText != 'undefined'){
|
780 |
-
if (valueText.length > 15)
|
781 |
-
return valueText.substring(0, 15) + '...';
|
782 |
-
else
|
783 |
-
return valueText;
|
784 |
-
}
|
785 |
-
},
|
786 |
-
},
|
787 |
-
"legend": {
|
788 |
-
'switchable': false,
|
789 |
-
"equalWidths": false
|
790 |
-
},
|
791 |
-
"zoomControl": {
|
792 |
-
"zoomControlEnabled": false
|
793 |
-
}
|
794 |
-
|
795 |
-
};
|
796 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
797 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
798 |
-
valueAxes["maximum"] = 100;
|
799 |
-
}
|
800 |
-
if(typeof chartOptions["valueAxes"][1] != "undefined" && (metric_compare == "Percent New Sessions" || metric_compare == "Bounce Rate")){
|
801 |
-
var valueAxes = chartOptions["valueAxes"][1];
|
802 |
-
valueAxes["maximum"] = 100;
|
803 |
-
}
|
804 |
-
var chart = AmCharts.makeChart("chartdiv", chartOptions);
|
805 |
-
var chart = AmCharts.makeChart(chart_id, chartOptions);
|
806 |
-
if (metric_compare == '' || typeof metric_compare == 'undefined' || metric_compare == 0) {
|
807 |
-
setTimeout(function(){jQuery('#gawd_country_meta .amChartsLegend svg g g g:last-child').remove()},130);
|
808 |
-
}
|
809 |
-
}
|
810 |
-
else{
|
811 |
-
gawd_draw_table(result, metric, 0, dimension);
|
812 |
-
}
|
813 |
-
//jQuery("#" + chart_id).find('a').hide();
|
814 |
})
|
815 |
}
|
816 |
|
@@ -923,419 +255,6 @@ function gawd_draw_analytics() {
|
|
923 |
jQuery('#loading_div').show();
|
924 |
}
|
925 |
}).done(function (data) {
|
926 |
-
jQuery('#opacity_div').hide();
|
927 |
-
jQuery('#loading_div').hide();
|
928 |
-
var result = JSON.parse(data);
|
929 |
-
|
930 |
-
if (result.error_message != undefined) {
|
931 |
-
var not_exist = '<div id="gawd_error">' + result.error_message + '</div>';
|
932 |
-
if (jQuery('#gawd_error').length < 1) {
|
933 |
-
jQuery('#chartdiv').append(not_exist);
|
934 |
-
}
|
935 |
-
return;
|
936 |
-
}
|
937 |
-
_data = result;
|
938 |
-
|
939 |
-
if (result.chart_data) {
|
940 |
-
result = result.chart_data;
|
941 |
-
}
|
942 |
-
var result_length = result.length;
|
943 |
-
if (filter_type == "week" || filter_type == "month" || filter_type == "hour") {
|
944 |
-
parseDates = false;
|
945 |
-
result_length = 20;
|
946 |
-
}
|
947 |
-
if (dimension == 'goals') {
|
948 |
-
dimension = 'date';
|
949 |
-
}
|
950 |
-
|
951 |
-
if (dimension != "pagePath" && dimension != "landingPagePath" && dimension != "daysToTransaction") {
|
952 |
-
jQuery("#chartdiv").show();
|
953 |
-
if (dimension == 'date' || dimension == 'siteSpeed' || dimension == 'adsense' || dimension == 'sales_performance') {
|
954 |
-
jQuery("#compare_time_conteiner").show();
|
955 |
-
var dimension_export = dimension;
|
956 |
-
if (filter_type == '') {
|
957 |
-
dimension = 'date';
|
958 |
-
} else {
|
959 |
-
dimension = filter_type;
|
960 |
-
}
|
961 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1);
|
962 |
-
} else {
|
963 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1);
|
964 |
-
var dimension_export = dimension;
|
965 |
-
}
|
966 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + metric.replace(/([A-Z])/g, " $1").trim().slice(1);
|
967 |
-
metric = metric.replace(/ +/g, ' ');
|
968 |
-
var metric_export = metric;
|
969 |
-
var metric_compare_export = metric_compare;
|
970 |
-
var c ='';
|
971 |
-
if (_data_compare.length > 0) {
|
972 |
-
gawd_compare();
|
973 |
-
return;
|
974 |
-
}
|
975 |
-
|
976 |
-
var duration = "";
|
977 |
-
var durationUnits = "";
|
978 |
-
if(metric == 'Avg Session Duration' || metric == 'Avg Session Duration' || metric == 'Duration' || metric == 'Avg Session Duration' || metric == 'Avg Page Load Time' || metric == 'Avg Server Response Time' || metric == 'Avg Redirection Time' || metric == 'Avg Page Download Time'){
|
979 |
-
duration = "ss";
|
980 |
-
durationUnits = {
|
981 |
-
"mm": "m ",
|
982 |
-
"ss": "s"
|
983 |
-
};
|
984 |
-
}
|
985 |
-
if (metric_compare != '') {
|
986 |
-
var _duration = '';
|
987 |
-
var _durationUnits = '';
|
988 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
989 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
990 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
991 |
-
metric_compare_title = /* ' vs ' + */ metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1) == "Percent New Sessions" ? '% New Sessions' : metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
992 |
-
|
993 |
-
if(metric_compare == 'Avg Session Duration' || metric_compare == 'Duration' || metric_compare == 'Avg Session Duration' || metric_compare == 'Avg Page Load Time' || metric_compare == 'Avg Server Response Time' || metric_compare == 'Avg Redirection Time' || metric_compare == 'Avg Page Download Time'){
|
994 |
-
_duration = "ss";
|
995 |
-
_durationUnits = {
|
996 |
-
"mm": "m ",
|
997 |
-
"ss": "s"
|
998 |
-
};
|
999 |
-
}
|
1000 |
-
c = {
|
1001 |
-
"id": "g2",
|
1002 |
-
"axisAlpha": 0.4,
|
1003 |
-
"position": "right",
|
1004 |
-
"title": metric_compare_title,
|
1005 |
-
"ignoreAxisWidth": false,
|
1006 |
-
"duration": _duration,
|
1007 |
-
"durationUnits": _durationUnits,
|
1008 |
-
'minimum': 0,
|
1009 |
-
"boldLabels": true,
|
1010 |
-
"zeroGridAlpha": 1
|
1011 |
-
};
|
1012 |
-
}
|
1013 |
-
jQuery('#_sum_comp_chartdiv').remove();
|
1014 |
-
jQuery('#_sum_box').remove();
|
1015 |
-
if(typeof _data.data_sum != 'undefined'){
|
1016 |
-
var float = '';
|
1017 |
-
if(metric_compare != ''){
|
1018 |
-
float="style='float:left'";
|
1019 |
-
var total = _data.data_sum[metric_compare];
|
1020 |
-
var avg = '';
|
1021 |
-
var diff = ((new Date(end_date).getTime() - new Date(start_date).getTime()) / 3600 / 24 / 1000)+1;
|
1022 |
-
var show_hide = 'gawd_show_total';
|
1023 |
-
if(metric_compare == 'Bounce Rate' || metric_compare == 'Percent New Sessions' || metric_compare == 'Pageviews Per Session'){
|
1024 |
-
avg = parseFloat(total).toFixed(2);
|
1025 |
-
if(metric_compare != 'Pageviews Per Session'){
|
1026 |
-
avg = avg + '%';
|
1027 |
-
}
|
1028 |
-
show_hide = 'gawd_hide_total';
|
1029 |
-
}
|
1030 |
-
else if(metric_compare == 'Avg Session Duration' || metric_compare == 'Avg Page Load Time' || metric_compare == 'Avg Server Response Time' || metric_compare == 'Avg Redirection Time' || metric_compare == 'Avg Page Download Time' || metric_compare == 'Duration'){
|
1031 |
-
avg = sec_to_normal(total);
|
1032 |
-
show_hide = 'gawd_hide_total';
|
1033 |
-
}
|
1034 |
-
else{
|
1035 |
-
//avg = Math.ceil(total/diff);
|
1036 |
-
avg = parseFloat(total/diff).toFixed(2);
|
1037 |
-
}
|
1038 |
-
var percent_color = total == 0 || metric_compare == 'Bounce Rate' ? "gawd_red" : "gawd_green";
|
1039 |
-
var sumBox = "<div class='_sum_box' id='_sum_comp_chartdiv'>";
|
1040 |
-
var metric_compare_title = metric_compare == 'Percent New Sessions' ? '% New Sessions' : metric_compare;
|
1041 |
-
sumBox += "<div class='box_metric'>" + metric_compare_title + "</div>"
|
1042 |
-
sumBox += "<div class='_box_left " + show_hide + "'>";
|
1043 |
-
sumBox += "<div class='box_title'>Total</div>";
|
1044 |
-
sumBox += "<div class='" + percent_color + "'>" + parseInt(total).toLocaleString() + "</div>";
|
1045 |
-
sumBox += "</div>";
|
1046 |
-
|
1047 |
-
sumBox += "<div class='_box_right'>";
|
1048 |
-
sumBox += "<div class='box_title'>Average</div>";
|
1049 |
-
sumBox += "<div class='" + percent_color + "'>" + avg + "</div>";
|
1050 |
-
sumBox += "</div>";
|
1051 |
-
sumBox += "<div class='clear'></div>";
|
1052 |
-
sumBox += "</div>";
|
1053 |
-
sumBox += "<div class='clear'></div>";
|
1054 |
-
jQuery('#chartdiv').after(sumBox);
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
var total = _data.data_sum[metric];
|
1058 |
-
var avg = '';
|
1059 |
-
var diff = ((new Date(end_date).getTime() - new Date(start_date).getTime()) / 3600 / 24 / 1000)+1;
|
1060 |
-
var show_hide = 'gawd_show_total';
|
1061 |
-
if(metric == 'Bounce Rate' || metric == 'Percent New Sessions' || metric == 'Pageviews Per Session'){
|
1062 |
-
avg = parseFloat(total).toFixed(2);
|
1063 |
-
if(metric != 'Pageviews Per Session'){
|
1064 |
-
avg = avg + '%';
|
1065 |
-
}
|
1066 |
-
show_hide = 'gawd_hide_total';
|
1067 |
-
}
|
1068 |
-
else if(metric == 'Avg Session Duration' || metric == 'Avg Page Load Time' || metric == 'Avg Server Response Time' || metric == 'Avg Redirection Time' || metric == 'Avg Page Download Time' || metric == 'Duration'){
|
1069 |
-
avg = sec_to_normal(total);
|
1070 |
-
show_hide = 'gawd_hide_total';
|
1071 |
-
}
|
1072 |
-
else{
|
1073 |
-
//avg = Math.ceil(total/diff);
|
1074 |
-
avg = parseFloat(total/diff).toFixed(2);
|
1075 |
-
}
|
1076 |
-
var percent_color = total == 0 || metric == 'Bounce Rate' ? "gawd_red" : "gawd_green";
|
1077 |
-
var sumBox = "<div " + float + " class='_sum_box' id='_sum_box'>";
|
1078 |
-
var metric_title = metric == 'Percent New Sessions' ? '% New Sessions' : metric;
|
1079 |
-
sumBox += "<div class='box_metric'>" + metric_title + "</div>"
|
1080 |
-
sumBox += "<div class='_box_left " + show_hide + "'>";
|
1081 |
-
sumBox += "<div class='box_title'>Total</div>";
|
1082 |
-
sumBox += "<div class='" + percent_color + "'>" + parseInt(total).toLocaleString() + "</div>";
|
1083 |
-
sumBox += "</div>";
|
1084 |
-
|
1085 |
-
sumBox += "<div class='_box_right'>";
|
1086 |
-
sumBox += "<div class='box_title'>Average</div>";
|
1087 |
-
sumBox += "<div class='" + percent_color + "'>" + avg + "</div>";
|
1088 |
-
sumBox += "</div>";
|
1089 |
-
sumBox += "<div class='clear'></div>";
|
1090 |
-
sumBox += "</div>";
|
1091 |
-
jQuery('#chartdiv').after(sumBox);
|
1092 |
-
}
|
1093 |
-
AmCharts.addInitHandler(function(chart) {
|
1094 |
-
var maxDP ;
|
1095 |
-
var max = 0;
|
1096 |
-
for(var i = 0; i < result.length; i++) {
|
1097 |
-
var dp = result[i];
|
1098 |
-
if (dp[metric] > max) {
|
1099 |
-
maxDP = dp;
|
1100 |
-
max = dp[metric];
|
1101 |
-
}
|
1102 |
-
}
|
1103 |
-
if(typeof maxDP != 'undefined'){
|
1104 |
-
maxDP.color = "#cc2525";
|
1105 |
-
}
|
1106 |
-
}, ["serial"]);
|
1107 |
-
if(dimension.indexOf('Dimension') != -1){
|
1108 |
-
dimension = jQuery('#gawd_custom_option option:selected').text();
|
1109 |
-
}
|
1110 |
-
if(result[0]['Date'] == 0){
|
1111 |
-
parseDates = false;
|
1112 |
-
}
|
1113 |
-
var chartOptions = {
|
1114 |
-
"type": "serial",
|
1115 |
-
"theme": "light",
|
1116 |
-
/* "percentPrecision": 1,
|
1117 |
-
"precision": 0, */
|
1118 |
-
"dataProvider": result,
|
1119 |
-
"dataDateFormat": "YYYY-MM-DD",
|
1120 |
-
"percentPrecision": 1,
|
1121 |
-
"precision": 0,
|
1122 |
-
|
1123 |
-
"valueAxes": [ {
|
1124 |
-
"id": "g1",
|
1125 |
-
"axisAlpha": 1,
|
1126 |
-
"position": "left",
|
1127 |
-
"title": metric.charAt(0).toUpperCase() + metric.slice(1) == "Percent New Sessions" ? '% New Sessions' : metric.charAt(0).toUpperCase() + metric.slice(1),
|
1128 |
-
"ignoreAxisWidth": false,
|
1129 |
-
"duration": duration,
|
1130 |
-
"durationUnits": durationUnits,
|
1131 |
-
'minimum': 0,
|
1132 |
-
"boldLabels": true,
|
1133 |
-
"zeroGridAlpha": 1,
|
1134 |
-
},
|
1135 |
-
c,
|
1136 |
-
],
|
1137 |
-
"graphs": [
|
1138 |
-
{
|
1139 |
-
"type": chartType,
|
1140 |
-
"fillAlphas": fillAlphas,
|
1141 |
-
"valueAxis": "g1",
|
1142 |
-
"bullet": "round",
|
1143 |
-
"bulletBorderAlpha": 1,
|
1144 |
-
"bulletColor": "#FFFFFF",
|
1145 |
-
"bulletSize": 5,
|
1146 |
-
"balloonText": "",
|
1147 |
-
"balloonFunction": function (graphDataItem, graph) {
|
1148 |
-
var dimension = jQuery("#gawd_tab").val();
|
1149 |
-
if(dimension.indexOf("custom_") > -1){
|
1150 |
-
customReport = true;
|
1151 |
-
dimension = dimension.substring(7);
|
1152 |
-
}
|
1153 |
-
var metric = jQuery("#gawd_metric").val();
|
1154 |
-
var metric_compare = jQuery("#gawd_metric_compare").val();
|
1155 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
1156 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
1157 |
-
metric = metric.replace(/ +/g, ' ');
|
1158 |
-
var filter_type = jQuery("#gawd_filter_val").val();
|
1159 |
-
var week = weekdays[new Date(graphDataItem.category).getDay()];
|
1160 |
-
var date = graphDataItem.dataContext[dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1)]
|
1161 |
-
if (filter_type == 'week' || filter_type == 'month') {
|
1162 |
-
week = '';
|
1163 |
-
date = graphDataItem.category;
|
1164 |
-
}
|
1165 |
-
date = typeof date == 'undefined' ? graphDataItem.category : date;
|
1166 |
-
|
1167 |
-
|
1168 |
-
date = date == 0 ? dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1) : date;
|
1169 |
-
|
1170 |
-
week = dimension != 'date' && dimension != 'week' && dimension != 'month' && dimension != 'siteSpeed' && dimension != 'sales_performance' ? '' : week != '' ? week + ', ' : '';
|
1171 |
-
if(date == "Date"){
|
1172 |
-
date = '';
|
1173 |
-
week = '';
|
1174 |
-
}
|
1175 |
-
|
1176 |
-
var metric_value = graphDataItem.dataContext[metric];//.toLocaleString();
|
1177 |
-
if(metric == 'Avg Session Duration' || metric == 'Avg Page Load Time' || metric == 'Avg Server Response Time' || metric == 'Avg Redirection Time' || metric == 'Avg Page Download Time' || metric == 'Duration'){
|
1178 |
-
metric_value = sec_to_normal(metric_value);
|
1179 |
-
}
|
1180 |
-
else if(metric == 'Bounce Rate' || metric == 'Percent New Sessions'){
|
1181 |
-
metric_value = parseFloat(metric_value).toFixed(2) + '%';
|
1182 |
-
}
|
1183 |
-
if(dimension == "sessionDurationBucket"){
|
1184 |
-
date = date == '1801' ? date + '+ seconds' : date + " seconds";
|
1185 |
-
}
|
1186 |
-
var compare = '';
|
1187 |
-
if (metric_compare != 0) {
|
1188 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
1189 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
1190 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
1191 |
-
var metric_compare_value = graphDataItem.dataContext[metric_compare];
|
1192 |
-
metric_compare_value = metric_compare_value.toString().indexOf(".") > 0 ? metric_compare_value.toLocaleString() : metric_compare_value.toLocaleString();
|
1193 |
-
if(metric_compare == 'Avg Session Duration' || metric_compare == 'Avg Page Load Time' || metric_compare == 'Avg Server Response Time' || metric_compare == 'Avg Redirection Time' || metric_compare == 'Avg Page Download Time' || metric_compare == 'Duration'){
|
1194 |
-
metric_compare_value = sec_to_normal(metric_compare_value.replace(',',''));
|
1195 |
-
}
|
1196 |
-
else if(metric_compare == 'Bounce Rate' || metric_compare == 'Percent New Sessions'){
|
1197 |
-
metric_compare_value = parseFloat(metric_compare_value).toFixed(2) + '%';
|
1198 |
-
}
|
1199 |
-
var compare = metric_compare + ': ' + metric_compare_value;
|
1200 |
-
}
|
1201 |
-
var metric_compare_class = compare != "" ? "class='chart_point_hover_metric_compare'" : '';
|
1202 |
-
if(gawd_admin.default_date_format == 'ymd_without_week'){
|
1203 |
-
week = '';
|
1204 |
-
}
|
1205 |
-
else if(gawd_admin.default_date_format == 'month_name_without_week' || gawd_admin.default_date_format == 'month_name_with_week'){
|
1206 |
-
var dates = date.split('-');
|
1207 |
-
if(dates.length>2){
|
1208 |
-
dates[2] = dates[2].indexOf('0') == 0 ? dates[2].substring(1) : dates[2];
|
1209 |
-
dates[1] = dates[1].indexOf('0') == 0 ? dates[1].substring(1) : dates[1];
|
1210 |
-
date = monthnames[dates[1]] + ' ' + dates[2] + ', ' + dates[0];
|
1211 |
-
}
|
1212 |
-
if(gawd_admin.default_date_format == 'month_name_without_week'){
|
1213 |
-
week = '';
|
1214 |
-
}
|
1215 |
-
}
|
1216 |
-
return "<div style='word-break:break-word; margin:10px; text-align:left'>" + week + "<span style='font-size:11px'>" + date + "</span><br><span style='font-size:11px' class='chart_point_hover_metric'>" + metric + ': ' + metric_value + "</span><br><span " + metric_compare_class + " style='font-size:11px'>" + compare + "</span></div>"
|
1217 |
-
},
|
1218 |
-
//when bullet hide
|
1219 |
-
//"hideBulletsCount": 100,
|
1220 |
-
"lineThickness": 5,
|
1221 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
1222 |
-
"useLineColorForBulletBorder": true,
|
1223 |
-
"valueField": metric,
|
1224 |
-
},
|
1225 |
-
{
|
1226 |
-
"type": chartType,
|
1227 |
-
"fillAlphas": fillAlphas,
|
1228 |
-
"valueAxis": "g2",
|
1229 |
-
"bullet": "round",
|
1230 |
-
"bulletBorderAlpha": 1,
|
1231 |
-
"bulletColor": "#FFFFFF",
|
1232 |
-
"bulletSize": 5,
|
1233 |
-
"showBalloon": true,
|
1234 |
-
"balloonText": "",
|
1235 |
-
//"hideBulletsCount": 50,
|
1236 |
-
"lineThickness": 2,
|
1237 |
-
"title": metric_compare == "Percent New Sessions" ? '% New Sessions' : metric_compare,
|
1238 |
-
"useLineColorForBulletBorder": true,
|
1239 |
-
"valueField": metric_compare
|
1240 |
-
}],
|
1241 |
-
"chartCursor": {
|
1242 |
-
"pan": false,
|
1243 |
-
"valueLineEnabled": false,
|
1244 |
-
"valueLineBalloonEnabled": false,
|
1245 |
-
"cursorAlpha": 1,
|
1246 |
-
"cursorColor": "#258cbb",
|
1247 |
-
"limitToGraph": "g1",
|
1248 |
-
"valueLineAlpha": 0.2
|
1249 |
-
},
|
1250 |
-
"responsive": {
|
1251 |
-
"enabled": true
|
1252 |
-
},
|
1253 |
-
"categoryField": dimension,
|
1254 |
-
"categoryAxis": {
|
1255 |
-
"autoRotateCount": 3,
|
1256 |
-
"autoRotateAngle": 60,
|
1257 |
-
"parseDates": parseDates,
|
1258 |
-
"equalSpacing": true,
|
1259 |
-
"dashLength": 2,
|
1260 |
-
"minorGridEnabled": true,
|
1261 |
-
"boldLabels": true,
|
1262 |
-
"labelFrequency": 1,
|
1263 |
-
"labelColorField": "color",
|
1264 |
-
"labelFunction": function(valueText, serialDataItem, categoryAxis) {
|
1265 |
-
if(typeof valueText != 'undefined'){
|
1266 |
-
if (valueText.length > 15)
|
1267 |
-
return valueText.substring(0, 15) + '...';
|
1268 |
-
else
|
1269 |
-
return valueText;
|
1270 |
-
}
|
1271 |
-
},
|
1272 |
-
},
|
1273 |
-
"legend": {
|
1274 |
-
'switchable': false,
|
1275 |
-
"equalWidths": false
|
1276 |
-
},
|
1277 |
-
"zoomControl": {
|
1278 |
-
"zoomControlEnabled": false
|
1279 |
-
}
|
1280 |
-
}
|
1281 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
1282 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
1283 |
-
valueAxes["maximum"] = 100;
|
1284 |
-
}
|
1285 |
-
if(typeof chartOptions["valueAxes"][1] != "undefined" && (metric_compare == "Percent New Sessions" || metric_compare == "Bounce Rate")){
|
1286 |
-
var valueAxes = chartOptions["valueAxes"][1];
|
1287 |
-
valueAxes["maximum"] = 100;
|
1288 |
-
}
|
1289 |
-
var chart = AmCharts.makeChart("chartdiv", chartOptions);
|
1290 |
-
if (metric_compare == 0) {
|
1291 |
-
jQuery('.amChartsLegend svg g g g:last-child').hide();
|
1292 |
-
jQuery("#chartdiv").find('a').remove();
|
1293 |
-
|
1294 |
-
}
|
1295 |
-
jQuery("#chartdiv").find('a').remove();
|
1296 |
-
} else {
|
1297 |
-
var metric_export = metric;
|
1298 |
-
var metric_compare_export = metric_compare;
|
1299 |
-
var dimension_export = dimension;
|
1300 |
-
jQuery("#chartdiv").hide();
|
1301 |
-
//jQuery(".filter_conteiner").hide();
|
1302 |
-
jQuery(".filter_conteiner").css({'height': '75px','position': 'relative'});
|
1303 |
-
if(typeof jQuery.cookie("collapsed") != 'undefined' && jQuery.cookie("collapsed") == 1){
|
1304 |
-
jQuery("#compare_time_conteiner").css({'float': 'none','width': '35%','position': 'absolute','right':'4%',"top": "35px"});
|
1305 |
-
jQuery('#compare_datepicker_wraper').width('98.5%');
|
1306 |
-
jQuery('.gawd_content').width('50.6%');
|
1307 |
-
}
|
1308 |
-
else{
|
1309 |
-
jQuery("#compare_time_conteiner").css({'float': 'none','width': '36.6%','position': 'absolute','right':'2.3%',"top": "35px"});
|
1310 |
-
jQuery('#compare_datepicker_wraper').width('98.5%');
|
1311 |
-
}
|
1312 |
-
|
1313 |
-
jQuery("#date_chart_conteiner").css({'position': 'absolute','float': 'none','right':'0'});
|
1314 |
-
jQuery(".gawd_date_filter_container").hide();
|
1315 |
-
jQuery("#date_chart_conteiner .gawd_row:first-child").hide();
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
var tab_name = window.location.href.split('tab=');
|
1319 |
-
d_start_date = start_date;
|
1320 |
-
d_end_date = end_date;
|
1321 |
-
d_second_start_date = start_date;
|
1322 |
-
d_second_end_date = end_date;
|
1323 |
-
d_metric_export = metric_export;
|
1324 |
-
d_metric_compare_export = metric_compare_export;
|
1325 |
-
d_dimension_export = dimension_export;
|
1326 |
-
d_custom = customReport,
|
1327 |
-
d_tab_name = tab_name;
|
1328 |
-
d_filter_type = filter_type;
|
1329 |
-
jQuery("#gbox_griddiv").remove();
|
1330 |
-
var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
1331 |
-
jQuery('.gawd_chart_conteiner').append(grid);
|
1332 |
-
|
1333 |
-
if (typeof data_of_compared != 'undefined' && typeof data_of_compared['chart_data'] != 'undefined' && (dimension == "pagePath" || dimension == "landingPagePath")) {
|
1334 |
-
gawd_compare();
|
1335 |
-
return;
|
1336 |
-
}
|
1337 |
-
gawd_draw_table(data, metric, metric_compare, dimension);
|
1338 |
-
|
1339 |
});
|
1340 |
}
|
1341 |
|
@@ -1637,7 +556,7 @@ function gawd_widget_real_time(chart_id) {
|
|
1637 |
if (typeof result.rows != 'undefined') {
|
1638 |
jQuery('#chartdiv').append('<div id="realtime_map" style="height:500px;"></div>');
|
1639 |
|
1640 |
-
show_realtime_map(country_data);
|
1641 |
}
|
1642 |
gawd_draw_table(array, 'Active Users', 0, 'Active Page')
|
1643 |
}
|
@@ -1667,95 +586,6 @@ function gawd_widget_all(start_date, end_date, metric) {
|
|
1667 |
security: gawd_admin.ajaxnonce,
|
1668 |
metric: metric,
|
1669 |
}).done(function (data) {
|
1670 |
-
var data = JSON.parse(data);
|
1671 |
-
data = data.chart_data;
|
1672 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
1673 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
1674 |
-
metric = metric.replace(/ +/g, ' ');
|
1675 |
-
var chartOptions = {
|
1676 |
-
"dataProvider": data,
|
1677 |
-
"type": "serial",
|
1678 |
-
"theme": "light",
|
1679 |
-
"percentPrecision": 1,
|
1680 |
-
"precision": 0,
|
1681 |
-
"export": {
|
1682 |
-
"enabled": true
|
1683 |
-
},
|
1684 |
-
"dataDateFormat": "YYYY-MM-DD",
|
1685 |
-
"valueAxes": [{
|
1686 |
-
"id": "g1",
|
1687 |
-
"axisAlpha": 0.4,
|
1688 |
-
"position": "left",
|
1689 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
1690 |
-
"ignoreAxisWidth": false,
|
1691 |
-
"boldLabels": true,
|
1692 |
-
"minimum":0
|
1693 |
-
}],
|
1694 |
-
"graphs": [{
|
1695 |
-
"type": 'line',
|
1696 |
-
"valueAxis": "g1",
|
1697 |
-
"bullet": "round",
|
1698 |
-
"bulletBorderAlpha": 1,
|
1699 |
-
"bulletColor": "#FFFFFF",
|
1700 |
-
"bulletSize": 5,
|
1701 |
-
"balloonFunction": function (graphDataItem, graph) {
|
1702 |
-
var dimension = 'Date';
|
1703 |
-
var week = weekdays[new Date(graphDataItem.category).getDay()] + ', ';
|
1704 |
-
var date = graphDataItem.dataContext[dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1)]
|
1705 |
-
date = typeof date == 'undefined' ? graphDataItem.category : date;
|
1706 |
-
date = date == 0 ? dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1) : date;
|
1707 |
-
var metric_value = graphDataItem.dataContext[metric].toLocaleString();
|
1708 |
-
if(metric == 'Avg Session Duration'){
|
1709 |
-
metric_value = sec_to_normal(metric_value);
|
1710 |
-
}
|
1711 |
-
else if(metric == 'Bounce Rate' || metric == 'Percent New Sessions'){
|
1712 |
-
metric_value = parseFloat(metric_value).toFixed(2) + '%';
|
1713 |
-
}
|
1714 |
-
if(gawd_admin.default_date_format == 'ymd_without_week'){
|
1715 |
-
week = '';
|
1716 |
-
}
|
1717 |
-
else if(gawd_admin.default_date_format == 'month_name_without_week' || gawd_admin.default_date_format == 'month_name_with_week'){
|
1718 |
-
var dates = date.split('-');
|
1719 |
-
if(typeof dates != 'undefined' && dates.length>2){
|
1720 |
-
dates[1] = dates[1].indexOf('0') == 0 ? dates[1].substring(1) : dates[1];
|
1721 |
-
dates[2] = dates[2].indexOf('0') == 0 ? dates[2].substring(1) : dates[2];
|
1722 |
-
date = monthnames[dates[1]] + ' ' + dates[2] + ', ' + dates[0];
|
1723 |
-
}
|
1724 |
-
if(gawd_admin.default_date_format == 'month_name_without_week'){
|
1725 |
-
week = '';
|
1726 |
-
}
|
1727 |
-
}
|
1728 |
-
return "<div style='margin:10px; text-align:left'>" + week + "<span style='font-size:11px'>" + date + "</span><br><span style='font-size:11px'></span><br><span style='font-size:11px' class='chart_point_hover_metric'>" + metric + ': ' + metric_value + "</span></div>"
|
1729 |
-
},
|
1730 |
-
//"hideBulletsCount": 50,
|
1731 |
-
"lineThickness": 2,
|
1732 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
1733 |
-
"useLineColorForBulletBorder": true,
|
1734 |
-
"valueField": metric,
|
1735 |
-
}],
|
1736 |
-
"chartCursor": {
|
1737 |
-
"pan": true,
|
1738 |
-
"valueLineEnabled": true,
|
1739 |
-
"valueLineBalloonEnabled": true,
|
1740 |
-
"cursorAlpha": 1,
|
1741 |
-
"cursorColor": "#258cbb",
|
1742 |
-
"limitToGraph": "g1",
|
1743 |
-
"valueLineAlpha": 0.2
|
1744 |
-
},
|
1745 |
-
"categoryField": 'Date',
|
1746 |
-
"categoryAxis": {
|
1747 |
-
"parseDates": true,
|
1748 |
-
"dashLength": 1,
|
1749 |
-
"minorGridEnabled": true
|
1750 |
-
}
|
1751 |
-
}
|
1752 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
1753 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
1754 |
-
valueAxes["maximum"] = 100;
|
1755 |
-
}
|
1756 |
-
var chart = AmCharts.makeChart("chart_widget", chartOptions)
|
1757 |
-
jQuery("#chart_widget").find('a').remove();
|
1758 |
-
|
1759 |
})
|
1760 |
}
|
1761 |
function gawd_pie_chart() {
|
@@ -1830,144 +660,7 @@ function gawd_pie_chart() {
|
|
1830 |
jQuery('#opacity_div').show();
|
1831 |
jQuery('#loading_div').show();
|
1832 |
}
|
1833 |
-
}).done(function
|
1834 |
-
jQuery('#opacity_div').hide();
|
1835 |
-
jQuery('#loading_div').hide();
|
1836 |
-
var result = JSON.parse(data);
|
1837 |
-
_data = result;
|
1838 |
-
|
1839 |
-
if (result.error_message != undefined) {
|
1840 |
-
var not_exist = '<div id="gawd_error">' + result.error_message + '</div>';
|
1841 |
-
if (typeof jQuery('#gawd_error') == 'undefined') {
|
1842 |
-
jQuery('#chartdiv').append(not_exist);
|
1843 |
-
}
|
1844 |
-
return;
|
1845 |
-
}
|
1846 |
-
if (result.chart_data) {
|
1847 |
-
result = result.chart_data;
|
1848 |
-
}
|
1849 |
-
if (result.length > 25) {
|
1850 |
-
jQuery('#chartdiv').height(1000);
|
1851 |
-
}
|
1852 |
-
if (dimension == 'goals') {
|
1853 |
-
dimension = 'date';
|
1854 |
-
}
|
1855 |
-
if (dimension == 'date' || dimension == 'siteSpeed' || dimension == 'adsense' || dimension == 'sales_performance') {
|
1856 |
-
//jQuery("#compare_time_conteiner").show();
|
1857 |
-
var dimension_export = dimension;
|
1858 |
-
if (filter_type == '' || typeof filter_type == 'undefined') {
|
1859 |
-
dimension = 'date';
|
1860 |
-
} else {
|
1861 |
-
dimension = filter_type;
|
1862 |
-
}
|
1863 |
-
|
1864 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1);
|
1865 |
-
}
|
1866 |
-
else {
|
1867 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1);
|
1868 |
-
var dimension_export = dimension;
|
1869 |
-
}
|
1870 |
-
|
1871 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
1872 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
1873 |
-
metric = metric.replace(/ +/g, ' ');
|
1874 |
-
var a = '';
|
1875 |
-
var baloon = true
|
1876 |
-
if(metric == "Bounce Rate" || metric == "Percent New Sessions"){
|
1877 |
-
a = '[[title]]: [[value]]%';
|
1878 |
-
baloon = false;
|
1879 |
-
}
|
1880 |
-
var metric_export = metric;
|
1881 |
-
var metric_compare_export = '';
|
1882 |
-
var filter_type = '';
|
1883 |
-
if(dimension.indexOf('Dimension') != -1){
|
1884 |
-
dimension = jQuery('#gawd_custom_option option:selected').text();
|
1885 |
-
}
|
1886 |
-
AmCharts.addInitHandler(function(chart) {
|
1887 |
-
if (chart.legend === undefined || chart.legend.truncateLabels === undefined)
|
1888 |
-
return;
|
1889 |
-
|
1890 |
-
// init fields
|
1891 |
-
var titleField = chart.titleField;
|
1892 |
-
var legendTitleField = chart.titleField+"Legend";
|
1893 |
-
|
1894 |
-
// iterate through the data and create truncated label properties
|
1895 |
-
for(var i = 0; i < chart.dataProvider.length; i++) {
|
1896 |
-
var label = chart.dataProvider[i][chart.titleField];
|
1897 |
-
if (label.length > chart.legend.truncateLabels)
|
1898 |
-
label = label.substr(0, chart.legend.truncateLabels-1)+'...'
|
1899 |
-
chart.dataProvider[i][legendTitleField] = label;
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
// replace chart.titleField to show our own truncated field
|
1903 |
-
chart.titleField = legendTitleField;
|
1904 |
-
|
1905 |
-
// make the balloonText use full title instead
|
1906 |
-
|
1907 |
-
chart.balloonText = chart.balloonText.replace(/\[\[title\]\]/, "[["+titleField+"]]");
|
1908 |
-
|
1909 |
-
}, ["pie"]);
|
1910 |
-
var chart = AmCharts.makeChart("chartdiv", {
|
1911 |
-
"type": "pie",
|
1912 |
-
"theme": "light",
|
1913 |
-
'labelsEnabled': labels_enabled,
|
1914 |
-
a,
|
1915 |
-
'sequencedAnimation': false,
|
1916 |
-
"dataProvider": result,
|
1917 |
-
"valueField": metric,
|
1918 |
-
"titleField": dimension,
|
1919 |
-
"autoResize": true,
|
1920 |
-
"depth3D": 15,
|
1921 |
-
"angle": 30,
|
1922 |
-
"startDuration": 0,
|
1923 |
-
"percentPrecision": 1,
|
1924 |
-
"precision": 0,
|
1925 |
-
"balloon": {
|
1926 |
-
"enabled": baloon
|
1927 |
-
},
|
1928 |
-
'groupPercent': 1,
|
1929 |
-
'marginTop': 0,
|
1930 |
-
"legend": {
|
1931 |
-
"enabled": true,
|
1932 |
-
"align": "center",
|
1933 |
-
"markerType": "circle",
|
1934 |
-
"truncateLabels": 25, // custom parameter
|
1935 |
-
|
1936 |
-
'valueText': metric == "Bounce Rate" || metric == "Percent New Sessions" ? '[[value]]%' : '[[value]]',
|
1937 |
-
"valueAlign": "left"
|
1938 |
-
},
|
1939 |
-
"zoomControl": {
|
1940 |
-
"zoomControlEnabled": false
|
1941 |
-
}
|
1942 |
-
});
|
1943 |
-
//CANVAS//
|
1944 |
-
var tab_name = window.location.href.split('tab=');
|
1945 |
-
if (tab_name[1] != 'pagePath' && tab_name[1] != 'landingPagePath' && tab_name[1] != 'daysToTransaction') {
|
1946 |
-
jQuery("#chartdiv").find('a').remove();
|
1947 |
-
jQuery('svg').find('desc').remove();
|
1948 |
-
var svg = document.getElementsByTagName('svg')[0];
|
1949 |
-
var canvas = document.getElementById("canvass");
|
1950 |
-
draw_canvas(svg, canvas);
|
1951 |
-
url = canvas.toDataURL();
|
1952 |
-
}
|
1953 |
-
if (typeof url == 'undefined') {
|
1954 |
-
url = '';
|
1955 |
-
}
|
1956 |
-
//CANVAS URL//
|
1957 |
-
|
1958 |
-
d_start_date = start_date;
|
1959 |
-
d_end_date = end_date;
|
1960 |
-
d_metric_export = metric_export;
|
1961 |
-
d_metric_compare_export = metric_compare_export;
|
1962 |
-
d_dimension_export = dimension_export;
|
1963 |
-
d_tab_name = tab_name;
|
1964 |
-
d_filter_type = filter_type;
|
1965 |
-
|
1966 |
-
jQuery("#gbox_griddiv").remove();
|
1967 |
-
var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
1968 |
-
jQuery('.gawd_chart_conteiner').append(grid);
|
1969 |
-
gawd_draw_table(data, metric, metric_compare, dimension);
|
1970 |
-
})
|
1971 |
}
|
1972 |
function gawd_pie_chart_compact(metric, dimension, chart_type, chart_id) {
|
1973 |
var _end_date = (moment().subtract(1, 'day')).format("YYYY-MM-DD");
|
@@ -1991,88 +684,6 @@ function gawd_pie_chart_compact(metric, dimension, chart_type, chart_id) {
|
|
1991 |
jQuery('#' + chart_id).closest(".postbox").find('.loading_div_compact').show();
|
1992 |
}
|
1993 |
}).done(function (data) {
|
1994 |
-
jQuery('#' + chart_id).closest(".postbox").find('.opacity_div_compact').hide();
|
1995 |
-
jQuery('#' + chart_id).closest(".postbox").find('.loading_div_compact').hide();
|
1996 |
-
var result = JSON.parse(data);
|
1997 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim();
|
1998 |
-
dimension = dimension.charAt(0).toUpperCase() + dimension.slice(1);
|
1999 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
2000 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
2001 |
-
metric = metric.replace(/ +/g, ' ');
|
2002 |
-
if(typeof result.data_sum != 'undefined'){
|
2003 |
-
var total = result.data_sum[metric];
|
2004 |
-
var avg = '';
|
2005 |
-
var diff = ((new Date(end_date).getTime() - new Date(start_date).getTime()) / 3600 / 24 / 1000)+1;
|
2006 |
-
var show_hide = 'gawd_show_total';
|
2007 |
-
if(metric == 'Bounce Rate' || metric == 'Percent New Sessions' || metric == 'Pageviews Per Session'){
|
2008 |
-
avg = parseFloat(total).toFixed(2);
|
2009 |
-
if(metric != 'Pageviews Per Session'){
|
2010 |
-
avg = avg + '%';
|
2011 |
-
}
|
2012 |
-
show_hide = 'gawd_hide_total';
|
2013 |
-
}
|
2014 |
-
else if(metric == 'Avg Session Duration'){
|
2015 |
-
avg = sec_to_normal(avg);
|
2016 |
-
show_hide = 'gawd_hide_total';
|
2017 |
-
}
|
2018 |
-
else{
|
2019 |
-
//avg = Math.ceil(total/diff);
|
2020 |
-
avg = parseFloat(total/diff).toFixed(2);
|
2021 |
-
}
|
2022 |
-
var percent_color = total == 0 || metric == 'Bounce Rate' ? "gawd_red" : "gawd_green";
|
2023 |
-
jQuery('#_sum_' + chart_id).remove();
|
2024 |
-
var sumBox = "<div class='_sum_box' id='_sum_" + chart_id + "'>";
|
2025 |
-
var metric_title = metric == 'Percent New Sessions' ? '% New Sessions' : metric;
|
2026 |
-
sumBox += "<div class='box_metric'>" + metric_title + "</div>"
|
2027 |
-
sumBox += "<div class='_box_left " + show_hide + "'>";
|
2028 |
-
sumBox += "<div class='box_title'>Total</div>";
|
2029 |
-
sumBox += "<div class='" + percent_color + "'>" + parseInt(total).toLocaleString() + "</div>";
|
2030 |
-
sumBox += "</div>";
|
2031 |
-
|
2032 |
-
sumBox += "<div class='_box_right'>";
|
2033 |
-
sumBox += "<div class='box_title'>Average</div>";
|
2034 |
-
sumBox += "<div class='" + percent_color + "'>" + avg + "</div>";
|
2035 |
-
sumBox += "</div>";
|
2036 |
-
sumBox += "<div class='clear'></div>";
|
2037 |
-
sumBox += "</div>";
|
2038 |
-
jQuery('#'+chart_id).after(sumBox);
|
2039 |
-
}
|
2040 |
-
result = result.chart_data;
|
2041 |
-
var chart = AmCharts.makeChart(chart_id, {
|
2042 |
-
|
2043 |
-
"type": "pie",
|
2044 |
-
"theme": "light",
|
2045 |
-
"angle": 25,
|
2046 |
-
"depth3D": 12,
|
2047 |
-
'sequencedAnimation': false,
|
2048 |
-
"dataProvider": result,
|
2049 |
-
"valueField": metric,
|
2050 |
-
"titleField": dimension,
|
2051 |
-
"autoResize": true,
|
2052 |
-
"minRadius": 60,
|
2053 |
-
"startDuration": 0,
|
2054 |
-
"percentPrecision": 1,
|
2055 |
-
"precision": 0,
|
2056 |
-
"maxLabelWidth": 70,
|
2057 |
-
'groupPercent': 5,
|
2058 |
-
"export": {
|
2059 |
-
"enabled": true
|
2060 |
-
},
|
2061 |
-
"responsive": {
|
2062 |
-
"enabled": true
|
2063 |
-
},
|
2064 |
-
"legend": {
|
2065 |
-
"enabled": true,
|
2066 |
-
"align": "center",
|
2067 |
-
"markerType": "circle",
|
2068 |
-
"valueAlign": "left",
|
2069 |
-
},
|
2070 |
-
"zoomControl": {
|
2071 |
-
"zoomControlEnabled": false
|
2072 |
-
}
|
2073 |
-
});
|
2074 |
-
//jQuery("#" + chart_id).find('a').remove();
|
2075 |
-
|
2076 |
})
|
2077 |
}
|
2078 |
function gawd_pie_chart_post_page(uri, divID) {
|
@@ -2153,73 +764,8 @@ function gawd_pie_chart_post_page(uri, divID) {
|
|
2153 |
security: gawd_admin.ajaxnonce,
|
2154 |
filter: uri,
|
2155 |
chart: 'pie',
|
2156 |
-
}).done(function (data)
|
2157 |
-
|
2158 |
-
jQuery(".loading_div_compact").hide();
|
2159 |
-
if (divID == 'gawd_post_page_popup') {
|
2160 |
-
jQuery("#loading_div").hide();
|
2161 |
-
jQuery(".gawd_btn").show();
|
2162 |
-
jQuery('#opacity_div, .gawd_btn').on('click', function () {
|
2163 |
-
jQuery('#opacity_div').remove();
|
2164 |
-
jQuery(".gawd_btn").remove();
|
2165 |
-
jQuery(".page_chart_div").remove();
|
2166 |
-
jQuery("#loading_div").remove();
|
2167 |
-
})
|
2168 |
-
}
|
2169 |
-
var result = JSON.parse(data);
|
2170 |
-
result = result.chart_data
|
2171 |
-
var diff = ((new Date(start_end_date[1]).getTime() - new Date(start_end_date[0]).getTime()) / 3600 / 24 / 1000)+1;
|
2172 |
-
if(diff > 8){
|
2173 |
-
dimension = 'Week';
|
2174 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
2175 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
2176 |
-
metric = metric.replace(/ +/g, ' ');
|
2177 |
-
}
|
2178 |
-
if(diff > 60){
|
2179 |
-
dimension = 'Month';
|
2180 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
2181 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
2182 |
-
metric = metric.replace(/ +/g, ' ');
|
2183 |
-
}
|
2184 |
-
var labelText = '';
|
2185 |
-
if(metric == "Bounce Rate" || metric == "Percent New Sessions"){
|
2186 |
-
labelText = '[[title]]: [[value]]%';
|
2187 |
-
}
|
2188 |
-
|
2189 |
-
var chart = AmCharts.makeChart(divID, {
|
2190 |
-
"type": "pie",
|
2191 |
-
"theme": "light",
|
2192 |
-
'sequencedAnimation': false,
|
2193 |
-
"dataProvider": result,
|
2194 |
-
"valueField": metric,
|
2195 |
-
"titleField": dimension,
|
2196 |
-
labelText,
|
2197 |
-
"depth3D": 15,
|
2198 |
-
"angle": 30,
|
2199 |
-
"minRadius": 70,
|
2200 |
-
"startDuration": 0,
|
2201 |
-
"percentPrecision": 1,
|
2202 |
-
"precision": 0,
|
2203 |
-
"balloon": {
|
2204 |
-
"enabled": false
|
2205 |
-
},
|
2206 |
-
'groupPercent': 1,
|
2207 |
-
'marginTop': 0,
|
2208 |
-
"export": {
|
2209 |
-
"enabled": true
|
2210 |
-
},
|
2211 |
-
"legend": {
|
2212 |
-
"enabled": true,
|
2213 |
-
"align": "center",
|
2214 |
-
"markerType": "circle",
|
2215 |
-
'switchable': false,
|
2216 |
-
'valueText': metric == "Bounce Rate" || metric == "Percent New Sessions" ? '[[value]]%' : '[[value]]',
|
2217 |
-
},
|
2218 |
-
"zoomControl": {
|
2219 |
-
"zoomControlEnabled": false
|
2220 |
-
}
|
2221 |
-
});
|
2222 |
-
jQuery("#" + divID).find('a').remove();
|
2223 |
//jQuery("#gbox_griddiv").remove();
|
2224 |
//var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
2225 |
//jQuery('.gawd_chart_conteiner').append(grid);
|
@@ -2384,108 +930,6 @@ function post_page_stats(uri, divID) {
|
|
2384 |
filter: uri,
|
2385 |
chart: 'line',
|
2386 |
}).done(function (data) {
|
2387 |
-
var data = JSON.parse(data);
|
2388 |
-
data = data.chart_data ? data.chart_data : data;
|
2389 |
-
jQuery(".opacity_div_compact").hide();
|
2390 |
-
jQuery(".loading_div_compact").hide();
|
2391 |
-
if (divID == 'gawd_post_page_popup') {
|
2392 |
-
jQuery("#loading_div").hide();
|
2393 |
-
jQuery(".gawd_btn").show();
|
2394 |
-
jQuery('#opacity_div, .gawd_btn').on('click', function () {
|
2395 |
-
jQuery('#opacity_div').remove();
|
2396 |
-
jQuery(".gawd_btn").remove();
|
2397 |
-
jQuery(".page_chart_div").remove();
|
2398 |
-
jQuery("#loading_div").remove();
|
2399 |
-
})
|
2400 |
-
}
|
2401 |
-
var chartOptions = {
|
2402 |
-
"dataProvider": data,
|
2403 |
-
"type": "serial",
|
2404 |
-
"theme": "light",
|
2405 |
-
"percentPrecision": 1,
|
2406 |
-
"precision": 0,
|
2407 |
-
"export": {
|
2408 |
-
"enabled": true
|
2409 |
-
},
|
2410 |
-
"dataDateFormat": "YYYY-MM-DD",
|
2411 |
-
"valueAxes": [{
|
2412 |
-
"id": "g1",
|
2413 |
-
"axisAlpha": 0.4,
|
2414 |
-
"position": "left",
|
2415 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
2416 |
-
"ignoreAxisWidth": false,
|
2417 |
-
|
2418 |
-
}],
|
2419 |
-
"graphs": [{
|
2420 |
-
"type": chartType,
|
2421 |
-
"valueAxis": "g1",
|
2422 |
-
"fillAlphas": fillAlphas,
|
2423 |
-
"bullet": "round",
|
2424 |
-
"bulletBorderAlpha": 1,
|
2425 |
-
"bulletColor": "#FFFFFF",
|
2426 |
-
"bulletSize": 5,
|
2427 |
-
//"hideBulletsCount": 50,
|
2428 |
-
"lineThickness": 2,
|
2429 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
2430 |
-
"useLineColorForBulletBorder": true,
|
2431 |
-
"valueField": metric,
|
2432 |
-
"balloonFunction": function (graphDataItem, graph) {
|
2433 |
-
var dimension = 'date';
|
2434 |
-
var week = weekdays[new Date(graphDataItem.category).getDay()] + ', ';
|
2435 |
-
var date = graphDataItem.dataContext[dimension];
|
2436 |
-
date = typeof date == 'undefined' ? graphDataItem.category : date;
|
2437 |
-
date = date == 0 ? dimension.replace(/([A-Z])/g, " $1").trim().charAt(0).toUpperCase() + dimension.replace(/([A-Z])/g, " $1").trim().slice(1) : date;
|
2438 |
-
var metric_value = graphDataItem.dataContext[metric].toLocaleString();
|
2439 |
-
if(metric == 'Avg Session Duration'){
|
2440 |
-
metric_value = sec_to_normal(metric_value);
|
2441 |
-
}
|
2442 |
-
else if(metric == 'Bounce Rate' || metric == 'Percent New Sessions'){
|
2443 |
-
metric_value = parseFloat(metric_value).toFixed(2) + '%';
|
2444 |
-
}
|
2445 |
-
if(gawd_admin.default_date_format == 'ymd_without_week'){
|
2446 |
-
week = '';
|
2447 |
-
}
|
2448 |
-
else if(gawd_admin.default_date_format == 'month_name_without_week' || gawd_admin.default_date_format == 'month_name_with_week'){
|
2449 |
-
var dates = date.split('-');
|
2450 |
-
if(typeof dates != 'undefined' && dates.length>2){
|
2451 |
-
dates[2] = dates[2].indexOf('0') == 0 ? dates[2].substring(1) : dates[2];
|
2452 |
-
dates[1] = dates[1].indexOf('0') == 0 ? dates[1].substring(1) : dates[1];
|
2453 |
-
date = monthnames[dates[1]] + ' ' + dates[2] + ', ' + dates[0];
|
2454 |
-
}
|
2455 |
-
if(gawd_admin.default_date_format == 'month_name_without_week'){
|
2456 |
-
week = '';
|
2457 |
-
}
|
2458 |
-
}
|
2459 |
-
return "<div style='margin:10px; text-align:left'>" + week + "<span style='font-size:11px'>" + date + "</span><br><span style='font-size:11px'></span><br><span style='font-size:11px' class='chart_point_hover_metric'>" + metric + ': ' + metric_value + "</span></div>"
|
2460 |
-
},
|
2461 |
-
}],
|
2462 |
-
"chartCursor": {
|
2463 |
-
"pan": true,
|
2464 |
-
"valueLineEnabled": true,
|
2465 |
-
"valueLineBalloonEnabled": true,
|
2466 |
-
"cursorAlpha": 1,
|
2467 |
-
"cursorColor": "#258cbb",
|
2468 |
-
"limitToGraph": "g1",
|
2469 |
-
"valueLineAlpha": 0.2
|
2470 |
-
},
|
2471 |
-
"categoryField": dimension,
|
2472 |
-
"categoryAxis": {
|
2473 |
-
"parseDates": true,
|
2474 |
-
"equalSpacing": true,
|
2475 |
-
"dashLength": 2,
|
2476 |
-
"minorGridEnabled": true,
|
2477 |
-
"boldLabels": true,
|
2478 |
-
"labelFrequency": 1,
|
2479 |
-
|
2480 |
-
}
|
2481 |
-
}
|
2482 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
2483 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
2484 |
-
valueAxes["maximum"] = 100;
|
2485 |
-
}
|
2486 |
-
var chart = AmCharts.makeChart(divID, chartOptions)
|
2487 |
-
jQuery("#" + divID).find('a').remove();
|
2488 |
-
jQuery("#" + divID).find('desc').remove();
|
2489 |
})
|
2490 |
}
|
2491 |
function show_hide(obj) {
|
@@ -3631,120 +2075,6 @@ function gawd_draw_analytics_country(country_name, geo_type) {
|
|
3631 |
jQuery('#loading_div').show();
|
3632 |
}
|
3633 |
}).done(function (data) {
|
3634 |
-
jQuery('#opacity_div').hide();
|
3635 |
-
jQuery('#loading_div').hide();
|
3636 |
-
var result = JSON.parse(data).chart_data;
|
3637 |
-
jQuery("#chartdiv").show();
|
3638 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
3639 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
3640 |
-
metric = metric.replace(/ +/g, ' ');
|
3641 |
-
metric_compare = metric_compare.replace(/([A-Z])/g, " $1").trim();
|
3642 |
-
metric_compare = metric_compare.charAt(0).toUpperCase() + metric_compare.slice(1);
|
3643 |
-
metric_compare = metric_compare.replace(/ +/g, ' ');
|
3644 |
-
dimension = dimension.replace(/([A-Z])/g, " $1").trim();
|
3645 |
-
dimension = dimension.charAt(0).toUpperCase() + dimension.slice(1);
|
3646 |
-
filter_type = '';
|
3647 |
-
var chartOptions = {
|
3648 |
-
"dataProvider": result,
|
3649 |
-
"type": "serial",
|
3650 |
-
"theme": "light",
|
3651 |
-
"percentPrecision": 1,
|
3652 |
-
"precision": 0,
|
3653 |
-
"export": {
|
3654 |
-
"enabled": true
|
3655 |
-
},
|
3656 |
-
"dataDateFormat": "YYYY-MM-DD",
|
3657 |
-
"valueAxes": [{
|
3658 |
-
"id": "g1",
|
3659 |
-
"axisAlpha": 0.4,
|
3660 |
-
"position": "left",
|
3661 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
3662 |
-
"ignoreAxisWidth": false,
|
3663 |
-
"boldLabels": true,
|
3664 |
-
|
3665 |
-
}],
|
3666 |
-
"graphs": [{
|
3667 |
-
"type": chartType,
|
3668 |
-
"fillAlphas": fillAlphas,
|
3669 |
-
"valueAxis": "g1",
|
3670 |
-
"bullet": "round",
|
3671 |
-
"bulletBorderAlpha": 1,
|
3672 |
-
"bulletColor": "#FFFFFF",
|
3673 |
-
"bulletSize": 5,
|
3674 |
-
//"hideBulletsCount": 50,
|
3675 |
-
"lineThickness": 2,
|
3676 |
-
"title": metric == "Percent New Sessions" ? '% New Sessions' : metric,
|
3677 |
-
"useLineColorForBulletBorder": true,
|
3678 |
-
"valueField": metric,
|
3679 |
-
}, {
|
3680 |
-
"bullet": "round",
|
3681 |
-
"bulletBorderAlpha": 1,
|
3682 |
-
"bulletColor": "#FFFFFF",
|
3683 |
-
"bulletSize": 5,
|
3684 |
-
'showBalloon': true,
|
3685 |
-
//"hideBulletsCount": 50,
|
3686 |
-
"lineThickness": 2,
|
3687 |
-
"title": metric_compare == "Percent New Sessions" ? '% New Sessions' : metric_compare,
|
3688 |
-
"useLineColorForBulletBorder": true,
|
3689 |
-
"valueField": metric_compare,
|
3690 |
-
}],
|
3691 |
-
"chartCursor": {
|
3692 |
-
"pan": true,
|
3693 |
-
"valueLineEnabled": true,
|
3694 |
-
"valueLineBalloonEnabled": true,
|
3695 |
-
"cursorAlpha": 1,
|
3696 |
-
"cursorColor": "#258cbb",
|
3697 |
-
"limitToGraph": "g1",
|
3698 |
-
"valueLineAlpha": 0.2
|
3699 |
-
},
|
3700 |
-
"categoryField": dimension,
|
3701 |
-
"categoryAxis": {
|
3702 |
-
"autoRotateCount": 10,
|
3703 |
-
"autoRotateAngle": 45,
|
3704 |
-
"parseDates": false,
|
3705 |
-
"dashLength": 1,
|
3706 |
-
"minorGridEnabled": true
|
3707 |
-
},
|
3708 |
-
"legend": {
|
3709 |
-
'switchable': false
|
3710 |
-
},
|
3711 |
-
"zoomControl": {
|
3712 |
-
"zoomControlEnabled": false
|
3713 |
-
}
|
3714 |
-
|
3715 |
-
}
|
3716 |
-
if(metric == "Percent New Sessions" || metric == "Bounce Rate"){
|
3717 |
-
var valueAxes = chartOptions["valueAxes"][0];
|
3718 |
-
valueAxes["maximum"] = 100;
|
3719 |
-
}
|
3720 |
-
if(typeof chartOptions["valueAxes"][1] != "undefined" && (metric + ' compare' == "Percent New Sessions compare" || metric + ' compare' == "Bounce Rate compare")){
|
3721 |
-
var valueAxes = chartOptions["valueAxes"][1];
|
3722 |
-
valueAxes["maximum"] = 100;
|
3723 |
-
}
|
3724 |
-
var chart = AmCharts.makeChart("chartdiv", chartOptions);
|
3725 |
-
jQuery('#chartdiv').find('a').remove();
|
3726 |
-
if (metric_compare == 0) {
|
3727 |
-
jQuery('.amChartsLegend svg g g g:last-child').hide();
|
3728 |
-
}
|
3729 |
-
var tab_name = window.location.href.split('tab=');
|
3730 |
-
|
3731 |
-
d_start_date = start_date;
|
3732 |
-
d_end_date = end_date;
|
3733 |
-
d_metric_export = metric_export;
|
3734 |
-
d_metric_compare_export = metric_compare_export;
|
3735 |
-
d_dimension_export = dimension_export;
|
3736 |
-
|
3737 |
-
d_tab_name = tab_name;
|
3738 |
-
d_filter_type = filter_type;
|
3739 |
-
d_country_filter = country_name;
|
3740 |
-
d_geo_type = geo_type;
|
3741 |
-
/* jQuery("#gbox_griddiv").remove();
|
3742 |
-
var grid = '<table id="griddiv"></table>';
|
3743 |
-
jQuery('.gawd_chart_conteiner').append(grid); */
|
3744 |
-
jQuery("#gbox_griddiv").remove();
|
3745 |
-
var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
3746 |
-
jQuery('.gawd_chart_conteiner').append(grid);
|
3747 |
-
gawd_draw_table(data, metric, metric_compare, dimension);
|
3748 |
})
|
3749 |
}
|
3750 |
|
@@ -3798,75 +2128,6 @@ function gawd_draw_analytics_country_pie(country_name, geo_type) {
|
|
3798 |
jQuery('#loading_div').show();
|
3799 |
}
|
3800 |
}).done(function (data) {
|
3801 |
-
jQuery('#opacity_div').hide();
|
3802 |
-
jQuery('#loading_div').hide();
|
3803 |
-
var result = JSON.parse(data).chart_data;
|
3804 |
-
jQuery("#chartdiv").show();
|
3805 |
-
var dimension_export = dimension;
|
3806 |
-
var metric_export = metric;
|
3807 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
3808 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
3809 |
-
metric = metric.replace(/ +/g, ' ');
|
3810 |
-
var metric_compare_export = '';
|
3811 |
-
var filter_type = '';
|
3812 |
-
var chart = AmCharts.makeChart("chartdiv", {
|
3813 |
-
"type": "pie",
|
3814 |
-
"theme": "light",
|
3815 |
-
'sequencedAnimation': false,
|
3816 |
-
"dataProvider": result,
|
3817 |
-
"valueField": metric,
|
3818 |
-
"titleField": dimension,
|
3819 |
-
"depth3D": 15,
|
3820 |
-
"angle": 30,
|
3821 |
-
"startDuration": 0,
|
3822 |
-
"percentPrecision": 1,
|
3823 |
-
"precision": 0,
|
3824 |
-
"balloon": {
|
3825 |
-
"fixedPosition": true
|
3826 |
-
},
|
3827 |
-
'groupPercent': 1,
|
3828 |
-
'marginTop': 0,
|
3829 |
-
"legend": {
|
3830 |
-
"enabled": true,
|
3831 |
-
"align": "center",
|
3832 |
-
"markerType": "circle",
|
3833 |
-
"equalWidths": false,
|
3834 |
-
'switchable': false,
|
3835 |
-
'valueText': metric == "Bounce Rate" || metric == "Percent New Sessions" ? '[[value]]%' : '[[value]]',
|
3836 |
-
},
|
3837 |
-
"zoomControl": {
|
3838 |
-
"zoomControlEnabled": false
|
3839 |
-
}
|
3840 |
-
});
|
3841 |
-
//CANVAS//
|
3842 |
-
var tab_name = window.location.href.split('tab=');
|
3843 |
-
if (tab_name[1] != 'pagePath' && tab_name[1] != 'daysToTransaction') {
|
3844 |
-
jQuery("#chartdiv").find('a').remove();
|
3845 |
-
jQuery('svg').find('desc').remove();
|
3846 |
-
var svg = document.getElementsByTagName('svg')[0];
|
3847 |
-
var canvas = document.getElementById("canvass");
|
3848 |
-
draw_canvas(svg, canvas);
|
3849 |
-
url = canvas.toDataURL();
|
3850 |
-
}
|
3851 |
-
if (typeof url == 'undefined') {
|
3852 |
-
url = '';
|
3853 |
-
}
|
3854 |
-
//CANVAS URL//
|
3855 |
-
var tab_name = window.location.href.split('tab=');
|
3856 |
-
|
3857 |
-
d_start_date = start_date;
|
3858 |
-
d_end_date = end_date;
|
3859 |
-
d_metric_export = metric_export;
|
3860 |
-
d_metric_compare_export = metric_compare_export;
|
3861 |
-
d_dimension_export = dimension_export;
|
3862 |
-
d_tab_name = tab_name;
|
3863 |
-
d_filter_type = filter_type;
|
3864 |
-
d_country_filter = country_name;
|
3865 |
-
d_geo_type = geo_type;
|
3866 |
-
jQuery("#gbox_griddiv").remove();
|
3867 |
-
var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
3868 |
-
jQuery('.gawd_chart_conteiner').append(grid);
|
3869 |
-
gawd_draw_table(data, metric, metric_compare, dimension);
|
3870 |
})
|
3871 |
}
|
3872 |
function gawd_datepicker_main(start, end) {
|
102 |
jQuery('#opacity_div').show();
|
103 |
jQuery('#loading_div').show();
|
104 |
}
|
105 |
+
}).done(function (data){
|
106 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
function gawd_draw_analytics_compact(metric, metric_compare, dimension, chart_type, chart_id) {
|
109 |
var _end_date = (moment().subtract(1, 'day')).format("YYYY-MM-DD");
|
142 |
jQuery('#' + chart_id).closest(".postbox").find('.opacity_div_compact').show();
|
143 |
jQuery('#' + chart_id).closest(".postbox").find('.loading_div_compact').show();
|
144 |
}
|
145 |
+
}).done(function (result){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
})
|
147 |
}
|
148 |
|
255 |
jQuery('#loading_div').show();
|
256 |
}
|
257 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
});
|
259 |
}
|
260 |
|
556 |
if (typeof result.rows != 'undefined') {
|
557 |
jQuery('#chartdiv').append('<div id="realtime_map" style="height:500px;"></div>');
|
558 |
|
559 |
+
///show_realtime_map(country_data);
|
560 |
}
|
561 |
gawd_draw_table(array, 'Active Users', 0, 'Active Page')
|
562 |
}
|
586 |
security: gawd_admin.ajaxnonce,
|
587 |
metric: metric,
|
588 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
})
|
590 |
}
|
591 |
function gawd_pie_chart() {
|
660 |
jQuery('#opacity_div').show();
|
661 |
jQuery('#loading_div').show();
|
662 |
}
|
663 |
+
}).done(function(){})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
}
|
665 |
function gawd_pie_chart_compact(metric, dimension, chart_type, chart_id) {
|
666 |
var _end_date = (moment().subtract(1, 'day')).format("YYYY-MM-DD");
|
684 |
jQuery('#' + chart_id).closest(".postbox").find('.loading_div_compact').show();
|
685 |
}
|
686 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
})
|
688 |
}
|
689 |
function gawd_pie_chart_post_page(uri, divID) {
|
764 |
security: gawd_admin.ajaxnonce,
|
765 |
filter: uri,
|
766 |
chart: 'pie',
|
767 |
+
}).done(function (data)
|
768 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
//jQuery("#gbox_griddiv").remove();
|
770 |
//var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
771 |
//jQuery('.gawd_chart_conteiner').append(grid);
|
930 |
filter: uri,
|
931 |
chart: 'line',
|
932 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
})
|
934 |
}
|
935 |
function show_hide(obj) {
|
2075 |
jQuery('#loading_div').show();
|
2076 |
}
|
2077 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2078 |
})
|
2079 |
}
|
2080 |
|
2128 |
jQuery('#loading_div').show();
|
2129 |
}
|
2130 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2131 |
})
|
2132 |
}
|
2133 |
function gawd_datepicker_main(start, end) {
|
inc/js/gawd_front.js
CHANGED
@@ -79,64 +79,7 @@ function gawd_pie_chart_post_page_front(uri,divID){
|
|
79 |
chart: 'pie',
|
80 |
security: gawd_front.ajaxnonce,
|
81 |
filter: uri,
|
82 |
-
}).done(function (data) {
|
83 |
-
jQuery(".opacity_div_compact").hide();
|
84 |
-
jQuery(".loading_div_compact").hide();
|
85 |
-
if(divID == 'gawd_post_page_popup'){
|
86 |
-
jQuery( "#loading_div" ).remove();
|
87 |
-
jQuery( ".gawd_btn" ).show();
|
88 |
-
jQuery('#opacity_div, .gawd_btn').on('click', function(){
|
89 |
-
jQuery('#opacity_div').remove();
|
90 |
-
jQuery( ".gawd_btn" ).remove();
|
91 |
-
jQuery( ".page_chart_div" ).remove();
|
92 |
-
jQuery( "#loading_div" ).remove();
|
93 |
-
})
|
94 |
-
}
|
95 |
-
var result = JSON.parse(data);
|
96 |
-
result = result.chart_data ;
|
97 |
-
|
98 |
-
var date1 = new Date(dates[1]).getTime();
|
99 |
-
var date2 = new Date(dates[0]).getTime();
|
100 |
-
var diff = ((date1 - date2) / 3600 / 24 / 1000)+1;
|
101 |
-
if(diff > 8){
|
102 |
-
dimension = 'Week';
|
103 |
-
metric = metric.replace(/([A-Z])/g, " $1").trim();
|
104 |
-
metric = metric.charAt(0).toUpperCase() + metric.slice(1);
|
105 |
-
metric = metric.replace(/ +/g, ' ');
|
106 |
-
}
|
107 |
-
var chart = AmCharts.makeChart( divID, {
|
108 |
-
"type": "pie",
|
109 |
-
"theme": "light",
|
110 |
-
'sequencedAnimation': false,
|
111 |
-
"dataProvider": result,
|
112 |
-
"valueField": metric,
|
113 |
-
"titleField": dimension,
|
114 |
-
"depth3D": 15,
|
115 |
-
"angle": 30,
|
116 |
-
"minRadius": 70,
|
117 |
-
"startDuration": 0,
|
118 |
-
"percentPrecision": 1,
|
119 |
-
"precision": 0,
|
120 |
-
"balloon":{
|
121 |
-
"fixedPosition":true
|
122 |
-
},
|
123 |
-
'groupPercent': 1,
|
124 |
-
'marginTop': 0,
|
125 |
-
"export": {
|
126 |
-
"enabled": true
|
127 |
-
},
|
128 |
-
"legend": {
|
129 |
-
"enabled": true,
|
130 |
-
"align": "center",
|
131 |
-
"markerType": "circle",
|
132 |
-
},
|
133 |
-
} );
|
134 |
-
jQuery("#"+divID).find('a').remove();
|
135 |
-
//jQuery("#gbox_griddiv").remove();
|
136 |
-
//var grid = '<table id="griddiv"></table><div id="pager"></div>';
|
137 |
-
//jQuery('.gawd_chart_conteiner').append(grid);
|
138 |
-
//gawd_draw_table(result,metric,metric_compare,dimension);
|
139 |
-
})
|
140 |
}
|
141 |
function post_page_stats_front(uri,divID){
|
142 |
if(typeof divID == 'undefined'){
|
@@ -209,71 +152,5 @@ function post_page_stats_front(uri,divID){
|
|
209 |
filter: uri,
|
210 |
|
211 |
}).done(function (data) {
|
212 |
-
var data = JSON.parse(data);
|
213 |
-
data = data.chart_data;
|
214 |
-
if(divID == 'gawd_post_page_popup'){
|
215 |
-
jQuery( "#loading_div" ).remove();
|
216 |
-
jQuery( ".gawd_btn" ).show();
|
217 |
-
jQuery('#opacity_div, .gawd_btn').on('click', function(){
|
218 |
-
jQuery('#opacity_div').remove();
|
219 |
-
jQuery( ".gawd_btn" ).remove();
|
220 |
-
jQuery( ".page_chart_div" ).remove();
|
221 |
-
jQuery( "#loading_div" ).remove();
|
222 |
-
})
|
223 |
-
|
224 |
-
}
|
225 |
-
|
226 |
-
var chart = AmCharts.makeChart(divID, {
|
227 |
-
"dataProvider": data,
|
228 |
-
"type": "serial",
|
229 |
-
"theme": "light",
|
230 |
-
"percentPrecision": 1,
|
231 |
-
"precision": 0,
|
232 |
-
"export": {
|
233 |
-
"enabled": true
|
234 |
-
},
|
235 |
-
"dataDateFormat": "YYYY-MM-DD",
|
236 |
-
"valueAxes": [{
|
237 |
-
"id": "g1",
|
238 |
-
"axisAlpha": 0.4,
|
239 |
-
"position": "left",
|
240 |
-
"title": metric,
|
241 |
-
"ignoreAxisWidth":false
|
242 |
-
|
243 |
-
}],
|
244 |
-
"chartCursor": {
|
245 |
-
"pan": true,
|
246 |
-
"valueLineEnabled": true,
|
247 |
-
"valueLineBalloonEnabled": true,
|
248 |
-
"cursorAlpha": 1,
|
249 |
-
"cursorColor": "#258cbb",
|
250 |
-
"limitToGraph": "g1",
|
251 |
-
"valueLineAlpha": 0.2
|
252 |
-
},
|
253 |
-
"graphs": [{
|
254 |
-
"type": chartType,
|
255 |
-
"valueAxis": "g1",
|
256 |
-
"fillAlphas": fillAlphas,
|
257 |
-
"bullet": "round",
|
258 |
-
"bulletBorderAlpha": 1,
|
259 |
-
"bulletColor": "#FFFFFF",
|
260 |
-
"bulletSize": 5,
|
261 |
-
//"hideBulletsCount": 50,
|
262 |
-
"lineThickness": 2,
|
263 |
-
"title": metric,
|
264 |
-
"useLineColorForBulletBorder": true,
|
265 |
-
"valueField": metric,
|
266 |
-
}],
|
267 |
-
"categoryField": dimension,
|
268 |
-
"categoryAxis": {
|
269 |
-
"parseDates": true,
|
270 |
-
"equalSpacing": true,
|
271 |
-
"dashLength": 2,
|
272 |
-
"minorGridEnabled": true,
|
273 |
-
"boldLabels": true,
|
274 |
-
"labelFrequency": 1,
|
275 |
-
}
|
276 |
-
} )
|
277 |
-
jQuery("#"+divID).find('a').remove();
|
278 |
})
|
279 |
}
|
79 |
chart: 'pie',
|
80 |
security: gawd_front.ajaxnonce,
|
81 |
filter: uri,
|
82 |
+
}).done(function (data) {})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
function post_page_stats_front(uri,divID){
|
85 |
if(typeof divID == 'undefined'){
|
152 |
filter: uri,
|
153 |
|
154 |
}).done(function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
})
|
156 |
}
|
inc/js/gawd_map_chart.js
DELETED
@@ -1,502 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
although ammap has methos like getAreaCenterLatitude and getAreaCenterLongitude,
|
3 |
-
they are not suitable in quite a lot of cases as the center of some countries
|
4 |
-
is even outside the country itself (like US, because of Alaska and Hawaii)
|
5 |
-
That's why wehave the coordinates stored here
|
6 |
-
*/
|
7 |
-
function show_realtime_map(realtime_data) {
|
8 |
-
|
9 |
-
var latlong = {};
|
10 |
-
latlong["AD"] = {"latitude": 42.5, "longitude": 1.5};
|
11 |
-
latlong["AE"] = {"latitude": 24, "longitude": 54};
|
12 |
-
latlong["AF"] = {"latitude": 33, "longitude": 65};
|
13 |
-
latlong["AG"] = {"latitude": 17.05, "longitude": -61.8};
|
14 |
-
latlong["AI"] = {"latitude": 18.25, "longitude": -63.1667};
|
15 |
-
latlong["AL"] = {"latitude": 41, "longitude": 20};
|
16 |
-
latlong["AM"] = {"latitude": 40, "longitude": 45};
|
17 |
-
latlong["AN"] = {"latitude": 12.25, "longitude": -68.75};
|
18 |
-
latlong["AO"] = {"latitude": -12.5, "longitude": 18.5};
|
19 |
-
latlong["AP"] = {"latitude": 35, "longitude": 105};
|
20 |
-
latlong["AQ"] = {"latitude": -90, "longitude": 0};
|
21 |
-
latlong["AR"] = {"latitude": -34, "longitude": -64};
|
22 |
-
latlong["AS"] = {"latitude": -14.3333, "longitude": -170};
|
23 |
-
latlong["AT"] = {"latitude": 47.3333, "longitude": 13.3333};
|
24 |
-
latlong["AU"] = {"latitude": -27, "longitude": 133};
|
25 |
-
latlong["AW"] = {"latitude": 12.5, "longitude": -69.9667};
|
26 |
-
latlong["AZ"] = {"latitude": 40.5, "longitude": 47.5};
|
27 |
-
latlong["BA"] = {"latitude": 44, "longitude": 18};
|
28 |
-
latlong["BB"] = {"latitude": 13.1667, "longitude": -59.5333};
|
29 |
-
latlong["BD"] = {"latitude": 24, "longitude": 90};
|
30 |
-
latlong["BE"] = {"latitude": 50.8333, "longitude": 4};
|
31 |
-
latlong["BF"] = {"latitude": 13, "longitude": -2};
|
32 |
-
latlong["BG"] = {"latitude": 43, "longitude": 25};
|
33 |
-
latlong["BH"] = {"latitude": 26, "longitude": 50.55};
|
34 |
-
latlong["BI"] = {"latitude": -3.5, "longitude": 30};
|
35 |
-
latlong["BJ"] = {"latitude": 9.5, "longitude": 2.25};
|
36 |
-
latlong["BM"] = {"latitude": 32.3333, "longitude": -64.75};
|
37 |
-
latlong["BN"] = {"latitude": 4.5, "longitude": 114.6667};
|
38 |
-
latlong["BO"] = {"latitude": -17, "longitude": -65};
|
39 |
-
latlong["BR"] = {"latitude": -10, "longitude": -55};
|
40 |
-
latlong["BS"] = {"latitude": 24.25, "longitude": -76};
|
41 |
-
latlong["BT"] = {"latitude": 27.5, "longitude": 90.5};
|
42 |
-
latlong["BV"] = {"latitude": -54.4333, "longitude": 3.4};
|
43 |
-
latlong["BW"] = {"latitude": -22, "longitude": 24};
|
44 |
-
latlong["BY"] = {"latitude": 53, "longitude": 28};
|
45 |
-
latlong["BZ"] = {"latitude": 17.25, "longitude": -88.75};
|
46 |
-
latlong["CA"] = {"latitude": 54, "longitude": -100};
|
47 |
-
latlong["CC"] = {"latitude": -12.5, "longitude": 96.8333};
|
48 |
-
latlong["CD"] = {"latitude": 0, "longitude": 25};
|
49 |
-
latlong["CF"] = {"latitude": 7, "longitude": 21};
|
50 |
-
latlong["CG"] = {"latitude": -1, "longitude": 15};
|
51 |
-
latlong["CH"] = {"latitude": 47, "longitude": 8};
|
52 |
-
latlong["CI"] = {"latitude": 8, "longitude": -5};
|
53 |
-
latlong["CK"] = {"latitude": -21.2333, "longitude": -159.7667};
|
54 |
-
latlong["CL"] = {"latitude": -30, "longitude": -71};
|
55 |
-
latlong["CM"] = {"latitude": 6, "longitude": 12};
|
56 |
-
latlong["CN"] = {"latitude": 35, "longitude": 105};
|
57 |
-
latlong["CO"] = {"latitude": 4, "longitude": -72};
|
58 |
-
latlong["CR"] = {"latitude": 10, "longitude": -84};
|
59 |
-
latlong["CU"] = {"latitude": 21.5, "longitude": -80};
|
60 |
-
latlong["CV"] = {"latitude": 16, "longitude": -24};
|
61 |
-
latlong["CX"] = {"latitude": -10.5, "longitude": 105.6667};
|
62 |
-
latlong["CY"] = {"latitude": 35, "longitude": 33};
|
63 |
-
latlong["CZ"] = {"latitude": 49.75, "longitude": 15.5};
|
64 |
-
latlong["DE"] = {"latitude": 51, "longitude": 9};
|
65 |
-
latlong["DJ"] = {"latitude": 11.5, "longitude": 43};
|
66 |
-
latlong["DK"] = {"latitude": 56, "longitude": 10};
|
67 |
-
latlong["DM"] = {"latitude": 15.4167, "longitude": -61.3333};
|
68 |
-
latlong["DO"] = {"latitude": 19, "longitude": -70.6667};
|
69 |
-
latlong["DZ"] = {"latitude": 28, "longitude": 3};
|
70 |
-
latlong["EC"] = {"latitude": -2, "longitude": -77.5};
|
71 |
-
latlong["EE"] = {"latitude": 59, "longitude": 26};
|
72 |
-
latlong["EG"] = {"latitude": 27, "longitude": 30};
|
73 |
-
latlong["EH"] = {"latitude": 24.5, "longitude": -13};
|
74 |
-
latlong["ER"] = {"latitude": 15, "longitude": 39};
|
75 |
-
latlong["ES"] = {"latitude": 40, "longitude": -4};
|
76 |
-
latlong["ET"] = {"latitude": 8, "longitude": 38};
|
77 |
-
latlong["EU"] = {"latitude": 47, "longitude": 8};
|
78 |
-
latlong["FI"] = {"latitude": 62, "longitude": 26};
|
79 |
-
latlong["FJ"] = {"latitude": -18, "longitude": 175};
|
80 |
-
latlong["FK"] = {"latitude": -51.75, "longitude": -59};
|
81 |
-
latlong["FM"] = {"latitude": 6.9167, "longitude": 158.25};
|
82 |
-
latlong["FO"] = {"latitude": 62, "longitude": -7};
|
83 |
-
latlong["FR"] = {"latitude": 46, "longitude": 2};
|
84 |
-
latlong["GA"] = {"latitude": -1, "longitude": 11.75};
|
85 |
-
latlong["GB"] = {"latitude": 54, "longitude": -2};
|
86 |
-
latlong["GD"] = {"latitude": 12.1167, "longitude": -61.6667};
|
87 |
-
latlong["GE"] = {"latitude": 42, "longitude": 43.5};
|
88 |
-
latlong["GF"] = {"latitude": 4, "longitude": -53};
|
89 |
-
latlong["GH"] = {"latitude": 8, "longitude": -2};
|
90 |
-
latlong["GI"] = {"latitude": 36.1833, "longitude": -5.3667};
|
91 |
-
latlong["GL"] = {"latitude": 72, "longitude": -40};
|
92 |
-
latlong["GM"] = {"latitude": 13.4667, "longitude": -16.5667};
|
93 |
-
latlong["GN"] = {"latitude": 11, "longitude": -10};
|
94 |
-
latlong["GP"] = {"latitude": 16.25, "longitude": -61.5833};
|
95 |
-
latlong["GQ"] = {"latitude": 2, "longitude": 10};
|
96 |
-
latlong["GR"] = {"latitude": 39, "longitude": 22};
|
97 |
-
latlong["GS"] = {"latitude": -54.5, "longitude": -37};
|
98 |
-
latlong["GT"] = {"latitude": 15.5, "longitude": -90.25};
|
99 |
-
latlong["GU"] = {"latitude": 13.4667, "longitude": 144.7833};
|
100 |
-
latlong["GW"] = {"latitude": 12, "longitude": -15};
|
101 |
-
latlong["GY"] = {"latitude": 5, "longitude": -59};
|
102 |
-
latlong["HK"] = {"latitude": 22.25, "longitude": 114.1667};
|
103 |
-
latlong["HM"] = {"latitude": -53.1, "longitude": 72.5167};
|
104 |
-
latlong["HN"] = {"latitude": 15, "longitude": -86.5};
|
105 |
-
latlong["HR"] = {"latitude": 45.1667, "longitude": 15.5};
|
106 |
-
latlong["HT"] = {"latitude": 19, "longitude": -72.4167};
|
107 |
-
latlong["HU"] = {"latitude": 47, "longitude": 20};
|
108 |
-
latlong["ID"] = {"latitude": -5, "longitude": 120};
|
109 |
-
latlong["IE"] = {"latitude": 53, "longitude": -8};
|
110 |
-
latlong["IL"] = {"latitude": 31.5, "longitude": 34.75};
|
111 |
-
latlong["IN"] = {"latitude": 20, "longitude": 77};
|
112 |
-
latlong["IO"] = {"latitude": -6, "longitude": 71.5};
|
113 |
-
latlong["IQ"] = {"latitude": 33, "longitude": 44};
|
114 |
-
latlong["IR"] = {"latitude": 32, "longitude": 53};
|
115 |
-
latlong["IS"] = {"latitude": 65, "longitude": -18};
|
116 |
-
latlong["IT"] = {"latitude": 42.8333, "longitude": 12.8333};
|
117 |
-
latlong["JM"] = {"latitude": 18.25, "longitude": -77.5};
|
118 |
-
latlong["JO"] = {"latitude": 31, "longitude": 36};
|
119 |
-
latlong["JP"] = {"latitude": 36, "longitude": 138};
|
120 |
-
latlong["KE"] = {"latitude": 1, "longitude": 38};
|
121 |
-
latlong["KG"] = {"latitude": 41, "longitude": 75};
|
122 |
-
latlong["KH"] = {"latitude": 13, "longitude": 105};
|
123 |
-
latlong["KI"] = {"latitude": 1.4167, "longitude": 173};
|
124 |
-
latlong["KM"] = {"latitude": -12.1667, "longitude": 44.25};
|
125 |
-
latlong["KN"] = {"latitude": 17.3333, "longitude": -62.75};
|
126 |
-
latlong["KP"] = {"latitude": 40, "longitude": 127};
|
127 |
-
latlong["KR"] = {"latitude": 37, "longitude": 127.5};
|
128 |
-
latlong["KW"] = {"latitude": 29.3375, "longitude": 47.6581};
|
129 |
-
latlong["KY"] = {"latitude": 19.5, "longitude": -80.5};
|
130 |
-
latlong["KZ"] = {"latitude": 48, "longitude": 68};
|
131 |
-
latlong["LA"] = {"latitude": 18, "longitude": 105};
|
132 |
-
latlong["LB"] = {"latitude": 33.8333, "longitude": 35.8333};
|
133 |
-
latlong["LC"] = {"latitude": 13.8833, "longitude": -61.1333};
|
134 |
-
latlong["LI"] = {"latitude": 47.1667, "longitude": 9.5333};
|
135 |
-
latlong["LK"] = {"latitude": 7, "longitude": 81};
|
136 |
-
latlong["LR"] = {"latitude": 6.5, "longitude": -9.5};
|
137 |
-
latlong["LS"] = {"latitude": -29.5, "longitude": 28.5};
|
138 |
-
latlong["LT"] = {"latitude": 55, "longitude": 24};
|
139 |
-
latlong["LU"] = {"latitude": 49.75, "longitude": 6};
|
140 |
-
latlong["LV"] = {"latitude": 57, "longitude": 25};
|
141 |
-
latlong["LY"] = {"latitude": 25, "longitude": 17};
|
142 |
-
latlong["MA"] = {"latitude": 32, "longitude": -5};
|
143 |
-
latlong["MC"] = {"latitude": 43.7333, "longitude": 7.4};
|
144 |
-
latlong["MD"] = {"latitude": 47, "longitude": 29};
|
145 |
-
latlong["ME"] = {"latitude": 42.5, "longitude": 19.4};
|
146 |
-
latlong["MG"] = {"latitude": -20, "longitude": 47};
|
147 |
-
latlong["MH"] = {"latitude": 9, "longitude": 168};
|
148 |
-
latlong["MK"] = {"latitude": 41.8333, "longitude": 22};
|
149 |
-
latlong["ML"] = {"latitude": 17, "longitude": -4};
|
150 |
-
latlong["MM"] = {"latitude": 22, "longitude": 98};
|
151 |
-
latlong["MN"] = {"latitude": 46, "longitude": 105};
|
152 |
-
latlong["MO"] = {"latitude": 22.1667, "longitude": 113.55};
|
153 |
-
latlong["MP"] = {"latitude": 15.2, "longitude": 145.75};
|
154 |
-
latlong["MQ"] = {"latitude": 14.6667, "longitude": -61};
|
155 |
-
latlong["MR"] = {"latitude": 20, "longitude": -12};
|
156 |
-
latlong["MS"] = {"latitude": 16.75, "longitude": -62.2};
|
157 |
-
latlong["MT"] = {"latitude": 35.8333, "longitude": 14.5833};
|
158 |
-
latlong["MU"] = {"latitude": -20.2833, "longitude": 57.55};
|
159 |
-
latlong["MV"] = {"latitude": 3.25, "longitude": 73};
|
160 |
-
latlong["MW"] = {"latitude": -13.5, "longitude": 34};
|
161 |
-
latlong["MX"] = {"latitude": 23, "longitude": -102};
|
162 |
-
latlong["MY"] = {"latitude": 2.5, "longitude": 112.5};
|
163 |
-
latlong["MZ"] = {"latitude": -18.25, "longitude": 35};
|
164 |
-
latlong["NA"] = {"latitude": -22, "longitude": 17};
|
165 |
-
latlong["NC"] = {"latitude": -21.5, "longitude": 165.5};
|
166 |
-
latlong["NE"] = {"latitude": 16, "longitude": 8};
|
167 |
-
latlong["NF"] = {"latitude": -29.0333, "longitude": 167.95};
|
168 |
-
latlong["NG"] = {"latitude": 10, "longitude": 8};
|
169 |
-
latlong["NI"] = {"latitude": 13, "longitude": -85};
|
170 |
-
latlong["NL"] = {"latitude": 52.5, "longitude": 5.75};
|
171 |
-
latlong["NO"] = {"latitude": 62, "longitude": 10};
|
172 |
-
latlong["NP"] = {"latitude": 28, "longitude": 84};
|
173 |
-
latlong["NR"] = {"latitude": -0.5333, "longitude": 166.9167};
|
174 |
-
latlong["NU"] = {"latitude": -19.0333, "longitude": -169.8667};
|
175 |
-
latlong["NZ"] = {"latitude": -41, "longitude": 174};
|
176 |
-
latlong["OM"] = {"latitude": 21, "longitude": 57};
|
177 |
-
latlong["PA"] = {"latitude": 9, "longitude": -80};
|
178 |
-
latlong["PE"] = {"latitude": -10, "longitude": -76};
|
179 |
-
latlong["PF"] = {"latitude": -15, "longitude": -140};
|
180 |
-
latlong["PG"] = {"latitude": -6, "longitude": 147};
|
181 |
-
latlong["PH"] = {"latitude": 13, "longitude": 122};
|
182 |
-
latlong["PK"] = {"latitude": 30, "longitude": 70};
|
183 |
-
latlong["PL"] = {"latitude": 52, "longitude": 20};
|
184 |
-
latlong["PM"] = {"latitude": 46.8333, "longitude": -56.3333};
|
185 |
-
latlong["PR"] = {"latitude": 18.25, "longitude": -66.5};
|
186 |
-
latlong["PS"] = {"latitude": 32, "longitude": 35.25};
|
187 |
-
latlong["PT"] = {"latitude": 39.5, "longitude": -8};
|
188 |
-
latlong["PW"] = {"latitude": 7.5, "longitude": 134.5};
|
189 |
-
latlong["PY"] = {"latitude": -23, "longitude": -58};
|
190 |
-
latlong["QA"] = {"latitude": 25.5, "longitude": 51.25};
|
191 |
-
latlong["RE"] = {"latitude": -21.1, "longitude": 55.6};
|
192 |
-
latlong["RO"] = {"latitude": 46, "longitude": 25};
|
193 |
-
latlong["RS"] = {"latitude": 44, "longitude": 21};
|
194 |
-
latlong["RU"] = {"latitude": 60, "longitude": 100};
|
195 |
-
latlong["RW"] = {"latitude": -2, "longitude": 30};
|
196 |
-
latlong["SA"] = {"latitude": 25, "longitude": 45};
|
197 |
-
latlong["SB"] = {"latitude": -8, "longitude": 159};
|
198 |
-
latlong["SC"] = {"latitude": -4.5833, "longitude": 55.6667};
|
199 |
-
latlong["SD"] = {"latitude": 15, "longitude": 30};
|
200 |
-
latlong["SE"] = {"latitude": 62, "longitude": 15};
|
201 |
-
latlong["SG"] = {"latitude": 1.3667, "longitude": 103.8};
|
202 |
-
latlong["SH"] = {"latitude": -15.9333, "longitude": -5.7};
|
203 |
-
latlong["SI"] = {"latitude": 46, "longitude": 15};
|
204 |
-
latlong["SJ"] = {"latitude": 78, "longitude": 20};
|
205 |
-
latlong["SK"] = {"latitude": 48.6667, "longitude": 19.5};
|
206 |
-
latlong["SL"] = {"latitude": 8.5, "longitude": -11.5};
|
207 |
-
latlong["SM"] = {"latitude": 43.7667, "longitude": 12.4167};
|
208 |
-
latlong["SN"] = {"latitude": 14, "longitude": -14};
|
209 |
-
latlong["SO"] = {"latitude": 10, "longitude": 49};
|
210 |
-
latlong["SR"] = {"latitude": 4, "longitude": -56};
|
211 |
-
latlong["ST"] = {"latitude": 1, "longitude": 7};
|
212 |
-
latlong["SV"] = {"latitude": 13.8333, "longitude": -88.9167};
|
213 |
-
latlong["SY"] = {"latitude": 35, "longitude": 38};
|
214 |
-
latlong["SZ"] = {"latitude": -26.5, "longitude": 31.5};
|
215 |
-
latlong["TC"] = {"latitude": 21.75, "longitude": -71.5833};
|
216 |
-
latlong["TD"] = {"latitude": 15, "longitude": 19};
|
217 |
-
latlong["TF"] = {"latitude": -43, "longitude": 67};
|
218 |
-
latlong["TG"] = {"latitude": 8, "longitude": 1.1667};
|
219 |
-
latlong["TH"] = {"latitude": 15, "longitude": 100};
|
220 |
-
latlong["TJ"] = {"latitude": 39, "longitude": 71};
|
221 |
-
latlong["TK"] = {"latitude": -9, "longitude": -172};
|
222 |
-
latlong["TM"] = {"latitude": 40, "longitude": 60};
|
223 |
-
latlong["TN"] = {"latitude": 34, "longitude": 9};
|
224 |
-
latlong["TO"] = {"latitude": -20, "longitude": -175};
|
225 |
-
latlong["TR"] = {"latitude": 39, "longitude": 35};
|
226 |
-
latlong["TT"] = {"latitude": 11, "longitude": -61};
|
227 |
-
latlong["TV"] = {"latitude": -8, "longitude": 178};
|
228 |
-
latlong["TW"] = {"latitude": 23.5, "longitude": 121};
|
229 |
-
latlong["TZ"] = {"latitude": -6, "longitude": 35};
|
230 |
-
latlong["UA"] = {"latitude": 49, "longitude": 32};
|
231 |
-
latlong["UG"] = {"latitude": 1, "longitude": 32};
|
232 |
-
latlong["UM"] = {"latitude": 19.2833, "longitude": 166.6};
|
233 |
-
latlong["US"] = {"latitude": 38, "longitude": -97};
|
234 |
-
latlong["UY"] = {"latitude": -33, "longitude": -56};
|
235 |
-
latlong["UZ"] = {"latitude": 41, "longitude": 64};
|
236 |
-
latlong["VA"] = {"latitude": 41.9, "longitude": 12.45};
|
237 |
-
latlong["VC"] = {"latitude": 13.25, "longitude": -61.2};
|
238 |
-
latlong["VE"] = {"latitude": 8, "longitude": -66};
|
239 |
-
latlong["VG"] = {"latitude": 18.5, "longitude": -64.5};
|
240 |
-
latlong["VI"] = {"latitude": 18.3333, "longitude": -64.8333};
|
241 |
-
latlong["VN"] = {"latitude": 16, "longitude": 106};
|
242 |
-
latlong["VU"] = {"latitude": -16, "longitude": 167};
|
243 |
-
latlong["WF"] = {"latitude": -13.3, "longitude": -176.2};
|
244 |
-
latlong["WS"] = {"latitude": -13.5833, "longitude": -172.3333};
|
245 |
-
latlong["YE"] = {"latitude": 15, "longitude": 48};
|
246 |
-
latlong["YT"] = {"latitude": -12.8333, "longitude": 45.1667};
|
247 |
-
latlong["ZA"] = {"latitude": -29, "longitude": 24};
|
248 |
-
latlong["ZM"] = {"latitude": -15, "longitude": 30};
|
249 |
-
latlong["ZW"] = {"latitude": -20, "longitude": 30};
|
250 |
-
|
251 |
-
var mapData = [
|
252 |
-
{"code": "AF", "name": "Afghanistan", "value": 32358260, "color": "#eea638"},
|
253 |
-
{"code": "AL", "name": "Albania", "value": 3215988, "color": "#d8854f"},
|
254 |
-
{"code": "DZ", "name": "Algeria", "value": 35980193, "color": "#de4c4f"},
|
255 |
-
{"code": "AO", "name": "Angola", "value": 19618432, "color": "#de4c4f"},
|
256 |
-
{"code": "AR", "name": "Argentina", "value": 40764561, "color": "#86a965"},
|
257 |
-
{"code": "AM", "name": "Armenia", "value": 3100236, "color": "#d8854f"},
|
258 |
-
{"code": "AU", "name": "Australia", "value": 22605732, "color": "#8aabb0"},
|
259 |
-
{"code": "AT", "name": "Austria", "value": 8413429, "color": "#d8854f"},
|
260 |
-
{"code": "AZ", "name": "Azerbaijan", "value": 9306023, "color": "#d8854f"},
|
261 |
-
{"code": "BH", "name": "Bahrain", "value": 1323535, "color": "#eea638"},
|
262 |
-
{"code": "BD", "name": "Bangladesh", "value": 150493658, "color": "#eea638"},
|
263 |
-
{"code": "BY", "name": "Belarus", "value": 9559441, "color": "#d8854f"},
|
264 |
-
{"code": "BE", "name": "Belgium", "value": 10754056, "color": "#d8854f"},
|
265 |
-
{"code": "BJ", "name": "Benin", "value": 9099922, "color": "#de4c4f"},
|
266 |
-
{"code": "BT", "name": "Bhutan", "value": 738267, "color": "#eea638"},
|
267 |
-
{"code": "BO", "name": "Bolivia", "value": 10088108, "color": "#86a965"},
|
268 |
-
{"code": "BA", "name": "Bosnia and Herzegovina", "value": 3752228, "color": "#d8854f"},
|
269 |
-
{"code": "BW", "name": "Botswana", "value": 2030738, "color": "#de4c4f"},
|
270 |
-
{"code": "BR", "name": "Brazil", "value": 196655014, "color": "#86a965"},
|
271 |
-
{"code": "BN", "name": "Brunei", "value": 405938, "color": "#eea638"},
|
272 |
-
{"code": "BG", "name": "Bulgaria", "value": 7446135, "color": "#d8854f"},
|
273 |
-
{"code": "BF", "name": "Burkina Faso", "value": 16967845, "color": "#de4c4f"},
|
274 |
-
{"code": "BI", "name": "Burundi", "value": 8575172, "color": "#de4c4f"},
|
275 |
-
{"code": "KH", "name": "Cambodia", "value": 14305183, "color": "#eea638"},
|
276 |
-
{"code": "CM", "name": "Cameroon", "value": 20030362, "color": "#de4c4f"},
|
277 |
-
{"code": "CA", "name": "Canada", "value": 34349561, "color": "#a7a737"},
|
278 |
-
{"code": "CV", "name": "Cape Verde", "value": 500585, "color": "#de4c4f"},
|
279 |
-
{"code": "CF", "name": "Central African Rep.", "value": 4486837, "color": "#de4c4f"},
|
280 |
-
{"code": "TD", "name": "Chad", "value": 11525496, "color": "#de4c4f"},
|
281 |
-
{"code": "CL", "name": "Chile", "value": 17269525, "color": "#86a965"},
|
282 |
-
{"code": "CN", "name": "China", "value": 1347565324, "color": "#eea638"},
|
283 |
-
{"code": "CO", "name": "Colombia", "value": 46927125, "color": "#86a965"},
|
284 |
-
{"code": "KM", "name": "Comoros", "value": 753943, "color": "#de4c4f"},
|
285 |
-
{"code": "CD", "name": "Congo, Dem. Rep.", "value": 67757577, "color": "#de4c4f"},
|
286 |
-
{"code": "CG", "name": "Congo, Rep.", "value": 4139748, "color": "#de4c4f"},
|
287 |
-
{"code": "CR", "name": "Costa Rica", "value": 4726575, "color": "#a7a737"},
|
288 |
-
{"code": "CI", "name": "Cote d'Ivoire", "value": 20152894, "color": "#de4c4f"},
|
289 |
-
{"code": "HR", "name": "Croatia", "value": 4395560, "color": "#d8854f"},
|
290 |
-
{"code": "CU", "name": "Cuba", "value": 11253665, "color": "#a7a737"},
|
291 |
-
{"code": "CY", "name": "Cyprus", "value": 1116564, "color": "#d8854f"},
|
292 |
-
{"code": "CZ", "name": "Czech Rep.", "value": 10534293, "color": "#d8854f"},
|
293 |
-
{"code": "DK", "name": "Denmark", "value": 5572594, "color": "#d8854f"},
|
294 |
-
{"code": "DJ", "name": "Djibouti", "value": 905564, "color": "#de4c4f"},
|
295 |
-
{"code": "DO", "name": "Dominican Rep.", "value": 10056181, "color": "#a7a737"},
|
296 |
-
{"code": "EC", "name": "Ecuador", "value": 14666055, "color": "#86a965"},
|
297 |
-
{"code": "EG", "name": "Egypt", "value": 82536770, "color": "#de4c4f"},
|
298 |
-
{"code": "SV", "name": "El Salvador", "value": 6227491, "color": "#a7a737"},
|
299 |
-
{"code": "GQ", "name": "Equatorial Guinea", "value": 720213, "color": "#de4c4f"},
|
300 |
-
{"code": "ER", "name": "Eritrea", "value": 5415280, "color": "#de4c4f"},
|
301 |
-
{"code": "EE", "name": "Estonia", "value": 1340537, "color": "#d8854f"},
|
302 |
-
{"code": "ET", "name": "Ethiopia", "value": 84734262, "color": "#de4c4f"},
|
303 |
-
{"code": "FJ", "name": "Fiji", "value": 868406, "color": "#8aabb0"},
|
304 |
-
{"code": "FI", "name": "Finland", "value": 5384770, "color": "#d8854f"},
|
305 |
-
{"code": "FR", "name": "France", "value": 63125894, "color": "#d8854f"},
|
306 |
-
{"code": "GA", "name": "Gabon", "value": 1534262, "color": "#de4c4f"},
|
307 |
-
{"code": "GM", "name": "Gambia", "value": 1776103, "color": "#de4c4f"},
|
308 |
-
{"code": "GE", "name": "Georgia", "value": 4329026, "color": "#d8854f"},
|
309 |
-
{"code": "DE", "name": "Germany", "value": 82162512, "color": "#d8854f"},
|
310 |
-
{"code": "GH", "name": "Ghana", "value": 24965816, "color": "#de4c4f"},
|
311 |
-
{"code": "GR", "name": "Greece", "value": 11390031, "color": "#d8854f"},
|
312 |
-
{"code": "GT", "name": "Guatemala", "value": 14757316, "color": "#a7a737"},
|
313 |
-
{"code": "GN", "name": "Guinea", "value": 10221808, "color": "#de4c4f"},
|
314 |
-
{"code": "GW", "name": "Guinea-Bissau", "value": 1547061, "color": "#de4c4f"},
|
315 |
-
{"code": "GY", "name": "Guyana", "value": 756040, "color": "#86a965"},
|
316 |
-
{"code": "HT", "name": "Haiti", "value": 10123787, "color": "#a7a737"},
|
317 |
-
{"code": "HN", "name": "Honduras", "value": 7754687, "color": "#a7a737"},
|
318 |
-
{"code": "HK", "name": "Hong Kong, China", "value": 7122187, "color": "#eea638"},
|
319 |
-
{"code": "HU", "name": "Hungary", "value": 9966116, "color": "#d8854f"},
|
320 |
-
{"code": "IS", "name": "Iceland", "value": 324366, "color": "#d8854f"},
|
321 |
-
{"code": "IN", "name": "India", "value": 1241491960, "color": "#eea638"},
|
322 |
-
{"code": "ID", "name": "Indonesia", "value": 242325638, "color": "#eea638"},
|
323 |
-
{"code": "IR", "name": "Iran", "value": 74798599, "color": "#eea638"},
|
324 |
-
{"code": "IQ", "name": "Iraq", "value": 32664942, "color": "#eea638"},
|
325 |
-
{"code": "IE", "name": "Ireland", "value": 4525802, "color": "#d8854f"},
|
326 |
-
{"code": "IL", "name": "Israel", "value": 7562194, "color": "#eea638"},
|
327 |
-
{"code": "IT", "name": "Italy", "value": 60788694, "color": "#d8854f"},
|
328 |
-
{"code": "JM", "name": "Jamaica", "value": 2751273, "color": "#a7a737"},
|
329 |
-
{"code": "JP", "name": "Japan", "value": 126497241, "color": "#eea638"},
|
330 |
-
{"code": "JO", "name": "Jordan", "value": 6330169, "color": "#eea638"},
|
331 |
-
{"code": "KZ", "name": "Kazakhstan", "value": 16206750, "color": "#eea638"},
|
332 |
-
{"code": "KE", "name": "Kenya", "value": 41609728, "color": "#de4c4f"},
|
333 |
-
{"code": "KP", "name": "Korea, Dem. Rep.", "value": 24451285, "color": "#eea638"},
|
334 |
-
{"code": "KR", "name": "Korea, Rep.", "value": 48391343, "color": "#eea638"},
|
335 |
-
{"code": "KW", "name": "Kuwait", "value": 2818042, "color": "#eea638"},
|
336 |
-
{"code": "KG", "name": "Kyrgyzstan", "value": 5392580, "color": "#eea638"},
|
337 |
-
{"code": "LA", "name": "Laos", "value": 6288037, "color": "#eea638"},
|
338 |
-
{"code": "LV", "name": "Latvia", "value": 2243142, "color": "#d8854f"},
|
339 |
-
{"code": "LB", "name": "Lebanon", "value": 4259405, "color": "#eea638"},
|
340 |
-
{"code": "LS", "name": "Lesotho", "value": 2193843, "color": "#de4c4f"},
|
341 |
-
{"code": "LR", "name": "Liberia", "value": 4128572, "color": "#de4c4f"},
|
342 |
-
{"code": "LY", "name": "Libya", "value": 6422772, "color": "#de4c4f"},
|
343 |
-
{"code": "LT", "name": "Lithuania", "value": 3307481, "color": "#d8854f"},
|
344 |
-
{"code": "LU", "name": "Luxembourg", "value": 515941, "color": "#d8854f"},
|
345 |
-
{"code": "MK", "name": "Macedonia, FYR", "value": 2063893, "color": "#d8854f"},
|
346 |
-
{"code": "MG", "name": "Madagascar", "value": 21315135, "color": "#de4c4f"},
|
347 |
-
{"code": "MW", "name": "Malawi", "value": 15380888, "color": "#de4c4f"},
|
348 |
-
{"code": "MY", "name": "Malaysia", "value": 28859154, "color": "#eea638"},
|
349 |
-
{"code": "ML", "name": "Mali", "value": 15839538, "color": "#de4c4f"},
|
350 |
-
{"code": "MR", "name": "Mauritania", "value": 3541540, "color": "#de4c4f"},
|
351 |
-
{"code": "MU", "name": "Mauritius", "value": 1306593, "color": "#de4c4f"},
|
352 |
-
{"code": "MX", "name": "Mexico", "value": 114793341, "color": "#a7a737"},
|
353 |
-
{"code": "MD", "name": "Moldova", "value": 3544864, "color": "#d8854f"},
|
354 |
-
{"code": "MN", "name": "Mongolia", "value": 2800114, "color": "#eea638"},
|
355 |
-
{"code": "ME", "name": "Montenegro", "value": 632261, "color": "#d8854f"},
|
356 |
-
{"code": "MA", "name": "Morocco", "value": 32272974, "color": "#de4c4f"},
|
357 |
-
{"code": "MZ", "name": "Mozambique", "value": 23929708, "color": "#de4c4f"},
|
358 |
-
{"code": "MM", "name": "Myanmar", "value": 48336763, "color": "#eea638"},
|
359 |
-
{"code": "NA", "name": "Namibia", "value": 2324004, "color": "#de4c4f"},
|
360 |
-
{"code": "NP", "name": "Nepal", "value": 30485798, "color": "#eea638"},
|
361 |
-
{"code": "NL", "name": "Netherlands", "value": 16664746, "color": "#d8854f"},
|
362 |
-
{"code": "NZ", "name": "New Zealand", "value": 4414509, "color": "#8aabb0"},
|
363 |
-
{"code": "NI", "name": "Nicaragua", "value": 5869859, "color": "#a7a737"},
|
364 |
-
{"code": "NE", "name": "Niger", "value": 16068994, "color": "#de4c4f"},
|
365 |
-
{"code": "NG", "name": "Nigeria", "value": 162470737, "color": "#de4c4f"},
|
366 |
-
{"code": "NO", "name": "Norway", "value": 4924848, "color": "#d8854f"},
|
367 |
-
{"code": "OM", "name": "Oman", "value": 2846145, "color": "#eea638"},
|
368 |
-
{"code": "PK", "name": "Pakistan", "value": 176745364, "color": "#eea638"},
|
369 |
-
{"code": "PA", "name": "Panama", "value": 3571185, "color": "#a7a737"},
|
370 |
-
{"code": "PG", "name": "Papua New Guinea", "value": 7013829, "color": "#8aabb0"},
|
371 |
-
{"code": "PY", "name": "Paraguay", "value": 6568290, "color": "#86a965"},
|
372 |
-
{"code": "PE", "name": "Peru", "value": 29399817, "color": "#86a965"},
|
373 |
-
{"code": "PH", "name": "Philippines", "value": 94852030, "color": "#eea638"},
|
374 |
-
{"code": "PL", "name": "Poland", "value": 38298949, "color": "#d8854f"},
|
375 |
-
{"code": "PT", "name": "Portugal", "value": 10689663, "color": "#d8854f"},
|
376 |
-
{"code": "PR", "name": "Puerto Rico", "value": 3745526, "color": "#a7a737"},
|
377 |
-
{"code": "QA", "name": "Qatar", "value": 1870041, "color": "#eea638"},
|
378 |
-
{"code": "RO", "name": "Romania", "value": 21436495, "color": "#d8854f"},
|
379 |
-
{"code": "RU", "name": "Russia", "value": 142835555, "color": "#d8854f"},
|
380 |
-
{"code": "RW", "name": "Rwanda", "value": 10942950, "color": "#de4c4f"},
|
381 |
-
{"code": "SA", "name": "Saudi Arabia", "value": 28082541, "color": "#eea638"},
|
382 |
-
{"code": "SN", "name": "Senegal", "value": 12767556, "color": "#de4c4f"},
|
383 |
-
{"code": "RS", "name": "Serbia", "value": 9853969, "color": "#d8854f"},
|
384 |
-
{"code": "SL", "name": "Sierra Leone", "value": 5997486, "color": "#de4c4f"},
|
385 |
-
{"code": "SG", "name": "Singapore", "value": 5187933, "color": "#eea638"},
|
386 |
-
{"code": "SK", "name": "Slovak Republic", "value": 5471502, "color": "#d8854f"},
|
387 |
-
{"code": "SI", "name": "Slovenia", "value": 2035012, "color": "#d8854f"},
|
388 |
-
{"code": "SB", "name": "Solomon Islands", "value": 552267, "color": "#8aabb0"},
|
389 |
-
{"code": "SO", "name": "Somalia", "value": 9556873, "color": "#de4c4f"},
|
390 |
-
{"code": "ZA", "name": "South Africa", "value": 50459978, "color": "#de4c4f"},
|
391 |
-
{"code": "ES", "name": "Spain", "value": 46454895, "color": "#d8854f"},
|
392 |
-
{"code": "LK", "name": "Sri Lanka", "value": 21045394, "color": "#eea638"},
|
393 |
-
{"code": "SD", "name": "Sudan", "value": 34735288, "color": "#de4c4f"},
|
394 |
-
{"code": "SR", "name": "Suriname", "value": 529419, "color": "#86a965"},
|
395 |
-
{"code": "SZ", "name": "Swaziland", "value": 1203330, "color": "#de4c4f"},
|
396 |
-
{"code": "SE", "name": "Sweden", "value": 9440747, "color": "#d8854f"},
|
397 |
-
{"code": "CH", "name": "Switzerland", "value": 7701690, "color": "#d8854f"},
|
398 |
-
{"code": "SY", "name": "Syria", "value": 20766037, "color": "#eea638"},
|
399 |
-
{"code": "TW", "name": "Taiwan", "value": 23072000, "color": "#eea638"},
|
400 |
-
{"code": "TJ", "name": "Tajikistan", "value": 6976958, "color": "#eea638"},
|
401 |
-
{"code": "TZ", "name": "Tanzania", "value": 46218486, "color": "#de4c4f"},
|
402 |
-
{"code": "TH", "name": "Thailand", "value": 69518555, "color": "#eea638"},
|
403 |
-
{"code": "TG", "name": "Togo", "value": 6154813, "color": "#de4c4f"},
|
404 |
-
{"code": "TT", "name": "Trinidad and Tobago", "value": 1346350, "color": "#a7a737"},
|
405 |
-
{"code": "TN", "name": "Tunisia", "value": 10594057, "color": "#de4c4f"},
|
406 |
-
{"code": "TR", "name": "Turkey", "value": 73639596, "color": "#d8854f"},
|
407 |
-
{"code": "TM", "name": "Turkmenistan", "value": 5105301, "color": "#eea638"},
|
408 |
-
{"code": "UG", "name": "Uganda", "value": 34509205, "color": "#de4c4f"},
|
409 |
-
{"code": "UA", "name": "Ukraine", "value": 45190180, "color": "#d8854f"},
|
410 |
-
{"code": "AE", "name": "United Arab Emirates", "value": 7890924, "color": "#eea638"},
|
411 |
-
{"code": "GB", "name": "United Kingdom", "value": 62417431, "color": "#d8854f"},
|
412 |
-
{"code": "US", "name": "United States", "value": 313085380, "color": "#a7a737"},
|
413 |
-
{"code": "UY", "name": "Uruguay", "value": 3380008, "color": "#86a965"},
|
414 |
-
{"code": "UZ", "name": "Uzbekistan", "value": 27760267, "color": "#eea638"},
|
415 |
-
{"code": "VE", "name": "Venezuela", "value": 29436891, "color": "#86a965"},
|
416 |
-
{"code": "PS", "name": "West Bank and Gaza", "value": 4152369, "color": "#eea638"},
|
417 |
-
{"code": "VN", "name": "Vietnam", "value": 88791996, "color": "#eea638"},
|
418 |
-
{"code": "YE", "name": "Yemen, Rep.", "value": 24799880, "color": "#eea638"},
|
419 |
-
{"code": "ZM", "name": "Zambia", "value": 13474959, "color": "#de4c4f"},
|
420 |
-
{"code": "ZW", "name": "Zimbabwe", "value": 12754378, "color": "#de4c4f"}
|
421 |
-
];
|
422 |
-
|
423 |
-
var minBulletSize = 30;
|
424 |
-
var maxBulletSize = 70;
|
425 |
-
var min = Infinity;
|
426 |
-
var max = -Infinity;
|
427 |
-
|
428 |
-
|
429 |
-
// get min and max values
|
430 |
-
for (var i = 0; i < mapData.length; i++) {
|
431 |
-
if (typeof realtime_data[mapData[i].name] == 'undefined') {
|
432 |
-
continue;
|
433 |
-
}
|
434 |
-
|
435 |
-
var value = realtime_data[mapData[i].name];
|
436 |
-
if (value < min) {
|
437 |
-
min = value;
|
438 |
-
}
|
439 |
-
if (value > max) {
|
440 |
-
max = value;
|
441 |
-
}
|
442 |
-
}
|
443 |
-
|
444 |
-
|
445 |
-
// build map
|
446 |
-
|
447 |
-
AmCharts.theme = AmCharts.themes.light;
|
448 |
-
gawd_map = new AmCharts.AmMap();
|
449 |
-
|
450 |
-
gawd_map.areasSettings = {
|
451 |
-
unlistedAreasColor: "#000000",
|
452 |
-
unlistedAreasAlpha: 0.1
|
453 |
-
};
|
454 |
-
gawd_map.imagesSettings.balloonText = "<span style='font-size:14px;'><b>[[title]]</b>: [[value]]</span>";
|
455 |
-
|
456 |
-
var dataProvider = {
|
457 |
-
mapVar: AmCharts.maps.worldLow,
|
458 |
-
images: []
|
459 |
-
}
|
460 |
-
|
461 |
-
// create circle for each country
|
462 |
-
|
463 |
-
|
464 |
-
// it's better to use circle square to show difference between values, not a radius
|
465 |
-
var maxSquare = maxBulletSize * maxBulletSize * 2 * Math.PI;
|
466 |
-
var minSquare = minBulletSize * minBulletSize * 2 * Math.PI;
|
467 |
-
|
468 |
-
// create circle for each country
|
469 |
-
for (var i = 0; i < mapData.length; i++) {
|
470 |
-
var dataItem = mapData[i];
|
471 |
-
if (typeof realtime_data[dataItem.name] == 'undefined') {
|
472 |
-
continue;
|
473 |
-
}
|
474 |
-
|
475 |
-
var value = realtime_data[dataItem.name];
|
476 |
-
// calculate size of a bubble
|
477 |
-
var square = (value - min) / (max - min) * (maxSquare - minSquare) + minSquare;
|
478 |
-
if (square < minSquare) {
|
479 |
-
square = minSquare;
|
480 |
-
}
|
481 |
-
var size = Math.sqrt(square / (Math.PI * 2));
|
482 |
-
var id = dataItem.code;
|
483 |
-
|
484 |
-
dataProvider.images.push({
|
485 |
-
type: "circle",
|
486 |
-
width: size,
|
487 |
-
height: size,
|
488 |
-
color: dataItem.color,
|
489 |
-
longitude: latlong[id].longitude,
|
490 |
-
latitude: latlong[id].latitude,
|
491 |
-
title: dataItem.name,
|
492 |
-
value: value
|
493 |
-
});
|
494 |
-
}
|
495 |
-
|
496 |
-
gawd_map.dataProvider = dataProvider;
|
497 |
-
gawd_map.projection = "eckert6";
|
498 |
-
|
499 |
-
gawd_map.write("realtime_map");
|
500 |
-
jQuery("#realtime_map").find('a').hide();
|
501 |
-
|
502 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/light.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
AmCharts.themes.light={themeName:"light",AmChart:{color:"#000000",backgroundColor:"#FFFFFF"},AmCoordinateChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmStockChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmSlicedChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"],outlineAlpha:1,outlineThickness:2,labelTickColor:"#000000",labelTickAlpha:0.3},AmRectangularChart:{zoomOutButtonColor:'#000000',zoomOutButtonRollOverAlpha:0.15,zoomOutButtonImage:"lens"},AxisBase:{axisColor:"#000000",axisAlpha:0.3,gridAlpha:0.1,gridColor:"#000000"},ChartScrollbar:{backgroundColor:"#000000",backgroundAlpha:0.12,graphFillAlpha:0.5,graphLineAlpha:0,selectedBackgroundColor:"#FFFFFF",selectedBackgroundAlpha:0.4,gridAlpha:0.15},ChartCursor:{cursorColor:"#000000",color:"#FFFFFF",cursorAlpha:0.5},AmLegend:{color:"#000000"},AmGraph:{lineAlpha:0.9},GaugeArrow:{color:"#000000",alpha:0.8,nailAlpha:0,innerRadius:"40%",nailRadius:15,startWidth:15,borderAlpha:0.8,nailBorderAlpha:0},GaugeAxis:{tickColor:"#000000",tickAlpha:1,tickLength:15,minorTickLength:8,axisThickness:3,axisColor:'#000000',axisAlpha:1,bandAlpha:0.8},TrendLine:{lineColor:"#c03246",lineAlpha:0.8},AreasSettings:{alpha:0.8,color:"#67b7dc",colorSolid:"#003767",unlistedAreasAlpha:0.4,unlistedAreasColor:"#000000",outlineColor:"#FFFFFF",outlineAlpha:0.5,outlineThickness:0.5,rollOverColor:"#3c5bdc",rollOverOutlineColor:"#FFFFFF",selectedOutlineColor:"#FFFFFF",selectedColor:"#f15135",unlistedAreasOutlineColor:"#FFFFFF",unlistedAreasOutlineAlpha:0.5},LinesSettings:{color:"#000000",alpha:0.8},ImagesSettings:{alpha:0.8,labelColor:"#000000",color:"#000000",labelRollOverColor:"#3c5bdc"},ZoomControl:{buttonFillAlpha:0.7,buttonIconColor:"#a7a7a7"},SmallMap:{mapColor:"#000000",rectangleColor:"#f15135",backgroundColor:"#FFFFFF",backgroundAlpha:0.7,borderThickness:1,borderAlpha:0.8},PeriodSelector:{color:"#000000"},PeriodButton:{color:"#000000",background:"transparent",opacity:0.7,border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",boxSizing:"border-box"},PeriodButtonSelected:{color:"#000000",backgroundColor:"#b9cdf5",border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",opacity:1,boxSizing:"border-box"},PeriodInputField:{color:"#000000",background:"transparent",border:"1px solid rgba(0, 0, 0, .3)",outline:"none"},DataSetSelector:{color:"#000000",selectedBackgroundColor:"#b9cdf5",rollOverBackgroundColor:"#a8b0e4"},DataSetCompareList:{color:"#000000",lineHeight:"100%",boxSizing:"initial",webkitBoxSizing:"initial",border:"1px solid rgba(0, 0, 0, .3)"},DataSetSelect:{border:"1px solid rgba(0, 0, 0, .3)",outline:"none"}};
|
|
inc/js/pie.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
(function(){var k=window.AmCharts;k.AmSlicedChart=k.Class({inherits:k.AmChart,construct:function(a){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");k.AmSlicedChart.base.construct.call(this,a);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=10;this.gradientRatio=[];this.maxLabelWidth=200;this.accessibleLabel="[[title]]: [[percents]]% [[value]] [[description]]";k.applyTheme(this,a,"AmSlicedChart")},initChart:function(){k.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(a){var b=a.type,c=a.dataItem,d=this.legend;if(!d.data&&c){var g=c.hidden;a=a.event;switch(b){case"clickMarker":g||d.switchable||this.clickSlice(c,a);break;case"clickLabel":g||this.clickSlice(c,a,!1);break;case"rollOverItem":g||this.rollOverSlice(c,!1,a);break;case"rollOutItem":g||this.rollOutSlice(c,a);break;case"hideItem":this.hideSlice(c,a);break;case"showItem":this.showSlice(c,a)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var a=this.legend;a&&a.invalidateSize()},addEventListeners:function(a,b){var c=this;a.mouseover(function(a){c.rollOverSlice(b,!0,a)}).mouseout(function(a){c.rollOutSlice(b,a)}).touchend(function(a){c.rollOverSlice(b,a)}).mouseup(function(a){c.clickSlice(b,a)}).contextmenu(function(a){c.handleRightClick(b,a)})},formatString:function(a,b,c){a=k.formatValue(a,b,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);var d=this.pf.precision;isNaN(this.tempPrec)||(this.pf.precision=this.tempPrec);a=k.formatValue(a,b,["percents"],this.pf);a=k.massReplace(a,{"[[title]]":b.title,"[[description]]":b.description});this.pf.precision=d;-1!=a.indexOf("[[")&&(a=k.formatDataContextValue(a,b.dataContext));a=c?k.fixNewLines(a):k.fixBrakes(a);return a=k.cleanFromEmpty(a)},startSlices:function(){var a;for(a=0;a<this.chartData.length;a++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(a):this.startSlice(this.chartData[a])},setStartTO:function(a){var b=this;a=setTimeout(function(){b.startSequenced.call(b)},b.startDuration/b.chartData.length*500*a);b.timeOuts.push(a)},pullSlices:function(a){var b=this.chartData,c;for(c=0;c<b.length;c++){var d=b[c];d.pulled&&this.pullSlice(d,1,a)}},startSequenced:function(){var a=this.chartData,b;for(b=0;b<a.length;b++)if(!a[b].started){this.startSlice(this.chartData[b]);break}},startSlice:function(a){a.started=!0;var b=a.wedge,c=this.startDuration,d=a.labelSet;b&&0<c&&(0<a.alpha&&b.show(),b.translate(a.startX,a.startY),this.animatable.push(b),b.animate({opacity:1,translate:"0,0"},c,this.startEffect));d&&0<c&&(0<a.alpha&&d.show(),d.translate(a.startX,a.startY),d.animate({opacity:1,translate:"0,0"},c,this.startEffect))},showLabels:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(0<c.alpha){var d=c.label;d&&d.show();(c=c.tick)&&c.show()}}},showSlice:function(a){isNaN(a)?a.hidden=!1:this.chartData[a].hidden=!1;this.invalidateVisibility()},hideSlice:function(a){isNaN(a)?a.hidden=!0:this.chartData[a].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(a,b,c){isNaN(a)||(a=this.chartData[a]);clearTimeout(this.hoverInt);if(!a.hidden){this.pullOnHover&&this.pullSlice(a,1);1>this.hoverAlpha&&a.wedge&&a.wedge.attr({opacity:this.hoverAlpha});var d=a.balloonX,g=a.balloonY;a.pulled&&(d+=a.pullX,g+=a.pullY);var f=this.formatString(this.balloonText,a,!0),h=this.balloonFunction;h&&(f=h(a,f));h=k.adjustLuminosity(a.color,-.15);f?this.showBalloon(f,h,b,d,g):this.hideBalloon();0===a.value&&this.hideBalloon();this.fire({type:"rollOverSlice",dataItem:a,chart:this,event:c})}},rollOutSlice:function(a,b){isNaN(a)||(a=this.chartData[a]);a.wedge&&a.wedge.attr({opacity:1});this.hideBalloon();this.fire({type:"rollOutSlice",dataItem:a,chart:this,event:b})},clickSlice:function(a,b,c){this.checkTouchDuration(b)&&(isNaN(a)||(a=this.chartData[a]),a.pulled?this.pullSlice(a,0):this.pullSlice(a,1),k.getURL(a.url,this.urlTarget),c||this.fire({type:"clickSlice",dataItem:a,chart:this,event:b}))},handleRightClick:function(a,b){isNaN(a)||(a=this.chartData[a]);this.fire({type:"rightClickSlice",dataItem:a,chart:this,event:b})},drawTicks:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b];if(c.label&&!c.skipTick){var d=c.ty,d=k.line(this.container,[c.tx0,c.tx,c.tx2],[c.ty0,d,d],this.labelTickColor,this.labelTickAlpha);k.setCN(this,d,this.type+"-tick");k.setCN(this,d,c.className,!0);c.tick=d;c.wedge.push(d)}}},initialStart:function(){var a=this,b=a.startDuration,c=setTimeout(function(){a.showLabels.call(a)},1E3*b);a.timeOuts.push(c);a.chartCreated?a.pullSlices(!0):(a.startSlices(),0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices(!0))},pullSlice:function(a,b,c){var d=this.pullOutDuration;!0===c&&(d=0);if(c=a.wedge)0<d?(c.animate({translate:b*a.pullX+","+b*a.pullY},d,this.pullOutEffect),a.labelSet&&a.labelSet.animate({translate:b*a.pullX+","+b*a.pullY},d,this.pullOutEffect)):(a.labelSet&&a.labelSet.translate(b*a.pullX,b*a.pullY),c.translate(b*a.pullX,b*a.pullY));1==b?(a.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(a.index),a={type:"pullOutSlice",dataItem:a,chart:this}):(a.pulled=!1,a={type:"pullInSlice",dataItem:a,chart:this});this.fire(a)},pullInAll:function(a){var b=this.chartData,c;for(c=0;c<this.chartData.length;c++)c!=a&&b[c].pulled&&this.pullSlice(b[c],0)},pullOutAll:function(){var a=this.chartData,b;for(b=0;b<a.length;b++)a[b].pulled||this.pullSlice(a[b],1)},parseData:function(){var a=[];this.chartData=a;var b=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==b){var c=b.length,d=0,g,f,h;for(g=0;g<c;g++){f={};var e=b[g];f.dataContext=e;null!==e[this.valueField]&&(f.value=Number(e[this.valueField]));(h=e[this.titleField])||(h="");f.title=h;f.pulled=k.toBoolean(e[this.pulledField],!1);(h=e[this.descriptionField])||(h="");f.description=h;f.labelRadius=Number(e[this.labelRadiusField]);f.switchable=!0;f.className=e[this.classNameField];f.url=e[this.urlField];h=e[this.patternField];!h&&this.patterns&&(h=this.patterns[g]);f.pattern=h;f.visibleInLegend=k.toBoolean(e[this.visibleInLegendField],!0);h=e[this.alphaField];f.alpha=void 0!==h?Number(h):this.alpha;h=e[this.colorField];void 0!==h&&(f.color=h);f.labelColor=k.toColor(e[this.labelColorField]);d+=f.value;f.hidden=!1;a[g]=f}for(g=b=0;g<c;g++)f=a[g],f.percents=f.value/d*100,f.percents<this.groupPercent&&b++;1<b&&(this.groupValue=0,this.removeSmallSlices(),a.push({title:this.groupedTitle,value:this.groupValue,percents:this.groupValue/d*100,pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha,pattern:this.groupedPattern,className:this.groupedClassName,dataContext:{}}));c=this.baseColor;c||(c=this.pieBaseColor);d=this.brightnessStep;d||(d=this.pieBrightnessStep);for(g=0;g<a.length;g++)c?h=k.adjustLuminosity(c,g*d/100):(h=this.colors[g],void 0===h&&(h=k.randomColor())),void 0===a[g].color&&(a[g].color=h);this.recalculatePercents()}},recalculatePercents:function(){var a=this.chartData,b=0,c,d;for(c=0;c<a.length;c++)d=a[c],!d.hidden&&0<d.value&&(b+=d.value);for(c=0;c<a.length;c++)d=this.chartData[c],d.percents=!d.hidden&&0<d.value?100*d.value/b:0},removeSmallSlices:function(){var a=this.chartData,b;for(b=a.length-1;0<=b;b--)a[b].percents<this.groupPercent&&(this.groupValue+=a[b].value,a.splice(b,1))},animateAgain:function(){var a=this;a.startSlices();for(var b=0;b<a.chartData.length;b++){var c=a.chartData[b];c.started=!1;var d=c.wedge;d&&(d.setAttr("opacity",a.startAlpha),d.translate(c.startX,c.startY));if(d=c.labelSet)d.setAttr("opacity",a.startAlpha),d.translate(c.startX,c.startY)}b=a.startDuration;0<b?(b=setTimeout(function(){a.pullSlices.call(a)},1200*b),a.timeOuts.push(b)):a.pullSlices()},measureMaxLabel:function(){var a=this.chartData,b=0,c;for(c=0;c<a.length;c++){var d=a[c],g=this.formatString(this.labelText,d),f=this.labelFunction;f&&(g=f(d,g));d=k.text(this.container,g,this.color,this.fontFamily,this.fontSize);g=d.getBBox().width;g>b&&(b=g);d.remove()}return b}})})();(function(){var k=window.AmCharts;k.AmPieChart=k.Class({inherits:k.AmSlicedChart,construct:function(a){this.type="pie";k.AmPieChart.base.construct.call(this,a);this.cname="AmPieChart";this.pieBrightnessStep=30;this.minRadius=10;this.depth3D=0;this.startAngle=90;this.angle=this.innerRadius=0;this.startRadius="500%";this.pullOutRadius="20%";this.labelRadius=20;this.labelText="[[title]]: [[percents]]%";this.balloonText="[[title]]: [[percents]]% ([[value]])\n[[description]]";this.previousScale=1;this.adjustPrecision=!1;this.gradientType="radial";k.applyTheme(this,a,this.cname)},drawChart:function(){k.AmPieChart.base.drawChart.call(this);var a=this.chartData;if(k.ifArray(a)){if(0<this.realWidth&&0<this.realHeight){k.VML&&(this.startAlpha=1);var b=this.startDuration,c=this.container,d=this.updateWidth();this.realWidth=d;var g=this.updateHeight();this.realHeight=g;var f=k.toCoordinate,h=f(this.marginLeft,d),e=f(this.marginRight,d),z=f(this.marginTop,g)+this.getTitleHeight(),n=f(this.marginBottom,g),A,B,l,x=k.toNumber(this.labelRadius),p=this.measureMaxLabel();p>this.maxLabelWidth&&(p=this.maxLabelWidth);this.labelText&&this.labelsEnabled||(x=p=0);A=void 0===this.pieX?(d-h-e)/2+h:f(this.pieX,this.realWidth);B=void 0===this.pieY?(g-z-n)/2+z:f(this.pieY,g);l=f(this.radius,d,g);l||(d=0<=x?d-h-e-2*p:d-h-e,g=g-z-n,l=Math.min(d,g),g<d&&(l/=1-this.angle/90,l>d&&(l=d)),g=k.toCoordinate(this.pullOutRadius,l),l=(0<=x?l-1.8*(x+g):l-1.8*g)/2);l<this.minRadius&&(l=this.minRadius);g=f(this.pullOutRadius,l);z=k.toCoordinate(this.startRadius,l);
|
2 |
-
f=f(this.innerRadius,l);f>=l&&(f=l-1);n=k.fitToBounds(this.startAngle,0,360);0<this.depth3D&&(n=270<=n?270:90);n-=90;360<n&&(n-=360);d=l-l*this.angle/90;for(h=p=0;h<a.length;h++)e=a[h],!0!==e.hidden&&(p+=k.roundTo(e.percents,this.pf.precision));p=k.roundTo(p,this.pf.precision);this.tempPrec=NaN;this.adjustPrecision&&100!=p&&(this.tempPrec=this.pf.precision+1);for(var E,h=0;h<a.length;h++)if(e=a[h],!0!==e.hidden&&(this.showZeroSlices||0!==e.percents)){var r=360*e.percents/100,p=Math.sin((n+r/2)/180*
|
3 |
-
Math.PI),C=d/l*-Math.cos((n+r/2)/180*Math.PI),q=this.outlineColor;q||(q=e.color);var v=this.alpha;isNaN(e.alpha)||(v=e.alpha);q={fill:e.color,stroke:q,"stroke-width":this.outlineThickness,"stroke-opacity":this.outlineAlpha,"fill-opacity":v};e.url&&(q.cursor="pointer");q=k.wedge(c,A,B,n,r,l,d,f,this.depth3D,q,this.gradientRatio,e.pattern,this.path,this.gradientType);k.setCN(this,q,"pie-item");k.setCN(this,q.wedge,"pie-slice");k.setCN(this,q,e.className,!0);this.addEventListeners(q,e);e.startAngle=
|
4 |
-
n;a[h].wedge=q;0<b&&(this.chartCreated||q.setAttr("opacity",this.startAlpha));e.ix=p;e.iy=C;e.wedge=q;e.index=h;e.label=null;v=c.set();if(this.labelsEnabled&&this.labelText&&e.percents>=this.hideLabelsPercent){var m=n+r/2;0>m&&(m+=360);360<m&&(m-=360);var t=x;isNaN(e.labelRadius)||(t=e.labelRadius,0>t&&(e.skipTick=!0));var r=A+p*(l+t),D=B+C*(l+t),w,u=0;isNaN(E)&&350<m&&1<a.length-h&&(E=h-1+Math.floor((a.length-h)/2));if(0<=t){var y;90>=m&&0<=m?(y=0,w="start",u=8):90<=m&&180>m?(y=1,w="start",u=8):
|
5 |
-
180<=m&&270>m?(y=2,w="end",u=-8):270<=m&&354>=m?(y=3,w="end",u=-8):354<=m&&(h>E?(y=0,w="start",u=8):(y=3,w="end",u=-8));e.labelQuarter=y}else w="middle";m=this.formatString(this.labelText,e);(t=this.labelFunction)&&(m=t(e,m));t=e.labelColor;t||(t=this.color);""!==m&&(m=k.wrappedText(c,m,t,this.fontFamily,this.fontSize,w,!1,this.maxLabelWidth),k.setCN(this,m,"pie-label"),k.setCN(this,m,e.className,!0),m.translate(r+1.5*u,D),m.node.style.pointerEvents="none",e.ty=D,e.textX=r+1.5*u,v.push(m),this.axesSet.push(v),e.labelSet=v,e.label=m);e.tx=r;e.tx2=r+u;e.tx0=A+p*l;e.ty0=B+C*l}r=f+(l-f)/2;e.pulled&&(r+=this.pullOutRadiusReal);this.accessible&&this.accessibleLabel&&(D=this.formatString(this.accessibleLabel,e),this.makeAccessible(q,D));e.balloonX=p*r+A;e.balloonY=C*r+B;e.startX=Math.round(p*z);e.startY=Math.round(C*z);e.pullX=Math.round(p*g);e.pullY=Math.round(C*g);this.graphsSet.push(q);if(0===e.alpha||0<b&&!this.chartCreated)q.hide(),v&&v.hide();n+=360*e.percents/100;360<n&&(n-=360)}0<x&&this.arrangeLabels();
|
6 |
-
this.pieXReal=A;this.pieYReal=B;this.radiusReal=l;this.innerRadiusReal=f;0<x&&this.drawTicks();this.initialStart();this.setDepths()}(a=this.legend)&&a.invalidateSize()}else this.cleanChart();this.dispDUpd()},setDepths:function(){var a=this.chartData,b;for(b=0;b<a.length;b++){var c=a[b],d=c.wedge,c=c.startAngle;0<=c&&180>c?d.toFront():180<=c&&d.toBack()}},arrangeLabels:function(){var a=this.chartData,b=a.length,c,d;for(d=b-1;0<=d;d--)c=a[d],0!==c.labelQuarter||c.hidden||this.checkOverlapping(d,c,0,!0,0);for(d=0;d<b;d++)c=a[d],1!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,1,!1,0);for(d=b-1;0<=d;d--)c=a[d],2!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,2,!0,0);for(d=0;d<b;d++)c=a[d],3!=c.labelQuarter||c.hidden||this.checkOverlapping(d,c,3,!1,0)},checkOverlapping:function(a,b,c,d,g){var f,h,e=this.chartData,k=e.length,n=b.label;if(n){if(!0===d)for(h=a+1;h<k;h++)e[h].labelQuarter==c&&(f=this.checkOverlappingReal(b,e[h],c))&&(h=k);else for(h=a-1;0<=h;h--)e[h].labelQuarter==c&&(f=this.checkOverlappingReal(b,e[h],c))&&(h=0);!0===f&&100>g&&isNaN(b.labelRadius)&&(f=b.ty+3*b.iy,b.ty=f,n.translate(b.textX,f),this.checkOverlapping(a,b,c,d,g+1))}},checkOverlappingReal:function(a,b,c){var d=!1,g=a.label,f=b.label;a.labelQuarter!=c||a.hidden||b.hidden||!f||(g=g.getBBox(),c={},c.width=g.width,c.height=g.height,c.y=a.ty,c.x=a.tx,a=f.getBBox(),f={},f.width=a.width,f.height=a.height,f.y=b.ty,f.x=b.tx,k.hitTest(c,f)&&(d=!0));return d}})})();
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/serial.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
(function(){var e=window.AmCharts;e.AmRectangularChart=e.Class({inherits:e.AmCoordinateChart,construct:function(a){e.AmRectangularChart.base.construct.call(this,a);this.theme=a;this.createEvents("zoomed","changed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.depth3D=this.angle=0;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.maxZoomFactor=20;this.zoomOutButtonImageSize=19;this.zoomOutButtonImage="lens";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;e.applyTheme(this,a,"AmRectangularChart")},initChart:function(){e.AmRectangularChart.base.initChart.call(this);this.updateDxy();!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),this.drawGraphs=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();this.scrollbarOnly||this.updateGraphs()},drawChart:function(){e.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(e.ifArray(this.chartData)){var a=this.chartCursor;a&&a.draw()}},resetMargins:function(){var a={},b;if("xy"==this.type){var c=this.xAxes,d=this.yAxes;for(b=0;b<c.length;b++){var g=c[b];g.ignoreAxisWidth||(g.setOrientation(!0),g.fixAxisPosition(),a[g.position]=!0)}for(b=0;b<d.length;b++)c=d[b],c.ignoreAxisWidth||(c.setOrientation(!1),c.fixAxisPosition(),a[c.position]=!0)}else{d=this.valueAxes;for(b=0;b<d.length;b++)c=d[b],c.ignoreAxisWidth||(c.setOrientation(this.rotate),c.fixAxisPosition(),a[c.position]=!0);(b=this.categoryAxis)&&!b.ignoreAxisWidth&&(b.setOrientation(!this.rotate),b.fixAxisPosition(),b.fixAxisPosition(),a[b.position]=!0)}a.left&&(this.marginLeft=0);a.right&&(this.marginRight=0);a.top&&(this.marginTop=0);a.bottom&&(this.marginBottom=0);this.fixMargins=a},measureMargins:function(){var a=this.valueAxes,b,c=this.autoMarginOffset,d=this.fixMargins,g=this.realWidth,h=this.realHeight,f=c,e=c,l=g;b=h;var m;for(m=0;m<a.length;m++)a[m].handleSynchronization(),b=this.getAxisBounds(a[m],f,l,e,b),f=Math.round(b.l),l=Math.round(b.r),e=Math.round(b.t),b=Math.round(b.b);if(a=this.categoryAxis)b=this.getAxisBounds(a,f,l,e,b),f=Math.round(b.l),l=Math.round(b.r),e=Math.round(b.t),b=Math.round(b.b);d.left&&f<c&&(this.marginLeft=Math.round(-f+c),!isNaN(this.minMarginLeft)&&this.marginLeft<this.minMarginLeft&&(this.marginLeft=this.minMarginLeft));d.right&&l>=g-c&&(this.marginRight=Math.round(l-g+c),!isNaN(this.minMarginRight)&&this.marginRight<this.minMarginRight&&(this.marginRight=this.minMarginRight));d.top&&e<c+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-e+c+this.titleHeight),!isNaN(this.minMarginTop)&&this.marginTop<this.minMarginTop&&(this.marginTop=this.minMarginTop));d.bottom&&b>h-c&&(this.marginBottom=Math.round(this.marginBottom+b-h+c),!isNaN(this.minMarginBottom)&&this.marginBottom<this.minMarginBottom&&(this.marginBottom=this.minMarginBottom));this.initChart()},getAxisBounds:function(a,b,c,d,g){if(!a.ignoreAxisWidth){var e=a.labelsSet,f=a.tickLength;a.inside&&(f=0);if(e)switch(e=a.getBBox(),a.position){case"top":a=e.y;d>a&&(d=a);break;case"bottom":a=e.y+e.height;g<a&&(g=a);break;case"right":a=e.x+e.width+f+3;c<a&&(c=a);break;case"left":a=e.x-f,b>a&&(b=a)}}return{l:b,t:d,r:c,b:g}},drawZoomOutButton:function(){var a=this;if(!a.zbSet){var b=a.container.set();a.zoomButtonSet.push(b);var c=a.color,d=a.fontSize,g=a.zoomOutButtonImageSize,h=a.zoomOutButtonImage.replace(/\.[a-z]*$/i,""),f=e.lang.zoomOutText||a.zoomOutText,k=a.zoomOutButtonColor,l=a.zoomOutButtonAlpha,m=a.zoomOutButtonFontSize,p=a.zoomOutButtonPadding;isNaN(m)||(d=m);(m=a.zoomOutButtonFontColor)&&(c=m);var m=a.zoomOutButton,n;m&&(m.fontSize&&(d=m.fontSize),m.color&&(c=m.color),m.backgroundColor&&(k=m.backgroundColor),isNaN(m.backgroundAlpha)||(a.zoomOutButtonRollOverAlpha=m.backgroundAlpha));var r=m=0;void 0!==a.pathToImages&&h&&(n=a.container.image(a.pathToImages+h+a.extension,0,0,g,g),e.setCN(a,n,"zoom-out-image"),b.push(n),n=n.getBBox(),m=n.width+5);void 0!==f&&(c=e.text(a.container,f,c,a.fontFamily,d,"start"),e.setCN(a,c,"zoom-out-label"),d=c.getBBox(),r=n?n.height/2-3:d.height/2,c.translate(m,r),b.push(c));n=b.getBBox();c=1;e.isModern||(c=0);k=e.rect(a.container,n.width+2*p+5,n.height+2*p-2,k,1,1,k,c);k.setAttr("opacity",l);k.translate(-p,-p);e.setCN(a,k,"zoom-out-bg");b.push(k);k.toBack();a.zbBG=k;n=k.getBBox();b.translate(a.marginLeftReal+a.plotAreaWidth-n.width+p,a.marginTopReal+p);b.hide();b.mouseover(function(){a.rollOverZB()}).mouseout(function(){a.rollOutZB()}).click(function(){a.clickZB()}).touchstart(function(){a.rollOverZB()}).touchend(function(){a.rollOutZB();a.clickZB()});for(l=0;l<b.length;l++)b[l].attr({cursor:"pointer"});a.zbSet=b}},rollOverZB:function(){this.rolledOverZB=!0;this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.rolledOverZB=!1;this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.rolledOverZB=!1;this.zoomOut()},zoomOut:function(){this.zoomOutValueAxes()},drawPlotArea:function(){var a=this.dx,b=this.dy,c=this.marginLeftReal,d=this.marginTopReal,g=this.plotAreaWidth-1,h=this.plotAreaHeight-1,f=this.plotAreaFillColors,k=this.plotAreaFillAlphas,l=this.plotAreaBorderColor,m=this.plotAreaBorderAlpha;"object"==typeof k&&(k=k[0]);f=e.polygon(this.container,[0,g,g,0,0],[0,0,h,h,0],f,k,1,l,m,this.plotAreaGradientAngle);e.setCN(this,f,"plot-area");f.translate(c+a,d+b);this.set.push(f);0!==a&&0!==b&&(f=this.plotAreaFillColors,"object"==typeof f&&(f=f[0]),f=e.adjustLuminosity(f,-.15),g=e.polygon(this.container,[0,a,g+a,g,0],[0,b,b,0,0],f,k,1,l,m),e.setCN(this,g,"plot-area-bottom"),g.translate(c,d+h),this.set.push(g),a=e.polygon(this.container,[0,0,a,a,0],[0,h,h+b,b,0],f,k,1,l,m),e.setCN(this,a,"plot-area-left"),a.translate(c,d),this.set.push(a));(c=this.bbset)&&this.scrollbarOnly&&c.remove()},updatePlotArea:function(){var a=this.updateWidth(),b=this.updateHeight(),c=this.container;this.realWidth=a;this.realWidth=b;c&&this.container.setSize(a,b);var c=this.marginLeftReal,d=this.marginTopReal,a=a-c-this.marginRightReal-this.dx,b=b-d-this.marginBottomReal;1>a&&(a=1);1>b&&(b=1);this.plotAreaWidth=Math.round(a);this.plotAreaHeight=Math.round(b);this.plotBalloonsSet.translate(c,d)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/
|
2 |
-
180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var a=this.getTitleHeight();this.titleHeight=a;this.marginTopReal=this.marginTop-this.dy;this.fixMargins&&!this.fixMargins.top&&(this.marginTopReal+=a);this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b];this.setAxisRenderers(c);this.updateObjectSize(c)}},setAxisRenderers:function(a){a.axisRenderer=e.RecAxis;a.guideFillRenderer=e.RecFill;a.axisItemRenderer=e.RecItem;a.marginsChanged=!0},updateGraphs:function(){var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.index=b;c.rotate=this.rotate;this.updateObjectSize(c)}},updateObjectSize:function(a){a.width=this.plotAreaWidth-1;a.height=this.plotAreaHeight-1;a.x=this.marginLeftReal;a.y=this.marginTopReal;a.dx=this.dx;a.dy=this.dy},updateChartCursor:function(){var a=this.chartCursor;a&&(a=e.processObject(a,e.ChartCursor,this.theme),this.updateObjectSize(a),this.addChartCursor(a),a.chart=this)},processScrollbars:function(){var a=this.chartScrollbar;a&&(a=e.processObject(a,e.ChartScrollbar,this.theme),this.addChartScrollbar(a))},updateScrollbars:function(){},removeChartCursor:function(){e.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b];c.valueAxis.recalculateToPercents?c.set&&c.set.hide():(c.x=this.marginLeftReal,c.y=this.marginTopReal,c.draw())}},handleCursorValueZoom:function(){},addTrendLine:function(a){this.trendLines.push(a)},zoomOutValueAxes:function(){for(var a=this.valueAxes,b=0;b<a.length;b++)a[b].zoomOut()},removeTrendLine:function(a){var b=this.trendLines,c;for(c=b.length-1;0<=c;c--)b[c]==a&&b.splice(c,1)},adjustMargins:function(a,b){var c=a.position,d=a.scrollbarHeight+a.offset;a.enabled&&("top"==c?b?this.marginLeftReal+=d:this.marginTopReal+=d:b?this.marginRightReal+=d:this.marginBottomReal+=d)},getScrollbarPosition:function(a,b,c){var d="bottom",g="top";a.oppositeAxis||(g=d,d="top");a.position=b?"bottom"==c||"left"==c?d:g:"top"==c||"right"==c?d:g},updateChartScrollbar:function(a,b){if(a){a.rotate=b;var c=this.marginTopReal,d=this.marginLeftReal,g=a.scrollbarHeight,e=this.dx,f=this.dy,k=a.offset;"top"==a.position?b?(a.y=c,a.x=d-g-k):(a.y=c-g+f-k,a.x=d+e):b?(a.y=c+f,a.x=d+this.plotAreaWidth+e+k):(a.y=c+this.plotAreaHeight+
|
3 |
-
k,a.x=this.marginLeftReal)}},showZB:function(a){var b=this.zbSet;a&&(b=this.zoomOutText,""!==b&&b&&this.drawZoomOutButton());if(b=this.zbSet)this.zoomButtonSet.push(b),a?b.show():b.hide(),this.rollOutZB()},handleReleaseOutside:function(a){e.AmRectangularChart.base.handleReleaseOutside.call(this,a);(a=this.chartCursor)&&a.handleReleaseOutside&&a.handleReleaseOutside()},handleMouseDown:function(a){e.AmRectangularChart.base.handleMouseDown.call(this,a);var b=this.chartCursor;b&&b.handleMouseDown&&!this.rolledOverZB&&b.handleMouseDown(a)},update:function(){e.AmRectangularChart.base.update.call(this);this.chartCursor&&this.chartCursor.update&&this.chartCursor.update()},handleScrollbarValueZoom:function(a){this.relativeZoomValueAxes(a.target.valueAxes,a.relativeStart,a.relativeEnd);this.zoomAxesAndGraphs()},zoomValueScrollbar:function(a){if(a&&a.enabled){var b=a.valueAxes[0],c=b.relativeStart,d=b.relativeEnd;b.reversed&&(d=1-c,c=1-b.relativeEnd);a.percentZoom(c,d)}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){var a=this.valueAxes,b;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);a=this.graphs;for(b=0;b<a.length;b++)a[b].zoom(this.start,this.end);(b=this.chartCursor)&&b.clearSelection();this.zoomTrendLines()}},handleValueAxisZoomReal:function(a,b){var c=a.relativeStart,d=a.relativeEnd;if(c>d)var g=c,c=d,d=g;this.relativeZoomValueAxes(b,c,d);this.updateAfterValueZoom()},updateAfterValueZoom:function(){this.zoomAxesAndGraphs();this.zoomScrollbar()},relativeZoomValueAxes:function(a,b,c){b=e.fitToBounds(b,0,1);c=e.fitToBounds(c,0,1);if(b>c){var d=b;b=c;c=d}var d=1/this.maxZoomFactor,g=e.getDecimals(d)+4;c-b<d&&(c=b+(c-b)/2,b=c-d/2,c+=d/2);b=e.roundTo(b,g);c=e.roundTo(c,g);d=!1;if(a){for(g=0;g<a.length;g++){var h=a[g].zoomToRelativeValues(b,c,!0);h&&(d=h)}this.showZB()}return d},addChartCursor:function(a){e.callMethod("destroy",[this.chartCursor]);a&&(this.listenTo(a,"moved",this.handleCursorMove),this.listenTo(a,"zoomed",this.handleCursorZoom),this.listenTo(a,"zoomStarted",this.handleCursorZoomStarted),
|
4 |
-
this.listenTo(a,"panning",this.handleCursorPanning),this.listenTo(a,"onHideCursor",this.handleCursorHide));this.chartCursor=a},handleCursorChange:function(){},handleCursorMove:function(a){var b,c=this.valueAxes;for(b=0;b<c.length;b++)a.panning||c[b].showBalloon(a.x,a.y)},handleCursorZoom:function(a){if(this.skipZoomed)this.skipZoomed=!1;else{var b=this.startX0,c=this.endX0,d=this.endY0,g=this.startY0,e=a.startX,f=a.endX,k=a.startY,l=a.endY;this.startX0=this.endX0=this.startY0=this.endY0=NaN;this.handleCursorZoomReal(b+
|
5 |
-
e*(c-b),b+f*(c-b),g+k*(d-g),g+l*(d-g),a)}},handleCursorHide:function(){var a,b=this.valueAxes;for(a=0;a<b.length;a++)b[a].hideBalloon();b=this.graphs;for(a=0;a<b.length;a++)b[a].hideBalloonReal()}})})();(function(){var e=window.AmCharts;e.AmSerialChart=e.Class({inherits:e.AmRectangularChart,construct:function(a){this.type="serial";e.AmSerialChart.base.construct.call(this,a);this.cname="AmSerialChart";this.theme=a;this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=.8;var b=new e.CategoryAxis(a);b.chart=this;this.categoryAxis=b;this.zoomOutOnDataUpdate=!0;this.mouseWheelZoomEnabled=this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=!1;this.minSelectedTime=0;e.applyTheme(this,a,this.cname)},initChart:function(){e.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");if(this.dataChanged)this.parseData();else this.onDataUpdated();this.drawGraphs=!0},onDataUpdated:function(){var a=this.countColumns(),b=this.chartData,c=this.graphs,d;for(d=0;d<c.length;d++){var g=c[d];g.data=b;g.columnCount=a}0<b.length&&(this.firstTime=this.getStartTime(b[0].time),this.lastTime=this.getEndTime(b[b.length-1].time));this.drawChart();this.autoMargins&&!this.marginsUpdated?(this.marginsUpdated=!0,this.measureMargins()):this.dispDUpd()},handleWheelReal:function(a,b){if(!this.wheelBusy){var c=this.categoryAxis,d=c.parseDates,g=c.minDuration(),e=c=1;this.mouseWheelZoomEnabled?b||(c=-1):b&&(c=-1);var f=this.chartCursor;if(f){var k=f.mouseX,f=f.mouseY;c!=e&&(k=this.rotate?f/this.plotAreaHeight:k/this.plotAreaWidth,c*=k,e*=1-k)}var l=this.chartData.length,k=this.lastTime,f=this.firstTime;0>a?d?(l=this.endTime-this.startTime,d=this.startTime+c*g,g=this.endTime+
|
6 |
-
e*g,0<e&&0<c&&g>=k&&(g=k,d=k-l),this.zoomToDates(new Date(d),new Date(g))):(0<e&&0<c&&this.end>=l-1&&(c=e=0),d=this.start+c,g=this.end+e,this.zoomToIndexes(d,g)):d?(l=this.endTime-this.startTime,d=this.startTime-c*g,g=this.endTime-e*g,0<e&&0<c&&d<=f&&(d=f,g=f+l),this.zoomToDates(new Date(d),new Date(g))):(0<e&&0<c&&1>this.start&&(c=e=0),d=this.start-c,g=this.end-e,this.zoomToIndexes(d,g))}},validateData:function(a){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!a&&(this.endTime=this.end=this.startTime=this.start=NaN);e.AmSerialChart.base.validateData.call(this)},drawChart:function(){if(0<this.realWidth&&0<this.realHeight){e.AmSerialChart.base.drawChart.call(this);var a=this.chartData;if(e.ifArray(a)){var b=this.chartScrollbar;!b||!this.marginsUpdated&&this.autoMargins||b.draw();(b=this.valueScrollbar)&&b.draw();var a=a.length-1,c,b=this.categoryAxis;if(b.parseDates&&!b.equalSpacing){if(b=this.startTime,c=this.endTime,isNaN(b)||isNaN(c))b=this.firstTime,c=this.lastTime}else if(b=this.start,c=this.end,isNaN(b)||isNaN(c))b=0,c=a;this.endTime=this.startTime=this.end=this.start=void 0;this.zoom(b,c)}}else this.cleanChart()},cleanChart:function(){e.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor,this.valueScrollbar])},updateCategoryAxis:function(a,b,c){a.chart=this;a.id=c;a.rotate=b;a.setOrientation(!this.rotate);a.init();this.setAxisRenderers(a);this.updateObjectSize(a)},updateValueAxes:function(){e.AmSerialChart.base.updateValueAxes.call(this);var a=this.valueAxes,b;for(b=0;b<a.length;b++){var c=a[b],d=this.rotate;c.rotate=d;c.setOrientation(d);d=this.categoryAxis;if(!d.startOnAxis||d.parseDates)c.expandMinMax=!0}},getStartTime:function(a){var b=this.categoryAxis;return e.resetDateToMin(new Date(a),b.minPeriod,1,b.firstDayOfWeek).getTime()},getEndTime:function(a){var b=e.extractPeriod(this.categoryAxis.minPeriod);return e.changeDate(new Date(a),b.period,b.count,!0).getTime()-1},updateMargins:function(){e.AmSerialChart.base.updateMargins.call(this);var a=this.chartScrollbar;a&&(this.getScrollbarPosition(a,this.rotate,this.categoryAxis.position),this.adjustMargins(a,this.rotate));if(a=this.valueScrollbar)this.getScrollbarPosition(a,!this.rotate,this.valueAxes[0].position),this.adjustMargins(a,!this.rotate)},updateScrollbars:function(){e.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,this.rotate);this.updateChartScrollbar(this.valueScrollbar,!this.rotate)},zoom:function(a,b){var c=this.categoryAxis;c.parseDates&&!c.equalSpacing?this.timeZoom(a,b):this.indexZoom(a,b);isNaN(a)&&this.zoomOutValueAxes();this.updateLegendValues()},timeZoom:function(a,b){var c=this.maxSelectedTime;isNaN(c)||(b!=this.endTime&&b-a>c&&(a=b-c),a!=this.startTime&&b-a>c&&(b=a+c));var d=this.minSelectedTime;if(0<d&&b-a<d){var g=Math.round(a+(b-a)/2),d=Math.round(d/2);a=g-d;b=g+d}d=this.chartData;g=this.categoryAxis;if(e.ifArray(d)&&(a!=this.startTime||b!=this.endTime)){var h=g.minDuration(),f=this.firstTime,k=this.lastTime;
|
7 |
-
a||(a=f,isNaN(c)||(a=k-c));b||(b=k);a>k&&(a=k);b<f&&(b=f);a<f&&(a=f);b>k&&(b=k);b<a&&(b=a+h);b-a<h/5&&(b<k?b=a+h/5:a=b-h/5);this.startTime=a;this.endTime=b;c=d.length-1;h=this.getClosestIndex(d,"time",a,!0,0,c);d=this.getClosestIndex(d,"time",b,!1,h,c);g.timeZoom(a,b);g.zoom(h,d);this.start=e.fitToBounds(h,0,c);this.end=e.fitToBounds(d,0,c);this.zoomAxesAndGraphs();this.zoomScrollbar();this.fixCursor();this.showZB();this.updateColumnsDepth();this.dispatchTimeZoomEvent()}},showZB:function(){var a,b=this.categoryAxis;b&&b.parseDates&&!b.equalSpacing&&(this.startTime>this.firstTime&&(a=!0),this.endTime<this.lastTime&&(a=!0));0<this.start&&(a=!0);this.end<this.chartData.length-1&&(a=!0);if(b=this.valueAxes)b=b[0],0!==b.relativeStart&&(a=!0),1!=b.relativeEnd&&(a=!0);e.AmSerialChart.base.showZB.call(this,a)},updateAfterValueZoom:function(){e.AmSerialChart.base.updateAfterValueZoom.call(this);this.updateColumnsDepth()},indexZoom:function(a,b){var c=this.maxSelectedSeries;isNaN(c)||(b!=this.end&&b-a>c&&(a=b-c),a!=this.start&&b-a>c&&(b=a+c));if(a!=this.start||b!=this.end){var d=this.chartData.length-1;isNaN(a)&&(a=0,isNaN(c)||(a=d-c));isNaN(b)&&(b=d);b<a&&(b=a);b>d&&(b=d);a>d&&(a=d-1);0>a&&(a=0);this.start=a;this.end=b;this.categoryAxis.zoom(a,b);this.zoomAxesAndGraphs();this.zoomScrollbar();this.fixCursor();0!==a||b!=this.chartData.length-1?this.showZB(!0):this.showZB(!1);this.updateColumnsDepth();this.dispatchIndexZoomEvent()}},updateGraphs:function(){e.AmSerialChart.base.updateGraphs.call(this);var a=this.graphs,b;for(b=0;b<a.length;b++){var c=a[b];c.columnWidthReal=this.columnWidth;c.categoryAxis=this.categoryAxis;e.isString(c.fillToGraph)&&(c.fillToGraph=this.graphsById[c.fillToGraph])}},zoomAxesAndGraphs:function(){e.AmSerialChart.base.zoomAxesAndGraphs.call(this);this.updateColumnsDepth()},updateColumnsDepth:function(){if(0!==this.depth3D||0!==this.angle){var a,b=this.graphs,c;this.columnsArray=[];for(a=0;a<b.length;a++){c=b[a];var d=c.columnsArray;if(d){var g;for(g=0;g<d.length;g++)this.columnsArray.push(d[g])}}this.columnsArray.sort(this.compareDepth);if(0<this.columnsArray.length){b=this.columnsSet;d=this.container.set();this.columnSet.push(d);for(a=0;a<this.columnsArray.length;a++)d.push(this.columnsArray[a].column.set);c&&d.translate(c.x,c.y);this.columnsSet=d;e.remove(b)}}},compareDepth:function(a,b){return a.depth>b.depth?1:-1},zoomScrollbar:function(){var a=this.chartScrollbar,b=this.categoryAxis;if(a){if(!this.zoomedByScrollbar){var c=a.dragger;c&&c.stop()}this.zoomedByScrollbar=!1;b.parseDates&&!b.equalSpacing?a.timeZoom(this.startTime,this.endTime):a.zoom(this.start,this.end)}this.zoomValueScrollbar(this.valueScrollbar)},updateTrendLines:function(){var a=this.trendLines,b;for(b=0;b<a.length;b++){var c=a[b],c=e.processObject(c,e.TrendLine,this.theme);a[b]=c;c.chart=this;c.id||(c.id="trendLineAuto"+b+"_"+(new Date).getTime());e.isString(c.valueAxis)&&(c.valueAxis=this.getValueAxisById(c.valueAxis));c.valueAxis||(c.valueAxis=this.valueAxes[0]);c.categoryAxis=this.categoryAxis}},countColumns:function(){var a=0,b=this.valueAxes.length,c=this.graphs.length,d,e,h=!1,f,k;for(k=0;k<b;k++){e=this.valueAxes[k];var l=e.stackType;if("100%"==l||"regular"==l)for(h=!1,f=0;f<c;f++)d=this.graphs[f],d.tcc=1,d.valueAxis==e&&"column"==d.type&&(!h&&d.stackable&&(a++,h=!0),(!d.stackable&&d.clustered||d.newStack)&&a++,d.columnIndex=a-1,d.clustered||(d.columnIndex=0));if("none"==l||"3d"==l){h=!1;for(f=0;f<c;f++)d=this.graphs[f],d.valueAxis==e&&"column"==d.type&&(d.clustered?(d.tcc=1,d.newStack&&(a=0),d.hidden||(d.columnIndex=a,a++)):d.hidden||(h=!0,d.tcc=1,d.columnIndex=0));h&&0===a&&(a=1)}if("3d"==l){e=1;for(k=0;k<c;k++)d=this.graphs[k],d.newStack&&e++,d.depthCount=e,d.tcc=a;a=e}}return a},parseData:function(){e.AmSerialChart.base.parseData.call(this);this.parseSerialData(this.dataProvider)},getCategoryIndexByValue:function(a){var b=this.chartData,c;for(c=0;c<b.length;c++)if(b[c].category==a)return c},handleScrollbarZoom:function(a){this.zoomedByScrollbar=!0;this.zoom(a.start,a.end)},dispatchTimeZoomEvent:function(){if(this.drawGraphs&&(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime)){var a={type:"zoomed"};a.startDate=new Date(this.startTime);a.endDate=new Date(this.endTime);a.startIndex=this.start;a.endIndex=this.end;this.startIndex=this.start;this.endIndex=this.end;this.startDate=a.startDate;this.endDate=a.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;var b=this.categoryAxis,c=e.extractPeriod(b.minPeriod).period,b=b.dateFormatsObject[c];a.startValue=e.formatDate(a.startDate,b,this);a.endValue=e.formatDate(a.endDate,b,this);a.chart=this;a.target=this;this.fire(a)}},dispatchIndexZoomEvent:function(){if(this.drawGraphs&&(this.prevStartIndex!=this.start||this.prevEndIndex!=this.end)){this.startIndex=this.start;this.endIndex=this.end;var a=this.chartData;if(e.ifArray(a)&&!isNaN(this.start)&&!isNaN(this.end)){var b={chart:this,target:this,type:"zoomed"};b.startIndex=this.start;b.endIndex=this.end;b.startValue=a[this.start].category;b.endValue=a[this.end].category;this.categoryAxis.parseDates&&(this.startTime=a[this.start].time,this.endTime=a[this.end].time,b.startDate=new Date(this.startTime),b.endDate=new Date(this.endTime));this.prevStartIndex=this.start;this.prevEndIndex=this.end;this.fire(b)}}},updateLegendValues:function(){this.legend&&this.legend.updateValues()},getClosestIndex:function(a,b,c,d,e,h){0>e&&(e=0);h>a.length-1&&(h=a.length-1);var f=e+Math.round((h-e)/2),k=a[f][b];return c==k?f:1>=h-e?d?e:Math.abs(a[e][b]-c)<Math.abs(a[h][b]-c)?e:h:c==k?f:c<k?this.getClosestIndex(a,b,
|
8 |
-
c,d,e,f):this.getClosestIndex(a,b,c,d,f,h)},zoomToIndexes:function(a,b){var c=this.chartData;if(c){var d=c.length;0<d&&(0>a&&(a=0),b>d-1&&(b=d-1),d=this.categoryAxis,d.parseDates&&!d.equalSpacing?this.zoom(c[a].time,this.getEndTime(c[b].time)):this.zoom(a,b))}},zoomToDates:function(a,b){var c=this.chartData;if(c)if(this.categoryAxis.equalSpacing){var d=this.getClosestIndex(c,"time",a.getTime(),!0,0,c.length);b=e.resetDateToMin(b,this.categoryAxis.minPeriod,1);c=this.getClosestIndex(c,"time",b.getTime(),!1,0,c.length);this.zoom(d,c)}else this.zoom(a.getTime(),b.getTime())},zoomToCategoryValues:function(a,b){this.chartData&&this.zoom(this.getCategoryIndexByValue(a),this.getCategoryIndexByValue(b))},formatPeriodString:function(a,b){if(b){var c=["value","open","low","high","close"],d="value open low high close average sum count".split(" "),g=b.valueAxis,h=this.chartData,f=b.numberFormatter;f||(f=this.nf);for(var k=0;k<c.length;k++){for(var l=c[k],m=0,p=0,n,r,w,z,u,q=0,D=0,v,t,x,B,A,G=this.start;G<=this.end;G++){var y=h[G];if(y&&(y=y.axes[g.id].graphs[b.id])){if(y.values){var C=y.values[l];if(this.rotate){if(0>y.x||y.x>y.graph.height)C=NaN}else if(0>y.x||y.x>y.graph.width)C=NaN;if(!isNaN(C)){isNaN(n)&&(n=C);r=C;if(isNaN(w)||w>C)w=C;if(isNaN(z)||z<C)z=C;u=e.getDecimals(m);var F=e.getDecimals(C),m=m+C,m=e.roundTo(m,Math.max(u,F));p++;u=m/p}}if(y.percents&&(y=y.percents[l],!isNaN(y))){isNaN(v)&&(v=y);t=y;if(isNaN(x)||x>y)x=y;if(isNaN(B)||B<y)B=y;A=e.getDecimals(q);C=e.getDecimals(y);q+=y;q=e.roundTo(q,Math.max(A,C));D++;A=q/D}}}q={open:v,close:t,high:B,low:x,average:A,sum:q,count:D};a=e.formatValue(a,{open:n,close:r,high:z,low:w,average:u,sum:m,count:p},d,f,l+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=e.formatValue(a,q,d,this.pf,"percents\\."+l+"\\.")}}return a=e.cleanFromEmpty(a)},formatString:function(a,b,c){if(b){var d=b.graph;if(void 0!==a){if(-1!=a.indexOf("[[category]]")){var g=b.serialDataItem.category;if(this.categoryAxis.parseDates){var h=this.balloonDateFormat,f=this.chartCursor;f&&f.categoryBalloonDateFormat&&(h=f.categoryBalloonDateFormat);h=e.formatDate(g,h,this);-1!=h.indexOf("fff")&&(h=e.formatMilliseconds(h,g));g=h}a=a.replace(/\[\[category\]\]/g,String(g))}g=d.numberFormatter;g||(g=this.nf);h=b.graph.valueAxis;(f=h.duration)&&!isNaN(b.values.value)&&(f=e.formatDuration(b.values.value,f,"",h.durationUnits,h.maxInterval,g),a=a.replace(RegExp("\\[\\[value\\]\\]","g"),f));"date"==h.type&&(h=e.formatDate(new Date(b.values.value),d.dateFormat,this),f=RegExp("\\[\\[value\\]\\]","g"),a=a.replace(f,h),h=e.formatDate(new Date(b.values.open),d.dateFormat,this),f=RegExp("\\[\\[open\\]\\]","g"),a=a.replace(f,h));d="value open low high close total".split(" ");h=this.pf;a=e.formatValue(a,b.percents,d,h,"percents\\.");a=e.formatValue(a,b.values,d,g,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);a=e.formatValue(a,b.values,["percents"],h);-1!=a.indexOf("[[")&&(a=e.formatDataContextValue(a,b.dataContext));-1!=a.indexOf("[[")&&b.graph.customData&&(a=e.formatDataContextValue(a,b.graph.customData));a=e.AmSerialChart.base.formatString.call(this,a,b,c)}return a}},updateChartCursor:function(){e.AmSerialChart.base.updateChartCursor.call(this);var a=this.chartCursor,b=this.categoryAxis;if(a){var c=a.categoryBalloonAlpha,d=a.categoryBalloonColor,g=a.color;void 0===d&&(d=a.cursorColor);var h=a.valueZoomable,f=a.zoomable,k=a.valueLineEnabled;this.rotate?(a.vLineEnabled=k,a.hZoomEnabled=h,a.vZoomEnabled=f):(a.hLineEnabled=k,a.vZoomEnabled=h,a.hZoomEnabled=f);if(a.valueLineBalloonEnabled)for(k=0;k<this.valueAxes.length;k++)h=this.valueAxes[k],(f=h.balloon)||(f={}),f=e.extend(f,this.balloon,!0),f.fillColor=d,f.balloonColor=d,f.fillAlpha=c,f.borderColor=d,f.color=g,h.balloon=f;else for(f=0;f<this.valueAxes.length;f++)h=this.valueAxes[f],h.balloon&&(h.balloon=null);b&&(b.balloonTextFunction=a.categoryBalloonFunction,a.categoryLineAxis=b,b.balloonText=a.categoryBalloonText,a.categoryBalloonEnabled&&((f=b.balloon)||(f={}),f=e.extend(f,this.balloon,!0),f.fillColor=d,f.balloonColor=d,f.fillAlpha=c,f.borderColor=d,f.color=g,b.balloon=f),b.balloon&&(b.balloon.enabled=a.categoryBalloonEnabled))}},addChartScrollbar:function(a){e.callMethod("destroy",[this.chartScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarZoom));this.rotate?void 0===a.width&&(a.width=a.scrollbarHeight):void 0===a.height&&(a.height=a.scrollbarHeight);a.gridAxis=this.categoryAxis;this.chartScrollbar=a},addValueScrollbar:function(a){e.callMethod("destroy",[this.valueScrollbar]);a&&(a.chart=this,this.listenTo(a,"zoomed",this.handleScrollbarValueZoom),this.listenTo(a,"zoomStarted",this.handleCursorZoomStarted));var b=a.scrollbarHeight;this.rotate?void 0===a.height&&(a.height=b):void 0===a.width&&(a.width=b);a.gridAxis||(a.gridAxis=this.valueAxes[0]);a.valueAxes=this.valueAxes;this.valueScrollbar=a},removeChartScrollbar:function(){e.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},removeValueScrollbar:function(){e.callMethod("destroy",[this.valueScrollbar]);this.valueScrollbar=null},handleReleaseOutside:function(a){e.AmSerialChart.base.handleReleaseOutside.call(this,a);e.callMethod("handleReleaseOutside",[this.chartScrollbar,this.valueScrollbar])},update:function(){e.AmSerialChart.base.update.call(this);this.chartScrollbar&&this.chartScrollbar.update&&this.chartScrollbar.update();this.valueScrollbar&&this.valueScrollbar.update&&this.valueScrollbar.update()},processScrollbars:function(){e.AmSerialChart.base.processScrollbars.call(this);var a=this.valueScrollbar;a&&(a=e.processObject(a,e.ChartScrollbar,this.theme),a.id="valueScrollbar",this.addValueScrollbar(a))},handleValueAxisZoom:function(a){this.handleValueAxisZoomReal(a,this.valueAxes)},zoomOut:function(){e.AmSerialChart.base.zoomOut.call(this);this.zoom()},getNextItem:function(a){var b=a.index,c=this.chartData,d=a.graph;if(b+1<c.length)for(b+=1;b<c.length;b++)if(a=c[b])if(a=a.axes[d.valueAxis.id].graphs[d.id],!isNaN(a.y))return a},handleCursorZoomReal:function(a,b,c,d,e){var h=e.target,f,k;this.rotate?(isNaN(a)||isNaN(b)||this.relativeZoomValueAxes(this.valueAxes,a,b)&&this.updateAfterValueZoom(),h.vZoomEnabled&&(f=e.start,k=e.end)):(isNaN(c)||isNaN(d)||this.relativeZoomValueAxes(this.valueAxes,c,d)&&this.updateAfterValueZoom(),h.hZoomEnabled&&(f=e.start,k=e.end));isNaN(f)||isNaN(k)||(a=this.categoryAxis,a.parseDates&&!a.equalSpacing?this.zoomToDates(new Date(f),new Date(k)):this.zoomToIndexes(f,k))},handleCursorZoomStarted:function(){var a=this.valueAxes;if(a){var a=a[0],b=a.relativeStart,c=a.relativeEnd;a.reversed&&(b=1-a.relativeEnd,c=1-a.relativeStart);this.rotate?(this.startX0=b,this.endX0=c):(this.startY0=b,this.endY0=c)}this.categoryAxis&&(this.start0=this.start,this.end0=this.end,this.startTime0=this.startTime,this.endTime0=this.endTime)},fixCursor:function(){this.chartCursor&&this.chartCursor.fixPosition();this.prevCursorItem=null},handleCursorMove:function(a){e.AmSerialChart.base.handleCursorMove.call(this,a);var b=a.target,c=this.categoryAxis;if(a.panning)this.handleCursorHide(a);else if(this.chartData&&!b.isHidden){var d=this.graphs;if(d){var g;g=c.xToIndex(this.rotate?a.y:a.x);if(g=this.chartData[g]){var h,f,k,l;if(b.oneBalloonOnly&&b.valueBalloonsEnabled){var m=Infinity;for(h=0;h<d.length;h++)if(f=d[h],f.balloon.enabled&&f.showBalloon&&!f.hidden){k=f.valueAxis.id;k=g.axes[k].graphs[f.id];k=k.y;"top"==f.showBalloonAt&&(k=0);"bottom"==f.showBalloonAt&&(k=this.height);var p=b.mouseX,n=b.mouseY;k=this.rotate?Math.abs(p-k):Math.abs(n-k);k<m&&(m=k,l=f)}b.mostCloseGraph=l}if(this.prevCursorItem!=g||l!=this.prevMostCloseGraph){m=[];for(h=0;h<d.length;h++)f=d[h],k=f.valueAxis.id,k=g.axes[k].graphs[f.id],b.showNextAvailable&&isNaN(k.y)&&(k=this.getNextItem(k)),l&&f!=l?(f.showGraphBalloon(k,b.pointer,!1,b.graphBulletSize,b.graphBulletAlpha),f.balloon.hide(0)):b.valueBalloonsEnabled?(f.balloon.showBullet=b.bulletsEnabled,f.balloon.bulletSize=b.bulletSize/2,a.hideBalloons||(f.showGraphBalloon(k,b.pointer,!1,b.graphBulletSize,b.graphBulletAlpha),f.balloon.set&&m.push({balloon:f.balloon,y:f.balloon.pointToY}))):(f.currentDataItem=k,f.resizeBullet(k,b.graphBulletSize,b.graphBulletAlpha));b.avoidBalloonOverlapping&&this.arrangeBalloons(m);this.prevCursorItem=g}this.prevMostCloseGraph=l}}c.showBalloon(a.x,a.y,b.categoryBalloonDateFormat,a.skip);this.updateLegendValues()}},handleCursorHide:function(a){e.AmSerialChart.base.handleCursorHide.call(this,a);a=this.categoryAxis;this.prevCursorItem=null;this.updateLegendValues();a&&a.hideBalloon();a=this.graphs;var b;for(b=0;b<a.length;b++)a[b].currentDataItem=null},handleCursorPanning:function(a){var b=a.target,c,d=a.deltaX,g=a.deltaY,h=a.delta2X,f=a.delta2Y;a=!1;if(this.rotate){isNaN(h)&&(h=d,a=!0);var k=this.endX0;c=this.startX0;var l=k-c,k=k-l*h,m=l;a||(m=0);a=e.fitToBounds(c-l*d,0,1-m)}else isNaN(f)&&(f=g,a=!0),k=this.endY0,c=this.startY0,l=k-c,k+=l*g,m=l,a||(m=0),a=e.fitToBounds(c+l*f,0,1-m);c=e.fitToBounds(k,m,1);var p;b.valueZoomable&&(p=this.relativeZoomValueAxes(this.valueAxes,a,c));var n;c=this.categoryAxis;this.rotate&&(d=g,h=f);a=!1;isNaN(h)&&(h=d,a=!0);if(b.zoomable&&(0<Math.abs(d)||0<Math.abs(h)))if(c.parseDates&&!c.equalSpacing){if(f=this.startTime0,g=this.endTime0,c=g-f,h*=c,l=this.firstTime,k=this.lastTime,m=c,a||(m=0),a=Math.round(e.fitToBounds(f-c*d,l,k-m)),h=Math.round(e.fitToBounds(g-h,l+m,k)),this.startTime!=a||this.endTime!=h)n={chart:this,target:b,type:"zoomed",start:a,end:h},this.skipZoomed=!0,b.fire(n),this.zoom(a,h),n=!0}else if(f=this.start0,g=this.end0,c=g-f,d=Math.round(c*d),h=Math.round(c*h),l=this.chartData.length-1,a||(c=0),a=e.fitToBounds(f-d,0,l-c),c=e.fitToBounds(g-h,c,l),this.start!=a||this.end!=c)this.skipZoomed=!0,b.fire({chart:this,target:b,type:"zoomed",start:a,end:c}),this.zoom(a,c),n=!0;!n&&p&&this.updateAfterValueZoom()},arrangeBalloons:function(a){var b=this.plotAreaHeight;a.sort(this.compareY);var c,d,e,h=this.plotAreaWidth,f=a.length;for(c=0;c<f;c++)d=a[c].balloon,d.setBounds(0,0,h,b),d.restorePrevious(),d.draw(),b=d.yPos-3;a.reverse();for(c=0;c<f;c++){d=a[c].balloon;var b=d.bottom,k=d.bottom-d.yPos;0<c&&b-k<e+3&&(d.setBounds(0,e+3,h,e+k+3),d.restorePrevious(),d.draw());d.set&&d.set.show();e=d.bottom}},compareY:function(a,b){return a.y<b.y?1:-1}})})();(function(){var e=window.AmCharts;e.Cuboid=e.Class({construct:function(a,b,c,d,e,h,f,k,l,m,p,n,r,w,z,u,q){this.set=a.set();this.container=a;this.h=Math.round(c);this.w=Math.round(b);this.dx=d;this.dy=e;this.colors=h;this.alpha=f;this.bwidth=k;this.bcolor=l;this.balpha=m;this.dashLength=w;this.topRadius=u;this.pattern=z;this.rotate=r;this.bcn=q;r?0>b&&0===p&&(p=180):0>c&&270==p&&(p=90);this.gradientRotation=p;0===d&&0===e&&(this.cornerRadius=n);this.draw()},draw:function(){var a=this.set;a.clear();var b=this.container,c=b.chart,d=this.w,g=this.h,h=this.dx,f=this.dy,k=this.colors,l=this.alpha,m=this.bwidth,p=this.bcolor,n=this.balpha,r=this.gradientRotation,w=this.cornerRadius,z=this.dashLength,u=this.pattern,q=this.topRadius,D=this.bcn,v=k,t=k;"object"==typeof k&&(v=k[0],t=k[k.length-1]);var x,B,A,G,y,C,F,L,M,Q=l;u&&(l=0);var E,H,I,J,K=this.rotate;if(0<Math.abs(h)||0<Math.abs(f))if(isNaN(q))F=t,t=e.adjustLuminosity(v,-.2),t=e.adjustLuminosity(v,-.2),x=e.polygon(b,[0,h,d+h,d,0],[0,f,f,0,0],t,l,1,p,0,r),0<n&&(M=e.line(b,[0,h,d+h],[0,f,f],p,n,m,z)),B=e.polygon(b,[0,0,d,d,0],[0,g,g,0,0],t,l,1,p,0,r),B.translate(h,f),0<n&&(A=e.line(b,[h,h],[f,f+g],p,n,m,z)),G=e.polygon(b,[0,0,h,h,0],[0,g,g+f,f,0],t,l,1,p,0,r),y=e.polygon(b,[d,d,d+h,d+h,d],[0,g,g+f,f,0],t,l,1,p,0,r),0<n&&(C=e.line(b,[d,d+h,d+h,d],[0,f,g+f,g],p,n,m,z)),t=e.adjustLuminosity(F,.2),F=e.polygon(b,[0,h,d+h,d,0],[g,g+f,g+f,g,g],t,l,1,p,0,r),0<n&&(L=e.line(b,[0,h,d+h],[g,g+f,g+f],p,n,m,z));else{var N,O,P;K?(N=g/2,t=h/2,P=g/2,O=d+h/2,H=Math.abs(g/2),E=Math.abs(h/2)):(t=d/2,N=f/2,O=d/2,P=g+f/2+1,E=Math.abs(d/2),H=Math.abs(f/2));I=E*q;J=H*q;.1<E&&.1<E&&(x=e.circle(b,E,v,l,m,p,n,!1,H),x.translate(t,N));.1<I&&.1<I&&(F=e.circle(b,I,e.adjustLuminosity(v,.5),l,m,p,n,!1,J),F.translate(O,P))}l=Q;1>Math.abs(g)&&(g=0);1>Math.abs(d)&&(d=0);!isNaN(q)&&(0<Math.abs(h)||0<Math.abs(f))?(k=[v],k={fill:k,stroke:p,"stroke-width":m,"stroke-opacity":n,"fill-opacity":l},K?(l="M0,0 L"+d+","+(g/2-g/2*q),m=" B",0<d&&(m=" A"),e.VML?(l+=m+Math.round(d-
|
9 |
-
I)+","+Math.round(g/2-J)+","+Math.round(d+I)+","+Math.round(g/2+J)+","+d+",0,"+d+","+g,l=l+(" L0,"+g)+(m+Math.round(-E)+","+Math.round(g/2-H)+","+Math.round(E)+","+Math.round(g/2+H)+",0,"+g+",0,0")):(l+="A"+I+","+J+",0,0,0,"+d+","+(g-g/2*(1-q))+"L0,"+g,l+="A"+E+","+H+",0,0,1,0,0"),E=90):(m=d/2-d/2*q,l="M0,0 L"+m+","+g,e.VML?(l="M0,0 L"+m+","+g,m=" B",0>g&&(m=" A"),l+=m+Math.round(d/2-I)+","+Math.round(g-J)+","+Math.round(d/2+I)+","+Math.round(g+J)+",0,"+g+","+d+","+g,l+=" L"+d+",0",l+=m+Math.round(d/
|
10 |
-
2+E)+","+Math.round(H)+","+Math.round(d/2-E)+","+Math.round(-H)+","+d+",0,0,0"):(l+="A"+I+","+J+",0,0,0,"+(d-d/2*(1-q))+","+g+"L"+d+",0",l+="A"+E+","+H+",0,0,1,0,0"),E=180),b=b.path(l).attr(k),b.gradient("linearGradient",[v,e.adjustLuminosity(v,-.3),e.adjustLuminosity(v,-.3),v],E),K?b.translate(h/2,0):b.translate(0,f/2)):b=0===g?e.line(b,[0,d],[0,0],p,n,m,z):0===d?e.line(b,[0,0],[0,g],p,n,m,z):0<w?e.rect(b,d,g,k,l,m,p,n,w,r,z):e.polygon(b,[0,0,d,d,0],[0,g,g,0,0],k,l,m,p,n,r,!1,z);d=isNaN(q)?0>g?[x,M,B,A,G,y,C,F,L,b]:[F,L,B,A,G,y,x,M,C,b]:K?0<d?[x,b,F]:[F,b,x]:0>g?[x,b,F]:[F,b,x];e.setCN(c,b,D+"front");e.setCN(c,B,D+"back");e.setCN(c,F,D+"top");e.setCN(c,x,D+"bottom");e.setCN(c,G,D+"left");e.setCN(c,y,D+"right");for(x=0;x<d.length;x++)if(B=d[x])a.push(B),e.setCN(c,B,D+"element");u&&b.pattern(u,NaN,c.path)},width:function(a){isNaN(a)&&(a=0);this.w=Math.round(a);this.draw()},height:function(a){isNaN(a)&&(a=0);this.h=Math.round(a);this.draw()},animateHeight:function(a,b){var c=this;c.animationFinished=!1;c.easing=b;c.totalFrames=a*e.updateRate;c.rh=c.h;c.frame=0;c.height(1);setTimeout(function(){c.updateHeight.call(c)},1E3/e.updateRate)},updateHeight:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b?(b=a.easing(0,a.frame,1,a.rh-1,b),a.height(b),window.requestAnimationFrame?window.requestAnimationFrame(function(){a.updateHeight.call(a)}):setTimeout(function(){a.updateHeight.call(a)},1E3/e.updateRate)):(a.height(a.rh),a.animationFinished=!0)},animateWidth:function(a,b){var c=this;c.animationFinished=!1;c.easing=b;c.totalFrames=a*e.updateRate;c.rw=c.w;c.frame=0;c.width(1);setTimeout(function(){c.updateWidth.call(c)},1E3/e.updateRate)},updateWidth:function(){var a=this;a.frame++;var b=a.totalFrames;a.frame<=b?(b=a.easing(0,a.frame,1,a.rw-1,b),a.width(b),window.requestAnimationFrame?window.requestAnimationFrame(function(){a.updateWidth.call(a)}):setTimeout(function(){a.updateWidth.call(a)},1E3/e.updateRate)):(a.width(a.rw),a.animationFinished=!0)}})})();(function(){var e=window.AmCharts;e.CategoryAxis=e.Class({inherits:e.AxisBase,construct:function(a){this.cname="CategoryAxis";e.CategoryAxis.base.construct.call(this,a);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.gridPosition="middle";this.safeDistance=30;this.stickBalloonToCategory=!1;e.applyTheme(this,a,this.cname)},draw:function(){e.CategoryAxis.base.draw.call(this);this.generateDFObject();var a=this.chart.chartData;this.data=a;this.labelRotationR=this.labelRotation;this.type=null;if(e.ifArray(a)){var b,c=this.chart;"scrollbar"!=this.id?(e.setCN(c,this.set,"category-axis"),e.setCN(c,this.labelsSet,"category-axis"),e.setCN(c,this.axisLine.axisSet,"category-axis")):this.bcn=this.id+"-";var d=this.start,g=this.labelFrequency,h=0,f=this.end-d+1,k=this.gridCountR,l=this.showFirstLabel,m=this.showLastLabel,p,n="",n=e.extractPeriod(this.minPeriod),r=e.getPeriodDuration(n.period,n.count),w,z,u,q,D=this.rotate;p=this.firstDayOfWeek;var v=this.boldPeriodBeginning;b=e.resetDateToMin(new Date(a[a.length-1].time+1.05*r),this.minPeriod,1,p).getTime();this.firstTime=c.firstTime;var t;this.endTime>b&&(this.endTime=b);q=this.minorGridEnabled;z=this.gridAlpha;var x=0,B=0;if(this.widthField)for(b=this.start;b<=this.end;b++)if(t=this.data[b]){var A=Number(this.data[b].dataContext[this.widthField]);isNaN(A)||(x+=A,t.widthValue=A)}if(this.parseDates&&!this.equalSpacing)this.lastTime=a[a.length-1].time,this.maxTime=e.resetDateToMin(new Date(this.lastTime+1.05*r),this.minPeriod,1,p).getTime(),this.timeDifference=this.endTime-this.startTime,this.parseDatesDraw();else if(!this.parseDates){if(this.cellWidth=this.getStepWidth(f),f<k&&(k=f),h+=this.start,this.stepWidth=this.getStepWidth(f),0<k)for(v=Math.floor(f/k),r=this.chooseMinorFrequency(v),f=h,f/2==Math.round(f/2)&&f--,0>f&&(f=0),k=0,this.widthField&&(f=this.start),this.end-f+1>=this.autoRotateCount&&(this.labelRotationR=this.autoRotateAngle),b=f;b<=this.end+2;b++){p=!1;0<=b&&b<this.data.length?(w=this.data[b],n=w.category,p=w.forceShow):n="";if(q&&!isNaN(r))if(b/r==Math.round(b/r)||p)b/v==Math.round(b/v)||p||(this.gridAlpha=this.minorGridAlpha,n=void 0);else continue;else if(b/v!=Math.round(b/v)&&!p)continue;f=this.getCoordinate(b-h);u=0;"start"==this.gridPosition&&(f-=this.cellWidth/2,u=this.cellWidth/2);p=!0;a=u;"start"==this.tickPosition&&(a=0,p=!1,u=0);if(b==d&&!l||b==this.end&&!m)n=void 0;Math.round(k/g)!=k/g&&(n=void 0);k++;A=this.cellWidth;D&&(A=NaN,this.ignoreAxisWidth||!c.autoMargins)&&(A="right"==this.position?c.marginRight:c.marginLeft,A-=this.tickLength+10);this.labelFunction&&w&&(n=this.labelFunction(n,w,this));n=e.fixBrakes(n);t=!1;this.boldLabels&&(t=!0);b>this.end&&"start"==this.tickPosition&&(n=" ");this.rotate&&this.inside&&(u-=2);isNaN(w.widthValue)||(w.percentWidthValue=w.widthValue/x*100,A=this.rotate?this.height*w.widthValue/x:this.width*w.widthValue/x,f=B,B+=A,u=A/2);u=new this.axisItemRenderer(this,f,n,p,A,u,void 0,t,a,!1,w.labelColor,w.className);u.serialDataItem=w;this.pushAxisItem(u);this.gridAlpha=z}}else if(this.parseDates&&this.equalSpacing){h=this.start;this.startTime=this.data[this.start].time;this.endTime=this.data[this.end].time;this.timeDifference=this.endTime-this.startTime;b=this.choosePeriod(0);g=b.period;w=b.count;b=e.getPeriodDuration(g,w);b<r&&(g=n.period,w=n.count,b=r);z=g;"WW"==z&&(z="DD");this.currentDateFormat=this.dateFormatsObject[z];this.stepWidth=this.getStepWidth(f);k=Math.ceil(this.timeDifference/b)+1;n=e.resetDateToMin(new Date(this.startTime-b),g,w,p).getTime();this.cellWidth=this.getStepWidth(f);f=Math.round(n/b);d=-1;f/2==Math.round(f/2)&&(d=-2,n-=b);f=this.start;f/2==Math.round(f/2)&&f--;0>f&&(f=0);B=this.end+2;B>=this.data.length&&(B=this.data.length);a=!1;a=!l;this.previousPos=-1E3;20<this.labelRotationR&&(this.safeDistance=5);A=f;if(this.data[f].time!=e.resetDateToMin(new Date(this.data[f].time),g,w,p).getTime()){t=0;var G=n;for(b=f;b<B;b++)r=this.data[b].time,this.checkPeriodChange(g,w,r,G)&&(t++,2<=t&&(A=b,b=B),G=r)}q&&1<w&&(r=this.chooseMinorFrequency(w),e.getPeriodDuration(g,r));if(0<this.gridCountR)for(b=f;b<B;b++)if(r=this.data[b].time,this.checkPeriodChange(g,w,r,n)&&b>=A){f=this.getCoordinate(b-this.start);q=!1;this.nextPeriod[z]&&(q=this.checkPeriodChange(this.nextPeriod[z],1,r,n,z))&&e.resetDateToMin(new Date(r),this.nextPeriod[z],1,p).getTime()!=r&&(q=!1);t=!1;q&&this.markPeriodChange?(q=this.dateFormatsObject[this.nextPeriod[z]],t=!0):q=this.dateFormatsObject[z];n=e.formatDate(new Date(r),q,c);if(b==d&&!l||b==k&&!m)n=" ";a?a=!1:(v||(t=!1),f-this.previousPos>this.safeDistance*Math.cos(this.labelRotationR*Math.PI/180)&&(this.labelFunction&&(n=this.labelFunction(n,new Date(r),this,g,w,u)),this.boldLabels&&(t=!0),u=new this.axisItemRenderer(this,f,n,void 0,void 0,void 0,void 0,t),q=u.graphics(),this.pushAxisItem(u),q=q.getBBox().width,e.isModern||(q-=f),this.previousPos=f+q));u=n=r}}for(b=l=0;b<this.data.length;b++)if(t=this.data[b])this.parseDates&&!this.equalSpacing?(m=t.time,d=this.cellWidth,"MM"==this.minPeriod&&(d=864E5*e.daysInMonth(new Date(m))*this.stepWidth,t.cellWidth=d),m=Math.round((m-this.startTime)*this.stepWidth+d/2)):m=this.getCoordinate(b-h),t.x[this.id]=m;if(this.widthField)for(b=this.start;b<=this.end;b++)t=this.data[b],d=t.widthValue,t.percentWidthValue=d/x*100,this.rotate?(m=this.height*d/x/2+l,l=this.height*d/x+l):(m=this.width*d/x/2+l,l=this.width*d/x+l),t.x[this.id]=m;x=this.guides.length;for(b=0;b<x;b++)if(l=this.guides[b],p=v=v=q=d=NaN,m=l.above,l.toCategory&&(v=c.getCategoryIndexByValue(l.toCategory),isNaN(v)||(d=this.getCoordinate(v-h),l.expand&&(d+=this.cellWidth/2),u=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(u,m))),l.category&&(p=c.getCategoryIndexByValue(l.category),isNaN(p)||(q=this.getCoordinate(p-h),l.expand&&(q-=this.cellWidth/2),v=(d-q)/2,u=new this.axisItemRenderer(this,q,l.label,!0,NaN,v,l),this.pushAxisItem(u,m))),p=c.dataDateFormat,l.toDate&&(!p||l.toDate instanceof Date||(l.toDate=l.toDate.toString()+" |"),l.toDate=e.getDate(l.toDate,p),this.equalSpacing?(v=c.getClosestIndex(this.data,"time",l.toDate.getTime(),
|
11 |
-
!1,0,this.data.length-1),isNaN(v)||(d=this.getCoordinate(v-h))):d=(l.toDate.getTime()-this.startTime)*this.stepWidth,u=new this.axisItemRenderer(this,d,"",!0,NaN,NaN,l),this.pushAxisItem(u,m)),l.date&&(!p||l.date instanceof Date||(l.date=l.date.toString()+" |"),l.date=e.getDate(l.date,p),this.equalSpacing?(p=c.getClosestIndex(this.data,"time",l.date.getTime(),!1,0,this.data.length-1),isNaN(p)||(q=this.getCoordinate(p-h))):q=(l.date.getTime()-this.startTime)*this.stepWidth,v=(d-q)/2,p=!0,l.toDate&&
|
12 |
-
(p=!1),u="H"==this.orientation?new this.axisItemRenderer(this,q,l.label,p,2*v,NaN,l):new this.axisItemRenderer(this,q,l.label,!1,NaN,v,l),this.pushAxisItem(u,m)),0<d||0<q){p=!1;if(this.rotate){if(d<this.height||q<this.height)p=!0}else if(d<this.width||q<this.width)p=!0;p&&(d=new this.guideFillRenderer(this,q,d,l),q=d.graphics(),this.pushAxisItem(d,m),l.graphics=q,q.index=b,l.balloonText&&this.addEventListeners(q,l))}if(c=c.chartCursor)D?c.fixHeight(this.cellWidth):(c.fixWidth(this.cellWidth),c.fullWidth&&this.balloon&&(this.balloon.minWidth=this.cellWidth));this.previousHeight=y}this.axisCreated=!0;this.set.translate(this.x,this.y);this.labelsSet.translate(this.x,this.y);this.labelsSet.show();this.positionTitle();(D=this.axisLine.set)&&D.toFront();var y=this.getBBox().height;2<y-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1)},xToIndex:function(a){var b=this.data,c=this.chart,d=c.rotate,g=this.stepWidth,h;if(this.parseDates&&!this.equalSpacing)a=this.startTime+Math.round(a/g)-this.minDuration()/2,h=c.getClosestIndex(b,"time",a,!1,this.start,this.end+1);else if(this.widthField)for(c=Infinity,g=this.start;g<=this.end;g++){var f=this.data[g];f&&(f=Math.abs(f.x[this.id]-a),f<c&&(c=f,h=g))}else this.startOnAxis||(a-=g/2),h=this.start+Math.round(a/g);h=e.fitToBounds(h,0,b.length-1);var k;b[h]&&(k=b[h].x[this.id]);d?k>this.height+1&&h--:k>this.width+1&&h--;0>k&&h++;return h=e.fitToBounds(h,0,b.length-1)},dateToCoordinate:function(a){return this.parseDates&&
|
13 |
-
!this.equalSpacing?(a.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(a=this.chart.getClosestIndex(this.data,"time",a.getTime(),!1,0,this.data.length-1),this.getCoordinate(a-this.start)):NaN},categoryToCoordinate:function(a){if(this.chart){var b=this.chart.getCategoryIndexByValue(a);if(!isNaN(b))return this.getCoordinate(b-this.start);if(this.parseDates)return this.dateToCoordinate(new Date(a))}else return NaN},coordinateToDate:function(a){return this.equalSpacing?(a=this.xToIndex(a),new Date(this.data[a].time)):new Date(this.startTime+a/this.stepWidth)},coordinateToValue:function(a){a=this.xToIndex(a);if(a=this.data[a])return this.parseDates?a.time:a.category},getCoordinate:function(a){a*=this.stepWidth;this.startOnAxis||(a+=this.stepWidth/2);return Math.round(a)},formatValue:function(a,b){b||(b=this.currentDateFormat);this.parseDates&&(a=e.formatDate(new Date(a),b,this.chart));return a},showBalloonAt:function(a){a=this.parseDates?this.dateToCoordinate(new Date(a)):this.categoryToCoordinate(a);return this.adjustBalloonCoordinate(a)},formatBalloonText:function(a,b,c){var d="",g="",h=this.chart,f=this.data[b];if(f)if(this.parseDates)d=e.formatDate(f.category,c,h),b=e.changeDate(new Date(f.category),this.minPeriod,1),g=e.formatDate(b,c,h),-1!=d.indexOf("fff")&&(d=e.formatMilliseconds(d,f.category),g=e.formatMilliseconds(g,b));else{var k;this.data[b+1]&&(k=this.data[b+1]);d=e.fixNewLines(f.category);k&&(g=e.fixNewLines(k.category))}a=a.replace(/\[\[category\]\]/g,String(d));return a=a.replace(/\[\[toCategory\]\]/g,String(g))},adjustBalloonCoordinate:function(a,b){var c=this.xToIndex(a),d=this.chart.chartCursor;if(this.stickBalloonToCategory){var e=this.data[c];e&&(a=e.x[this.id]);this.stickBalloonToStart&&(a-=this.cellWidth/2);var h=0;if(d){var f=d.limitToGraph;if(f){var k=f.valueAxis.id;f.hidden||(h=e.axes[k].graphs[f.id].y)}this.rotate?("left"==this.position?(f&&(h-=d.width),0<h&&(h=0)):0>h&&(h=0),d.fixHLine(a,h)):("top"==this.position?(f&&(h-=d.height),0<h&&(h=0)):0>h&&(h=0),d.fixVLine(a,h))}}d&&!b&&(d.setIndex(c),this.parseDates&&d.setTimestamp(this.coordinateToDate(a).getTime()));return a}})})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/worldLow.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
AmCharts.maps.worldLow={"svg":{"defs":{"amcharts:ammap":{"projection":"mercator","leftLongitude":"-169.6","topLatitude":"83.68","rightLongitude":"190.25","bottomLatitude":"-55.55"}},"g":{"path":[{"id":"AE","title":"United Arab Emirates","d":"M619.87,393.72L620.37,393.57L620.48,394.41L622.67,393.93L624.99,394.01L626.68,394.1L628.6,392.03L630.7,390.05L632.47,388.15L633,389.2L633.38,391.64L631.95,391.65L631.72,393.65L632.22,394.07L630.95,394.67L630.94,395.92L630.12,397.18L630.05,398.39L629.48,399.03L621.06,397.51L619.98,394.43z"},{"id":"AF","title":"Afghanistan","d":"M646.88,356.9L649.74,358.2L651.85,357.74L652.44,356.19L654.65,355.67L656.23,354.62L656.79,351.83L659.15,351.15L659.59,349.9L660.92,350.84L661.76,350.95L663.32,350.98L665.44,351.72L666.29,352.14L668.32,351.02L669.27,351.69L670.17,350.09L671.85,350.16L672.28,349.64L672.58,348.21L673.79,346.98L675.3,347.78L675,348.87L675.85,349.04L675.58,351.99L676.69,353.14L677.67,352.4L678.92,352.06L680.66,350.49L682.59,350.75L685.49,350.75L685.99,351.76L684.35,352.15L682.93,352.8L679.71,353.2L676.7,353.93L675.06,355.44L675.72,356.9L676.05,358.6L674.65,360.03L674.77,361.33L674,362.55L671.33,362.44L672.43,364.66L670.65,365.51L669.46,367.51L669.61,369.49L668.51,370.41L667.48,370.11L665.33,370.54L665.03,371.45L662.94,371.45L661.38,373.29L661.28,376.04L657.63,377.37L655.68,377.09L655.11,377.79L653.44,377.39L650.63,377.87L645.94,376.23L648.48,373.3L648.25,371.2L646.13,370.65L645.91,368.56L644.99,365.92L646.19,364.09L644.97,363.6L645.74,361.15z"},{"id":"AL","title":"Albania","d":"M532.98,334.66L532.63,335.93L533.03,337.52L534.19,338.42L534.13,339.39L533.22,339.93L533.05,341.12L531.75,342.88L531.27,342.63L531.22,341.83L529.66,340.6L529.42,338.85L529.66,336.32L530.04,335.16L529.57,334.57L529.38,333.38L530.6,331.51L530.77,332.23L531.53,331.89L532.13,332.91L532.8,333.29z"},{"id":"AM","title":"Armenia","d":"M597.45,337.5L601.35,336.92L601.93,337.9L603,338.54L602.43,339.46L603.93,340.72L603.14,341.88L604.33,342.87L605.59,343.46L605.65,345.96L604.63,346.06L603.49,343.98L603.5,343.43L602.26,343.44L601.43,342.46L600.85,342.56L599.74,341.5L597.66,340.59L597.93,338.8z"},{"id":"AO","title":"Angola","d":"M521.03,479.78l0.69,2.09l0.8,1.68l0.64,0.91l1.07,1.47l1.85,-0.23l0.93,-0.4l1.55,0.4l0.42,-0.7l0.7,-1.64l1.74,-0.11l0.15,-0.49l1.43,-0.01l-0.24,1.01l3.4,-0.02l0.05,1.77l0.57,1.09l-0.41,1.7l0.21,1.74l0.94,1.05l-0.15,3.37l0.69,-0.26l1.22,0.07l1.74,-0.42l1.28,0.17l0.3,0.88l-0.32,1.38l0.49,1.34l-0.42,1.07l0.24,0.99l-5.84,-0.04l-0.13,9.16l1.89,2.38l1.83,1.82l-5.15,1.19l-6.79,-0.41l-1.94,-1.4l-11.37,0.13l-0.42,0.21l-1.67,-1.32l-1.82,-0.09l-1.68,0.5l-1.35,0.56l-0.26,-1.83l0.39,-2.55l0.97,-2.65l0.15,-1.24l0.91,-2.59l0.67,-1.17l1.61,-1.87l0.9,-1.27l0.29,-2.11l-0.15,-1.61l-0.84,-1.01l-0.75,-1.72l-0.69,-1.69l0.15,-0.59l0.86,-1.12l-0.85,-2.72l-0.57,-1.88l-1.4,-1.77l0.27,-0.54l1.16,-0.38l0.81,0.05l0.98,-0.34L521.03,479.78zM510.12,479.24l-0.71,0.3l-0.75,-2.1l1.13,-1.21l0.85,-0.47l1.05,0.96l-1.02,0.59l-0.46,0.72L510.12,479.24z"},{"id":"AR","title":"Argentina","d":"M291.6,648.91l-2.66,0.25l-1.43,-1.73l-1.69,-0.13l-3,0l0,-10.57l1.08,2.15l1.4,3.53l3.65,2.87l3.93,1.21L291.6,648.91zM293.1,526.47l1.65,2.18l1.09,-2.43l3.2,0.12l0.45,0.64l5.15,4.94l2.29,0.46l3.43,2.26l2.89,1.2l0.4,1.36l-2.76,4.73l2.83,0.85l3.15,0.48l2.22,-0.5l2.54,-2.4l0.46,-2.74l1.39,-0.59l1.41,1.79l-0.06,2.49l-2.36,1.73l-1.88,1.28l-3.16,3.08l-3.74,4.37l-0.7,2.59l-0.75,3.37l0.03,3.3l-0.61,0.74l-0.22,2.17l-0.19,1.76l3.56,2.91l-0.38,2.37l1.75,1.51l-0.14,1.7l-2.69,4.52l-4.16,1.91l-5.62,0.75l-3.08,-0.36l0.59,2.15l-0.57,2.72l0.52,1.85l-1.68,1.3l-2.87,0.51l-2.7,-1.35l-1.08,0.97l0.39,3.71l1.89,1.14l1.54,-1.19l0.84,1.96l-2.58,1.18l-2.25,2.38l-0.41,3.91l-0.66,2.11l-2.65,0.01l-2.2,2.04l-0.8,3.01l2.76,2.98l2.68,0.83l-0.96,3.73l-3.31,2.38l-1.82,5.03l-2.56,1.72l-1.15,2.06l0.91,4.64l1.87,2.63l-1.18,-0.23l-2.6,-0.71l-6.78,-0.61l-1.16,-2.63l0.05,-3.33l-1.87,0.28l-0.99,-1.6l-0.25,-4.6l2.15,-1.88l0.89,-2.68l-0.33,-2.11l1.49,-3.52l1.02,-5.35l-0.3,-2.33l1.22,-0.75l-0.3,-1.48l-1.3,-0.78l0.92,-1.63l-1.27,-1.46l-0.65,-4.4l1.13,-0.77l-0.47,-4.54l0.66,-3.75l0.75,-3.22l1.68,-1.3l-0.85,-3.46l-0.01,-3.22l2.12,-2.26l-0.06,-2.87l1.6,-3.31l0.01,-3.09l-0.73,-0.61l-1.29,-5.69l1.73,-3.34l-0.27,-3.11l1,-2.9l1.84,-2.96l1.98,-1.95l-0.84,-1.23l0.59,-1l-0.09,-5.14l3.05,-1.51l0.96,-3.16l-0.34,-0.76l2.34,-2.72L293.1,526.47z"},{"id":"AT","title":"Austria","d":"M522.86,309.85L522.65,311.56L521.07,311.57L521.61,312.46L520.68,315.11L520.15,315.8L517.7,315.9L516.28,316.82L513.96,316.51L509.95,315.46L509.33,314.03L506.56,314.75L506.23,315.52L504.53,314.94L503.1,314.83L501.83,314.09L502.26,313.08L502.15,312.34L503,312.12L504.42,313.26L504.82,312.17L507.29,312.35L509.3,311.61L510.64,311.73L511.51,312.58L511.78,311.88L511.38,309.16L512.39,308.62L513.37,306.67L515.46,308.04L517.03,306.3L518.02,305.98L520.2,307.28L521.51,307.06L522.81,307.86L522.58,308.4z"},{"id":"AU","title":"Australia","d":"M882.93,588.16l2.71,1.28l1.53,-0.51l2.19,-0.71l1.68,0.25l0.2,4.43l-0.96,1.3l-0.29,3.06l-0.98,-1.05l-1.95,2.67l-0.58,-0.21l-1.72,-0.12l-1.73,-3.28l-0.38,-2.5l-1.62,-3.25l0.07,-1.7L882.93,588.16zM877.78,502.1l1.01,2.25l1.8,-1.08l0.93,1.22l1.35,1.13l-0.29,1.28l0.6,2.48l0.43,1.45l0.71,0.35l0.76,2.5l-0.27,1.52l0.91,1.99l3.04,1.54l1.98,1.41l1.88,1.29l-0.37,0.72l1.6,1.87l1.09,3.25l1.12,-0.66l1.14,1.31l0.69,-0.46l0.48,3.21l1.99,1.87l1.3,1.17l2.19,2.49l0.79,2.49l0.07,1.77l-0.19,1.94l1.34,2.68l-0.16,2.81l-0.49,1.48l-0.76,2.87l0.06,1.86l-0.55,2.34l-1.24,3l-2.08,1.63l-1.02,2.59l-0.94,1.67l-0.83,2.93l-1.08,1.71l-0.71,2.58l-0.36,2.4l0.14,1.11l-1.61,1.22l-3.14,0.13l-2.59,1.45l-1.29,1.38l-1.69,1.54l-2.32,-1.58l-1.72,-0.63l0.44,-1.85l-1.53,0.67l-2.46,2.58l-2.42,-0.97l-1.59,-0.56l-1.6,-0.25l-2.71,-1.03l-1.81,-2.18l-0.52,-2.66l-0.65,-1.75l-1.38,-1.4l-2.7,-0.41l0.92,-1.66l-0.68,-2.52l-1.37,2.35l-2.5,0.63l1.47,-1.88l0.42,-1.95l1.08,-1.65l-0.22,-2.47l-2.28,2.85l-1.75,1.15l-1.07,2.69l-2.19,-1.4l0.09,-1.79l-1.75,-2.43l-1.48,-1.25l0.53,-0.77l-3.6,-2l-1.97,-0.09l-2.7,-1.6l-5.02,0.31l-3.63,1.18l-3.19,1.1l-2.68,-0.22l-2.97,1.7l-2.43,0.77l-0.54,1.75l-1.04,1.36l-2.38,0.08l-1.76,0.3l-2.48,-0.61l-2.02,0.37l-1.92,0.15l-1.67,1.8l-0.82,-0.15l-1.41,0.96l-1.35,1.08l-2.05,-0.13l-1.88,0l-2.97,-2.17l-1.51,-0.64l0.06,-1.93l1.39,-0.46l0.48,-0.76l-0.1,-1.2l0.34,-2.3l-0.31,-1.95l-1.48,-3.29l-0.46,-1.85l0.12,-1.83l-1.12,-2.08l-0.07,-0.93l-1.24,-1.26l-0.35,-2.47l-1.6,-2.48l-0.39,-1.33l1.23,1.35l-0.95,-2.88l1.39,0.9l0.83,1.2l-0.05,-1.59l-1.39,-2.43l-0.27,-0.97l-0.65,-0.92l0.3,-1.77l0.57,-0.75l0.38,-1.52l-0.3,-1.77l1.16,-2.17l0.21,2.29l1.18,-2.07l2.28,-1l1.37,-1.28l2.14,-1.1l1.27,-0.23l0.77,0.37l2.21,-1.11l1.7,-0.33l0.42,-0.65l0.74,-0.27l1.55,0.07l2.95,-0.87l1.52,-1.31l0.72,-1.58l1.64,-1.49l0.13,-1.17l0.07,-1.59l1.96,-2.47l1.18,2.51l1.19,-0.58l-1,-1.38l0.88,-1.41l1.24,0.63l0.34,-2.21l1.53,-1.42l0.68,-1.14l1.41,-0.49l0.04,-0.8l1.23,0.34l0.05,-0.72l1.23,-0.41l1.36,-0.39l2.07,1.32l1.56,1.71l1.75,0.02l1.78,0.27l-0.59,-1.58l1.34,-2.3l1.26,-0.75l-0.44,-0.71l1.22,-1.63l1.7,-1.01l1.43,0.34l2.36,-0.54l-0.05,-1.45l-2.05,-0.94l1.49,-0.41l1.86,0.7l1.49,1.17l2.36,0.73l0.8,-0.29l1.74,0.88l1.64,-0.82l1.05,0.25l0.66,-0.55l1.29,1.41l-0.75,1.53l-1.06,1.16l-0.96,0.1l0.33,1.15l-0.82,1.43l-1,1.41l0.2,0.81l2.23,1.6l2.16,0.93l1.44,1l2.03,1.72l0.79,0l1.47,0.75l0.43,0.9l2.68,0.99l1.85,-1l0.55,-1.57l0.57,-1.29l0.35,-1.59l0.85,-2.3l-0.39,-1.39l0.2,-0.84l-0.32,-1.64l0.37,-2.16l0.54,-0.58l-0.44,-0.95l0.68,-1.51l0.53,-1.56l0.07,-0.81l1.04,-1.06l0.79,1.39l0.19,1.78l0.7,0.34l0.12,1.2l1.02,1.45l0.21,1.62L877.78,502.1z"},{"id":"AZ","title":"Azerbaijan","d":"M601.43,342.46l0.83,0.97l1.24,-0.01l-0.01,0.56l1.14,2.08l-1.92,-0.48l-1.42,-1.66l-0.44,-1.37L601.43,342.46zM608.08,337.03l1.24,0.25l0.48,-0.95l1.67,-1.51l1.47,1.97l1.43,2.62l1.31,0.17l0.86,0.99l-2.31,0.29l-0.49,2.82l-0.48,1.26l-1.03,0.84l0.08,1.77l-0.7,0.18l-1.75,-1.87l0.97,-1.78l-0.83,-1.06l-1.05,0.27l-3.31,2.66l-0.06,-2.5l-1.26,-0.59l-1.19,-0.99l0.79,-1.16l-1.49,-1.26l0.56,-0.92l-1.07,-0.64l-0.58,-0.97l0.69,-0.61l2.09,1.07l1.51,0.22l0.38,-0.43l-1.38,-2.02l0.73,-0.52l0.79,0.13L608.08,337.03z"},{"id":"BA","title":"Bosnia and Herzegovina","d":"M528.54,323.11L529.56,323.1L528.86,324.82L530.21,326.32L529.8,328.14L529.14,328.31L528.61,328.67L527.7,329.56L527.29,331.66L524.81,330.22L523.75,328.61L522.68,327.76L521.39,326.31L520.79,325.1L519.41,323.27L520,321.63L521.01,322.54L521.61,321.72L522.92,321.63L525.33,322.29L527.27,322.23z"},{"id":"BD","title":"Bangladesh","d":"M735.09,400.41L735.04,402.56L734.06,402.1L734.24,404.51L733.44,402.95L733.28,401.43L732.74,399.98L731.57,398.22L728.99,398.1L729.25,399.35L728.37,401.02L727.17,400.41L726.76,400.96L725.97,400.63L724.89,400.36L724.45,397.88L723.48,395.6L723.95,393.76L722.23,392.94L722.85,391.82L724.6,390.67L722.58,389.04L723.57,386.93L725.79,388.27L727.13,388.43L727.38,390.58L730.04,391L732.65,390.95L734.26,391.48L732.97,394.07L731.71,394.25L730.85,395.98L732.38,397.56L732.84,395.62L733.62,395.61z"},{"id":"BE","title":"Belgium","d":"M484.55,295.91L486.6,296.26L489.2,295.33L490.97,297.28L492.52,298.32L492.2,301.29L491.47,301.45L491.16,303.88L488.71,301.91L487.27,302.25L485.31,300.19L484.01,298.42L482.71,298.35L482.3,296.79z"},{"id":"BF","title":"Burkina Faso","d":"M467.33,436.4L465.41,435.67L464.09,435.78L463.11,436.49L461.85,435.89L461.36,434.96L460.1,434.34L459.91,432.7L460.68,431.49L460.61,430.53L462.84,428.17L463.25,426.21L464.02,425.51L465.38,425.89L466.55,425.31L466.93,424.57L469.11,423.29L469.64,422.39L472.26,421.19L473.81,420.78L474.51,421.33L476.3,421.32L476.08,422.72L476.46,424.03L478.04,425.9L478.12,427.28L481.36,427.93L481.29,429.88L480.68,430.74L479.31,431L478.74,432.24L477.78,432.56L475.32,432.5L474.02,432.28L473.12,432.74L471.88,432.53L467.01,432.66L466.94,434.27z"},{"id":"BG","title":"Bulgaria","d":"M538.78,325.56L539.59,327.16L540.67,326.87L542.83,327.48L546.95,327.68L548.34,326.69L551.64,325.79L553.68,327.2L555.33,327.61L553.87,329.2L552.85,331.93L553.75,334.09L551.34,333.58L548.48,334.76L548.45,336.62L545.9,336.97L543.93,335.67L541.68,336.7L539.61,336.59L539.41,334.12L538,332.91L538.47,332.37L538.16,331.92L538.63,330.71L539.7,329.52L538.34,327.86L538.09,326.44z"},{"id":"BI","title":"Burundi","d":"M557.52,475.93L557.34,472.56L556.63,471.3L558.34,471.52L559.2,469.93L560.69,470.11L560.85,471.21L561.45,471.84L561.48,472.75L560.79,473.33L559.69,474.79L558.68,475.8z"},{"id":"BJ","title":"Benin","d":"M482.8,445.92L480.48,446.25L479.79,444.31L479.92,437.85L479.35,437.27L479.25,435.88L478.27,434.89L477.42,434.06L477.78,432.56L478.74,432.24L479.31,431L480.68,430.74L481.29,429.88L482.23,429.05L483.24,429.04L485.38,430.68L485.27,431.63L485.9,433.31L485.35,434.45L485.64,435.21L484.28,436.96L483.42,437.83L482.89,439.6L482.96,441.39z"},{"id":"BN","title":"Brunei Darussalam","d":"M795.46,450.77L796.57,449.72L798.96,448.19L798.83,449.57L798.67,451.35L797.33,451.26L796.74,452.21z"},{"id":"BO","title":"Bolivia","d":"M299.04,526.35L295.84,526.22L294.75,528.65L293.1,526.47L289.43,525.74L287.1,528.46L285.07,528.87L283.97,524.72L282.47,521.38L283.35,518.51L281.88,517.26L281.51,515.14L280.13,513.14L281.9,510L280.69,507.56L281.34,506.59L280.83,505.52L281.93,504.08L281.99,501.64L282.12,499.62L282.73,498.66L280.3,494.08L282.39,494.32L283.83,494.25L284.46,493.4L286.91,492.25L288.38,491.19L292.05,490.71L291.76,492.83L292.1,493.92L291.87,495.82L294.92,498.37L298.06,498.84L299.16,499.91L301.06,500.48L302.22,501.31L303.98,501.28L305.61,502.13L305.73,503.79L306.28,504.63L306.32,505.88L305.5,505.92L306.58,509.29L311.95,509.41L311.54,511.09L311.84,512.24L313.37,513.06L314.04,514.88L313.54,517.2L312.77,518.49L313.04,520.18L312.16,520.79L312.12,519.88L309.5,518.37L306.9,518.32L302.01,519.18L300.67,521.8L300.6,523.4L299.49,526.99z"},{"id":"BR","title":"Brazil","d":"M313.68,551.79L317.42,547.42L320.59,544.34L322.47,543.06L324.83,541.33L324.89,538.84L323.48,537.05L322.09,537.64L322.64,535.86L323.02,534.04L323.02,532.36L322.01,531.81L320.96,532.3L319.92,532.17L319.59,530.99L319.33,528.22L318.8,527.32L316.91,526.5L315.77,527.09L312.81,526.51L312.99,522.45L312.16,520.79L313.04,520.18L312.77,518.49L313.54,517.2L314.04,514.88L313.37,513.06L311.84,512.24L311.54,511.09L311.95,509.41L306.58,509.29L305.5,505.92L306.32,505.88L306.28,504.63L305.73,503.79L305.61,502.13L303.98,501.28L302.22,501.31L301.06,500.48L299.16,499.91L298.06,498.84L294.92,498.37L291.87,495.82L292.1,493.92L291.76,492.83L292.05,490.71L288.38,491.19L286.91,492.25L284.46,493.4L283.83,494.25L282.39,494.32L280.3,494.08L278.72,494.57L277.44,494.24L277.63,489.94L275.33,491.6L272.86,491.53L271.8,490.02L269.94,489.86L270.53,488.65L268.97,486.93L267.8,484.4L268.54,483.89L268.54,482.7L270.24,481.89L269.96,480.38L270.67,479.4L270.88,478.1L274.08,476.19L276.38,475.66L276.75,475.24L279.28,475.37L280.54,467.72L280.61,466.51L280.17,464.92L278.93,463.9L278.94,461.88L280.52,461.42L281.08,461.71L281.17,460.64L279.53,460.35L279.5,458.61L284.96,458.67L285.89,457.71L286.67,458.59L287.21,460.24L287.74,459.89L289.29,461.37L291.47,461.19L292.01,460.33L294.09,459.68L295.25,459.23L295.57,458.05L297.58,457.25L297.42,456.67L295.05,456.43L294.66,454.67L294.77,452.8L293.52,452.08L294.04,451.82L296.12,452.18L298.35,452.88L299.16,452.22L301.17,451.78L304.31,450.74L305.34,449.67L304.96,448.88L306.42,448.76L307.08,449.4L306.71,450.63L307.67,451.05L308.32,452.35L307.54,453.33L307.09,455.71L307.81,457.12L308.01,458.41L309.74,459.71L311.12,459.85L311.43,459.31L312.31,459.19L313.58,458.7L314.49,457.96L316.04,458.19L316.72,458.09L318.25,458.32L318.5,457.75L318.03,457.2L318.31,456.39L319.44,456.64L320.77,456.35L322.37,456.94L323.6,457.52L324.47,456.76L325.09,456.88L325.48,457.67L326.82,457.47L327.89,456.41L328.75,454.35L330.41,451.8L331.37,451.67L332.06,453.21L333.63,458.09L335.13,458.55L335.21,460.47L333.1,462.76L333.97,463.6L338.93,464.04L339.03,466.83L341.16,465L344.69,466.01L349.34,467.71L350.71,469.34L350.25,470.88L353.51,470.02L358.97,471.5L363.16,471.39L367.3,473.7L370.88,476.83L373.04,477.63L375.44,477.75L376.46,478.63L377.41,482.2L377.88,483.89L376.76,488.55L375.33,490.39L371.38,494.33L369.59,497.54L367.52,500.02L366.82,500.08L366.03,502.18L366.23,507.58L365.45,512.06L365.15,513.99L364.27,515.14L363.77,519.08L360.93,522.96L360.45,526.05L358.18,527.36L357.52,529.17L354.48,529.16L350.07,530.33L348.09,531.68L344.95,532.57L341.65,535.01L339.28,538.07L338.87,540.39L339.34,542.12L338.81,545.3L338.18,546.85L336.22,548.6L333.11,554.28L330.64,556.87L328.73,558.41L327.46,561.57L325.6,563.48L324.82,561.58L326.06,560.01L324.44,557.76L322.24,555.94L319.35,553.86L318.31,553.95L315.5,551.45z"},{"id":"BS","title":"Bahamas","d":"M257.86,395.2l-0.69,0.15l-0.71,-1.76l-1.05,-0.89l0.61,-1.95l0.84,0.12l0.98,2.55L257.86,395.2zM257.06,386.51l-3.06,0.5l-0.2,-1.15l1.32,-0.25l1.85,0.09L257.06,386.51zM259.36,386.48l-0.48,2.21l-0.52,-0.4l0.05,-1.63l-1.26,-1.23l-0.01,-0.36L259.36,386.48z"},{"id":"BT","title":"Bhutan","d":"M732.36,382.78L733.5,383.78L733.3,385.71L731.01,385.8L728.65,385.59L726.88,386.08L724.33,384.89L724.28,384.26L726.13,381.92L727.64,381.12L729.65,381.85L731.13,381.93z"},{"id":"BW","title":"Botswana","d":"M547.17,515.95L547.73,516.47L548.62,518.18L551.79,521.43L552.99,521.75L553,522.8L553.82,524.7L555.99,525.16L557.78,526.52L553.81,528.74L551.29,531L550.36,533.03L549.52,534.18L547.99,534.43L547.5,535.9L547.21,536.86L545.42,537.58L543.14,537.43L541.8,536.57L540.62,536.19L539.25,536.91L538.56,538.39L537.23,539.32L535.83,540.71L533.82,541.03L533.2,539.94L533.46,538.04L531.79,535.11L531.04,534.65L531.04,525.79L533.8,525.68L533.88,515.11L535.97,515.02L540.29,513.99L541.37,515.2L543.15,514.05L544.01,514.04L545.59,513.38L546.09,513.6z"},{"id":"BY","title":"Belarus","d":"M541.1,284.07L543.81,284.11L546.85,282.31L547.5,279.59L549.8,278.02L549.54,275.82L551.24,274.98L554.26,273.05L557.21,274.31L557.61,275.54L559.08,274.95L561.82,276.13L562.09,278.44L561.49,279.76L563.25,282.91L564.39,283.78L564.22,284.64L566.11,285.47L566.92,286.72L565.83,287.74L563.57,287.58L563.03,288.02L563.69,289.56L564.38,292.49L561.97,292.76L561.11,293.76L560.92,296.02L559.81,295.59L557.28,295.81L556.54,294.76L555.49,295.54L554.44,294.89L552.23,294.8L549.1,293.72L546.27,293.36L544.1,293.46L542.56,294.69L541.22,294.86L541.17,292.85L540.3,290.73L541.98,289.79L542,287.94L541.22,286.16z"},{"id":"BZ","title":"Belize","d":"M225.31,412.96L225.29,412.53L225.63,412.39L226.14,412.74L227.14,410.97L227.67,410.93L227.68,411.36L228.21,411.37L228.17,412.17L227.71,413.44L227.96,413.89L227.67,414.94L227.84,415.21L227.52,416.68L226.97,417.46L226.46,417.55L225.9,418.55L225.07,418.55L225.29,415.27z"},{"id":"CA","title":"Canada","d":"M198.93,96.23l-0.22,-5.9l3.63,0.58l1.63,0.96l3.35,4.92l-0.76,4.97l-4.15,2.77l-2.28,-3.12L198.93,96.23zM212.14,108.88l0.33,-1.49l-1.97,-2.45l-5.65,-0.19l0.75,3.68l5.25,0.83L212.14,108.88zM248.49,155.83l3.08,5.1l0.81,0.57l3.07,-1.27l3.02,0.2l2.98,0.28l-0.25,-2.64l-4.84,-5.38l-6.42,-1.08l-1.35,0.67L248.49,155.83zM183.06,93.13l-2.71,4.19l6.24,0.52l4.61,4.44l4.58,1.5l-1.09,-5.68l-2.14,-6.73l-7.58,-5.35l-5.5,-2.04l0.2,5.69L183.06,93.13zM208.96,82.89l5.13,-0.12l-2.22,4l-0.04,5.3l3.01,5.76l5.81,1.77l4.96,-0.99l5.18,-10.73l3.85,-4.45l-3.38,-4.97l-2.21,-10.65l-4.6,-3.19l-4.72,-3.68l-3.58,-9.56l-6.52,0.94l1.23,4.15l-2.87,1.25l-1.94,5.32l-1.94,7.46l1.78,7.26L208.96,82.89zM145.21,136.27l3.92,1.95l12.67,-1.3l-5.82,4.77l0.36,3.43l4.26,-0.24l7.07,-4.58l9.5,-1.67l1.71,-5.22l-0.49,-5.57l-2.94,-0.5l-2.5,1.93l-1.1,-4.13l-0.95,-5.7l-2.9,-1.42l-2.57,4.41l4.01,11.05l-4.9,-0.85l-4.98,-6.79l-7.89,-4l-2.64,3.32L145.21,136.27zM167.77,94.21l-3.65,-2.9l-1.5,-0.66l-2.88,4.28l-0.05,2l4.66,0.01L167.77,94.21zM166.31,106.56l0.93,-3.99l-3.95,-2.12l-4.09,1.39l-2.27,4.26l4.16,4.21L166.31,106.56zM195.4,139.8l4.62,-1.11l1.28,-8.25l-0.09,-5.95l-2.14,-5.56l-0.22,1.6l-3.94,-0.7l-4.22,4.09l-3.02,-0.37l0.18,8.92l4.6,-0.87l-0.06,6.47L195.4,139.8zM192.12,185.41l-5.06,-3.93l-4.71,-4.21l-0.87,-6.18l-1.76,-8.92l-3.14,-3.84l-2.79,-1.55l-2.47,1.42l1.99,9.59l-1.41,3.73l-2.29,-8.98l-2.56,-3.11l-3.17,4.81l-3.9,-4.76l-6.24,2.87l1.4,-4.46l-2.87,-1.87l-7.51,5.84l-1.95,3.71l-2.35,6.77l4.9,2.32l4.33,-0.12l-6.5,3.46l1.48,3.13l3.98,0.17l5.99,-0.67l5.42,1.96l-3.66,1.44l-3.95,-0.37l-4.33,1.41l-1.87,0.87l3.45,6.35l2.49,-0.88l3.83,2.15l1.52,3.65l4.99,-0.73l7.1,-1.16l5.26,-2.65l3.26,-0.48l4.82,2.12l5.07,1.22l0.94,-2.86l-1.79,-3.05l4.6,-0.64L192.12,185.41zM199.86,184.43l-1.96,3.54l-2.47,2.49l3.83,3.54l2.28,-0.85l3.78,2.36l1.74,-2.73l-1.71,-3.03l-0.84,-1.53l-1.68,-1.46L199.86,184.43zM182.25,154.98l-2.13,-2.17l-3.76,0.4l-0.95,1.38l4.37,6.75L182.25,154.98zM210.94,168.15l3.01,-6.93l3.34,-1.85l4.19,-8.74l-5.36,-2.47l-5.84,-0.36l-2.78,2.77l-1.47,4.23l-0.04,4.82l1.75,8.19L210.94,168.15zM228.09,145.15l5.76,-0.18l8.04,-1.61l3.59,1.28l4.18,-2.26l1.75,-2.84l-0.63,-4.52l-3,-4.23l-4.56,-0.8l-5.71,0.97l-4.46,2.44l-4.09,-0.94l-3.78,-0.5l-1.78,-2.7l-3.22,-2.61l0.64,-4.43l-2.42,-3.98l-5.52,0.03l-3.11,-3.99l-5.78,-0.8l-1.06,5.1l3.25,3.74l5.8,1.45l2.81,5.09l0.34,5.6l0.97,5.99l7.45,3.42L228.09,145.15zM139.07,126.88l5.21,-5.05l2.62,-0.59l2.16,-4.23l0.38,-9.77l-3.85,1.91l-4.3,-0.18l-5.76,8.19l-4.76,8.98l3.8,2.51L139.07,126.88zM211.25,143.05l1.53,-4.14l-1.02,-3.46l-2.45,-3.92l-4.03,3.02l-1.49,4.92l3.4,2.79L211.25,143.05zM202.94,154.49l-0.73,-2.88l-5,1.26l-3.34,-2.11l-3.32,4.8l3.09,6.28l-5.72,-1.17l-0.06,3.01l6.97,7.05l1.94,3.38l2.7,0.73l4.6,-3.41l0.5,-8.21l-4.24,-4.07L202.94,154.49zM128.95,308.23l-1.16,-2.34l-2.8,-1.77l-1.39,-2.05l-0.95,-1.5l-2.64,-0.46l-1.72,-0.67l-2.94,-0.96l-0.24,1.02l1.08,2.38l2.89,0.78l0.5,1.23l2.51,1.5l0.84,1.51l4.6,1.92L128.95,308.23zM250.65,230.6l-2,-2.11l-2.06,0.5l-0.25,-3.06l-3.21,-2.04l-3.07,-2.27l-1.63,-1.75l-1.43,1.03l-0.52,-2.96l-2.03,-0.55l-0.96,6.13l-0.36,5.11l-2.44,3.14l3.8,-0.6l0.96,3.65l3.99,-3.23l2.78,-3.38l1.57,2.86l4.36,1.51L250.65,230.6zM130.12,178.05l7.38,-4.18V170l3.48,-6.41l6.88,-6.69l3.52,-2.47l-3.01,-4.2l-2.72,-2.95l-7.16,-0.57l-4,-2.16l-9.48,1.63l2.74,6.23l-2.43,6.43l-1.94,6.87l-1.2,3.86l6.47,4.69L130.12,178.05zM264.36,205.36l0.32,-1.01l-0.03,-3.17l-2.19,-2.08l-2.57,1.05l-1.19,4.17l0.7,3.56l3.14,-0.36L264.36,205.36zM288.18,212.9l4.41,6.6l3.45,2.85l4.92,-7.87l0.87,-4.93l-4.41,-0.47l-4.03,-6.7l-4.45,-1.64l-6.6,-4.97l5.15,-3.63l-2.65,-7.54l-2.44,-3.35l-6.77,-3.35l-2.92,-5.55l-5.21,1.99l-0.36,-3.86l-3.86,-4.32l-6.22,-4.71l-2.65,3.71l-5.55,2.66l0.42,-6.06l-4.81,-10.05l-7.11,4.06l-2.59,7.7l-2.21,-5.92l2.06,-6.37l-7.24,2.65l-2.88,3.99l-2.15,8.42l0.89,9.05l3.98,0.04l-2.93,3.92l2.33,2.96l4.55,1.25l5.93,2.42l10.2,1.82l5.08,-1.04l1.5,-2.42l2.21,2.79l2.47,0.46l2.97,4.96l-1.8,1.98l5.68,2.63l4.29,3.68l1.08,2.55l0.77,3.24l-3.63,6.93l-0.98,3.44l0.94,2.42l-5.77,0.86l-5.27,0.12l-1.85,4.87l2.37,2.23l8.11,-1.03l-0.04,-1.89l4.08,3.15l4.18,3.28l-0.98,1.77l3.4,3.02l6.02,3.53l7.6,2.39l-0.46,-2.09l-2.92,-3.67l-3.96,-5.37l7.03,5l3.54,1.66l0.97,-4.44l-1.82,-6.3l-1.16,-1.73l-3.81,-3.03l-2.95,-3.91l0.35,-3.94L288.18,212.9zM222.35,51.34l2.34,7.29l4.96,5.88l9.81,-1.09l6.31,1.97l-4.38,6.05l-2.21,-1.78l-7.66,-0.71l1.19,8.31l3.96,6.04l-0.8,5.2l-4.97,3.46l-2.27,5.47l4.55,2.65l3.82,8.55l-7.5,-5.7l-1.71,0.94l1.38,9.38l-5.18,2.83l0.35,5.85l5.3,0.63l4.17,1.44l8.24,-1.84l7.33,3.27l7.49,-7.19l-0.06,-3.02l-4.79,0.48l-0.39,-2.84l3.92,-3.83l1.33,-5.15l4.33,-3.83l2.66,-4.76l-2.32,-7.1l1.94,-2.65l-3.86,-1.89l8.49,-1.63l1.79,-3.15l5.78,-2.6l4.8,-13.47l4.57,-4.94l6.62,-11.12l-6.1,0.1l2.54,-4.3l6.78,-3.99l6.84,-8.9l0.12,-5.73l-5.13,-6.04l-6.02,-2.93l-7.49,-1.82l-6.07,-1.49l-6.07,-1.5l-8.1,3.98l-1.49,-2.53l-8.57,0.98l-5.03,2.57l-3.7,3.65l-2.13,11.74L239,24.52l-3.48,-1.14l-4.12,7.97l-5.5,3.35l-3.27,0.66l-4.17,3.84l0.61,6.65L222.35,51.34zM296.75,316.34l-0.98,-1.98l-1.06,1.26l0.7,1.36l3.56,1.71l1.04,-0.26l1.38,-1.66l-2.6,0.11L296.75,316.34zM239.75,238.48l0.61,1.63l1.98,0.14l3.28,-3.34l0.06,-1.19l-3.85,-0.06L239.75,238.48zM301.88,304.92l-2.87,-1.8l-3.69,-1.09l-0.97,0.37l2.61,2.04l3.63,1.34l1.36,-0.08L301.88,304.92zM326.76,309.71l-0.36,-2.24l-1.96,0.72l0.87,-3.11l-2.8,-1.32l-1.29,1.05l-2.49,-1.18l0.98,-1.51l-1.88,-0.93l-1.83,1.47l1.86,-3.82l1.5,-2.8l0.54,-1.22l-1.3,-0.2l-2.43,1.55l-1.74,2.53l-2.9,6.92l-2.35,2.56l1.22,1.14l-1.75,1.47l0.43,1.23l5.44,0.13l3.01,-0.25l2.69,1.01l-1.98,1.93l1.67,0.14l3.25,-3.58l0.78,0.53l-0.61,3.37l1.84,0.77l1.27,-0.15l1.18,-3.61L326.76,309.71zM305.57,314.47l-2.81,4.56l-4.63,0.58l-3.64,-2.01l-0.92,-3.07l-0.89,-4.46l2.65,-2.83l-2.48,-2.09l-4.19,0.43l-5.88,3.53l-4.5,5.45l-2.38,0.67l3.23,-3.8l4.04,-5.57l3.57,-1.9l2.35,-3.11l2.9,-0.3l4.21,0.03l6,0.92l4.74,-0.71l3.53,-3.62l4.62,-1.59l2.01,-1.58l2.04,-1.71l-0.2,-5.19l-1.13,-1.77l-2.18,-0.63l-1.11,-4.05l-1.8,-1.55l-4.47,-1.26l-2.52,-2.82l-3.73,-2.83l1.13,-3.2l-3.1,-6.26l-3.65,-6.89l-2.18,-4.98l-1.86,2.61l-2.68,6.05l-4.06,2.97l-2.03,-3.16l-2.56,-0.85l-0.93,-6.99l0.08,-4.8l-5,-0.44l-0.85,-2.27l-3.45,-3.44l-2.61,-2.04l-2.32,1.58l-2.88,-0.58l-4.81,-1.65l-1.95,1.4l0.94,9.18l1.22,5.12l-3.31,5.75l3.41,4.02l1.9,4.44l0.23,3.42l-1.55,3.5l-3.18,3.46l-4.49,2.28l1.98,2.53l1.46,7.4l-1.52,4.68l-2.16,1.46l-4.17,-4.28l-2.03,-5.17l-0.87,-4.76l0.46,-4.19l-3.05,-0.47l-4.63,-0.28l-2.97,-2.08l-3.51,-1.37l-2.01,-2.38l-2.8,-1.94l-5.21,-2.23l-3.92,1.02l-1.31,-3.95l-1.26,-4.99l-4.12,-0.9l0.15,-6.41l1.09,-4.48l3.04,-6.6l3.43,-4.9l3.26,-0.77l0.19,-4.05l2.21,-2.68l4.01,-0.42l3.25,-4.39l0.82,-2.9l2.7,-5.73l0.84,-3.5l2.9,2.11l3.9,-1.08l5.49,-4.96l0.36,-3.54l-1.98,-3.98l2.09,-4.06l-0.17,-3.87l-3.76,-3.95l-4.14,-1.19l-3.98,-0.62l-0.15,8.71l-2.04,6.56l-2.93,5.3l-2.71,-4.95l0.84,-5.61l-3.35,-5.02l-3.75,6.09l0.01,-7.99l-5.21,-1.63l2.49,-4.01l-3.81,-9.59l-2.84,-3.91l-3.7,-1.44l-3.32,6.43l-0.22,9.34l3.27,3.29l3,4.91l-1.27,7.71l-2.26,-0.2l-1.78,5.88l0.02,-7l-4.34,-2.58l-2.49,1.33l0.32,4.67l-4.09,-0.18l-4.35,1.17l-4.95,-3.35l-3.13,0.6l-2.82,-4.11l-2.26,-1.84l-2.24,0.77l-3.41,0.35l-1.81,2.61l2.86,3.19l-3.05,3.72l-2.99,-4.42l-2.39,1.3l-7.57,0.87l-5.07,-1.59l3.94,-3.74l-3.78,-3.9l-2.75,0.5l-3.86,-1.32l-6.56,-2.89l-4.29,-3.37l-3.4,-0.47l-1.06,2.36l-3.44,1.31l-0.38,-6.15l-3.73,5.5l-4.74,-7.32l-1.94,-0.89l-0.63,3.91l-2.09,1.9l-1.93,-3.39l-4.59,2.05l-4.2,3.55l-4.17,-0.98l-3.4,2.5l-2.46,3.28l-2.92,-0.72l-4.41,-3.8l-5.23,-1.94l-0.02,27.65l-0.01,35.43l2.76,0.17l2.73,1.56l1.96,2.44l2.49,3.6l2.73,-3.05l2.81,-1.79l1.49,2.85l1.89,2.23l2.57,2.42l1.75,3.79l2.87,5.88l4.77,3.2l0.08,3.12l-1.56,2.35l0.06,2.48l3.39,3.45l0.49,3.76l3.59,1.96l-0.4,2.79l1.56,3.96l5.08,1.82l2,1.89l5.43,4.23l0.38,0.01h7.96h8.32h2.76h8.55h8.27h8.41l8.42,0l9.53,0l9.59,0l5.8,0l0.01,-1.64l0.95,-0.02l0.5,2.35l0.87,0.72l1.96,0.26l2.86,0.67l2.72,1.3l2.27,-0.55l3.45,1.09l1.14,-1.66l1.59,-0.66l0.62,-1.03l0.63,-0.55l2.61,0.86l1.93,0.1l0.67,0.57l0.94,2.38l3.15,0.63l-0.49,1.18l1.11,1.21l-0.48,1.56l1.18,0.51l-0.59,1.37l0.75,0.13l0.53,-0.6l0.55,0.9l2.1,0.5l2.13,0.04l2.27,0.41l2.51,0.78l0.91,1.26l1.82,3.04l-0.9,1.3l-2.28,-0.54l-1.42,-2.44l0.36,2.49l-1.34,2.17l0.15,1.84l-0.23,1.07l-1.81,1.27l-1.32,2.09l-0.62,1.32l1.54,0.24l2.08,-1.2l1.23,-1.06l0.83,-0.17l1.54,0.38l0.75,-0.59l1.37,-0.48l2.44,-0.47v0l0,0l-0.25,-1.15l-0.13,0.04l-0.86,0.2l-1.12,-0.36l0.84,-1.32l0.85,-0.46l1.98,-0.56l2.37,-0.53l1.24,0.73l0.78,-0.85l0.89,-0.54l0.6,0.29l0.03,0.06l2.87,-2.73l1.27,-0.73l4.26,-0.03l5.17,0l0.28,-0.98l0.9,-0.2l1.19,-0.62l1,-1.82l0.86,-3.15l2.14,-3.1l0.93,1.08l1.88,-0.7l1.25,1.19l0,5.52l1.83,2.25l3.12,-0.48l4.49,-0.13l-4.87,3.26l0.11,3.29l2.13,0.28l3.13,-2.79l2.78,-1.58l6.21,-2.35l3.47,-2.62l-1.81,-1.46L305.57,314.47zM251.91,243.37l1.1,-3.12l-0.71,-1.23l-1.15,-0.13l-1.08,1.8l-0.13,0.41l0.74,1.77L251.91,243.37zM109.25,279.8L109.25,279.8l1.56,-2.35L109.25,279.8zM105.85,283.09l-2.69,0.38l-1.32,-0.62l-0.17,1.52l0.52,2.07l1.42,1.46l1.04,2.13l1.69,2.1l1.12,0.01l-2.44,-3.7L105.85,283.09z"},{"id":"CD","title":"Democratic Republic of Congo","d":"M561.71,453.61L561.54,456.87L562.66,457.24L561.76,458.23L560.68,458.97L559.61,460.43L559.02,461.72L558.86,463.96L558.21,465.02L558.19,467.12L557.38,467.9L557.28,469.56L556.89,469.77L556.63,471.3L557.34,472.56L557.52,475.93L558.02,478.5L557.74,479.96L558.3,481.58L559.93,483.15L561.44,486.7L560.34,486.41L556.57,486.89L555.82,487.22L555.02,489.02L555.65,490.27L555.15,493.62L554.8,496.47L555.56,496.98L557.52,498.08L558.29,497.57L558.53,500.65L556.38,500.62L555.23,499.05L554.2,497.83L552.05,497.43L551.42,495.94L549.7,496.84L547.46,496.44L546.52,495.15L544.74,494.89L543.43,494.96L543.27,494.08L542.3,494.01L541.02,493.84L539.29,494.26L538.07,494.19L537.37,494.45L537.52,491.08L536.59,490.03L536.38,488.3L536.79,486.6L536.23,485.51L536.18,483.75L532.77,483.77L533.02,482.76L531.59,482.77L531.44,483.26L529.7,483.37L528.99,485L528.57,485.71L527.02,485.31L526.1,485.71L524.24,485.93L523.17,484.46L522.53,483.55L521.72,481.87L521.03,479.78L512.76,479.75L511.77,480.08L510.96,480.03L509.8,480.41L509.41,479.54L510.12,479.24L510.21,478.02L510.67,477.3L511.69,476.72L512.43,477L513.39,475.93L514.91,475.96L515.09,476.75L516.14,477.25L517.79,475.49L519.42,474.13L520.13,473.24L520.04,470.94L521.26,468.23L522.54,466.8L524.39,465.46L524.71,464.57L524.78,463.55L525.24,462.58L525.09,461L525.44,458.53L525.99,456.79L526.83,455.3L526.99,453.62L527.24,451.67L528.34,450.25L529.84,449.35L532.15,450.3L533.93,451.33L535.98,451.61L538.07,452.15L538.91,450.47L539.3,450.25L540.57,450.53L543.7,449.14L544.8,449.73L545.71,449.65L546.13,448.97L547.17,448.73L549.28,449.02L551.08,449.08L552.01,448.79L553.7,451.1L554.96,451.43L555.71,450.96L557.01,451.15L558.57,450.56L559.24,451.75z"},{"id":"CF","title":"Central African Republic","d":"M518.09,442.66L520.41,442.44L520.93,441.72L521.39,441.78L522.09,442.41L525.62,441.34L526.81,440.24L528.28,439.25L528,438.26L528.79,438L531.5,438.18L534.14,436.87L536.16,433.78L537.59,432.64L539.36,432.15L539.68,433.37L541.3,435.14L541.3,436.29L540.85,437.47L541.03,438.34L542,439.15L544.14,440.39L545.67,441.52L545.7,442.44L547.58,443.9L548.75,445.11L549.46,446.79L551.56,447.9L552.01,448.79L551.08,449.08L549.28,449.02L547.17,448.73L546.13,448.97L545.71,449.65L544.8,449.73L543.7,449.14L540.57,450.53L539.3,450.25L538.91,450.47L538.07,452.15L535.98,451.61L533.93,451.33L532.15,450.3L529.84,449.35L528.34,450.25L527.24,451.67L526.99,453.62L525.19,453.46L523.29,452.99L521.62,454.47L520.15,457.07L519.85,456.26L519.73,454.99L518.45,454.09L517.41,452.65L517.17,451.65L515.85,450.19L516.07,449.36L515.79,448.18L516.01,446.01L516.68,445.5z"},{"id":"CG","title":"Republic of Congo","d":"M511.69,476.72L510.64,475.76L509.79,476.23L508.66,477.43L506.36,474.48L508.49,472.94L507.44,471.09L508.4,470.39L510.29,470.05L510.51,468.81L512.01,470.15L514.49,470.27L515.35,468.95L515.7,467.1L515.39,464.92L514.07,463.28L515.28,460.05L514.58,459.5L512.5,459.72L511.71,458.29L511.92,457.07L515.45,457.18L517.72,457.91L519.95,458.57L520.15,457.07L521.62,454.47L523.29,452.99L525.19,453.46L526.99,453.62L526.83,455.3L525.99,456.79L525.44,458.53L525.09,461L525.24,462.58L524.78,463.55L524.71,464.57L524.39,465.46L522.54,466.8L521.26,468.23L520.04,470.94L520.13,473.24L519.42,474.13L517.79,475.49L516.14,477.25L515.09,476.75L514.91,475.96L513.39,475.93L512.43,477z"},{"id":"CH","title":"Switzerland","d":"M502.15,312.34L502.26,313.08L501.83,314.09L503.1,314.83L504.53,314.94L504.31,316.61L503.08,317.3L501,316.79L500.39,318.42L499.06,318.55L498.57,317.91L497,319.27L495.65,319.46L494.44,318.6L493.48,316.83L492.14,317.47L492.18,315.63L494.23,313.32L494.14,312.27L495.42,312.66L496.19,311.95L498.57,311.98L499.15,311.08z"},{"id":"CI","title":"Côte d'Ivoire","d":"M467.24,449.46L465.97,449.49L464.01,448.94L462.22,448.97L458.89,449.46L456.95,450.27L454.17,451.29L453.63,451.22L453.84,448.92L454.11,448.57L454.03,447.46L452.84,446.29L451.95,446.1L451.13,445.33L451.74,444.09L451.46,442.73L451.59,441.91L452.04,441.91L452.2,440.68L451.98,440.14L452.25,439.75L453.29,439.41L452.6,437.15L451.95,435.99L452.18,435.02L452.74,434.81L453.1,434.55L453.88,434.97L456.04,435L456.56,434.17L457.04,434.23L457.85,433.91L458.29,435.12L458.94,434.76L460.1,434.34L461.36,434.96L461.85,435.89L463.11,436.49L464.09,435.78L465.41,435.67L467.33,436.4L468.07,440.41L466.89,442.77L466.16,445.94L467.37,448.35z"},{"id":"CL","title":"Chile","d":"M282.81,636.73l0,10.57l3,0l1.69,0.13l-0.93,1.98l-2.4,1.53l-1.38,-0.16l-1.66,-0.4l-2.04,-1.48l-2.94,-0.71l-3.53,-2.71l-2.86,-2.57l-3.86,-5.25l2.31,0.97l3.94,3.13l3.72,1.7l1.45,-2.17l0.91,-3.2l2.58,-1.91L282.81,636.73zM283.97,524.72l1.1,4.15l2.02,-0.41l0.34,0.76l-0.96,3.16l-3.05,1.51l0.09,5.14l-0.59,1l0.84,1.23l-1.98,1.95l-1.84,2.96l-1,2.9l0.27,3.11l-1.73,3.34l1.29,5.69l0.73,0.61l-0.01,3.09l-1.6,3.31l0.06,2.87l-2.12,2.26l0.01,3.22l0.85,3.46l-1.68,1.3l-0.75,3.22l-0.66,3.75l0.47,4.54l-1.13,0.77l0.65,4.4l1.27,1.46l-0.92,1.63l1.3,0.78l0.3,1.48l-1.22,0.75l0.3,2.33l-1.02,5.35l-1.49,3.52l0.33,2.11l-0.89,2.68l-2.15,1.88l0.25,4.6l0.99,1.6l1.87,-0.28l-0.05,3.33l1.16,2.63l6.78,0.61l2.6,0.71l-2.49,-0.03l-1.35,1.13l-2.53,1.67l-0.45,4.38l-1.19,0.11l-3.16,-1.54l-3.21,-3.25l0,0l-3.49,-2.63l-0.88,-2.87l0.79,-2.62l-1.41,-2.94l-0.36,-7.34l1.19,-4.03l2.96,-3.19l-4.26,-1.19l2.67,-3.57l0.95,-6.56l3.12,1.37l1.46,-7.97l-1.88,-1l-0.88,4.75l-1.77,-0.54l0.88,-5.42l0.96,-6.84l1.29,-2.48l-0.81,-3.5l-0.23,-3.98l1.18,-0.11l1.72,-5.6l1.94,-5.43l1.19,-4.97l-0.65,-4.91l0.84,-2.67l-0.34,-3.96l1.64,-3.87l0.51,-6.04l0.9,-6.37l0.88,-6.75l-0.21,-4.87l-0.58,-4.15l1.44,-0.75l0.75,-1.5l1.37,1.99l0.37,2.12l1.47,1.25l-0.88,2.87L283.97,524.72z"},{"id":"CM","title":"Cameroon","d":"M511.92,457.07L511.57,456.92L509.91,457.28L508.2,456.9L506.87,457.09L502.31,457.02L502.72,454.82L501.62,452.98L500.34,452.5L499.77,451.25L499.05,450.85L499.09,450.08L499.81,448.1L501.14,445.4L501.95,445.37L503.62,443.73L504.69,443.69L506.26,444.84L508.19,443.89L508.45,442.73L509.08,441.59L509.51,440.17L511.01,439.01L511.58,437.04L512.17,436.41L512.57,434.94L513.31,433.13L515.67,430.93L515.82,429.98L516.13,429.47L515.02,428.33L515.11,427.43L515.9,427.26L517.01,429.09L517.2,430.98L517.1,432.87L518.62,435.44L517.06,435.41L516.27,435.61L514.99,435.33L514.38,436.66L516.03,438.31L517.25,438.79L517.65,439.96L518.53,441.89L518.09,442.66L516.68,445.5L516.01,446.01L515.79,448.18L516.07,449.36L515.85,450.19L517.17,451.65L517.41,452.65L518.45,454.09L519.73,454.99L519.85,456.26L520.15,457.07L519.95,458.57L517.72,457.91L515.45,457.18z"},{"id":"CN","title":"China","d":"M784.63,410.41l-2.42,1.41l-2.3,-0.91l-0.08,-2.53l1.38,-1.34l3.06,-0.83l1.61,0.07l0.63,1.13l-1.23,1.3L784.63,410.41zM833.19,302.89l4.88,1.38l3.32,3.03l1.13,3.95l4.26,0l2.43,-1.65l4.63,-1.24l-1.47,3.76l-1.09,1.51l-0.96,4.46l-1.89,3.89l-3.4,-0.7l-2.41,1.4l0.74,3.36l-0.4,4.55l-1.43,0.1l0.02,1.93l-1.81,-2.24l-1.11,2.13l-4.33,1.62l0.44,1.97l-2.42,-0.14l-1.33,-1.17l-1.93,2.64l-3.09,1.98l-2.28,2.35l-3.92,1.06l-2.06,1.69l-3.02,0.98l1.49,-1.67l-0.59,-1.41l2.22,-2.45l-1.48,-1.93l-2.44,1.3l-3.17,2.54l-1.73,2.34l-2.75,0.17l-1.43,1.68l1.48,2.41l2.29,0.58l0.09,1.58l2.22,1.02l3.14,-2.51l2.49,1.37l1.81,0.09l0.46,1.84l-3.97,0.97l-1.31,1.87l-2.73,1.73l-1.44,2.39l3.02,1.86l1.1,3.31l1.71,3.05l1.9,2.53l-0.05,2.43l-1.76,0.89l0.67,1.73l1.65,1l-0.43,2.61l-0.71,2.52l-1.57,0.28l-2.05,3.41l-2.27,4.09l-2.6,3.68l-3.86,2.82l-3.9,2.55l-3.16,0.35l-1.71,1.34l-0.97,-0.98l-1.59,1.5l-3.92,1.5l-2.97,0.46l-0.96,3.15l-1.55,0.17l-0.74,-2.16l0.66,-1.16l-3.76,-0.96l-1.33,0.49l-2.82,-0.78l-1.33,-1.22l0.44,-1.74l-2.56,-0.55l-1.35,-1.14l-2.39,1.62l-2.73,0.35l-2.24,-0.02l-1.5,0.74l-1.45,0.44l0.42,3.43l-1.5,-0.08l-0.25,-0.7l-0.08,-1.24l-2.06,0.87l-1.21,-0.55l-2.08,-1.13l0.82,-2.51l-1.78,-0.59l-0.67,-2.8l-2.96,0.51l0.34,-3.63l2.66,-2.58l0.11,-2.57l-0.08,-2.4l-1.22,-0.75l-0.94,-1.86l-1.64,0.24l-3.02,-0.47l0.95,-1.33l-1.31,-1.99l-2,1.35L740.4,378l-3.23,2.03l-2.55,2.36l-2.26,0.39l-1.23,-0.85l-1.48,-0.08l-2,-0.73l-1.51,0.8l-1.85,2.34l-0.24,-2.48l-1.71,0.66l-3.27,-0.31l-3.17,-0.73l-2.28,-1.39l-2.18,-0.63l-0.94,-1.53l-1.58,-0.46l-2.83,-2.09l-2.25,-0.99l-1.16,0.77l-3.9,-2.26l-2.75,-2.07l-0.79,-3.63l2.01,0.44l0.09,-1.69l-1.12,-1.71l0.28,-2.74l-3.01,-3.99l-4.61,-1.39l-0.83,-2.66l-2.07,-1.63l-0.5,-1.01l-0.42,-2.01l0.1,-1.38l-1.7,-0.81l-0.92,0.36l-0.71,-3.32l0.8,-0.83l-0.39,-0.85l2.68,-1.73l1.94,-0.72l2.97,0.49l1.06,-2.35l3.6,-0.44l1,-1.48l4.42,-2.03l0.39,-0.85l-0.22,-2.17l1.92,-1l-2.52,-6.75l5.55,-1.58l1.44,-0.89l2.02,-7.26l5.56,1.35l1.56,-1.86l0.13,-4.19l2.33,-0.39l2.13,-2.83l1.1,-0.35l0.74,2.97l2.36,2.23l4,1.57l1.93,3.32l-1.08,4.73l1.01,1.73l3.33,0.68l3.78,0.55l3.39,2.45l1.73,0.43l1.28,3.57l1.65,2.27l3.09,-0.09l5.79,0.85l3.73,-0.53l2.77,0.57l4.15,2.29l3.39,0l1.24,1.16l3.26,-2.01l4.53,-1.31l4.2,-0.14l3.28,-1.34l2.01,-2.05l1.96,-1.3l-0.45,-1.28l-0.9,-1.5l1.47,-2.54l1.58,0.36l2.88,0.8l2.79,-2.1l4.28,-1.55l2.05,-2.66l1.97,-1.16l4.07,-0.54l2.21,0.46l0.31,-1.45l-2.54,-2.89l-2.25,-1.33l-2.16,1.54l-2.77,-0.65l-1.59,0.53l-0.72,-1.71l1.98,-4.23l1.37,-3.25l3.37,1.63l3.95,-2.74l-0.03,-1.93l2.53,-4.73l1.56,-1.45l-0.04,-2.52l-1.54,-1.1l2.32,-2.31l3.48,-0.84l3.72,-0.13l4.2,1.39l2.46,1.71l1.73,4.61l1.05,1.94l0.98,2.73L833.19,302.89z"},{"id":"CO","title":"Colombia","d":"M263.92,463.81L262.72,463.15L261.34,462.23L260.54,462.67L258.16,462.28L257.48,461.08L256.96,461.13L254.15,459.54L253.77,458.67L254.82,458.46L254.7,457.07L255.35,456.06L256.74,455.87L257.93,454.12L259,452.66L257.96,451.99L258.49,450.37L257.86,447.81L258.46,447.08L258.02,444.71L256.88,443.21L257.24,441.85L258.15,442.05L258.68,441.21L258.03,439.56L258.37,439.14L259.81,439.23L261.92,437.26L263.07,436.96L263.1,436.03L263.62,433.64L265.23,432.32L266.99,432.27L267.21,431.68L269.41,431.91L271.62,430.48L272.71,429.84L274.06,428.47L275.06,428.64L275.79,429.39L275.25,430.35L273.45,430.83L272.74,432.25L271.65,433.06L270.84,434.12L270.49,436.13L269.72,437.79L271.16,437.97L271.52,439.27L272.14,439.89L272.36,441.02L272.03,442.06L272.13,442.65L272.82,442.88L273.49,443.86L277.09,443.59L278.72,443.95L280.7,446.36L281.83,446.06L283.85,446.21L285.45,445.89L286.44,446.38L285.93,447.88L285.31,448.82L285.09,450.83L285.65,452.68L286.45,453.51L286.54,454.14L285.12,455.53L286.14,456.14L286.89,457.12L287.74,459.89L287.21,460.24L286.67,458.59L285.89,457.71L284.96,458.67L279.5,458.61L279.53,460.35L281.17,460.64L281.08,461.71L280.52,461.42L278.94,461.88L278.93,463.9L280.17,464.92L280.61,466.51L280.54,467.72L279.28,475.37L277.88,473.88L277.04,473.82L278.85,470.98L276.7,469.67L275.02,469.91L274.01,469.43L272.46,470.17L270.37,469.82L268.72,466.9L267.42,466.18L266.53,464.86L264.67,463.54z"},{"id":"CR","title":"Costa Rica","d":"M242.63,440.4L241.11,439.77L240.54,439.18L240.86,438.69L240.76,438.07L239.98,437.39L238.88,436.84L237.91,436.48L237.73,435.65L236.99,435.14L237.17,435.97L236.61,436.64L235.97,435.86L235.07,435.58L234.69,435.01L234.71,434.15L235.08,433.25L234.29,432.85L234.93,432.31L235.35,431.94L237.2,432.69L237.84,432.32L238.73,432.56L239.2,433.14L240.02,433.33L240.69,432.73L241.41,434.27L242.49,435.41L243.81,436.62L242.72,436.87L242.74,438L243.32,438.42L242.9,438.76L243.01,439.27L242.78,439.84z"},{"id":"CU","title":"Cuba","d":"M244.58,396.94L247.01,397.16L249.21,397.19L251.84,398.22L252.96,399.33L255.58,398.99L256.57,399.69L258.95,401.56L260.69,402.91L261.61,402.87L263.29,403.48L263.08,404.32L265.15,404.44L267.27,405.66L266.94,406.35L265.07,406.73L263.18,406.88L261.25,406.64L257.24,406.93L259.12,405.27L257.98,404.5L256.17,404.3L255.2,403.44L254.53,401.74L252.95,401.85L250.33,401.05L249.49,400.42L245.84,399.95L244.86,399.36L245.91,398.61L243.16,398.46L241.15,400.02L239.98,400.06L239.58,400.8L238.2,401.13L237,400.84L238.48,399.91L239.08,398.82L240.35,398.15L241.78,397.56L243.91,397.27z"},{"id":"CY","title":"Cyprus","d":"M570.31,358.29L572.2,356.83L569.65,357.85L567.63,357.8L567.23,358.63L567.03,358.65L565.7,358.77L566.35,360.14L567.72,360.58L570.6,359.2L570.51,358.93z"},{"id":"CZ","title":"Czech Republic","d":"M522.81,307.86L521.51,307.06L520.2,307.28L518.02,305.98L517.03,306.3L515.46,308.04L513.37,306.67L511.79,304.84L510.36,303.8L510.06,301.98L509.57,300.68L511.61,299.73L512.65,298.63L514.66,297.77L515.37,296.93L516.11,297.44L517.36,296.97L518.69,298.4L520.78,298.79L520.61,300L522.13,300.9L522.55,299.77L524.47,300.26L524.74,301.63L526.82,301.89L528.11,304.02L527.28,304.03L526.84,304.8L526.2,304.99L526.02,305.96L525.48,306.17L525.4,306.56L524.45,307L523.2,306.93z"},{"id":"DE","title":"Germany","d":"M503.07,278.92L503.12,280.8L505.96,281.92L505.93,283.62L508.78,282.72L510.35,281.41L513.52,283.3L514.84,284.81L515.5,287.2L514.72,288.45L515.73,290.1L516.43,292.55L516.21,294.11L517.36,296.97L516.11,297.44L515.37,296.93L514.66,297.77L512.65,298.63L511.61,299.73L509.57,300.68L510.06,301.98L510.36,303.8L511.79,304.84L513.37,306.67L512.39,308.62L511.38,309.16L511.78,311.88L511.51,312.58L510.64,311.73L509.3,311.61L507.29,312.35L504.82,312.17L504.42,313.26L503,312.12L502.15,312.34L499.15,311.08L498.57,311.98L496.19,311.95L496.54,308.97L497.96,306.07L493.92,305.29L492.6,304.16L492.76,302.27L492.2,301.29L492.52,298.32L492.04,293.63L493.73,293.63L494.44,291.92L495.14,287.69L494.61,286.11L495.16,285.11L497.5,284.85L498.02,285.89L499.93,283.56L499.29,281.77L499.16,279.02L501.28,279.66z"},{"id":"DJ","title":"Djibouti","d":"M596.05,427.72L596.71,428.6L596.62,429.79L595.02,430.47L596.23,431.24L595.19,432.76L594.57,432.26L593.9,432.46L592.33,432.41L592.28,431.55L592.07,430.76L593.01,429.43L594,428.17L595.2,428.42z"},{"id":"DK","title":"Denmark","d":"M510.83,275.84l-1.68,3.97l-2.93,-2.76l-0.39,-2.05l4.11,-1.66L510.83,275.84zM505.85,271.59l-0.69,1.9l-0.83,-0.55l-2.02,3.59l0.76,2.39l-1.79,0.74l-2.12,-0.64l-1.14,-2.72l-0.08,-5.12l0.47,-1.38l0.8,-1.54l2.47,-0.32l0.98,-1.43l2.26,-1.47l-0.1,2.68l-0.83,1.68l0.34,1.43L505.85,271.59z"},{"id":"DO","title":"Dominican Republic","d":"M274.18,407.35L274.53,406.84L276.72,406.86L278.38,407.62L279.12,407.54L279.63,408.59L281.16,408.53L281.07,409.41L282.32,409.52L283.7,410.6L282.66,411.8L281.32,411.16L280.04,411.28L279.12,411.14L278.61,411.68L277.53,411.86L277.11,411.14L276.18,411.57L275.06,413.57L274.34,413.11L274.19,412.27L274.25,411.47L273.53,410.59L274.21,410.09L274.43,408.96z"},{"id":"DZ","title":"Algeria","d":"M508.9,396.08L499.29,401.83L491.17,407.68L487.22,409L484.11,409.29L484.08,407.41L482.78,406.93L481.03,406.08L480.37,404.69L470.91,398.14L461.45,391.49L450.9,383.96L450.96,383.35L450.96,383.14L450.93,379.39L455.46,377.03L458.26,376.54L460.55,375.68L461.63,374.06L464.91,372.77L465.03,370.36L466.65,370.07L467.92,368.86L471.59,368.3L472.1,367.02L471.36,366.31L470.39,362.78L470.23,360.73L469.17,358.55L471.86,356.68L474.9,356.08L476.67,354.65L479.37,353.6L484.12,352.98L488.76,352.69L490.17,353.21L492.81,351.84L495.81,351.81L496.95,352.62L498.86,352.41L498.29,354.2L498.74,357.48L498.08,360.3L496.35,362.18L496.6,364.71L498.89,366.69L498.92,367.5L500.64,368.83L501.84,374.69L502.75,377.53L502.9,379.01L502.41,381.6L502.61,383.04L502.25,384.76L502.5,386.73L501.38,388.02L503.04,390.28L503.15,391.6L504.14,393.31L505.45,392.75L507.67,394.17z"},{"id":"EC","title":"Ecuador","d":"M250.1,472.87L251.59,470.79L250.98,469.57L249.91,470.87L248.23,469.64L248.8,468.86L248.33,466.33L249.31,465.91L249.83,464.18L250.89,462.38L250.69,461.25L252.23,460.65L254.15,459.54L256.96,461.13L257.48,461.08L258.16,462.28L260.54,462.67L261.34,462.23L262.72,463.15L263.92,463.81L264.31,465.92L263.44,467.73L260.38,470.65L257.01,471.75L255.29,474.18L254.76,476.06L253.17,477.21L252,475.8L250.86,475.5L249.7,475.72L249.63,474.7L250.43,474.04z"},{"id":"EE","title":"Estonia","d":"M543.42,264.71L543.75,261.59L542.72,262.26L540.94,260.36L540.69,257.25L544.24,255.72L547.77,254.91L550.81,255.83L553.71,255.66L554.13,256.62L552.14,259.76L552.97,264.72L551.77,266.38L549.45,266.37L547.04,264.43L545.81,263.78z"},{"id":"EG","title":"Egypt","d":"M573.17,377.28L572.38,378.57L571.78,380.97L571.02,382.61L570.36,383.17L569.43,382.15L568.16,380.73L566.16,376.16L565.88,376.45L567.04,379.82L568.76,383L570.88,387.88L571.91,389.56L572.81,391.3L575.33,394.7L574.77,395.23L574.86,397.2L578.13,399.91L578.62,400.53L567.5,400.53L556.62,400.53L545.35,400.53L545.35,389.3L545.35,378.12L544.51,375.54L545.23,373.54L544.8,372.15L545.81,370.58L549.54,370.53L552.24,371.39L555.02,372.36L556.32,372.86L558.48,371.83L559.63,370.9L562.11,370.63L564.1,371.04L564.87,372.66L565.52,371.59L567.76,372.36L569.95,372.55L571.33,371.73z"},{"id":"EH","title":"Western Sahara","d":"M438.57,383.06L442.19,383.07L450.94,383.1L450.94,383.1L450.94,383.1L442.19,383.07L438.57,383.06L438.46,383.15L438.41,383.19L436.63,386.39L434.77,387.53L433.75,389.44L433.69,391.09L432.94,392.88L432,393.37L430.44,395.31L429.48,397.46L429.66,398.48L428.74,400.05L427.66,400.87L427.53,402.26L427.41,403.53L428.02,402.53L439,402.55L438.47,398.2L439.16,396.65L441.78,396.38L441.69,388.52L450.9,388.69L450.9,383.96L450.96,383.35L450.96,383.14z"},{"id":"ER","title":"Eritrea","d":"M594,428.17L593.04,427.24L591.89,425.57L590.65,424.65L589.92,423.65L587.48,422.5L585.56,422.47L584.88,421.86L583.24,422.54L581.54,421.23L580.66,423.38L577.4,422.78L577.1,421.63L578.31,417.38L578.58,415.45L579.46,414.55L581.53,414.07L582.95,412.4L584.58,415.78L585.35,418.45L586.89,419.86L590.71,422.58L592.27,424.22L593.79,425.88L594.67,426.86L596.05,427.72L595.2,428.42z"},{"id":"ES","title":"Spain","d":"M449.92,334.56L450.06,331.88L448.92,330.22L452.88,327.45L456.31,328.15L460.08,328.12L463.06,328.78L465.39,328.58L469.92,328.7L471.04,330.19L476.2,331.92L477.22,331.1L480.38,332.82L483.63,332.33L483.78,334.52L481.12,337.01L477.53,337.79L477.28,339.03L475.55,341.06L474.47,344.02L475.56,346.07L473.94,347.67L473.34,349.97L471.22,350.67L469.23,353.36L465.68,353.41L463,353.35L461.25,354.57L460.18,355.88L458.8,355.59L457.77,354.42L456.97,352.42L454.35,351.88L454.12,350.72L455.16,349.4L455.54,348.44L454.58,347.38L455.35,345.03L454.23,342.86L455.44,342.56L455.55,340.84L456.01,340.31L456.04,337.43L457.34,336.43L456.56,334.55L454.92,334.42L454.44,334.89L452.79,334.9L452.08,333.06L450.94,333.61z"},{"id":"ET","title":"Ethiopia","d":"M581.54,421.23L583.24,422.54L584.88,421.86L585.56,422.47L587.48,422.5L589.92,423.65L590.65,424.65L591.89,425.57L593.04,427.24L594,428.17L593.01,429.43L592.07,430.76L592.28,431.55L592.33,432.41L593.9,432.46L594.57,432.26L595.19,432.76L594.58,433.77L595.62,435.33L596.65,436.69L597.72,437.7L606.89,441.04L609.25,441.02L601.32,449.44L597.67,449.56L595.17,451.53L593.38,451.58L592.61,452.46L590.69,452.46L589.56,451.52L587,452.69L586.17,453.85L584.3,453.63L583.68,453.31L583.02,453.38L582.14,453.36L578.59,450.98L576.64,450.98L575.68,450.07L575.68,448.5L574.22,448.03L572.57,444.98L571.29,444.33L570.79,443.21L569.37,441.84L567.65,441.64L568.61,440.03L570.09,439.96L570.51,439.1L570.48,436.57L571.31,433.61L572.63,432.81L572.92,431.65L574.12,429.48L575.81,428.06L576.95,425.25L577.4,422.78L580.66,423.38z"},{"id":"FK","title":"Falkland Islands","d":"M303.66,633.13L307.02,630.44L309.41,631.56L311.09,629.77L313.33,631.78L312.49,633.36L308.7,634.72L307.44,633.13L305.06,635.18z"},{"id":"FI","title":"Finland","d":"M555.42,193.1L555.01,198.5L559.31,203.49L556.72,208.97L559.98,216.93L558.09,222.69L560.62,227.55L559.47,231.69L563.62,235.95L562.56,239.05L559.96,242.5L553.96,249.91L548.87,250.36L543.94,252.43L539.38,253.61L537.75,250.54L535.04,248.67L535.66,242.95L534.3,237.54L535.64,233.96L538.18,230.02L544.59,223L546.47,221.61L546.17,218.77L542.27,215.55L541.33,212.85L541.25,201.73L536.88,196.58L533.14,192.77L534.82,190.69L537.94,194.84L541.6,194.45L544.61,196.32L547.28,192.88L548.66,187.03L553.01,184.25L556.61,187.51z"},{"id":"FJ","title":"Fiji","d":"M980.53,508.61l-0.35,1.4l-0.23,0.16l-1.78,0.72l-1.79,0.61l-0.36,-1.09l1.4,-0.6l0.89,-0.16l1.64,-0.91L980.53,508.61zM974.69,512.92l-1.27,-0.36l-1.08,1l0.27,1.29l1.55,0.36l1.74,-0.4l0.46,-1.53l-0.96,-0.84L974.69,512.92z"},{"id":"FR","title":"France","d":"M502.06,333.54l-0.93,2.89l-1.27,-0.76l-0.65,-2.53l0.57,-1.41l1.81,-1.45L502.06,333.54zM485.31,300.19l1.96,2.06l1.44,-0.34l2.45,1.97l0.63,0.37l0.81,-0.09l1.32,1.12l4.04,0.79l-1.42,2.9l-0.36,2.98l-0.77,0.71l-1.28,-0.38l0.09,1.05l-2.05,2.3l-0.04,1.84l1.34,-0.63l0.96,1.77l-0.12,1.13l0.83,1.5l-0.97,1.21l0.72,3.04l1.52,0.49l-0.32,1.68l-2.54,2.17l-5.53,-1.04l-4.08,1.24l-0.32,2.29l-3.25,0.49l-3.15,-1.72l-1.02,0.82l-5.16,-1.73l-1.12,-1.49l1.45,-2.32l0.53,-7.88l-2.89,-4.26l-2.07,-2.09l-4.29,-1.6l-0.28,-3.07l3.64,-0.92l4.71,1.09l-0.89,-4.84l2.65,1.85l6.53,-3.37l0.84,-3.61l2.45,-0.9l0.41,1.56l1.3,0.07L485.31,300.19z"},{"id":"GA","title":"Gabon","d":"M506.36,474.48L503.48,471.66L501.62,469.36L499.92,466.48L500.01,465.56L500.62,464.66L501.3,462.64L501.87,460.57L502.82,460.41L506.89,460.44L506.87,457.09L508.2,456.9L509.91,457.28L511.57,456.92L511.92,457.07L511.71,458.29L512.5,459.72L514.58,459.5L515.28,460.05L514.07,463.28L515.39,464.92L515.7,467.1L515.35,468.95L514.49,470.27L512.01,470.15L510.51,468.81L510.29,470.05L508.4,470.39L507.44,471.09L508.49,472.94z"},{"id":"GB","title":"United Kingdom","d":"M459.38,281l-1.5,3.29l-2.12,-0.98l-1.73,0.07l0.58,-2.57l-0.58,-2.6l2.35,-0.2L459.38,281zM466.83,260.24l-3,5.73l2.86,-0.72l3.07,0.03l-0.73,4.22l-2.52,4.53l2.9,0.32l0.22,0.52l2.5,5.79l1.92,0.77l1.73,5.41l0.8,1.84l3.4,0.88l-0.34,2.93l-1.43,1.33l1.12,2.33l-2.52,2.33l-3.75,-0.04l-4.77,1.21l-1.31,-0.87l-1.85,2.06l-2.59,-0.5l-1.97,1.67l-1.49,-0.87l4.11,-4.64l2.51,-0.97l-0.02,0l-4.38,-0.75l-0.79,-1.8l2.93,-1.41l-1.54,-2.48l0.53,-3.06l4.17,0.42l0,0l0.41,-2.74l-1.88,-2.95l-0.04,-0.07l-3.4,-0.85l-0.67,-1.32l1.02,-2.2l-0.92,-1.37l-1.51,2.34l-0.16,-4.8l-1.42,-2.59l1.02,-5.36l2.18,-4.31l2.24,0.42L466.83,260.24z"},{"id":"GE","title":"Georgia","d":"M591.76,335.85L592.18,334.25L591.48,331.68L589.86,330.27L588.31,329.83L587.28,328.66L587.62,328.2L589.99,328.86L594.12,329.48L597.94,331.31L598.43,332.02L600.13,331.42L602.75,332.22L603.6,333.77L605.37,334.64L604.64,335.15L606.02,337.17L605.64,337.6L604.13,337.38L602.04,336.32L601.35,336.92L597.45,337.5L594.75,335.68z"},{"id":"GF","title":"French Guiana","d":"M327.89,456.41l-1.07,1.06l-1.34,0.2l-0.38,-0.78l-0.63,-0.12l-0.87,0.76l-1.22,-0.57l0.71,-1.19l0.24,-1.27l0.48,-1.2l-1.09,-1.65l-0.22,-1.91l1.46,-2.41l0.95,0.31l2.06,0.66l2.97,2.36l0.46,1.14l-1.66,2.55L327.89,456.41z"},{"id":"GH","title":"Ghana","d":"M478.23,446.84L473.83,448.48L472.27,449.44L469.74,450.25L467.24,449.46L467.37,448.35L466.16,445.94L466.89,442.77L468.07,440.41L467.33,436.4L466.94,434.27L467.01,432.66L471.88,432.53L473.12,432.74L474.02,432.28L475.32,432.5L475.11,433.39L476.28,434.85L476.28,436.9L476.55,439.12L477.25,440.15L476.63,442.68L476.85,444.08L477.6,445.86z"},{"id":"GL","title":"Greenland","d":"M344.13,23.91L353.55,10.3L363.39,11.37L366.96,2.42L376.87,0L399.27,3.15L416.81,21.74L411.63,30.04L400.9,30.97L385.81,33L387.22,36.64L397.15,34.4L405.59,41.31L411.04,35.19L413.37,42.34L410.29,53.31L417.43,46.38L431.04,38.83L439.45,42.64L441.02,50.76L429.59,63.42L428.01,67.32L419.05,70.18L425.54,70.97L422.26,82.48L420,92.07L420.09,107.33L423.46,115.67L419.08,116.18L414.47,120.06L419.64,126.36L420.3,135.98L417.3,137L420.93,146.15L414.71,146.9L417.96,151.04L417.04,154.55L413.09,156.06L409.18,156.09L412.69,162.57L412.73,166.7L407.18,162.87L405.74,165.36L409.52,167.65L413.2,173.13L414.26,180.08L409.26,181.7L407.1,178.44L403.63,173.46L404.59,179.33L401.34,183.74L408.72,184.09L412.59,184.54L405.07,191.57L397.45,197.7L389.25,200.31L386.16,200.35L383.26,203.22L379.36,210.85L373.33,215.74L371.39,216.03L367.65,217.7L363.63,219.29L361.22,223.41L361.18,227.97L359.77,232.13L355.19,237.08L356.32,241.79L355.06,246.64L353.63,252.2L349.68,252.54L345.54,247.91L339.93,247.88L337.21,244.7L335.34,238.9L330.48,231.22L329.06,227.07L328.68,221.18L324.79,214.91L325.8,209.74L323.93,207.21L326.7,198.56L330.92,195.71L332.03,192.45L332.62,186.19L329.41,189.05L327.89,190.24L325.37,191.38L321.93,188.77L321.74,183.22L322.84,178.74L325.44,178.62L331.16,180.87L326.34,175.44L323.83,172.43L321.04,173.67L318.7,171.48L321.83,162.98L320.13,159.45L317.9,152.71L314.53,141.8L310.96,137.63L310.99,133L303.46,126.31L297.51,125.46L290.02,125.93L283.18,126.79L279.92,123.04L275.05,115.38L282.41,111.41L288.06,110.73L276.06,107.37L269.74,101.93L270.13,96.59L280.74,89.72L291.01,82.56L292.09,76.92L284.53,71.16L286.97,64.52L296.68,52.19L300.76,50.21L299.59,41.64L306.23,36.4L314.85,33.19L323.47,33.01L326.53,39.31L333.97,27.99L340.66,35.77L344.59,37.36L350.42,43.77L343.75,33z"},{"id":"GM","title":"Gambia","d":"M428.03,426.43L428.39,425.16L431.44,425.07L432.08,424.4L432.97,424.35L434.07,425.06L434.94,425.07L435.87,424.59L436.43,425.41L435.22,426.06L434,426.01L432.8,425.4L431.76,426.06L431.26,426.09L430.58,426.49z"},{"id":"GN","title":"Guinea","d":"M451.59,441.91L450.8,441.84L450.23,442.97L449.43,442.96L448.89,442.36L449.07,441.23L447.9,439.51L447.17,439.82L446.57,439.89L445.8,440.05L445.83,439.02L445.38,438.28L445.47,437.46L444.86,436.27L444.08,435.26L441.84,435.26L441.19,435.79L440.41,435.85L439.93,436.46L439.61,437.25L438.11,438.49L436.88,436.82L435.79,435.71L435.07,435.35L434.37,434.78L434.06,433.53L433.65,432.91L432.83,432.44L434.08,431.06L434.93,431.11L435.66,430.63L436.28,430.63L436.72,430.25L436.48,429.31L436.79,429.01L436.84,428.04L438.19,428.07L440.21,428.77L440.83,428.7L441.04,428.39L442.56,428.61L442.97,428.45L443.13,429.5L443.58,429.49L444.31,429.11L444.77,429.21L445.55,429.93L446.75,430.16L447.52,429.54L448.43,429.16L449.1,428.76L449.66,428.84L450.28,429.46L450.62,430.25L451.77,431.44L451.19,432.17L451.08,433.09L451.68,432.81L452.03,433.15L451.88,433.99L452.74,434.81L452.18,435.02L451.95,435.99L452.6,437.15L453.29,439.41L452.25,439.75L451.98,440.14L452.2,440.68L452.04,441.91z"},{"id":"GQ","title":"Equatorial Guinea","d":"M501.87,460.57L501.34,460.15L502.31,457.02L506.87,457.09L506.89,460.44L502.82,460.41z"},{"id":"GR","title":"Greece","d":"M541.7,356.71l1.53,1.16l2.18,-0.19l2.09,0.24l-0.07,0.6l1.53,-0.41l-0.35,1.01l-4.04,0.29l0.03,-0.56l-3.42,-0.67L541.7,356.71zM549.85,335.75l-0.87,2.33l-0.67,0.41l-1.71,-0.1l-1.46,-0.35l-3.4,0.96l1.94,2.06l-1.42,0.59l-1.56,0l-1.48,-1.88l-0.53,0.8l0.63,2.18l1.4,1.7l-1.06,0.79l1.56,1.65l1.39,1.03l0.04,2l-1.36,-1.15l-1.24,0.21l0.83,1.8l-0.92,0.19l-1,-0.69l1.2,3.95l-0.58,0l-0.45,-1.25l-0.57,-0.02l-0.26,1.32l-0.45,-0.3l0.1,-0.74l-0.56,-1.04h-0.64l0.12,0.84l-0.25,0.27l-0.62,-0.54l-0.38,-1.01l0.52,-0.57l-0.36,-0.74l-0.41,-0.38l-0.42,-0.09l-0.49,-0.94l0.58,-0.52l0.36,-0.48l0.56,0.1l0.25,-0.41l0.59,-0.16l0.68,0.46l0.55,0.17l0.39,-0.62l-0.94,-0.08l-0.56,-0.19l-1.25,0.28l-1.22,0.05l-1.09,-1.64l-0.18,-0.25l0.17,-0.64l-1.42,-1.15l-0.19,-1.03l1.3,-1.76l0.17,-1.19l0.91,-0.53l0.06,-0.97l1.83,-0.33l1.07,-0.81l1.52,0.07l0.46,-0.65l0.53,-0.12l2.07,0.11l2.25,-1.02l1.98,1.3l2.55,-0.35l0.03,-1.86L549.85,335.75z"},{"id":"GT","title":"Guatemala","d":"M222.64,424.75L221.2,424.25L219.45,424.2L218.17,423.63L216.66,422.45L216.73,421.61L217.05,420.93L216.66,420.39L218.01,418.03L221.6,418.02L221.68,417.04L221.22,416.86L220.91,416.23L219.87,415.56L218.83,414.58L220.1,414.58L220.1,412.93L222.72,412.93L225.31,412.96L225.29,415.27L225.07,418.55L225.9,418.55L226.82,419.08L227.06,418.64L227.88,419.01L226.61,420.12L225.28,420.93L225.08,421.48L225.3,422.04L224.72,422.78L224.06,422.95L224.21,423.29L223.69,423.61L222.73,424.33z"},{"id":"GW","title":"Guinea-Bissau","d":"M432.83,432.44L431.33,431.25L430.15,431.07L429.51,430.26L429.52,429.83L428.67,429.23L428.49,428.62L429.98,428.15L430.91,428.24L431.66,427.92L436.84,428.04L436.79,429.01L436.48,429.31L436.72,430.25L436.28,430.63L435.66,430.63L434.93,431.11L434.08,431.06z"},{"id":"GY","title":"Guyana","d":"M307.7,440L309.54,441.03L311.28,442.86L311.35,444.31L312.41,444.38L313.91,445.74L315.02,446.72L314.57,449.24L312.87,449.97L313.02,450.62L312.5,452.07L313.75,454.09L314.64,454.1L315.01,455.67L316.72,458.09L316.04,458.19L314.49,457.96L313.58,458.7L312.31,459.19L311.43,459.31L311.12,459.85L309.74,459.71L308.01,458.41L307.81,457.12L307.09,455.71L307.54,453.33L308.32,452.35L307.67,451.05L306.71,450.63L307.08,449.4L306.42,448.76L304.96,448.88L303.07,446.76L303.83,445.99L303.77,444.69L305.5,444.24L306.19,443.72L305.23,442.68L305.48,441.65z"},{"id":"HN","title":"Honduras","d":"M230.43,426.9L229.95,426.01L229.09,425.76L229.29,424.61L228.91,424.3L228.33,424.1L227.1,424.44L227,424.05L226.15,423.59L225.55,423.02L224.72,422.78L225.3,422.04L225.08,421.48L225.28,420.93L226.61,420.12L227.88,419.01L228.17,419.13L228.79,418.62L229.59,418.58L229.85,418.81L230.29,418.67L231.59,418.93L232.89,418.85L233.79,418.53L234.12,418.21L235.01,418.36L235.68,418.56L236.41,418.49L236.97,418.24L238.25,418.64L238.7,418.7L239.55,419.24L240.36,419.89L241.38,420.33L242.12,421.13L241.16,421.07L240.77,421.46L239.8,421.84L239.09,421.84L238.47,422.21L237.91,422.08L237.43,421.64L237.14,421.72L236.78,422.41L236.51,422.38L236.46,422.98L235.48,423.77L234.97,424.11L234.68,424.47L233.85,423.89L233.25,424.65L232.66,424.63L232,424.7L232.06,426.11L231.65,426.13L231.3,426.79z"},{"id":"HR","title":"Croatia","d":"M528.05,318.93L528.73,320.48L529.62,321.62L528.54,323.11L527.27,322.23L525.33,322.29L522.92,321.63L521.61,321.72L521.01,322.54L520,321.63L519.41,323.27L520.79,325.1L521.39,326.31L522.68,327.76L523.75,328.61L524.81,330.22L527.29,331.66L526.98,332.3L524.35,330.9L522.72,329.52L520.16,328.38L517.8,325.53L518.37,325.23L517.09,323.59L517.03,322.25L515.23,321.63L514.37,323.34L513.54,322.01L513.61,320.63L513.71,320.57L515.66,320.71L516.18,320.03L517.13,320.68L518.23,320.76L518.22,319.64L519.19,319.23L519.47,317.61L521.7,316.53L522.59,317.03L524.69,318.76L527,319.53z"},{"id":"HT","title":"Haiti","d":"M270.04,406.75L271.75,406.88L274.18,407.35L274.43,408.96L274.21,410.09L273.53,410.59L274.25,411.47L274.19,412.27L272.33,411.77L271.01,411.97L269.3,411.76L267.99,412.31L266.48,411.39L266.73,410.44L269.31,410.85L271.43,411.09L272.44,410.43L271.16,409.16L271.18,408.03L269.41,407.57z"},{"id":"HU","title":"Hungary","d":"M520.68,315.11L521.61,312.46L521.07,311.57L522.65,311.56L522.86,309.85L524.29,310.92L525.32,311.38L527.68,310.87L527.9,310.03L529.02,309.9L530.38,309.25L530.68,309.52L532,309L532.66,308L533.58,307.75L536.58,309.03L537.18,308.6L538.73,309.74L538.93,310.86L537.22,311.73L535.89,314.53L534.2,317.29L531.95,318.05L530.2,317.88L528.05,318.93L527,319.53L524.69,318.76L522.59,317.03L521.7,316.53L521.15,315.16z"},{"id":"ID","title":"Indonesia","d":"M813.72,492.06l-1.18,0.05l-3.72,-1.98l2.61,-0.56l1.47,0.86l0.98,0.86L813.72,492.06zM824.15,491.78l-2.4,0.62l-0.34,-0.34l0.25,-0.96l1.21,-1.72l2.77,-1.12l0.28,0.56l0.05,0.86L824.15,491.78zM805.83,486.01l1.01,0.75l1.73,-0.23l0.7,1.2l-3.24,0.57l-1.94,0.38l-1.51,-0.02l0.96,-1.62l1.54,-0.02L805.83,486.01zM819.86,486l-0.41,1.56l-4.21,0.8l-3.73,-0.35l-0.01,-1.03l2.23,-0.59l1.76,0.84l1.87,-0.21L819.86,486zM779.82,482.31l5.37,0.28l0.62,-1.16l5.2,1.35l1.02,1.82l4.21,0.51l3.44,1.67l-3.2,1.07l-3.08,-1.13l-2.54,0.08l-2.91,-0.21l-2.62,-0.51l-3.25,-1.07l-2.06,-0.28l-1.17,0.35l-5.11,-1.16l-0.49,-1.21l-2.57,-0.21l1.92,-2.68l3.4,0.17l2.26,1.09l1.16,0.21L779.82,482.31zM853,480.73l-1.44,1.91l-0.27,-2.11l0.5,-1.01l0.59,-0.95l0.64,0.82L853,480.73zM832.04,473.02l-1.05,0.93l-1.94,-0.51l-0.55,-1.2l2.84,-0.13L832.04,473.02zM841.08,472.01l1.02,2.13l-2.37,-1.15l-2.34,-0.23l-1.58,0.18l-1.94,-0.1l0.67,-1.53l3.46,-0.12L841.08,472.01zM851.37,466.59l0.78,4.51l2.9,1.67l2.34,-2.96l3.22,-1.68l2.49,0l2.4,0.97l2.08,1l3.01,0.53l0.05,9.1l0.05,9.16l-2.5,-2.31l-2.85,-0.57l-0.69,0.8l-3.55,0.09l1.19,-2.29l1.77,-0.78l-0.73,-3.05l-1.35,-2.35l-5.44,-2.37l-2.31,-0.23l-4.21,-2.58l-0.83,1.36l-1.08,0.25l-0.64,-1.02l-0.01,-1.21l-2.14,-1.37l3.02,-1l2,0.05l-0.24,-0.74l-4.1,-0.01l-1.11,-1.66l-2.5,-0.51l-1.19,-1.38l3.78,-0.67l1.44,-0.91l4.5,1.14L851.37,466.59zM826.41,459.43l-2.25,2.76l-2.11,0.54l-2.7,-0.54l-4.67,0.14l-2.45,0.4l-0.4,2.11l2.51,2.48l1.51,-1.26l5.23,-0.95l-0.23,1.28l-1.22,-0.4l-1.22,1.63l-2.47,1.08l2.65,3.57l-0.51,0.96l2.52,3.22l-0.02,1.84l-1.5,0.82l-1.1,-0.98l1.36,-2.29l-2.75,1.08l-0.7,-0.77l0.36,-1.08l-2.02,-1.64l0.21,-2.72l-1.87,0.85l0.24,3.25l0.11,4l-1.78,0.41l-1.2,-0.82l0.8,-2.57l-0.43,-2.69l-1.18,-0.02l-0.87,-1.91l1.16,-1.83l0.4,-2.21l1.41,-4.2l0.59,-1.15l2.38,-2.07l2.19,0.82l3.54,0.39l3.22,-0.12l2.77,-2.02L826.41,459.43zM836.08,460.23l-0.15,2.43l-1.45,-0.27l-0.43,1.69l1.16,1.47l-0.79,0.33l-1.13,-1.76l-0.83,-3.56l0.56,-2.23l0.93,-1.01l0.2,1.52l1.66,0.24L836.08,460.23zM805.76,458.29l3.14,2.58l-3.32,0.33l-0.94,1.9l0.12,2.52l-2.7,1.91L802,470.3l-1.08,4.27l-0.41,-0.99l-3.19,1.26l-1.11,-1.71l-2,-0.16l-1.4,-0.89l-3.33,1l-1.02,-1.35l-1.84,0.15l-2.31,-0.32l-0.43,-3.74l-1.4,-0.77l-1.35,-2.38l-0.39,-2.44l0.33,-2.58l1.67,-1.85l0.47,1.86l1.92,1.57l1.81,-0.57l1.79,0.2l1.63,-1.41l1.34,-0.24l2.65,0.78l2.29,-0.59l1.44,-3.88l1.08,-0.97l0.97,-3.17l3.22,0l2.43,0.47l-1.59,2.52l2.06,2.64L805.76,458.29zM771.95,479.71l-3.1,0.06l-2.36,-2.34l-3.6,-2.28l-1.2,-1.69l-2.12,-2.27l-1.39,-2.09l-2.13,-3.9l-2.46,-2.32l-0.82,-2.39l-1.03,-2.17l-2.53,-1.75l-1.47,-2.39l-2.11,-1.56l-2.92,-3.08l-0.25,-1.42l1.81,0.11l4.34,0.54l2.48,2.73l2.17,1.89l1.55,1.16l2.66,3l2.85,0.04l2.36,1.91l1.62,2.33l2.13,1.27l-1.12,2.27l1.61,0.97l1.01,0.07l0.48,1.94l0.98,1.56l2.06,0.25l1.36,1.76l-0.7,3.47L771.95,479.71z"},{"id":"IE","title":"Ireland","d":"M457.88,284.29L458.34,287.65L456.22,291.77L451.25,294.45L447.28,293.77L449.55,288.99L448.09,284.22L451.9,280.47L454.02,278.2L454.6,280.8L454.02,283.37L455.76,283.31z"},{"id":"IL","title":"Israel","d":"M575.41,366.82L574.92,367.87L573.9,367.41L573.32,369.61L574.02,369.97L573.31,370.43L573.18,371.29L574.5,370.84L574.57,372.11L573.17,377.28L571.33,371.73L572.14,370.65L571.95,370.46L572.69,368.93L573.26,366.43L573.66,365.59L573.74,365.56L574.68,365.56L574.94,364.98L575.69,364.93L575.73,366.3L575.35,366.8z"},{"id":"IN","title":"India","d":"M693.5,357.44L696.51,361.43L696.23,364.17L697.34,365.88L697.25,367.57L695.24,367.13L696.03,370.76L698.78,372.82L702.68,375.09L700.9,376.55L699.81,379.54L702.53,380.74L705.17,382.29L708.83,384.06L712.67,384.47L714.29,386.06L716.45,386.35L719.83,387.08L722.16,387.03L722.48,385.79L722.11,383.8L722.33,382.45L724.04,381.78L724.28,384.26L724.33,384.89L726.88,386.08L728.65,385.59L731.01,385.8L733.3,385.71L733.5,383.78L732.36,382.78L734.62,382.38L737.17,380.03L740.4,378L742.75,378.78L744.75,377.44L746.07,379.42L745.12,380.76L748.14,381.23L748.36,382.43L747.37,383.01L747.6,384.94L745.6,384.37L741.97,386.53L742.05,388.31L740.51,390.91L740.36,392.41L739.11,394.93L736.92,394.23L736.81,397.38L736.18,398.41L736.48,399.69L735.09,400.41L733.62,395.61L732.84,395.62L732.38,397.56L730.85,395.98L731.71,394.25L732.97,394.07L734.26,391.48L732.65,390.95L730.04,391L727.38,390.58L727.13,388.43L725.79,388.27L723.57,386.93L722.58,389.04L724.6,390.67L722.85,391.82L722.23,392.94L723.95,393.76L723.48,395.6L724.45,397.88L724.89,400.36L724.48,401.46L722.58,401.42L719.12,402.04L719.28,404.29L717.78,406.05L713.75,408.05L710.61,411.51L708.5,413.36L705.71,415.27L705.71,416.61L704.31,417.33L701.78,418.36L700.47,418.52L699.63,420.72L700.21,424.47L700.36,426.84L699.18,429.55L699.16,434.38L697.71,434.52L696.44,436.67L697.29,437.6L694.73,438.4L693.79,440.32L692.66,441.13L690.01,438.5L688.71,434.54L687.63,431.68L686.65,430.34L685.16,427.6L684.47,424.02L683.98,422.22L681.43,418.25L680.27,412.61L679.43,408.84L679.44,405.26L678.9,402.46L674.82,404.25L672.84,403.89L669.18,400.26L670.53,399.17L669.7,397.99L666.41,395.41L668.28,393.37L674.45,393.38L673.89,390.74L672.32,389.18L672,386.79L670.16,385.39L673.25,382.09L676.51,382.33L679.44,379.01L681.2,375.75L683.92,372.51L683.88,370.18L686.27,368.27L684,366.64L683.03,364.39L682.04,361.44L683.41,359.98L687.67,360.81L690.79,360.3z"},{"id":"IQ","title":"Iraq","d":"M602.61,355.77L604.44,356.81L604.66,358.81L603.24,359.98L602.59,362.62L604.54,365.8L607.97,367.62L609.42,370.12L608.96,372.49L609.85,372.49L609.88,374.22L611.43,375.91L609.77,375.76L607.88,375.49L605.82,378.57L600.61,378.31L592.71,371.82L588.53,369.53L585.15,368.64L584.02,364.6L590.23,361.1L591.29,356.98L591.02,354.46L592.56,353.6L594,351.42L595.2,350.87L598.46,351.33L599.45,352.22L600.79,351.63z"},{"id":"IR","title":"Iran","d":"M626.44,351.53L628.91,350.85L630.9,348.83L632.77,348.93L634,348.27L636,348.6L639.1,350.39L641.34,350.78L644.54,353.87L646.63,353.99L646.88,356.9L645.74,361.15L644.97,363.6L646.19,364.09L644.99,365.92L645.91,368.56L646.13,370.65L648.25,371.2L648.48,373.3L645.94,376.23L647.32,377.91L648.45,379.84L651.13,381.24L651.21,384.01L652.55,384.52L652.78,385.96L648.74,387.57L647.68,391.17L642.41,390.24L639.35,389.53L636.19,389.12L634.99,385.31L633.65,384.75L631.49,385.31L628.67,386.82L625.24,385.79L622.41,383.38L619.71,382.48L617.84,379.47L615.77,375.2L614.26,375.72L612.48,374.65L611.43,375.91L609.88,374.22L609.85,372.49L608.96,372.49L609.42,370.12L607.97,367.62L604.54,365.8L602.59,362.62L603.24,359.98L604.66,358.81L604.44,356.81L602.61,355.77L600.79,351.63L599.26,348.8L599.8,347.71L598.93,343.59L600.85,342.56L601.29,343.93L602.71,345.59L604.63,346.06L605.65,345.96L608.96,343.3L610.01,343.03L610.83,344.1L609.87,345.88L611.62,347.74L612.31,347.57L613.2,350.18L615.86,350.91L617.81,352.67L621.79,353.27L626.17,352.35z"},{"id":"IS","title":"Iceland","d":"M434.57,212.43L433.93,216.91L437.09,221.51L433.45,226.52L425.36,230.9L422.94,232.05L419.25,231.12L411.43,229.11L414.19,226.27L408.09,223.07L413.05,221.79L412.93,219.82L407.05,218.25L408.94,213.78L413.19,212.75L417.56,217.43L421.82,213.68L425.35,215.64L429.92,211.93z"},{"id":"IT","title":"Italy","d":"M518.77,347.88l-1.01,2.78l0.42,1.09l-0.59,1.79l-2.14,-1.31l-1.43,-0.38l-3.91,-1.79l0.39,-1.82l3.28,0.32l2.86,-0.39L518.77,347.88zM501.08,337.06l1.68,2.62l-0.39,4.81l-1.27,-0.23l-1.14,1.2l-1.06,-0.95l-0.11,-4.38l-0.64,-2.1l1.54,0.19L501.08,337.06zM509.95,315.46l4.01,1.05l-0.3,1.99l0.67,1.71l-2.23,-0.58l-2.28,1.42l0.16,1.97l-0.34,1.12l0.92,1.99l2.63,1.95l1.41,3.17l3.12,3.05l2.2,-0.02l0.68,0.83l-0.79,0.74l2.51,1.35l2.06,1.12l2.4,1.92l0.29,0.68l-0.52,1.31l-1.56,-1.7l-2.44,-0.6l-1.18,2.36l2.03,1.34l-0.33,1.88l-1.17,0.21l-1.5,3.06l-1.17,0.27l0.01,-1.08l0.57,-1.91l0.61,-0.77l-1.09,-2.09l-0.86,-1.83l-1.16,-0.46l-0.83,-1.58l-1.8,-0.67l-1.21,-1.49l-2.07,-0.24l-2.19,-1.68l-2.56,-2.45l-1.91,-2.19l-0.87,-3.8l-1.4,-0.45l-2.28,-1.29l-1.29,0.53l-1.62,1.8l-1.17,0.28l0.32,-1.68l-1.52,-0.49l-0.72,-3.04l0.97,-1.21l-0.83,-1.5l0.12,-1.13l1.21,0.86l1.35,-0.19l1.57,-1.36l0.49,0.64l1.34,-0.13l0.61,-1.63l2.07,0.51l1.24,-0.68l0.22,-1.67l1.7,0.58l0.33,-0.78l2.77,-0.71L509.95,315.46z"},{"id":"JM","title":"Jamaica","d":"M257.76,410.96L259.65,411.22L261.14,411.93L261.6,412.73L259.63,412.78L258.78,413.27L257.21,412.8L255.61,411.73L255.94,411.06L257.12,410.86z"},{"id":"JO","title":"Jordan","d":"M574.92,367.87L575.41,366.82L578.53,368.14L584.02,364.6L585.15,368.64L584.62,369.13L579,370.78L581.8,374.04L580.87,374.58L580.41,375.67L578.27,376.11L577.6,377.27L576.38,378.25L573.26,377.74L573.17,377.28L574.57,372.11L574.5,370.84L574.92,369.88z"},{"id":"JP","title":"Japan","d":"M852.76,362.01l0.36,1.15l-1.58,2.03l-1.15,-1.07l-1.44,0.78l-0.74,1.95l-1.83,-0.95l0.02,-1.58l1.55,-2l1.59,0.39l1.15,-1.42L852.76,362.01zM870.53,351.73l-1.06,2.78l0.49,1.73l-1.46,2.42l-3.58,1.6l-4.93,0.21l-4,3.84l-1.88,-1.29L854,360.5l-4.88,0.75l-3.32,1.59l-3.28,0.06l2.84,2.46l-1.87,5.61l-1.81,1.37l-1.36,-1.27l0.69,-2.96l-1.77,-0.96l-1.14,-2.28l2.65,-1.03l1.47,-2.11l2.82,-1.75l2.06,-2.33l5.58,-1.02l3,0.7l2.93,-6.17l1.87,1.67l4.11,-3.51l1.59,-1.38l1.76,-4.38l-0.48,-4.1l1.18,-2.33l2.98,-0.68l1.53,5.11l-0.08,2.94l-2.59,3.6L870.53,351.73zM878.76,325.8l1.97,0.83l1.98,-1.65l0.62,4.35l-4.16,1.05l-2.46,3.76l-4.41,-2.58l-1.53,4.12l-3.12,0.06l-0.39,-3.74l1.39,-2.94l3,-0.21l0.82,-5.38l0.83,-3.09l3.29,4.12L878.76,325.8z"},{"id":"KE","title":"Kenya","d":"M590.19,465.78L591.85,468.07L589.89,469.19L589.2,470.35L588.14,470.55L587.75,472.52L586.85,473.64L586.3,475.5L585.17,476.42L581.15,473.63L580.95,472.01L570.79,466.34L570.31,466.03L570.29,463.08L571.09,461.95L572.47,460.11L573.49,458.08L572.26,454.88L571.93,453.48L570.6,451.54L572.32,449.87L574.22,448.03L575.68,448.5L575.68,450.07L576.64,450.98L578.59,450.98L582.14,453.36L583.02,453.38L583.68,453.31L584.3,453.63L586.17,453.85L587,452.69L589.56,451.52L590.69,452.46L592.61,452.46L590.16,455.63z"},{"id":"KG","title":"Kyrgyzstan","d":"M674.22,333.11L674.85,331.45L676.69,330.91L681.31,332.22L681.74,329.98L683.33,329.18L687.33,330.79L688.35,330.37L693,330.47L697.16,330.87L698.56,332.24L700.29,332.79L699.9,333.65L695.48,335.68L694.48,337.16L690.88,337.6L689.82,339.95L686.85,339.46L684.92,340.18L682.24,341.9L682.63,342.75L681.83,343.58L676.53,344.13L673.06,342.96L670.02,343.24L670.29,341.14L673.34,341.75L674.37,340.62L676.5,340.98L680.09,338.34L676.77,336.38L674.77,337.31L672.7,335.91L675.05,333.48z"},{"id":"KH","title":"Cambodia","d":"M765.44,433.6L764.3,432.12L762.89,429.18L762.22,425.73L764.02,423.35L767.64,422.8L770.27,423.21L772.58,424.34L773.85,422.35L776.34,423.41L776.99,425.33L776.64,428.75L771.93,430.94L773.16,432.67L770.22,432.87L767.79,434.01z"},{"id":"KP","title":"North Korea","d":"M841.55,332.62L841.94,333.29L840.88,333.06L839.66,334.33L838.82,335.61L838.93,338.28L837.48,339.09L836.98,339.74L835.92,340.82L834.05,341.42L832.84,342.4L832.75,343.97L832.42,344.37L833.54,344.95L835.13,346.53L834.72,347.39L833.53,347.62L831.55,347.79L830.46,349.39L829.2,349.27L829.03,349.59L827.67,348.92L827.33,349.58L826.51,349.87L826.41,349.21L825.68,348.89L824.93,348.32L825.7,346.75L826.36,346.33L826.11,345.68L826.82,343.74L826.63,343.15L825,342.75L823.68,341.78L825.96,339.43L829.05,337.45L830.98,334.8L832.31,335.97L834.73,336.11L834.29,334.14L838.62,332.51L839.74,330.38z"},{"id":"KR","title":"South Korea","d":"M835.13,346.53L837.55,350.71L838.24,352.98L838.26,356.96L837.21,358.84L834.67,359.5L832.43,360.91L829.9,361.2L829.59,359.35L830.11,356.78L828.87,353.18L830.95,352.59L829.03,349.59L829.2,349.27L830.46,349.39L831.55,347.79L833.53,347.62L834.72,347.39z"},{"id":"XK","title":"Kosovo","d":"M533.47,333.92L533.34,334.69L532.98,334.66L532.8,333.29L532.13,332.91L531.53,331.89L532.05,331.04L532.72,330.76L533.11,329.5L533.61,329.28L534.01,329.82L534.54,330.06L534.9,330.67L535.36,330.85L535.91,331.55L536.31,331.53L535.99,332.46L535.66,332.91L535.75,333.19L535.12,333.33z"},{"id":"KW","title":"Kuwait","d":"M609.77,375.76L610.35,377.17L610.1,377.9L611,380.31L609.02,380.39L608.32,378.88L605.82,378.57L607.88,375.49z"},{"id":"KZ","title":"Kazakhstan","d":"M674.22,333.11L672.61,333.81L668.92,336.42L667.69,339.07L666.64,339.09L665.88,337.34L662.31,337.22L661.74,334.16L660.37,334.13L660.58,330.33L657.23,327.53L652.42,327.83L649.13,328.39L646.45,324.89L644.16,323.41L639.81,320.57L639.29,320.22L632.07,322.57L632.18,336.7L630.74,336.88L628.78,333.95L626.88,332.89L623.7,333.68L622.46,334.93L622.3,334.01L622.99,332.44L622.46,331.12L619.21,329.82L617.94,326.35L616.4,325.37L616.3,324.09L619.03,324.46L619.14,321.58L621.52,320.94L623.97,321.53L624.48,317.62L623.98,315.11L621.17,315.31L618.79,314.31L615.54,316.1L612.93,316.96L611.5,316.3L611.79,314.2L610,311.44L607.92,311.55L605.54,308.72L607.16,305.5L606.34,304.63L608.57,299.86L611.46,302.39L611.81,299.2L617.59,294.35L621.97,294.23L628.16,297.33L631.47,299.12L634.45,297.25L638.89,297.17L642.48,299.46L643.3,298.15L647.23,298.34L647.94,296.23L643.39,293.14L646.08,290.91L645.56,289.66L648.25,288.45L646.23,285.25L647.51,283.63L658,281.97L659.37,280.78L666.39,278.99L668.91,276.95L673.95,278.01L674.83,283.02L677.76,281.86L681.36,283.49L681.13,286.07L683.82,285.8L690.84,281.31L689.82,282.81L693.4,286.47L699.66,298.05L701.16,295.72L705.02,298.28L709.05,297.14L710.59,297.94L711.94,300.49L713.9,301.33L715.1,303.18L718.71,302.6L720.2,305.23L718.06,308.06L715.73,308.46L715.6,312.64L714.04,314.5L708.48,313.15L706.46,320.41L705.02,321.3L699.47,322.88L701.99,329.63L700.07,330.63L700.29,332.79L698.56,332.24L697.16,330.87L693,330.47L688.35,330.37L687.33,330.79L683.33,329.18L681.74,329.98L681.31,332.22L676.69,330.91L674.85,331.45z"},{"id":"LA","title":"Lao People's Democratic Republic","d":"M770.27,423.21L771.18,421.91L771.31,419.47L769.04,416.94L768.86,414.07L766.73,411.69L764.61,411.49L764.05,412.51L762.4,412.59L761.56,412.08L758.61,413.82L758.54,411.2L759.23,408.09L757.34,407.96L757.18,406.18L755.96,405.26L756.56,404.16L758.95,402.22L759.2,402.92L760.69,403L760.27,399.57L761.72,399.13L763.36,401.5L764.62,404.22L768.07,404.25L769.16,406.84L767.37,407.61L766.56,408.68L769.92,410.44L772.25,413.9L774.02,416.47L776.14,418.49L776.85,420.53L776.34,423.41L773.85,422.35L772.58,424.34z"},{"id":"LB","title":"Lebanon","d":"M575.69,364.93L574.94,364.98L574.68,365.56L573.74,365.56L574.74,362.83L576.13,360.45L576.19,360.33L577.45,360.51L577.91,361.83L576.38,363.1z"},{"id":"LK","title":"Sri Lanka","d":"M704.57,442.37L704.15,445.29L702.98,446.09L700.54,446.73L699.2,444.5L698.71,440.47L699.98,435.89L701.91,437.46L703.22,439.44z"},{"id":"LR","title":"Liberia","d":"M453.63,451.22L452.89,451.24L450,449.91L447.46,447.78L445.07,446.25L443.18,444.44L443.85,443.54L444,442.73L445.26,441.2L446.57,439.89L447.17,439.82L447.9,439.51L449.07,441.23L448.89,442.36L449.43,442.96L450.23,442.97L450.8,441.84L451.59,441.91L451.46,442.73L451.74,444.09L451.13,445.33L451.95,446.1L452.84,446.29L454.03,447.46L454.11,448.57L453.84,448.92z"},{"id":"LS","title":"Lesotho","d":"M556.5,547.75L557.48,548.71L556.62,550.27L556.14,551.32L554.58,551.82L554.06,552.86L553.06,553.18L550.96,550.69L552.45,548.66L553.97,547.41L555.28,546.77z"},{"id":"LT","title":"Lithuania","d":"M538.99,282.09L538.76,280.87L539.06,279.54L537.82,278.77L534.89,277.91L534.29,273.75L537.5,272.2L542.2,272.53L544.96,272.03L545.35,273.08L546.84,273.4L549.54,275.82L549.8,278.02L547.5,279.59L546.85,282.31L543.81,284.11L541.1,284.07L540.43,282.61z"},{"id":"LU","title":"Luxembourg","d":"M492.2,301.29L492.76,302.27L492.6,304.16L491.79,304.26L491.16,303.88L491.47,301.45z"},{"id":"LV","title":"Latvia","d":"M534.29,273.75L534.39,269.94L535.77,266.7L538.41,264.92L540.63,268.8L542.88,268.7L543.42,264.71L545.81,263.78L547.04,264.43L549.45,266.37L551.77,266.38L553.12,267.57L553.35,270.06L554.26,273.05L551.24,274.98L549.54,275.82L546.84,273.4L545.35,273.08L544.96,272.03L542.2,272.53L537.5,272.2z"},{"id":"LY","title":"Libya","d":"M516.89,397.93L514.91,399.05L513.33,397.39L508.9,396.08L507.67,394.17L505.45,392.75L504.14,393.31L503.15,391.6L503.04,390.28L501.38,388.02L502.5,386.73L502.25,384.76L502.61,383.04L502.41,381.6L502.9,379.01L502.75,377.53L501.84,374.69L503.21,373.94L503.45,372.56L503.15,371.21L505.08,369.95L505.94,368.9L507.31,367.95L507.47,365.4L510.76,366.55L511.94,366.26L514.28,366.82L518,368.29L519.31,371.21L521.83,371.85L525.78,373.21L528.77,374.82L530.14,373.98L531.48,372.49L530.83,369.98L531.71,368.38L533.73,366.83L535.66,366.38L539.45,367.06L540.41,368.54L541.45,368.55L542.34,369.11L545.13,369.5L545.81,370.58L544.8,372.15L545.23,373.54L544.51,375.54L545.35,378.12L545.35,389.3L545.35,400.53L545.35,406.49L542.13,406.5L542.09,407.74L530.91,402.04L519.72,396.27z"},{"id":"MA","title":"Morocco","d":"M450.96,383.14L450.93,379.39L455.46,377.03L458.26,376.54L460.55,375.68L461.63,374.06L464.91,372.77L465.03,370.36L466.65,370.07L467.92,368.86L471.59,368.3L472.1,367.02L471.36,366.31L470.39,362.78L470.23,360.73L469.17,358.55L467.95,358.51L465.05,357.76L462.38,358L460.69,356.54L458.63,356.52L457.74,358.63L455.87,362.14L453.79,363.53L450.98,365.06L449.18,367.3L448.8,369.04L447.73,371.86L448.43,375.89L446.09,378.57L444.69,379.42L442.48,381.59L439.87,381.94L438.57,383.06L442.19,383.07L450.94,383.1L450.94,383.1L450.94,383.1L442.19,383.07L438.57,383.06z"},{"id":"MD","title":"Moldova","d":"M549.89,309.45L550.56,308.83L552.42,308.41L554.49,309.72L555.64,309.88L556.91,311L556.71,312.41L557.73,313.08L558.13,314.8L559.11,315.84L558.92,316.44L559.44,316.86L558.7,317.15L557.04,317.04L556.77,316.47L556.18,316.8L556.38,317.52L555.61,318.81L555.12,320.18L554.42,320.62L553.91,318.79L554.21,317.07L554.12,315.28L552.5,312.84L551.61,311.09L550.74,309.85z"},{"id":"ME","title":"Montenegro","d":"M530.77,332.23L530.6,331.51L529.38,333.38L529.57,334.57L528.98,334.28L528.2,333.05L526.98,332.3L527.29,331.66L527.7,329.56L528.61,328.67L529.14,328.31L529.88,328.97L530.29,329.51L531.21,329.92L532.28,330.71L532.05,331.04L531.53,331.89z"},{"id":"MG","title":"Madagascar","d":"M614.17,498.4L614.91,499.61L615.6,501.5L616.06,504.96L616.78,506.31L616.5,507.69L616.01,508.55L615.05,506.85L614.53,507.71L615.06,509.85L614.81,511.09L614.04,511.76L613.86,514.24L612.76,517.66L611.38,521.75L609.64,527.42L608.57,531.63L607.3,535.18L605.02,535.91L602.57,537.22L600.96,536.43L598.73,535.33L597.96,533.71L597.77,531L596.79,528.58L596.53,526.41L597.03,524.25L598.32,523.73L598.33,522.74L599.67,520.48L599.92,518.6L599.27,517.2L598.74,515.35L598.52,512.65L599.5,511.02L599.87,509.17L601.27,509.07L602.84,508.47L603.87,507.95L605.11,507.91L606.7,506.26L609.01,504.48L609.85,503.04L609.47,501.81L610.66,502.16L612.21,500.17L612.26,498.45L613.19,497.17z"},{"id":"MK","title":"Macedonia","d":"M532.98,334.66L533.34,334.69L533.47,333.92L535.12,333.33L535.75,333.19L536.71,332.97L538,332.91L539.41,334.12L539.61,336.59L539.07,336.71L538.61,337.36L537.09,337.29L536.02,338.1L534.19,338.42L533.03,337.52L532.63,335.93z"},{"id":"ML","title":"Mali","d":"M441.13,422.22L442.07,421.7L442.54,420L443.43,419.93L445.39,420.73L446.97,420.16L448.05,420.35L448.48,419.71L459.73,419.67L460.35,417.64L459.86,417.28L458.51,404.6L457.16,391.54L461.45,391.49L470.91,398.14L480.37,404.69L481.03,406.08L482.78,406.93L484.08,407.41L484.11,409.29L487.22,409L487.23,415.75L485.69,417.69L485.45,419.48L482.96,419.93L479.14,420.18L478.1,421.21L476.3,421.32L474.51,421.33L473.81,420.78L472.26,421.19L469.64,422.39L469.11,423.29L466.93,424.57L466.55,425.31L465.38,425.89L464.02,425.51L463.25,426.21L462.84,428.17L460.61,430.53L460.68,431.49L459.91,432.7L460.1,434.34L458.94,434.76L458.29,435.12L457.85,433.91L457.04,434.23L456.56,434.17L456.04,435L453.88,434.97L453.1,434.55L452.74,434.81L451.88,433.99L452.03,433.15L451.68,432.81L451.08,433.09L451.19,432.17L451.77,431.44L450.62,430.25L450.28,429.46L449.66,428.84L449.1,428.76L448.43,429.16L447.52,429.54L446.75,430.16L445.55,429.93L444.77,429.21L444.31,429.11L443.58,429.49L443.13,429.5L442.97,428.45L443.1,427.56L442.86,426.46L441.81,425.65L441.26,424.01z"},{"id":"MM","title":"Myanmar","d":"M754.36,405.95L752.72,407.23L750.74,407.37L749.46,410.56L748.28,411.09L749.64,413.66L751.42,415.79L752.56,417.71L751.54,420.23L750.57,420.76L751.24,422.21L753.11,424.49L753.43,426.09L753.38,427.42L754.48,430.02L752.94,432.67L751.58,435.58L751.31,433.48L752.17,431.3L751.23,429.62L751.46,426.51L750.32,425.03L749.41,421.59L748.9,417.93L747.69,415.53L745.84,416.99L742.65,419.05L741.08,418.79L739.34,418.12L740.31,414.51L739.73,411.77L737.53,408.38L737.87,407.31L736.23,406.93L734.24,404.51L734.06,402.1L735.04,402.56L735.09,400.41L736.48,399.69L736.18,398.41L736.81,397.38L736.92,394.23L739.11,394.93L740.36,392.41L740.51,390.91L742.05,388.31L741.97,386.53L745.6,384.37L747.6,384.94L747.37,383.01L748.36,382.43L748.14,381.23L749.78,380.99L750.72,382.85L751.94,383.6L752.03,386L751.91,388.57L749.26,391.15L748.92,394.78L751.88,394.28L752.55,397.08L754.33,397.67L753.51,400.17L755.59,401.3L756.81,401.85L758.86,400.98L758.95,402.22L756.56,404.16L755.96,405.26z"},{"id":"MN","title":"Mongolia","d":"M721.29,304.88L724.25,304.14L729.6,300.4L733.87,298.33L736.3,299.68L739.23,299.74L741.1,301.79L743.9,301.94L747.96,303.03L750.68,300L749.54,297.4L752.45,292.74L755.59,294.61L758.13,295.14L761.43,296.29L761.96,299.61L765.95,301.45L768.6,300.64L772.14,300.07L774.95,300.65L777.7,302.74L779.4,304.94L782,304.9L785.53,305.59L788.11,304.53L791.8,303.82L795.91,300.76L797.59,301.23L799.06,302.69L802.4,302.33L801.04,305.58L799.06,309.8L799.78,311.51L801.37,310.98L804.13,311.63L806.29,310.09L808.54,311.42L811.08,314.31L810.77,315.76L808.56,315.3L804.49,315.84L802.51,317L800.46,319.66L796.18,321.21L793.39,323.31L790.51,322.51L788.93,322.15L787.46,324.69L788.35,326.19L788.81,327.47L786.84,328.77L784.83,330.82L781.56,332.15L777.35,332.3L772.82,333.61L769.56,335.62L768.32,334.46L764.93,334.46L760.78,332.17L758.01,331.6L754.28,332.13L748.49,331.28L745.4,331.37L743.76,329.1L742.48,325.53L740.75,325.1L737.36,322.65L733.58,322.1L730.25,321.42L729.24,319.69L730.32,314.96L728.39,311.65L724.39,310.08L722.03,307.85z"},{"id":"MR","title":"Mauritania","d":"M441.13,422.22L439.28,420.24L437.58,418.11L435.72,417.34L434.38,416.49L432.81,416.52L431.45,417.15L430.05,416.9L429.09,417.83L428.85,416.27L429.63,414.83L429.98,412.08L429.67,409.17L429.33,407.7L429.61,406.23L428.89,404.81L427.41,403.53L428.02,402.53L439,402.55L438.47,398.2L439.16,396.65L441.78,396.38L441.69,388.52L450.9,388.69L450.9,383.96L461.45,391.49L457.16,391.54L458.51,404.6L459.86,417.28L460.35,417.64L459.73,419.67L448.48,419.71L448.05,420.35L446.97,420.16L445.39,420.73L443.43,419.93L442.54,420L442.07,421.7z"},{"id":"MW","title":"Malawi","d":"M572.15,495.69L571.37,497.85L572.15,501.57L573.13,501.53L574.14,502.45L575.31,504.53L575.55,508.25L574.34,508.86L573.48,510.87L571.65,509.08L571.45,507.04L572.04,505.69L571.87,504.54L570.77,503.81L569.99,504.07L568.38,502.69L566.91,501.95L567.76,499.29L568.64,498.3L568.1,495.94L568.66,493.64L569.14,492.87L568.43,490.47L567.11,489.21L569.85,489.73L570.42,490.51L571.37,491.83z"},{"id":"MX","title":"Mexico","d":"M202.89,388.72L201.8,391.43L201.31,393.64L201.1,397.72L200.83,399.19L201.32,400.83L202.19,402.3L202.75,404.61L204.61,406.82L205.26,408.51L206.36,409.96L209.34,410.75L210.5,411.97L212.96,411.15L215.09,410.86L217.19,410.33L218.96,409.82L220.74,408.62L221.41,406.89L221.64,404.4L222.13,403.53L224.02,402.74L226.99,402.05L229.47,402.15L231.17,401.9L231.84,402.53L231.75,403.97L230.24,405.74L229.58,407.55L230.09,408.06L229.67,409.34L228.97,411.63L228.26,410.88L227.67,410.93L227.14,410.97L226.14,412.74L225.63,412.39L225.29,412.53L225.31,412.96L222.72,412.93L220.1,412.93L220.1,414.58L218.83,414.58L219.87,415.56L220.91,416.23L221.22,416.86L221.68,417.04L221.6,418.02L218.01,418.03L216.66,420.39L217.05,420.93L216.73,421.61L216.66,422.45L213.49,419.34L212.04,418.4L209.75,417.64L208.19,417.85L205.93,418.94L204.52,419.23L202.54,418.47L200.44,417.91L197.82,416.58L195.72,416.17L192.54,414.82L190.2,413.42L189.49,412.64L187.92,412.47L185.05,411.54L183.88,410.2L180.87,408.53L179.47,406.66L178.8,405.21L179.73,404.92L179.44,404.07L180.09,403.3L180.1,402.26L179.16,400.92L178.9,399.72L177.96,398.2L175.49,395.18L172.67,392.79L171.31,390.88L168.9,389.62L168.39,388.86L168.82,386.94L167.39,386.21L165.73,384.69L165.03,382.5L163.52,382.24L161.9,380.58L160.58,379.03L160.46,378.03L158.95,375.61L157.96,373.13L158,371.88L155.97,370.59L155.04,370.73L153.44,369.83L152.99,371.16L153.45,372.72L153.72,375.15L154.69,376.48L156.77,378.69L157.23,379.44L157.66,379.66L158.02,380.76L158.52,380.71L159.09,382.75L159.94,383.55L160.53,384.66L162.3,386.26L163.23,389.15L164.06,390.5L164.84,391.94L164.99,393.56L166.34,393.66L167.47,395.05L168.49,396.41L168.42,396.95L167.24,398.06L166.74,398.05L166,396.2L164.17,394.47L162.15,392.99L160.71,392.21L160.8,389.96L160.38,388.28L159.04,387.32L157.11,385.93L156.74,386.33L156.04,385.51L154.31,384.76L152.66,382.93L152.86,382.69L154.01,382.87L155.05,381.69L155.16,380.26L153,377.99L151.36,377.1L150.32,375.09L149.28,372.97L147.98,370.36L146.84,367.4L150.03,367.15L153.59,366.79L153.33,367.43L157.56,369.04L163.96,371.35L169.54,371.32L171.76,371.32L171.76,369.97L176.62,369.97L177.64,371.14L179.08,372.17L180.74,373.6L181.67,375.29L182.37,377.05L183.82,378.02L186.15,378.98L187.91,376.45L190.21,376.39L192.18,377.67L193.59,379.85L194.56,381.71L196.21,383.51L196.83,385.7L197.62,387.17L199.8,388.13L201.79,388.81z"},{"id":"MY","title":"Malaysia","d":"M758.65,446.07l0.22,1.44l1.85,-0.33l0.92,-1.15l0.64,0.26l1.66,1.69l1.18,1.87l0.16,1.88l-0.3,1.27l0.27,0.96l0.21,1.65l0.99,0.77l1.1,2.46l-0.05,0.94l-1.99,0.19l-2.65,-2.06l-3.32,-2.21l-0.33,-1.42l-1.62,-1.87l-0.39,-2.31l-1.01,-1.52l0.31,-2.04l-0.62,-1.19l0.49,-0.5L758.65,446.07zM807.84,450.9l-2.06,0.95l-2.43,-0.47l-3.22,0l-0.97,3.17l-1.08,0.97l-1.44,3.88l-2.29,0.59l-2.65,-0.78l-1.34,0.24l-1.63,1.41l-1.79,-0.2l-1.81,0.57l-1.92,-1.57l-0.47,-1.86l2.05,0.96l2.17,-0.52l0.56,-2.36l1.2,-0.53l3.36,-0.6l2.01,-2.21l1.38,-1.77l1.28,1.45l0.59,-0.95l1.34,0.09l0.16,-1.78l0.13,-1.38l2.16,-1.95l1.41,-2.19l1.13,-0.01l1.44,1.42l0.13,1.22l1.85,0.78l2.34,0.84l-0.2,1.1l-1.88,0.14L807.84,450.9z"},{"id":"MZ","title":"Mozambique","d":"M572.15,495.69L574.26,495.46L577.63,496.26L578.37,495.9L580.32,495.83L581.32,494.98L583,495.02L586.06,493.92L588.29,492.28L588.75,493.55L588.63,496.38L588.98,498.88L589.09,503.36L589.58,504.76L588.75,506.83L587.66,508.84L585.87,510.64L583.31,511.75L580.15,513.16L576.98,516.31L575.9,516.85L573.94,518.94L572.79,519.63L572.55,521.75L573.88,524L574.43,525.76L574.47,526.66L574.96,526.51L574.88,529.47L574.43,530.88L575.09,531.4L574.67,532.67L573.5,533.76L571.19,534.8L567.82,536.46L566.59,537.61L566.83,538.91L567.54,539.12L567.3,540.76L565.18,540.74L564.94,539.36L564.52,537.97L564.28,536.86L564.78,533.43L564.05,531.26L562.71,527L565.66,523.59L566.4,521.44L566.83,521.17L567.14,519.43L566.69,518.55L566.81,516.35L567.36,514.31L567.35,510.62L565.9,509.68L564.56,509.47L563.96,508.75L562.66,508.14L560.32,508.2L560.14,507.12L559.87,505.07L568.38,502.69L569.99,504.07L570.77,503.81L571.87,504.54L572.04,505.69L571.45,507.04L571.65,509.08L573.48,510.87L574.34,508.86L575.55,508.25L575.31,504.53L574.14,502.45L573.13,501.53L572.15,501.57L571.37,497.85z"},{"id":"NA","title":"Namibia","d":"M521.08,546.54L519,544.15L517.9,541.85L517.28,538.82L516.59,536.57L515.65,531.85L515.59,528.22L515.23,526.58L514.14,525.34L512.69,522.87L511.22,519.3L510.61,517.45L508.32,514.58L508.15,512.33L509.5,511.78L511.18,511.28L513,511.37L514.67,512.69L515.09,512.48L526.46,512.36L528.4,513.76L535.19,514.17L540.34,512.98L542.64,512.31L544.46,512.48L545.56,513.14L545.59,513.38L544.01,514.04L543.15,514.05L541.37,515.2L540.29,513.99L535.97,515.02L533.88,515.11L533.8,525.68L531.04,525.79L531.04,534.65L531.03,546.17L528.53,547.8L527.03,548.03L525.26,547.43L524,547.2L523.53,545.84L522.42,544.97z"},{"id":"NC","title":"New Caledonia","d":"M940.08,523.48L942.38,525.34L943.83,526.72L942.77,527.45L941.22,526.63L939.22,525.28L937.41,523.69L935.56,521.59L935.17,520.58L936.37,520.63L937.95,521.64L939.18,522.65z"},{"id":"NE","title":"Niger","d":"M481.29,429.88L481.36,427.93L478.12,427.28L478.04,425.9L476.46,424.03L476.08,422.72L476.3,421.32L478.1,421.21L479.14,420.18L482.96,419.93L485.45,419.48L485.69,417.69L487.23,415.75L487.22,409L491.17,407.68L499.29,401.83L508.9,396.08L513.33,397.39L514.91,399.05L516.89,397.93L517.58,402.6L518.63,403.38L518.68,404.33L519.84,405.35L519.23,406.63L518.15,412.61L518.01,416.4L514.43,419.14L513.22,422.94L514.39,424L514.38,425.85L516.18,425.92L515.9,427.26L515.11,427.43L515.02,428.33L514.49,428.4L512.6,425.27L511.94,425.15L509.75,426.75L507.58,425.92L506.07,425.75L505.26,426.15L503.61,426.07L501.96,427.29L500.53,427.36L497.14,425.88L495.81,426.58L494.38,426.53L493.33,425.45L490.51,424.38L487.5,424.72L486.77,425.34L486.38,426.99L485.57,428.14L485.38,430.68L483.24,429.04L482.23,429.05z"},{"id":"NG","title":"Nigeria","d":"M499.09,450.08L496.18,451.08L495.11,450.94L494.03,451.56L491.79,451.5L490.29,449.75L489.37,447.73L487.38,445.89L485.27,445.92L482.8,445.92L482.96,441.39L482.89,439.6L483.42,437.83L484.28,436.96L485.64,435.21L485.35,434.45L485.9,433.31L485.27,431.63L485.38,430.68L485.57,428.14L486.38,426.99L486.77,425.34L487.5,424.72L490.51,424.38L493.33,425.45L494.38,426.53L495.81,426.58L497.14,425.88L500.53,427.36L501.96,427.29L503.61,426.07L505.26,426.15L506.07,425.75L507.58,425.92L509.75,426.75L511.94,425.15L512.6,425.27L514.49,428.4L515.02,428.33L516.13,429.47L515.82,429.98L515.67,430.93L513.31,433.13L512.57,434.94L512.17,436.41L511.58,437.04L511.01,439.01L509.51,440.17L509.08,441.59L508.45,442.73L508.19,443.89L506.26,444.84L504.69,443.69L503.62,443.73L501.95,445.37L501.14,445.4L499.81,448.1z"},{"id":"NI","title":"Nicaragua","d":"M234.93,432.31L233.96,431.41L232.65,430.26L232.03,429.3L230.85,428.41L229.44,427.12L229.75,426.68L230.22,427.11L230.43,426.9L231.3,426.79L231.65,426.13L232.06,426.11L232,424.7L232.66,424.63L233.25,424.65L233.85,423.89L234.68,424.47L234.97,424.11L235.48,423.77L236.46,422.98L236.51,422.38L236.78,422.41L237.14,421.72L237.43,421.64L237.91,422.08L238.47,422.21L239.09,421.84L239.8,421.84L240.77,421.46L241.16,421.07L242.12,421.13L241.88,421.41L241.74,422.05L242.02,423.1L241.38,424.08L241.08,425.23L240.98,426.5L241.14,427.23L241.21,428.52L240.78,428.8L240.52,430.02L240.71,430.77L240.13,431.5L240.27,432.26L240.69,432.73L240.02,433.33L239.2,433.14L238.73,432.56L237.84,432.32L237.2,432.69L235.35,431.94z"},{"id":"NL","title":"Netherlands","d":"M492.28,285.98L494.61,286.11L495.14,287.69L494.44,291.92L493.73,293.63L492.04,293.63L492.52,298.32L490.97,297.28L489.2,295.33L486.6,296.26L484.55,295.91L485.99,294.67L488.45,287.93z"},{"id":"NO","title":"Norway","d":"M554.23,175.61l8.77,6.24l-3.61,2.23l3.07,5.11l-4.77,3.19l-2.26,0.72l1.19,-5.59l-3.6,-3.25l-4.35,2.78l-1.38,5.85l-2.67,3.44l-3.01,-1.87l-3.66,0.38l-3.12,-4.15l-1.68,2.09l-1.74,0.32l-0.41,5.08l-5.28,-1.22l-0.74,4.22l-2.69,-0.03l-1.85,5.24l-2.8,7.87l-4.35,9.5l1.02,2.23l-0.98,2.55l-2.78,-0.11l-1.82,5.91l0.17,8.04l1.79,2.98l-0.93,6.73l-2.33,3.81l-1.24,3.15l-1.88,-3.35l-5.54,6.27l-3.74,1.24l-3.88,-2.71l-1,-5.86l-0.89,-13.26l2.58,-3.88l7.4,-5.18l5.54,-6.59l5.13,-9.3l6.74,-13.76l4.7,-5.67l7.71,-9.89l6.15,-3.59l4.61,0.44l4.27,-6.99l5.11,0.38L554.23,175.61z"},{"id":"NP","title":"Nepal","d":"M722.33,382.45L722.11,383.8L722.48,385.79L722.16,387.03L719.83,387.08L716.45,386.35L714.29,386.06L712.67,384.47L708.83,384.06L705.17,382.29L702.53,380.74L699.81,379.54L700.9,376.55L702.68,375.09L703.84,374.31L706.09,375.31L708.92,377.4L710.49,377.86L711.43,379.39L713.61,380.02L715.89,381.41L719.06,382.14z"},{"id":"NZ","title":"New Zealand","d":"M960.38,588.63l0.64,1.53l1.99,-1.5l0.81,1.57l0,1.57l-1.04,1.74l-1.83,2.8l-1.43,1.54l1.03,1.86l-2.16,0.05l-2.4,1.46l-0.75,2.57l-1.59,4.03l-2.2,1.8l-1.4,1.16l-2.58,-0.09l-1.82,-1.34l-3.05,-0.28l-0.47,-1.48l1.51,-2.96l3.53,-3.87l1.81,-0.73l2.01,-1.47l2.4,-2.01l1.68,-1.98l1.25,-2.81l1.06,-0.95l0.42,-2.07l1.97,-1.7L960.38,588.63zM964.84,571.61l2.03,3.67l0.06,-2.38l1.27,0.95l0.42,2.65l2.26,1.15l1.89,0.28l1.6,-1.35l1.42,0.41l-0.68,3.15l-0.85,2.09l-2.14,-0.07l-0.75,1.1l0.26,1.56l-0.41,0.68l-1.06,1.97l-1.39,2.53l-2.17,1.49l-0.48,-0.98l-1.17,-0.54l1.62,-3.04l-0.92,-2.01l-3.02,-1.45l0.08,-1.31l2.03,-1.25l0.47,-2.74l-0.13,-2.28l-1.14,-2.34l0.08,-0.61l-1.34,-1.43l-2.21,-3.04l-1.17,-2.41l1.04,-0.27l1.53,1.89l2.18,0.89L964.84,571.61z"},{"id":"OM","title":"Oman","d":"M640.29,403.18l-1.05,2.04l-1.27,-0.16l-0.58,0.71l-0.45,1.5l0.34,1.98l-0.26,0.36l-1.29,-0.01l-1.75,1.1l-0.27,1.43l-0.64,0.62l-1.74,-0.02l-1.1,0.74l0.01,1.18l-1.36,0.81l-1.55,-0.27l-1.88,0.98l-1.3,0.16l-0.92,-2.04l-2.19,-4.84l8.41,-2.96l1.87,-5.97l-1.29,-2.14l0.07,-1.22l0.82,-1.26l0.01,-1.25l1.27,-0.6l-0.5,-0.42l0.23,-2l1.43,-0.01l1.26,2.09l1.57,1.11l2.06,0.4l1.66,0.55l1.27,1.74l0.76,1l1,0.38l-0.01,0.67l-1.02,1.79l-0.45,0.84L640.29,403.18zM633.37,388.64L633,389.2l-0.53,-1.06l0.82,-1.06l0.35,0.27L633.37,388.64z"},{"id":"PA","title":"Panama","d":"M256.88,443.21L255.95,442.4L255.35,440.88L256.04,440.13L255.33,439.94L254.81,439.01L253.41,438.23L252.18,438.41L251.62,439.39L250.48,440.09L249.87,440.19L249.6,440.78L250.93,442.3L250.17,442.66L249.76,443.08L248.46,443.22L247.97,441.54L247.61,442.02L246.68,441.86L246.12,440.72L244.97,440.54L244.24,440.21L243.04,440.21L242.95,440.82L242.63,440.4L242.78,439.84L243.01,439.27L242.9,438.76L243.32,438.42L242.74,438L242.72,436.87L243.81,436.62L244.81,437.63L244.75,438.23L245.87,438.35L246.14,438.12L246.91,438.82L248.29,438.61L249.48,437.9L251.18,437.33L252.14,436.49L253.69,436.65L253.58,436.93L255.15,437.03L256.4,437.52L257.31,438.36L258.37,439.14L258.03,439.56L258.68,441.21L258.15,442.05L257.24,441.85z"},{"id":"PE","title":"Peru","d":"M280.13,513.14L279.38,514.65L277.94,515.39L275.13,513.71L274.88,512.51L269.33,509.59L264.3,506.42L262.13,504.64L260.97,502.27L261.43,501.44L259.06,497.69L256.29,492.45L253.65,486.83L252.5,485.54L251.62,483.48L249.44,481.64L247.44,480.51L248.35,479.26L246.99,476.59L247.86,474.64L250.1,472.87L250.43,474.04L249.63,474.7L249.7,475.72L250.86,475.5L252,475.8L253.17,477.21L254.76,476.06L255.29,474.18L257.01,471.75L260.38,470.65L263.44,467.73L264.31,465.92L263.92,463.81L264.67,463.54L266.53,464.86L267.42,466.18L268.72,466.9L270.37,469.82L272.46,470.17L274.01,469.43L275.02,469.91L276.7,469.67L278.85,470.98L277.04,473.82L277.88,473.88L279.28,475.37L276.75,475.24L276.38,475.66L274.08,476.19L270.88,478.1L270.67,479.4L269.96,480.38L270.24,481.89L268.54,482.7L268.54,483.89L267.8,484.4L268.97,486.93L270.53,488.65L269.94,489.86L271.8,490.02L272.86,491.53L275.33,491.6L277.63,489.94L277.44,494.24L278.72,494.57L280.3,494.08L282.73,498.66L282.12,499.62L281.99,501.64L281.93,504.08L280.83,505.52L281.34,506.59L280.69,507.56L281.9,510z"},{"id":"PG","title":"Papua New Guinea","d":"M912.32,482.42l-0.79,0.28l-1.21,-1.08l-1.23,-1.78l-0.6,-2.13l0.39,-0.27l0.3,0.83l0.85,0.63l1.36,1.77l1.32,0.95L912.32,482.42zM901.39,478.67l-1.47,0.23l-0.44,0.79l-1.53,0.68l-1.44,0.66l-1.49,0l-2.3,-0.81l-1.6,-0.78l0.23,-0.87l2.51,0.41l1.53,-0.22l0.42,-1.34l0.4,-0.07l0.27,1.49l1.6,-0.21l0.79,-0.96l1.57,-1l-0.31,-1.65l1.68,-0.05l0.57,0.46l-0.06,1.55L901.39,478.67zM887.96,484.02l2.5,1.84l1.82,2.99l1.61,-0.09l-0.11,1.25l2.17,0.48l-0.84,0.53l2.98,1.19l-0.31,0.82l-1.86,0.2l-0.69,-0.73l-2.41,-0.32l-2.83,-0.43l-2.18,-1.8l-1.59,-1.55l-1.46,-2.46l-3.66,-1.23l-2.38,0.8l-1.71,0.93l0.36,2.08l-2.2,0.97l-1.57,-0.47l-2.9,-0.12l-0.05,-9.16l-0.05,-9.1l4.87,1.92l5.18,1.6l1.93,1.43l1.56,1.41l0.43,1.65l4.67,1.73l0.68,1.49l-2.58,0.3L887.96,484.02zM904.63,475.93l-0.88,0.74l-0.53,-1.65l-0.65,-1.08l-1.27,-0.91l-1.6,-1.19l-2.02,-0.82l0.78,-0.67l1.51,0.78l0.95,0.61l1.18,0.67l1.12,1.17l1.07,0.89L904.63,475.93z"},{"id":"PH","title":"Philippines","d":"M829.59,439.86l0.29,1.87l0.17,1.58l-0.96,2.57l-1.02,-2.86l-1.31,1.42l0.9,2.06l-0.8,1.31l-3.3,-1.63l-0.79,-2.03l0.86,-1.33l-1.78,-1.33l-0.88,1.17l-1.32,-0.11l-2.08,1.57l-0.46,-0.82l1.1,-2.37l1.77,-0.79l1.53,-1.06l0.99,1.27l2.13,-0.77l0.46,-1.26l1.98,-0.08l-0.17,-2.18l2.27,1.34l0.24,1.42L829.59,439.86zM822.88,434.6l-1.01,0.93l-0.88,1.79l-0.88,0.84l-1.73,-1.95l0.58,-0.76l0.7,-0.79l0.31,-1.76l1.55,-0.17l-0.45,1.91l2.08,-2.74L822.88,434.6zM807.52,437.32l-3.73,2.67l1.38,-1.97l2.03,-1.74l1.68,-1.96l1.47,-2.82l0.5,2.31l-1.85,1.56L807.52,437.32zM817,430.02l1.68,0.88l1.78,0l-0.05,1.19l-1.3,1.2l-1.78,0.85l-0.1,-1.32l0.2,-1.45L817,430.02zM827.14,429.25l0.79,3.18l-2.16,-0.75l0.06,0.95l0.69,1.75l-1.33,0.63l-0.12,-1.99l-0.84,-0.15l-0.44,-1.72l1.65,0.23l-0.04,-1.08l-1.71,-2.18l2.69,0.06L827.14,429.25zM816,426.66l-0.74,2.47l-1.2,-1.42l-1.43,-2.18l2.4,0.1L816,426.66zM815.42,410.92l1.73,0.84l0.86,-0.76l0.25,0.75l-0.46,1.22l0.96,2.09l-0.74,2.42l-1.65,0.96l-0.44,2.33l0.63,2.29l1.49,0.32l1.24,-0.34l3.5,1.59l-0.27,1.56l0.92,0.69l-0.29,1.32l-2.18,-1.4l-1.04,-1.5l-0.72,1.05l-1.79,-1.72l-2.55,0.42l-1.4,-0.63l0.14,-1.19l0.88,-0.73l-0.84,-0.67l-0.36,1.04l-1.38,-1.65l-0.42,-1.26l-0.1,-2.77l1.13,0.96l0.29,-4.55l0.91,-2.66L815.42,410.92z"},{"id":"PL","title":"Poland","d":"M517.36,296.97L516.21,294.11L516.43,292.55L515.73,290.1L514.72,288.45L515.5,287.2L514.84,284.81L516.76,283.42L521.13,281.2L524.67,279.56L527.46,280.38L527.67,281.56L530.38,281.62L533.83,282.17L538.99,282.09L540.43,282.61L541.1,284.07L541.22,286.16L542,287.94L541.98,289.79L540.3,290.73L541.17,292.85L541.22,294.86L542.63,298.75L542.33,299.99L540.94,300.5L538.39,304.11L539.11,306.03L538.5,305.78L535.84,304.14L533.82,304.74L532.5,304.3L530.84,305.22L529.43,303.7L528.27,304.28L528.11,304.02L526.82,301.89L524.74,301.63L524.47,300.26L522.55,299.77L522.13,300.9L520.61,300L520.78,298.79L518.69,298.4z"},{"id":"PK","title":"Pakistan","d":"M685.99,351.76L688.06,353.39L688.89,356.05L693.5,357.44L690.79,360.3L687.67,360.81L683.41,359.98L682.04,361.44L683.03,364.39L684,366.64L686.27,368.27L683.88,370.18L683.92,372.51L681.2,375.75L679.44,379.01L676.51,382.33L673.25,382.09L670.16,385.39L672,386.79L672.32,389.18L673.89,390.74L674.45,393.38L668.28,393.37L666.41,395.41L664.36,394.64L663.52,392.44L661.35,390.1L656.19,390.68L651.63,390.73L647.68,391.17L648.74,387.57L652.78,385.96L652.55,384.52L651.21,384.01L651.13,381.24L648.45,379.84L647.32,377.91L645.94,376.23L650.63,377.87L653.44,377.39L655.11,377.79L655.68,377.09L657.63,377.37L661.28,376.04L661.38,373.29L662.94,371.45L665.03,371.45L665.33,370.54L667.48,370.11L668.51,370.41L669.61,369.49L669.46,367.51L670.65,365.51L672.43,364.66L671.33,362.44L674,362.55L674.77,361.33L674.65,360.03L676.05,358.6L675.72,356.9L675.06,355.44L676.7,353.93L679.71,353.2L682.93,352.8L684.35,352.15z"},{"id":"PR","title":"Puerto Rico","d":"M289.41,410.89L290.84,411.15L291.35,411.73L290.63,412.47L288.52,412.45L286.88,412.55L286.72,411.3L287.11,410.87z"},{"id":"PS","title":"Palestinian Territories","d":"M574.92,367.87L574.92,369.88L574.5,370.84L573.18,371.29L573.31,370.43L574.02,369.97L573.32,369.61L573.9,367.41z"},{"id":"PT","title":"Portugal","d":"M449.92,334.56L450.94,333.61L452.08,333.06L452.79,334.9L454.44,334.89L454.92,334.42L456.56,334.55L457.34,336.43L456.04,337.43L456.01,340.31L455.55,340.84L455.44,342.56L454.23,342.86L455.35,345.03L454.58,347.38L455.54,348.44L455.16,349.4L454.12,350.72L454.35,351.88L453.23,352.79L451.75,352.3L450.3,352.68L450.73,349.94L450.47,347.76L449.21,347.43L448.54,346.08L448.77,343.72L449.88,342.41L450.08,340.94L450.67,338.73L450.6,337.16L450.04,335.82z"},{"id":"PY","title":"Paraguay","d":"M299.49,526.99L300.6,523.4L300.67,521.8L302.01,519.18L306.9,518.32L309.5,518.37L312.12,519.88L312.16,520.79L312.99,522.45L312.81,526.51L315.77,527.09L316.91,526.5L318.8,527.32L319.33,528.22L319.59,530.99L319.92,532.17L320.96,532.3L322.01,531.81L323.02,532.36L323.02,534.04L322.64,535.86L322.09,537.64L321.63,540.39L319.09,542.79L316.87,543.29L313.72,542.81L310.9,541.96L313.66,537.23L313.25,535.86L310.37,534.66L306.94,532.4L304.65,531.94z"},{"id":"QA","title":"Qatar","d":"M617.72,392.16L617.53,389.92L618.29,388.3L619.05,387.96L619.9,388.93L619.95,390.74L619.34,392.55L618.56,392.77z"},{"id":"RO","title":"Romania","d":"M538.93,310.86L540.14,309.97L541.88,310.43L543.67,310.45L544.97,311.46L545.93,310.82L548,310.42L548.71,309.44L549.89,309.45L550.74,309.85L551.61,311.09L552.5,312.84L554.12,315.28L554.21,317.07L553.91,318.79L554.42,320.62L555.67,321.35L556.98,320.71L558.26,321.39L558.32,322.42L556.96,323.26L556.11,322.9L555.33,327.61L553.68,327.2L551.64,325.79L548.34,326.69L546.95,327.68L542.83,327.48L540.67,326.87L539.59,327.16L538.78,325.56L538.27,324.88L538.92,324.22L538.22,323.73L537.34,324.61L535.71,323.47L535.49,321.84L533.78,320.9L533.47,319.63L531.95,318.05L534.2,317.29L535.89,314.53L537.22,311.73z"},{"id":"RS","title":"Serbia","d":"M533.78,320.9L535.49,321.84L535.71,323.47L537.34,324.61L538.22,323.73L538.92,324.22L538.27,324.88L538.78,325.56L538.09,326.44L538.34,327.86L539.7,329.52L538.63,330.71L538.16,331.92L538.47,332.37L538,332.91L536.71,332.97L535.75,333.19L535.66,332.91L535.99,332.46L536.31,331.53L535.91,331.55L535.36,330.85L534.9,330.67L534.54,330.06L534.01,329.82L533.61,329.28L533.11,329.5L532.72,330.76L532.05,331.04L532.28,330.71L531.21,329.92L530.29,329.51L529.88,328.97L529.14,328.31L529.8,328.14L530.21,326.32L528.86,324.82L529.56,323.1L528.54,323.11L529.62,321.62L528.73,320.48L528.05,318.93L530.2,317.88L531.95,318.05L533.47,319.63z"},{"id":"RU","title":"Russia","d":"M1008.27,215.75l-2.78,2.97l-4.6,0.7l-0.07,6.46l-1.12,1.35l-2.63,-0.19l-2.14,-2.26l-3.73,-1.92l-0.63,-2.89l-2.85,-1.1l-3.19,0.87l-1.52,-2.37l0.61,-2.55l-3.36,1.64l1.26,3.19l-1.59,2.83l-0.02,0.04l-3.6,2.89l-3.63,-0.48l2.53,3.44l1.67,5.2l1.29,1.67l0.33,2.53l-0.72,1.6l-5.23,-1.32l-7.84,4.51l-2.49,0.69l-4.29,4.1l-4.07,3.5l-1.03,2.55l-4.01,-3.9l-7.31,4.42l-1.28,-2.08l-2.7,2.39l-3.75,-0.76l-0.9,3.63l-3.36,5.22l0.1,2.14l3.19,1.17l-0.38,7.46l-2.6,0.19l-1.2,4.15l1.17,2.1l-4.9,2.47l-0.97,5.4l-4.18,1.14l-0.84,4.66l-4.04,4.18l-1.04,-3.08l-1.2,-6.69l-1.56,-10.65l1.35,-6.95l2.37,-3.07l0.15,-2.44l4.36,-1.18l5.01,-6.78l4.83,-5.73l5.04,-4.57l2.25,-8.37l-3.41,0.51l-1.68,4.92l-7.11,6.36l-2.3,-7.14l-7.24,2l-7.02,9.56l2.32,3.38l-6.26,1.42l-4.33,0.56l0.2,-3.95l-4.36,-0.84l-3.47,2.7l-8.57,-0.94l-9.22,1.62l-9.08,10.33l-10.75,11.78l4.42,0.61l1.38,3l2.72,1.05l1.79,-2.38l3.08,0.31l4.05,5.19l0.09,3.92l-2.19,4.51l-0.24,5.27l-1.26,6.85l-4.23,6.01l-0.94,2.82l-3.81,4.66l-3.78,4.53l-1.81,2.28l-3.74,2.25l-1.77,0.05l-1.76,-1.86l-3.76,2.79l-0.44,1.26l-0.39,-0.66l-0.02,-1.93l1.43,-0.1l0.4,-4.55l-0.74,-3.36l2.41,-1.4l3.4,0.7l1.89,-3.89l0.96,-4.46l1.09,-1.51l1.47,-3.76l-4.63,1.24l-2.43,1.65l-4.26,0l-1.13,-3.95l-3.32,-3.03l-4.88,-1.38l-1.04,-4.28l-0.98,-2.73l-1.05,-1.94l-1.73,-4.61l-2.46,-1.71l-4.2,-1.39l-3.72,0.13l-3.48,0.84l-2.32,2.31l1.54,1.1l0.04,2.52l-1.56,1.45l-2.53,4.72l0.03,1.93l-3.95,2.74l-3.37,-1.63l-3.35,0.36l-1.47,-1.46l-1.68,-0.47l-4.11,3.06l-3.69,0.71l-2.58,1.06l-3.53,-0.7l-2.6,0.04l-1.7,-2.2l-2.75,-2.09l-2.81,-0.58l-3.55,0.57l-2.65,0.81l-3.98,-1.84l-0.53,-3.32l-3.3,-1.15l-2.54,-0.53l-3.14,-1.87l-2.9,4.66l1.14,2.6l-2.73,3.03l-4.05,-1.09l-2.8,-0.16l-1.87,-2.04l-2.92,-0.06l-2.44,-1.35l-4.26,2.07l-5.35,3.74l-2.96,0.74l-1.1,0.35l-1.49,-2.63l-3.61,0.58l-1.19,-1.84l-1.96,-0.85l-1.35,-2.55l-1.55,-0.8l-4.03,1.14l-3.86,-2.57l-1.49,2.33l-6.27,-11.58l-3.58,-3.66l1.03,-1.5l-7.03,4.49l-2.69,0.27l0.23,-2.58l-3.6,-1.63l-2.93,1.17l-0.88,-5.01l-5.04,-1.06l-2.52,2.03l-7.02,1.79l-1.37,1.19l-10.49,1.66l-1.29,1.62l2.02,3.21l-2.69,1.2l0.53,1.25l-2.69,2.22l4.54,3.1l-0.7,2.11l-3.94,-0.19l-0.81,1.31l-3.59,-2.29l-4.45,0.09l-2.98,1.87l-3.32,-1.79l-6.18,-3.1l-4.38,0.12l-5.79,4.85l-0.35,3.19l-2.88,-2.53l-2.24,4.77l0.82,0.87l-1.62,3.21l2.38,2.84l2.08,-0.12l1.79,2.76l-0.28,2.1l1.42,0.66l-1.28,2.39l-2.72,0.66l-2.79,4.09l2.55,3.7l-0.28,2.59l3.06,4.46l-1.67,1.51l-0.48,0.95l-1.24,-0.25l-1.93,-2.27l-0.79,-0.13l-1.76,-0.87l-0.86,-1.55l-2.62,-0.79l-1.7,0.6l-0.49,-0.71l-3.82,-1.83l-4.13,-0.62l-2.37,-0.66l-0.34,0.45l-3.57,-3.27l-3.2,-1.48l-2.42,-2.32l2.04,-0.64l2.33,-3.35l-1.57,-1.6l4.13,-1.67l-0.07,-0.9l-2.52,0.66l0.09,-1.83l1.45,-1.16l2.71,-0.31l0.44,-1.4l-0.62,-2.33l1.14,-2.23l-0.03,-1.26l-4.13,-1.41l-1.64,0.05l-1.73,-2.04l-2.15,0.69l-3.56,-1.54l0.06,-0.87l-1,-1.93l-2.24,-0.22l-0.23,-1.39l0.7,-0.91l-1.79,-2.58l-2.91,0.44l-0.85,-0.23l-0.71,1.04l-1.05,-0.18l-0.69,-2.94l-0.66,-1.54l0.54,-0.44l2.26,0.16l1.09,-1.02l-0.81,-1.25l-1.89,-0.83l0.17,-0.86l-1.14,-0.87l-1.76,-3.15l0.6,-1.31l-0.27,-2.31l-2.74,-1.18l-1.47,0.59l-0.4,-1.24l-2.95,-1.26l-0.9,-2.99l-0.24,-2.49l-1.35,-1.19l1.2,-1.66l-0.83,-4.96l2,-3.13l-0.42,-0.96l3.19,-3.07l-2.94,-2.68l6,-7.41l2.6,-3.45l1.05,-3.1l-4.15,-4.26l1.15,-4.15l-2.52,-4.85l1.89,-5.76l-3.26,-7.96l2.59,-5.48l-4.29,-4.99l0.41,-5.4l2.26,-0.72l4.77,-3.19l2.89,-2.81l4.61,4.86l7.68,1.88l10.59,8.65l2.15,3.51l0.19,4.8l-3.11,3.69l-4.58,1.85l-12.52,-5.31l-2.06,0.9l4.57,5.1l0.18,3.15l0.18,6.75l3.61,1.97l2.19,1.66l0.36,-3.11l-1.69,-2.8l1.78,-2.51l6.78,4.1l2.36,-1.59l-1.89,-4.88l6.53,-6.74l2.59,0.4l2.62,2.43l1.63,-4.81l-2.34,-4.28l1.37,-4.41l-2.06,-4.69l7.84,2.44l1.6,4.18l-3.55,0.91l0.02,4.04l2.21,2.44l4.33,-1.54l0.69,-4.61l5.86,-3.52l9.79,-6.54l2.11,0.38l-2.76,4.64l3.48,0.78l2.01,-2.58l5.25,-0.21l4.16,-3.19l3.2,4.62l3.19,-5.09l-2.94,-4.58l1.46,-2.66l8.28,2.44l3.88,2.49l10.16,8.8l1.88,-3.97l-2.85,-4.11l-0.08,-1.68l-3.38,-0.78l0.92,-3.83l-1.5,-6.49l-0.08,-2.74l5.17,-7.99l1.84,-8.42l2.08,-1.88l7.42,2.51l0.58,5.18l-2.66,7.28l1.74,2.78l0.9,5.94l-0.64,11.07l3.09,4.73l-1.2,5.01l-5.49,10.2l3.21,1.02l1.12,-2.51l3.08,-1.82l0.74,-3.55l2.43,-3.49l-1.63,-4.26l1.31,-5.08l-3.07,-0.64l-0.67,-4.42l2.24,-8.28l-3.64,-7.03l5.02,-6.04l-0.65,-6.62l1.4,-0.22l1.47,5.19l-1.11,8.67l3,1.59l-1.28,-6.37l4.69,-3.58l5.82,-0.49l5.18,5.18l-2.49,-7.62l-0.28,-10.28l4.88,-2.02l6.74,0.44l6.08,-1.32l-2.28,-5.38l3.25,-7.02l3.22,-0.3l5.45,-5.51l7.4,-1.51l0.94,-3.15l7.36,-1.08l2.29,2.61l6.29,-6.24l5.15,0.2l0.77,-5.24l2.68,-5.33l6.62,-5.31l4.81,4.21l-3.82,3.13l6.35,1.92l0.76,6.03l2.56,-2.94l8.2,0.16l6.32,5.84l2.25,4.35l-0.7,5.85l-3.1,3.24l-7.37,5.92l-2.11,3.08l3.48,1.43l4.15,2.55l2.52,-1.91l1.43,6.39l1.23,-2.56l4.48,-1.57l9,1.65l0.68,4.58l11.72,1.43l0.16,-7.47l5.95,1.74l4.48,-0.05l4.53,5.14l1.29,6.04l-1.66,3.84l3.52,6.98l4.41,3.49l2.71,-9.18l4.5,4l4.78,-2.38l5.43,2.72l2.07,-2.47l4.59,1.24l-2.02,-8.4l3.7,-4.07l25.32,6.06l2.39,5.35l7.34,6.65l11.32,-1.62l5.58,1.41l2.33,3.5l-0.34,6.02l3.45,2.29l3.75,-1.64l4.97,-0.21l5.29,1.57l5.31,-0.89l4.88,6.99l3.47,-2.48l-2.27,-5.07l1.25,-3.62l8.95,2.29l5.83,-0.49l8.06,3.84l3.92,3.44l6.87,5.86l7.35,7.34l-0.24,4.44l1.89,1.74l-0.65,-5.15l7.61,1.07L1008.27,215.75zM880.84,306.25l-2.82,-7.68l-1.16,-4.51l0.07,-4.5l-0.97,-4.5l-0.73,-3.15l-1.25,0.67l1.11,2.21l-2.59,2.17l-0.25,6.3l1.64,4.41l-0.12,5.85l-0.65,3.24l0.32,4.54l-0.31,4.01l0.52,3.4l1.84,-3.13l2.13,2.44l0.08,-2.84l-2.73,-4.23l1.72,-6.11L880.84,306.25zM537.82,278.77l-2.94,-0.86l-3.87,1.58l-0.64,2.13l3.45,0.55l5.16,-0.07l-0.22,-1.23l0.3,-1.33L537.82,278.77zM979.95,178.65l3.66,-0.52l2.89,-2.06l0.24,-1.19l-4.06,-2.51l-2.38,-0.02l-0.36,0.37l-3.57,3.64l0.5,2.73L979.95,178.65zM870.07,151.56l-2.66,3.92l0.49,0.52l5.75,1.08l4.25,-0.07l-0.34,-2.57l-3.98,-3.81L870.07,151.56zM894.64,142.03l3.24,-4.25l-7.04,-2.88l-5.23,-1.68l-0.67,3.59l5.21,4.27L894.64,142.03zM869.51,140.34l10.33,0.3l2.21,-8.14l-10.13,-6.07l-7.4,-0.51l-3.7,2.18l-1.51,7.75l5.55,7.01L869.51,140.34zM622.39,166.28l-2.87,1.96l0.41,4.83l5.08,2.35l0.74,3.82l9.16,1.1l1.66,-0.74l-5.36,-7.11l-0.57,-7.52l4.39,-9.14l4.18,-9.82l8.71,-10.17l8.56,-5.34l9.93,-5.74l1.88,-3.71l-1.95,-4.83l-5.46,1.6l-4.8,4.49l-9.33,2.22l-9.26,7.41l-6.27,5.85l0.76,4.87l-6.71,9.03l2.58,1.22l-5.56,8.27L622.39,166.28zM769.87,98.34l0.83,-5.72l-7.11,-8.34l-2.11,-0.98l-2.3,1.7l-5.12,18.6L769.87,98.34zM605.64,69.03l3.04,3.88l3.28,-2.69l0.39,-2.72l2.52,-1.27l3.76,-2.23l1.08,-2.62l-4.16,-3.85l-2.64,2.9l-1.61,4.12l-0.57,-4.65l-4.26,0.21L601,63.25l6.24,0.52L605.64,69.03zM736.89,82.07l4.65,5.73l7.81,4.2l6.12,-1.8l0.69,-13.62l-6.46,-16.04l-5.45,-9.02l-6.07,4.11l-7.28,11.83l3.83,3.27L736.89,82.07z"},{"id":"RW","title":"Rwanda","d":"M560.54,466.55L561.66,468.12L561.49,469.76L560.69,470.11L559.2,469.93L558.34,471.52L556.63,471.3L556.89,469.77L557.28,469.56L557.38,467.9L558.19,467.12L558.87,467.41z"},{"id":"SA","title":"Saudi Arabia","d":"M595.2,417.22L594.84,415.98L593.99,415.1L593.77,413.93L592.33,412.89L590.83,410.43L590.04,408.02L588.1,405.98L586.85,405.5L584.99,402.65L584.67,400.57L584.79,398.78L583.18,395.42L581.87,394.23L580.35,393.6L579.43,391.84L579.58,391.15L578.8,389.55L577.98,388.86L576.89,386.54L575.18,384.02L573.75,381.86L572.36,381.87L572.79,380.13L572.92,379.02L573.26,377.74L576.38,378.25L577.6,377.27L578.27,376.11L580.41,375.67L580.87,374.58L581.8,374.04L579,370.78L584.62,369.13L585.15,368.64L588.53,369.53L592.71,371.82L600.61,378.31L605.82,378.57L608.32,378.88L609.02,380.39L611,380.31L612.1,383.04L613.48,383.75L613.96,384.86L615.87,386.17L616.04,387.46L615.76,388.49L616.12,389.53L616.92,390.4L617.3,391.41L617.72,392.16L618.56,392.77L619.34,392.55L619.87,393.72L619.98,394.43L621.06,397.51L629.48,399.03L630.05,398.39L631.33,400.53L629.46,406.5L621.05,409.46L612.97,410.59L610.35,411.91L608.34,414.98L607.03,415.46L606.33,414.49L605.26,414.64L602.55,414.35L602.03,414.05L598.8,414.12L598.04,414.39L596.89,413.63L596.14,415.06L596.43,416.29z"},{"id":"SB","title":"Solomon Islands","d":"M929.81,492.75l0.78,0.97l-1.96,-0.02l-1.07,-1.74l1.67,0.69L929.81,492.75zM926.26,491.02l-1.09,0.06l-1.72,-0.29l-0.59,-0.44l0.18,-1.12l1.85,0.44l0.91,0.59L926.26,491.02zM928.58,490.25l-0.42,0.52l-2.08,-2.45l-0.58,-1.68h0.95l1.01,2.25L928.58,490.25zM923.52,486.69l0.12,0.57l-2.2,-1.19l-1.54,-1.01l-1.05,-0.94l0.42,-0.29l1.29,0.67l2.3,1.29L923.52,486.69zM916.97,483.91l-0.56,0.16l-1.23,-0.64l-1.15,-1.15l0.14,-0.47l1.67,1.18L916.97,483.91z"},{"id":"SD","title":"Sudan","d":"M570.48,436.9L570.09,436.85L570.14,435.44L569.8,434.47L568.36,433.35L568.02,431.3L568.36,429.2L567.06,429.01L566.87,429.64L565.18,429.79L565.86,430.62L566.1,432.33L564.56,433.89L563.16,435.93L561.72,436.22L559.36,434.57L558.3,435.15L558.01,435.98L556.57,436.51L556.47,437.09L553.68,437.09L553.29,436.51L551.27,436.41L550.26,436.9L549.49,436.65L548.05,435L547.57,434.23L545.54,434.62L544.77,435.93L544.05,438.45L543.09,438.98L542.23,439.29L542,439.15L541.03,438.34L540.85,437.47L541.3,436.29L541.3,435.14L539.68,433.37L539.36,432.15L539.39,431.46L538.36,430.63L538.33,428.97L537.75,427.87L536.76,428.04L537.04,426.99L537.77,425.79L537.45,424.61L538.37,423.73L537.79,423.06L538.53,421.28L539.81,419.15L542.23,419.35L542.09,407.74L542.13,406.5L545.35,406.49L545.35,400.53L556.62,400.53L567.5,400.53L578.62,400.53L579.52,403.47L578.91,404.01L579.32,407.07L580.35,410.59L581.41,411.32L582.95,412.4L581.53,414.07L579.46,414.55L578.58,415.45L578.31,417.38L577.1,421.63L577.4,422.78L576.95,425.25L575.81,428.06L574.12,429.48L572.92,431.65L572.63,432.81L571.31,433.61L570.48,436.57z"},{"id":"SE","title":"Sweden","d":"M537.45,217.49L534.73,222.18L535.17,226.2L530.71,231.33L525.3,236.67L523.25,245.08L525.25,249.15L527.93,252.29L525.36,258.52L522.44,259.78L521.37,268.62L519.78,273.38L516.38,272.89L514.79,276.84L511.54,277.07L510.65,272.36L508.3,266.55L506.17,259.05L507.41,255.9L509.74,252.09L510.67,245.36L508.88,242.38L508.7,234.34L510.53,228.43L513.31,228.54L514.28,225.99L513.26,223.76L517.61,214.26L520.42,206.39L522.27,201.15L524.96,201.17L525.71,196.96L530.99,198.18L531.4,193.1L533.14,192.77L536.88,196.58L541.25,201.73L541.33,212.85L542.27,215.55z"},{"id":"SI","title":"Slovenia","d":"M513.96,316.51L516.28,316.82L517.7,315.9L520.15,315.8L520.68,315.11L521.15,315.16L521.7,316.53L519.47,317.61L519.19,319.23L518.22,319.64L518.23,320.76L517.13,320.68L516.18,320.03L515.66,320.71L513.71,320.57L514.33,320.21L513.66,318.5z"},{"id":"SJ","title":"Svalbard and Jan Mayen","d":"M544.58,104.49l-6.26,5.36l-4.95,-3.02l1.94,-3.42l-1.69,-4.34l5.81,-2.78l1.11,5.18L544.58,104.49zM526.43,77.81l9.23,11.29l-7.06,5.66l-1.56,10.09l-2.46,2.49l-1.33,10.51l-3.38,0.48l-6.03,-7.64l2.54,-4.62l-4.2,-3.86l-5.46,-11.82l-2.18,-11.79l7.64,-5.69l1.54,5.56l3.99,-0.22l1.06,-5.43l4.12,-0.56L526.43,77.81zM546.6,66.35l5.5,5.8l-4.16,8.52l-8.13,1.81l-8.27,-2.56l-0.5,-4.32l-4.02,-0.28l-3.07,-7.48l8.66,-4.72l4.07,4.08l2.84,-5.09L546.6,66.35z"},{"id":"SK","title":"Slovakia","d":"M528.11,304.02L528.27,304.28L529.43,303.7L530.84,305.22L532.5,304.3L533.82,304.74L535.84,304.14L538.5,305.78L537.73,306.89L537.18,308.6L536.58,309.03L533.58,307.75L532.66,308L532,309L530.68,309.52L530.38,309.25L529.02,309.9L527.9,310.03L527.68,310.87L525.32,311.38L524.29,310.92L522.86,309.85L522.58,308.4L522.81,307.86L523.2,306.93L524.45,307L525.4,306.56L525.48,306.17L526.02,305.96L526.2,304.99L526.84,304.8L527.28,304.03z"},{"id":"SL","title":"Sierra Leone","d":"M443.18,444.44L442.42,444.23L440.41,443.1L438.95,441.6L438.46,440.57L438.11,438.49L439.61,437.25L439.93,436.46L440.41,435.85L441.19,435.79L441.84,435.26L444.08,435.26L444.86,436.27L445.47,437.46L445.38,438.28L445.83,439.02L445.8,440.05L446.57,439.89L445.26,441.2L444,442.73L443.85,443.54z"},{"id":"SN","title":"Senegal","d":"M428.39,425.16L427.23,422.92L425.83,421.9L427.07,421.35L428.43,419.32L429.09,417.83L430.05,416.9L431.45,417.15L432.81,416.52L434.38,416.49L435.72,417.34L437.58,418.11L439.28,420.24L441.13,422.22L441.26,424.01L441.81,425.65L442.86,426.46L443.1,427.56L442.97,428.45L442.56,428.61L441.04,428.39L440.83,428.7L440.21,428.77L438.19,428.07L436.84,428.04L431.66,427.92L430.91,428.24L429.98,428.15L428.49,428.62L428.03,426.43L430.58,426.49L431.26,426.09L431.76,426.06L432.8,425.4L434,426.01L435.22,426.06L436.43,425.41L435.87,424.59L434.94,425.07L434.07,425.06L432.97,424.35L432.08,424.4L431.44,425.07z"},{"id":"SO","title":"Somalia","d":"M618.63,430.43L618.56,429.64L617.5,429.65L616.17,430.63L614.68,430.91L613.39,431.33L612.5,431.39L610.9,431.49L609.9,432.01L608.51,432.2L606.04,433.08L602.99,433.41L600.34,434.14L598.95,434.13L597.69,432.94L597.14,431.77L596.23,431.24L595.19,432.76L594.58,433.77L595.62,435.33L596.65,436.69L597.72,437.7L606.89,441.04L609.25,441.02L601.32,449.44L597.67,449.56L595.17,451.53L593.38,451.58L592.61,452.46L590.16,455.63L590.19,465.78L591.85,468.07L592.48,467.41L593.13,465.95L596.2,462.57L598.81,460.45L603.01,457.69L605.81,455.43L609.11,451.62L611.5,448.49L613.91,444.39L615.64,440.8L616.99,437.65L617.78,434.6L618.38,433.58L618.37,432.08z"},{"id":"SR","title":"Suriname","d":"M315.02,446.72L318.38,447.28L318.68,446.77L320.95,446.57L323.96,447.33L322.5,449.73L322.72,451.64L323.83,453.3L323.34,454.5L323.09,455.77L322.37,456.94L320.77,456.35L319.44,456.64L318.31,456.39L318.03,457.2L318.5,457.75L318.25,458.32L316.72,458.09L315.01,455.67L314.64,454.1L313.75,454.09L312.5,452.07L313.02,450.62L312.87,449.97L314.57,449.24z"},{"id":"SS","title":"South Sudan","d":"M570.48,436.9L570.51,439.1L570.09,439.96L568.61,440.03L567.65,441.64L569.37,441.84L570.79,443.21L571.29,444.33L572.57,444.98L574.22,448.03L572.32,449.87L570.6,451.54L568.87,452.82L566.9,452.82L564.64,453.47L562.86,452.84L561.71,453.61L559.24,451.75L558.57,450.56L557.01,451.15L555.71,450.96L554.96,451.43L553.7,451.1L552.01,448.79L551.56,447.9L549.46,446.79L548.75,445.11L547.58,443.9L545.7,442.44L545.67,441.52L544.14,440.39L542.23,439.29L543.09,438.98L544.05,438.45L544.77,435.93L545.54,434.62L547.57,434.23L548.05,435L549.49,436.65L550.26,436.9L551.27,436.41L553.29,436.51L553.68,437.09L556.47,437.09L556.57,436.51L558.01,435.98L558.3,435.15L559.36,434.57L561.72,436.22L563.16,435.93L564.56,433.89L566.1,432.33L565.86,430.62L565.18,429.79L566.87,429.64L567.06,429.01L568.36,429.2L568.02,431.3L568.36,433.35L569.8,434.47L570.14,435.44L570.09,436.85z"},{"id":"SV","title":"El Salvador","d":"M229.09,425.76L228.78,426.43L227.16,426.39L226.15,426.12L224.99,425.55L223.43,425.37L222.64,424.75L222.73,424.33L223.69,423.61L224.21,423.29L224.06,422.95L224.72,422.78L225.55,423.02L226.15,423.59L227,424.05L227.1,424.44L228.33,424.1L228.91,424.3L229.29,424.61z"},{"id":"SY","title":"Syria","d":"M584.02,364.6L578.53,368.14L575.41,366.82L575.35,366.8L575.73,366.3L575.69,364.93L576.38,363.1L577.91,361.83L577.45,360.51L576.19,360.33L575.93,357.72L576.61,356.31L577.36,355.56L578.11,354.8L578.27,352.86L579.18,353.54L582.27,352.57L583.76,353.22L586.07,353.21L589.29,351.9L590.81,351.96L594,351.42L592.56,353.6L591.02,354.46L591.29,356.98L590.23,361.1z"},{"id":"SZ","title":"Swaziland","d":"M565.18,540.74L564.61,542.13L562.97,542.46L561.29,540.77L561.27,539.69L562.03,538.52L562.3,537.62L563.11,537.4L564.52,537.97L564.94,539.36z"},{"id":"TD","title":"Chad","d":"M515.9,427.26L516.18,425.92L514.38,425.85L514.39,424L513.22,422.94L514.43,419.14L518.01,416.4L518.15,412.61L519.23,406.63L519.84,405.35L518.68,404.33L518.63,403.38L517.58,402.6L516.89,397.93L519.72,396.27L530.91,402.04L542.09,407.74L542.23,419.35L539.81,419.15L538.53,421.28L537.79,423.06L538.37,423.73L537.45,424.61L537.77,425.79L537.04,426.99L536.76,428.04L537.75,427.87L538.33,428.97L538.36,430.63L539.39,431.46L539.36,432.15L537.59,432.64L536.16,433.78L534.14,436.87L531.5,438.18L528.79,438L528,438.26L528.28,439.25L526.81,440.24L525.62,441.34L522.09,442.41L521.39,441.78L520.93,441.72L520.41,442.44L518.09,442.66L518.53,441.89L517.65,439.96L517.25,438.79L516.03,438.31L514.38,436.66L514.99,435.33L516.27,435.61L517.06,435.41L518.62,435.44L517.1,432.87L517.2,430.98L517.01,429.09z"},{"id":"TF","title":"French Southern and Antarctic Lands","d":"M668.54,619.03L670.34,620.36L672.99,620.9L673.09,621.71L672.31,623.67L668,623.95L667.93,621.66L668.35,619.9z"},{"id":"TG","title":"Togo","d":"M480.48,446.25L478.23,446.84L477.6,445.86L476.85,444.08L476.63,442.68L477.25,440.15L476.55,439.12L476.28,436.9L476.28,434.85L475.11,433.39L475.32,432.5L477.78,432.56L477.42,434.06L478.27,434.89L479.25,435.88L479.35,437.27L479.92,437.85L479.79,444.31z"},{"id":"TH","title":"Thailand","d":"M762.89,429.18L760.37,427.87L757.97,427.93L758.38,425.68L755.91,425.7L755.69,428.84L754.18,432.99L753.27,435.49L753.46,437.54L755.28,437.63L756.42,440.2L756.93,442.63L758.49,444.24L760.19,444.57L761.64,446.02L760.73,447.17L758.87,447.51L758.65,446.07L756.37,444.84L755.88,445.34L754.77,444.27L754.29,442.88L752.8,441.29L751.44,439.96L750.98,441.61L750.45,440.05L750.76,438.29L751.58,435.58L752.94,432.67L754.48,430.02L753.38,427.42L753.43,426.09L753.11,424.49L751.24,422.21L750.57,420.76L751.54,420.23L752.56,417.71L751.42,415.79L749.64,413.66L748.28,411.09L749.46,410.56L750.74,407.37L752.72,407.23L754.36,405.95L755.96,405.26L757.18,406.18L757.34,407.96L759.23,408.09L758.54,411.2L758.61,413.82L761.56,412.08L762.4,412.59L764.05,412.51L764.61,411.49L766.73,411.69L768.86,414.07L769.04,416.94L771.31,419.47L771.18,421.91L770.27,423.21L767.64,422.8L764.02,423.35L762.22,425.73z"},{"id":"TJ","title":"Tajikistan","d":"M674.37,340.62L673.34,341.75L670.29,341.14L670.02,343.24L673.06,342.96L676.53,344.13L681.83,343.58L682.54,346.91L683.46,346.55L685.16,347.36L685.07,348.74L685.49,350.75L682.59,350.75L680.66,350.49L678.92,352.06L677.67,352.4L676.69,353.14L675.58,351.99L675.85,349.04L675,348.87L675.3,347.78L673.79,346.98L672.58,348.21L672.28,349.64L671.85,350.16L670.17,350.09L669.27,351.69L668.32,351.02L666.29,352.14L665.44,351.72L667.01,348.15L666.41,345.49L664.35,344.63L665.08,343.04L667.42,343.21L668.75,341.2L669.64,338.85L673.39,337.99L672.81,339.7L673.21,340.72z"},{"id":"TL","title":"Timor-Leste","d":"M825.65,488.25L825.98,487.59L828.39,486.96L830.35,486.86L831.22,486.51L832.28,486.86L831.25,487.62L828.33,488.85L825.98,489.67L825.93,488.81z"},{"id":"TM","title":"Turkmenistan","d":"M646.88,356.9L646.63,353.99L644.54,353.87L641.34,350.78L639.1,350.39L636,348.6L634,348.27L632.77,348.93L630.9,348.83L628.91,350.85L626.44,351.53L625.92,349.04L626.33,345.31L624.14,344.09L624.86,341.61L623,341.39L623.62,338.3L626.26,339.21L628.73,338.02L626.68,335.79L625.88,333.65L623.62,334.61L623.34,337.34L622.46,334.93L623.7,333.68L626.88,332.89L628.78,333.95L630.74,336.88L632.18,336.7L635.34,336.65L634.88,334.77L637.28,333.47L639.64,331.27L643.42,333.27L643.72,336.26L644.79,337.03L647.82,336.86L648.76,337.53L650.14,341.32L653.35,343.83L655.18,345.52L658.11,347.27L661.84,348.79L661.76,350.95L660.92,350.84L659.59,349.9L659.15,351.15L656.79,351.83L656.23,354.62L654.65,355.67L652.44,356.19L651.85,357.74L649.74,358.2z"},{"id":"TN","title":"Tunisia","d":"M501.84,374.69L500.64,368.83L498.92,367.5L498.89,366.69L496.6,364.71L496.35,362.18L498.08,360.3L498.74,357.48L498.29,354.2L498.86,352.41L501.92,351L503.88,351.42L503.8,353.19L506.18,351.9L506.38,352.57L504.97,354.28L504.96,355.88L505.93,356.73L505.56,359.69L503.71,361.4L504.24,363.23L505.69,363.29L506.4,364.88L507.47,365.4L507.31,367.95L505.94,368.9L505.08,369.95L503.15,371.21L503.45,372.56L503.21,373.94z"},{"id":"TR","title":"Turkey","d":"M578.75,336.6l4.02,1.43l3.27,-0.57l2.41,0.33l3.31,-1.94l2.99,-0.18l2.7,1.83l0.48,1.3l-0.27,1.79l2.08,0.91l1.1,1.06l-1.92,1.03l0.88,4.11l-0.55,1.1l1.53,2.82l-1.34,0.59l-0.98,-0.89l-3.26,-0.45l-1.2,0.55l-3.19,0.54l-1.51,-0.06l-3.23,1.31l-2.31,0.01l-1.49,-0.66l-3.09,0.97l-0.92,-0.68l-0.15,1.94l-0.75,0.76l-0.75,0.76l-1.03,-1.57l1.06,-1.3l-1.71,0.3l-2.35,-0.8l-1.93,2l-4.26,0.39l-2.27,-1.86l-3.02,-0.12l-0.65,1.44l-1.94,0.41l-2.71,-1.85l-3.06,0.06l-1.66,-3.48l-2.05,-1.96l1.36,-2.78l-1.78,-1.72l3.11,-3.48l4.32,-0.15l1.18,-2.81l5.34,0.49l3.37,-2.42l3.27,-1.06l4.64,-0.08L578.75,336.6zM551.5,338.99l-2.34,1.98l-0.88,-1.71l0.04,-0.76l0.67,-0.41l0.87,-2.33l-1.37,-0.99l2.86,-1.18l2.41,0.5l0.33,1.44l2.45,1.2l-0.51,0.91l-3.33,0.2L551.5,338.99z"},{"id":"TT","title":"Trinidad and Tobago","d":"M302.31,433.24L303.92,432.87L304.51,432.97L304.4,435.08L302.06,435.39L301.55,435.14L302.37,434.36z"},{"id":"TW","title":"Taiwan","d":"M816.7,393.27L815.01,398.14L813.81,400.62L812.33,398.07L812.01,395.82L813.66,392.82L815.91,390.5L817.19,391.41z"},{"id":"TZ","title":"Tanzania","d":"M570.31,466.03L570.79,466.34L580.95,472.01L581.15,473.63L585.17,476.42L583.88,479.87L584.04,481.46L585.84,482.48L585.92,483.21L585.15,484.91L585.31,485.76L585.13,487.11L586.11,488.87L587.27,491.66L588.29,492.28L586.06,493.92L583,495.02L581.32,494.98L580.32,495.83L578.37,495.9L577.63,496.26L574.26,495.46L572.15,495.69L571.37,491.83L570.42,490.51L569.85,489.73L567.11,489.21L565.51,488.36L563.73,487.89L562.61,487.41L561.44,486.7L559.93,483.15L558.3,481.58L557.74,479.96L558.02,478.5L557.52,475.93L558.68,475.8L559.69,474.79L560.79,473.33L561.48,472.75L561.45,471.84L560.85,471.21L560.69,470.11L561.49,469.76L561.66,468.12L560.54,466.55L561.53,466.21L564.6,466.25z"},{"id":"UA","title":"Ukraine","d":"M564.38,292.49L565.42,292.68L566.13,291.64L566.98,291.87L569.89,291.43L571.68,294L570.98,294.92L571.21,296.31L573.45,296.52L574.45,298.45L574.39,299.32L577.95,300.86L580.1,300.17L581.83,302.21L583.47,302.17L587.6,303.57L587.63,304.84L586.5,307.07L587.11,309.4L586.67,310.79L583.96,311.1L582.52,312.26L582.43,314.09L580.19,314.42L578.32,315.74L575.7,315.95L573.28,317.47L571.96,318.5L573.45,319.97L574.82,320.93L577.68,320.69L577.13,322.11L574.06,322.79L570.25,325.06L568.7,324.27L569.31,322.42L566.25,321.26L566.75,320.49L569.91,318.86L569.51,318.05L569.06,318.46L568.62,318.24L564.26,317.22L564.07,315.71L561.47,316.21L560.43,318.44L558.26,321.39L556.98,320.71L555.67,321.35L554.42,320.62L555.12,320.18L555.61,318.81L556.38,317.52L556.18,316.8L556.77,316.48L557.04,317.04L558.7,317.15L559.44,316.86L558.92,316.44L559.11,315.84L558.13,314.8L557.73,313.08L556.71,312.41L556.91,311L555.64,309.88L554.49,309.72L552.42,308.41L550.56,308.83L549.89,309.45L548.71,309.44L548,310.42L545.93,310.82L544.98,311.46L543.67,310.45L541.88,310.43L540.14,309.97L538.93,310.86L538.73,309.74L537.18,308.6L537.73,306.89L538.5,305.79L539.12,306.03L538.39,304.11L540.94,300.5L542.33,299.99L542.63,298.75L541.22,294.86L542.56,294.69L544.1,293.46L546.27,293.36L549.1,293.72L552.23,294.8L554.44,294.89L555.49,295.54L556.54,294.76L557.28,295.81L559.81,295.59L560.92,296.02L561.11,293.76L561.97,292.76z"},{"id":"UG","title":"Uganda","d":"M564.6,466.25L561.53,466.21L560.54,466.55L558.87,467.41L558.19,467.12L558.21,465.02L558.86,463.96L559.02,461.72L559.61,460.43L560.68,458.97L561.76,458.23L562.66,457.24L561.54,456.87L561.71,453.61L562.86,452.84L564.64,453.47L566.9,452.82L568.87,452.82L570.6,451.54L571.93,453.48L572.26,454.88L573.49,458.08L572.47,460.11L571.09,461.95L570.29,463.08L570.31,466.03z"},{"id":"US","title":"United States","d":"M109.25,279.8L109.25,279.8l-1.54,-1.83l-2.47,-1.57l-0.79,-4.36l-3.61,-4.13l-1.51,-4.94l-2.69,-0.34l-4.46,-0.13l-3.29,-1.54l-5.8,-5.64l-2.68,-1.05l-4.9,-1.99l-3.88,0.48l-5.51,-2.59l-3.33,-2.43l-3.11,1.21l0.58,3.93l-1.55,0.36l-3.24,1.16l-2.47,1.86l-3.11,1.16l-0.4,-3.24l1.26,-5.53l2.98,-1.77l-0.77,-1.46l-3.57,3.22l-1.91,3.77l-4.04,3.95l2.05,2.65l-2.65,3.85l-3.01,2.21l-2.81,1.59l-0.69,2.29l-4.38,2.63l-0.89,2.36l-3.28,2.13l-1.92,-0.38l-2.62,1.38l-2.85,1.67l-2.33,1.63l-4.81,1.38l-0.44,-0.81l3.07,-2.27l2.74,-1.51l2.99,-2.71l3.48,-0.56l1.38,-2.06l3.89,-3.05l0.63,-1.03l2.07,-1.83l0.48,-4l1.43,-3.17l-3.23,1.64l-0.9,-0.93l-1.52,1.95l-1.83,-2.73l-0.76,1.94l-1.05,-2.7l-2.8,2.17l-1.72,0l-0.24,-3.23l0.51,-2.02l-1.81,-1.98l-3.65,1.07l-2.37,-2.63l-1.92,-1.36l-0.01,-3.25l-2.16,-2.48l1.08,-3.41l2.29,-3.37l1,-3.15l2.27,-0.45l1.92,0.99l2.26,-3.01l2.04,0.54l2.14,-1.96l-0.52,-2.92l-1.57,-1.16l2.08,-2.52l-1.72,0.07l-2.98,1.43l-0.85,1.43l-2.21,-1.43l-3.97,0.73l-4.11,-1.56l-1.18,-2.65l-3.55,-3.91l3.94,-2.87l6.25,-3.41h2.31l-0.38,3.48l5.92,-0.27l-2.28,-4.34l-3.45,-2.72l-1.99,-3.64l-2.69,-3.17l-3.85,-2.38l1.57,-4.03l4.97,-0.25l3.54,-3.58l0.67,-3.92l2.86,-3.91l2.73,-0.95l5.31,-3.76l2.58,0.57l4.31,-4.61l4.24,1.83l2.03,3.87l1.25,-1.65l4.74,0.51l-0.17,1.95l4.29,1.43l2.86,-0.84l5.91,2.64l5.39,0.78l2.16,1.07l3.73,-1.34l4.25,2.46l3.05,1.13l-0.02,27.65l-0.01,35.43l2.76,0.17l2.73,1.56l1.96,2.44l2.49,3.6l2.73,-3.05l2.81,-1.79l1.49,2.85l1.89,2.23l2.57,2.42l1.75,3.79l2.87,5.88l4.77,3.2l0.08,3.12L109.25,279.8zM285.18,314.23l-1.25,-1.19l-1.88,0.7l-0.93,-1.08l-2.14,3.1l-0.86,3.15l-1,1.82l-1.19,0.62l-0.9,0.2l-0.28,0.98l-5.17,0l-4.26,0.03l-1.27,0.73l-2.87,2.73l0.29,0.54l0.17,1.51l-2.1,1.27l-2.3,-0.32l-2.2,-0.14l-1.33,0.44l0.25,1.15l0,0l0.05,0.37l-2.42,2.27l-2.11,1.09l-1.44,0.51l-1.66,1.03l-2.03,0.5l-1.4,-0.19l-1.73,-0.77l0.96,-1.45l0.62,-1.32l1.32,-2.09l-0.14,-1.57l-0.5,-2.24l-1.04,-0.39l-1.74,1.7l-0.56,-0.03l-0.14,-0.97l1.54,-1.56l0.26,-1.79l-0.23,-1.79l-2.08,-1.55l-2.38,-0.8l-0.39,1.52l-0.62,0.4l-0.5,1.95l-0.26,-1.33l-1.12,0.95l-0.7,1.32l-0.73,1.92l-0.14,1.64l0.93,2.38l-0.08,2.51l-1.14,1.84l-0.57,0.52l-0.76,0.41l-0.95,0.02l-0.26,-0.25l-0.76,-1.98l-0.02,-0.98l0.08,-0.94l-0.35,-1.87l0.53,-2.18l0.63,-2.71l1.46,-3.03l-0.42,0.01l-2.06,2.54l-0.38,-0.46l1.1,-1.42l1.67,-2.57l1.91,-0.36l2.19,-0.8l2.21,0.42l0.09,0.02l2.47,-0.36l-1.4,-1.61l-0.75,-0.13l-0.86,-0.16l-0.59,-1.14l-2.75,0.36l-2.49,0.9l-1.97,-1.55l-1.59,-0.52l0.9,-2.17l-2.48,1.37l-2.25,1.33l-2.16,1.04l-1.72,-1.4l-2.81,0.85l0.01,-0.6l1.9,-1.73l1.99,-1.65l2.86,-1.37l-3.45,-1.09l-2.27,0.55l-2.72,-1.3l-2.86,-0.67l-1.96,-0.26l-0.87,-0.72l-0.5,-2.35l-0.95,0.02l-0.01,1.64l-5.8,0l-9.59,0l-9.53,0l-8.42,0h-8.41h-8.27h-8.55h-2.76h-8.32h-7.96l0.95,3.47l0.45,3.41l-0.69,1.09l-1.49,-3.91l-4.05,-1.42l-0.34,0.82l0.82,1.94l0.89,3.53l0.51,5.42l-0.34,3.59l-0.34,3.54l-1.1,3.61l0.9,2.9l0.1,3.2l-0.61,3.05l1.49,1.99l0.39,2.95l2.17,2.99l1.24,1.17l-0.1,0.82l2.34,4.85l2.72,3.45l0.34,1.87l0.71,0.55l2.6,0.33l1,0.91l1.57,0.17l0.31,0.96l1.31,0.4l1.82,1.92l0.47,1.7l3.19,-0.25l3.56,-0.36l-0.26,0.65l4.23,1.6l6.4,2.31l5.58,-0.02l2.22,0l0.01,-1.35l4.86,0l1.02,1.16l1.43,1.03l1.67,1.43l0.93,1.69l0.7,1.77l1.45,0.97l2.33,0.96l1.77,-2.53l2.29,-0.06l1.98,1.28l1.41,2.18l0.97,1.86l1.65,1.8l0.62,2.19l0.79,1.47l2.19,0.96l1.99,0.68l1.09,-0.09l-0.53,-1.06l-0.14,-1.5l0.03,-2.16l0.65,-1.42l1.53,-1.51l2.79,-1.37l2.55,-2.37l2.36,-0.75l1.74,-0.23l2.04,0.74l2.45,-0.4l2.09,1.69l2.03,0.1l1.05,-0.61l1.04,0.47l0.53,-0.42l-0.6,-0.63l0.05,-1.3l-0.5,-0.86l1.16,-0.5l2.14,-0.22l2.49,0.36l3.17,-0.41l1.76,0.8l1.36,1.5l0.5,0.16l2.83,-1.46l1.09,0.49l2.19,2.68l0.79,1.75l-0.58,2.1l0.42,1.23l1.3,2.4l1.49,2.68l1.07,0.71l0.44,1.35l1.38,0.37l0.84,-0.39l0.7,-1.89l0.12,-1.21l0.09,-2.1l-1.33,-3.65l-0.02,-1.37l-1.25,-2.25l-0.94,-2.75l-0.5,-2.25l0.43,-2.31l1.32,-1.94l1.58,-1.57l3.08,-2.16l0.4,-1.12l1.42,-1.23l1.4,-0.22l1.84,-1.98l2.9,-1.01l1.78,-2.53l-0.39,-3.46l-0.29,-1.21l-0.8,-0.24l-0.12,-3.35l-1.93,-1.14l1.85,0.56l-0.6,-2.26l0.54,-1.55l0.33,2.97l1.43,1.36l-0.87,2.4l0.26,0.14l1.58,-2.81l0.9,-1.38l-0.04,-1.35l-0.7,-0.64l-0.58,-1.94l0.92,0.9l0.62,0.19l0.21,0.92l2.04,-2.78l0.61,-2.62l-0.83,-0.17l0.85,-1.02l-0.08,0.45l1.79,-0.01l3.93,-1.11l-0.83,-0.7l-4.12,0.7l2.34,-1.07l1.63,-0.18l1.22,-0.19l2.07,-0.65l1.35,0.07l1.89,-0.61l0.22,-1.07l-0.84,-0.84l0.29,1.37l-1.16,-0.09l-0.93,-1.99l0.03,-2.01l0.48,-0.86l1.48,-2.28l2.96,-1.15l2.88,-1.34l2.99,-1.9l-0.48,-1.29l-1.83,-2.25L285.18,314.23zM45.62,263.79l-1.5,0.8l-2.55,1.86l0.43,2.42l1.43,1.32l2.8,-1.95l2.43,-2.47l-1.19,-1.63L45.62,263.79zM0,235.22l2.04,-1.26l0.23,-0.68L0,232.61V235.22zM8.5,250.59l-2.77,0.97l1.7,1.52l1.84,1.04l1.72,-0.87l-0.27,-2.15L8.5,250.59zM105.85,283.09l-2.69,0.38l-1.32,-0.62l-0.17,1.52l0.52,2.07l1.42,1.46l1.04,2.13l1.69,2.1l1.12,0.01l-2.44,-3.7L105.85,283.09zM37.13,403.77l-1,-0.28l-0.27,0.26l0.02,0.19l0.32,0.24l0.48,0.63l0.94,-0.21l0.23,-0.36L37.13,403.77zM34.14,403.23l1.5,0.09l0.09,-0.32l-1.38,-0.13L34.14,403.23zM40.03,406.52l-0.5,-0.26l-1.07,-0.5l-0.21,-0.06l-0.16,0.28l0.19,0.58l-0.49,0.48l-0.14,0.33l0.46,1.08l-0.08,0.83l0.7,0.42l0.41,-0.49l0.9,-0.46l1.1,-0.63l0.07,-0.16l-0.71,-1.04L40.03,406.52zM32.17,401.38l-0.75,0.41l0.11,0.12l0.36,0.68l0.98,0.11l0.2,0.04l0.15,-0.17l-0.81,-0.99L32.17,401.38zM27.77,399.82l-0.43,0.3l-0.15,0.22l0.94,0.55l0.33,-0.3l-0.06,-0.7L27.77,399.82z"},{"id":"UY","title":"Uruguay","d":"M313.68,551.79L315.5,551.45L318.31,553.95L319.35,553.86L322.24,555.94L324.44,557.76L326.06,560.01L324.82,561.58L325.6,563.48L324.39,565.6L321.22,567.48L319.15,566.8L317.63,567.17L315.04,565.71L313.14,565.82L311.43,563.95L311.65,561.79L312.26,561.05L312.23,557.75L312.98,554.38z"},{"id":"UZ","title":"Uzbekistan","d":"M661.76,350.95L661.84,348.79L658.11,347.27L655.18,345.52L653.35,343.83L650.14,341.32L648.76,337.53L647.82,336.86L644.79,337.03L643.72,336.26L643.42,333.27L639.64,331.27L637.28,333.47L634.88,334.77L635.34,336.65L632.18,336.7L632.07,322.57L639.29,320.22L639.81,320.57L644.16,323.41L646.45,324.89L649.13,328.39L652.42,327.83L657.23,327.53L660.58,330.33L660.37,334.13L661.74,334.16L662.31,337.22L665.88,337.34L666.64,339.09L667.69,339.07L668.92,336.42L672.61,333.81L674.22,333.11L675.05,333.48L672.7,335.91L674.77,337.31L676.77,336.38L680.09,338.34L676.5,340.98L674.37,340.62L673.21,340.72L672.81,339.7L673.39,337.99L669.64,338.85L668.75,341.2L667.42,343.21L665.08,343.04L664.35,344.63L666.41,345.49L667.01,348.15L665.44,351.72L663.32,350.98z"},{"id":"VE","title":"Venezuela","d":"M275.25,430.35L275.17,431.02L273.52,431.35L274.44,432.64L274.4,434.13L273.17,435.77L274.23,438.01L275.44,437.83L276.07,435.79L275.2,434.79L275.06,432.65L278.55,431.49L278.16,430.15L279.14,429.25L280.15,431.25L282.12,431.3L283.94,432.88L284.05,433.82L286.56,433.84L289.56,433.55L291.17,434.82L293.31,435.17L294.88,434.29L294.91,433.57L298.39,433.4L301.75,433.36L299.37,434.2L300.32,435.54L302.57,435.75L304.69,437.14L305.14,439.4L306.6,439.33L307.7,440L305.48,441.65L305.23,442.68L306.19,443.72L305.5,444.24L303.77,444.69L303.83,445.99L303.07,446.76L304.96,448.88L305.34,449.67L304.31,450.74L301.17,451.78L299.16,452.22L298.35,452.88L296.12,452.18L294.04,451.82L293.52,452.08L294.77,452.8L294.66,454.67L295.05,456.43L297.42,456.67L297.58,457.25L295.57,458.05L295.25,459.23L294.09,459.68L292.01,460.33L291.47,461.19L289.29,461.37L287.74,459.89L286.89,457.12L286.14,456.14L285.12,455.53L286.54,454.14L286.45,453.51L285.65,452.68L285.09,450.83L285.31,448.82L285.93,447.88L286.44,446.38L285.45,445.89L283.85,446.21L281.83,446.06L280.7,446.36L278.72,443.95L277.09,443.59L273.49,443.86L272.82,442.88L272.13,442.65L272.03,442.06L272.36,441.02L272.14,439.89L271.52,439.27L271.16,437.97L269.72,437.79L270.49,436.13L270.84,434.12L271.65,433.06L272.74,432.25L273.45,430.83z"},{"id":"VN","title":"Vietnam","d":"M778.21,401.87L774.47,404.43L772.13,407.24L771.51,409.29L773.66,412.38L776.28,416.2L778.82,417.99L780.53,420.32L781.81,425.64L781.43,430.66L779.1,432.53L775.88,434.36L773.6,436.72L770.1,439.34L769.08,437.53L769.87,435.62L767.79,434.01L770.22,432.87L773.16,432.67L771.93,430.94L776.64,428.75L776.99,425.33L776.34,423.41L776.85,420.53L776.14,418.49L774.02,416.47L772.25,413.9L769.92,410.44L766.56,408.68L767.37,407.61L769.16,406.84L768.07,404.25L764.62,404.22L763.36,401.5L761.72,399.13L763.23,398.39L765.46,398.41L768.19,398.06L770.58,396.44L771.93,397.58L774.5,398.13L774.05,399.87L775.39,401.09z"},{"id":"VU","title":"Vanuatu","d":"M945.87,509.9l-0.92,0.38l-0.94,-1.27l0.1,-0.78L945.87,509.9zM943.8,505.46l0.46,2.33l-0.75,-0.36l-0.58,0.16l-0.4,-0.8l-0.06,-2.21L943.8,505.46z"},{"id":"YE","title":"Yemen","d":"M624.16,416.33L622.13,417.12L621.59,418.4L621.52,419.39L618.73,420.61L614.25,421.96L611.74,423.99L610.51,424.14L609.67,423.97L608.03,425.17L606.24,425.72L603.89,425.87L603.18,426.03L602.57,426.78L601.83,426.99L601.4,427.72L600.01,427.66L599.11,428.04L597.17,427.9L596.44,426.23L596.52,424.66L596.07,423.81L595.52,421.69L594.71,420.5L595.27,420.36L594.98,419.04L595.32,418.48L595.2,417.22L596.43,416.29L596.14,415.06L596.89,413.63L598.04,414.39L598.8,414.12L602.03,414.05L602.55,414.35L605.26,414.64L606.33,414.49L607.03,415.46L608.34,414.98L610.35,411.91L612.97,410.59L621.05,409.46L623.25,414.3z"},{"id":"ZA","title":"South Africa","d":"M563.63,548.71l-0.55,0.46l-1.19,1.63l-0.78,1.66l-1.59,2.33l-3.17,3.38l-1.98,1.98l-2.12,1.51l-2.93,1.3l-1.43,0.17l-0.36,0.93l-1.7,-0.5l-1.39,0.64l-3.04,-0.65l-1.7,0.41l-1.16,-0.18l-2.89,1.33l-2.39,0.54l-1.73,1.28l-1.28,0.08l-1.19,-1.21l-0.95,-0.06l-1.21,-1.51l-0.13,0.47l-0.37,-0.91l0.02,-1.96l-0.91,-2.23l0.9,-0.6l-0.07,-2.53l-1.84,-3.05l-1.41,-2.74l0,-0.01l-2.01,-4.15l1.34,-1.57l1.11,0.87l0.47,1.36l1.26,0.23l1.76,0.6l1.51,-0.23l2.5,-1.63l0,-11.52l0.76,0.46l1.66,2.93l-0.26,1.89l0.63,1.1l2.01,-0.32l1.4,-1.39l1.33,-0.93l0.69,-1.48l1.37,-0.72l1.18,0.38l1.34,0.87l2.28,0.15l1.79,-0.72l0.28,-0.96l0.49,-1.47l1.53,-0.25l0.84,-1.15l0.93,-2.03l2.52,-2.26l3.97,-2.22l1.14,0.03l1.36,0.51l0.94,-0.36l1.49,0.3l1.34,4.26l0.73,2.17l-0.5,3.43l0.24,1.11l-1.42,-0.57l-0.81,0.22l-0.26,0.9l-0.77,1.17l0.03,1.08l1.67,1.7l1.64,-0.34l0.57,-1.39l2.13,0.03l-0.7,2.28l-0.33,2.62l-0.73,1.43L563.63,548.71zM556.5,547.75l-1.22,-0.98l-1.31,0.65l-1.52,1.25l-1.5,2.03l2.1,2.48l1,-0.32l0.52,-1.03l1.56,-0.5l0.48,-1.05l0.86,-1.56L556.5,547.75z"},{"id":"ZM","title":"Zambia","d":"M567.11,489.21L568.43,490.47L569.14,492.87L568.66,493.64L568.1,495.94L568.64,498.3L567.76,499.29L566.91,501.95L568.38,502.69L559.87,505.07L560.14,507.12L558.01,507.52L556.42,508.67L556.08,509.68L555.07,509.9L552.63,512.3L551.08,514.19L550.13,514.26L549.22,513.92L546.09,513.6L545.59,513.38L545.56,513.14L544.46,512.48L542.64,512.31L540.34,512.98L538.51,511.16L536.62,508.78L536.75,499.62L542.59,499.66L542.35,498.67L542.77,497.6L542.28,496.27L542.6,494.89L542.3,494.01L543.27,494.08L543.43,494.96L544.74,494.89L546.52,495.15L547.46,496.44L549.7,496.84L551.42,495.94L552.05,497.43L554.2,497.83L555.23,499.05L556.38,500.62L558.53,500.65L558.29,497.57L557.52,498.08L555.56,496.98L554.8,496.47L555.15,493.62L555.65,490.27L555.02,489.02L555.82,487.22L556.57,486.89L560.34,486.41L561.44,486.7L562.61,487.41L563.73,487.89L565.51,488.36z"},{"id":"ZW","title":"Zimbabwe","d":"M562.71,527L561.22,526.7L560.27,527.06L558.92,526.55L557.78,526.52L555.99,525.16L553.82,524.7L553,522.8L552.99,521.75L551.79,521.43L548.62,518.18L547.73,516.47L547.17,515.95L546.09,513.6L549.22,513.92L550.13,514.26L551.08,514.19L552.63,512.3L555.07,509.9L556.08,509.68L556.42,508.67L558.01,507.52L560.14,507.12L560.32,508.2L562.66,508.14L563.96,508.75L564.56,509.47L565.9,509.68L567.35,510.62L567.36,514.31L566.81,516.35L566.69,518.55L567.14,519.43L566.83,521.17L566.4,521.44L565.66,523.59z"}]}}};
|
|
include/gawd_pdf_file.php
CHANGED
@@ -33,8 +33,9 @@ class gawd_pdf_file extends GAWD_file {
|
|
33 |
exit;
|
34 |
}
|
35 |
public function export_reccuing(){
|
36 |
-
|
37 |
-
require_once (GAWD_DIR . '/include/src/
|
|
|
38 |
|
39 |
$datay1 = array();
|
40 |
$datay2 = array();
|
33 |
exit;
|
34 |
}
|
35 |
public function export_reccuing(){
|
36 |
+
return false;
|
37 |
+
// require_once (GAWD_DIR . '/include/src/jpgraph.php');
|
38 |
+
// require_once (GAWD_DIR . '/include/src/jpgraph_line.php');
|
39 |
|
40 |
$datay1 = array();
|
41 |
$datay2 = array();
|
include/src/flag_mapping
DELETED
@@ -1,237 +0,0 @@
|
|
1 |
-
class JpCountryFlags {
|
2 |
-
|
3 |
-
$iCountryFlags = array(
|
4 |
-
'Afghanistan' => 'afgh.gif',
|
5 |
-
'Republic of Angola' => 'agla.gif',
|
6 |
-
'Republic of Albania' => 'alba.gif',
|
7 |
-
'Alderney' => 'alde.gif',
|
8 |
-
'Democratic and Popular Republic of Algeria' => 'alge.gif',
|
9 |
-
'Territory of American Samoa' => 'amsa.gif',
|
10 |
-
'Principality of Andorra' => 'andr.gif',
|
11 |
-
'British Overseas Territory of Anguilla' => 'angu.gif',
|
12 |
-
'Antarctica' => 'anta.gif',
|
13 |
-
'Argentine Republic' => 'arge.gif',
|
14 |
-
'League of Arab States' => 'arle.gif',
|
15 |
-
'Republic of Armenia' => 'arme.gif',
|
16 |
-
'Aruba' => 'arub.gif',
|
17 |
-
'Commonwealth of Australia' => 'astl.gif',
|
18 |
-
'Republic of Austria' => 'aust.gif',
|
19 |
-
'Azerbaijani Republic' => 'azer.gif',
|
20 |
-
'British Antarctic Territory' => 'bant.gif',
|
21 |
-
'Kingdom of Belgium' => 'belg.gif',
|
22 |
-
'British Overseas Territory of Bermuda' => 'berm.gif',
|
23 |
-
'Commonwealth of the Bahamas' => 'bhms.gif',
|
24 |
-
'Kingdom of Bahrain' => 'bhrn.gif',
|
25 |
-
'Republic of Belarus' => 'blru.gif',
|
26 |
-
'Republic of Bolivia' => 'blva.gif',
|
27 |
-
'Belize' => 'blze.gif',
|
28 |
-
'Republic of Benin' => 'bnin.gif',
|
29 |
-
'Republic of Botswana' => 'bots.gif',
|
30 |
-
'Federative Republic of Brazil' => 'braz.gif',
|
31 |
-
'Barbados' => 'brbd.gif',
|
32 |
-
'British Indian Ocean Territory' => 'brin.gif',
|
33 |
-
'Brunei Darussalam' => 'brun.gif',
|
34 |
-
'Republic of Burkina' => 'bufa.gif',
|
35 |
-
'Republic of Bulgaria' => 'bulg.gif',
|
36 |
-
'Republic of Burundi' => 'buru.gif',
|
37 |
-
'Overseas Territory of the British Virgin Islands' => 'bvis.gif',
|
38 |
-
'Central African Republic' => 'cafr.gif',
|
39 |
-
'Kingdom of Cambodia' => 'camb.gif',
|
40 |
-
'Republic of Cameroon' => 'came.gif',
|
41 |
-
'Dominion of Canada' => 'cana.gif',
|
42 |
-
'Caribbean Community' => 'cari.gif',
|
43 |
-
'Republic of Cape Verde' => 'cave.gif',
|
44 |
-
'Republic of Chad' => 'chad.gif',
|
45 |
-
'Republic of Chile' => 'chil.gif',
|
46 |
-
'Territory of Christmas Island' => 'chms.gif',
|
47 |
-
'Commonwealth of Independent States' => 'cins.gif',
|
48 |
-
'Cook Islands' => 'ckis.gif',
|
49 |
-
'Republic of Colombia' => 'clmb.gif',
|
50 |
-
'Territory of Cocos Islands' => 'cois.gif',
|
51 |
-
'Commonwealth' => 'comn.gif',
|
52 |
-
'Union of the Comoros' => 'como.gif',
|
53 |
-
'Republic of the Congo' => 'cong.gif',
|
54 |
-
'Republic of Costa Rica' => 'corc.gif',
|
55 |
-
'Republic of Croatia' => 'croa.gif',
|
56 |
-
'Republic of Cuba' => 'cuba.gif',
|
57 |
-
'British Overseas Territory of the Cayman Islands' => 'cyis.gif',
|
58 |
-
'Republic of Cyprus' => 'cypr.gif',
|
59 |
-
'The Czech Republic' => 'czec.gif',
|
60 |
-
'Kingdom of Denmark' => 'denm.gif',
|
61 |
-
'Republic of Djibouti' => 'djib.gif',
|
62 |
-
'Commonwealth of Dominica' => 'domn.gif',
|
63 |
-
'Dominican Republic' => 'dore.gif',
|
64 |
-
'Republic of Ecuador' => 'ecua.gif',
|
65 |
-
'Arab Republic of Egypt' => 'egyp.gif',
|
66 |
-
'Republic of El Salvador' => 'elsa.gif',
|
67 |
-
'England' => 'engl.gif',
|
68 |
-
'Republic of Equatorial Guinea' => 'eqgu.gif',
|
69 |
-
'State of Eritrea' => 'erit.gif',
|
70 |
-
'Republic of Estonia' => 'estn.gif',
|
71 |
-
'Ethiopia' => 'ethp.gif',
|
72 |
-
'European Union' => 'euun.gif',
|
73 |
-
'British Overseas Territory of the Falkland Islands' => 'fais.gif',
|
74 |
-
'International Federation of Vexillological Associations' => 'fiav.gif',
|
75 |
-
'Republic of Fiji' => 'fiji.gif',
|
76 |
-
'Republic of Finland' => 'finl.gif',
|
77 |
-
'Territory of French Polynesia' => 'fpol.gif',
|
78 |
-
'French Republic' => 'fran.gif',
|
79 |
-
'Overseas Department of French Guiana' => 'frgu.gif',
|
80 |
-
'Gabonese Republic' => 'gabn.gif',
|
81 |
-
'Republic of the Gambia' => 'gamb.gif',
|
82 |
-
'Republic of Georgia' => 'geor.gif',
|
83 |
-
'Federal Republic of Germany' => 'germ.gif',
|
84 |
-
'Republic of Ghana' => 'ghan.gif',
|
85 |
-
'Gibraltar' => 'gibr.gif',
|
86 |
-
'Hellenic Republic' => 'grec.gif',
|
87 |
-
'State of Grenada' => 'gren.gif',
|
88 |
-
'Overseas Department of Guadeloupe' => 'guad.gif',
|
89 |
-
'Territory of Guam' => 'guam.gif',
|
90 |
-
'Republic of Guatemala' => 'guat.gif',
|
91 |
-
'The Bailiwick of Guernsey' => 'guer.gif',
|
92 |
-
'Republic of Guinea' => 'guin.gif',
|
93 |
-
'Republic of Haiti' => 'hait.gif',
|
94 |
-
'Hong Kong Special Administrative Region' => 'hokn.gif',
|
95 |
-
'Republic of Honduras' => 'hond.gif',
|
96 |
-
'Republic of Hungary' => 'hung.gif',
|
97 |
-
'Republic of Iceland' => 'icel.gif',
|
98 |
-
'International Committee of the Red Cross' => 'icrc.gif',
|
99 |
-
'Republic of India' => 'inda.gif',
|
100 |
-
'Republic of Indonesia' => 'indn.gif',
|
101 |
-
'Republic of Iraq' => 'iraq.gif',
|
102 |
-
'Republic of Ireland' => 'irel.gif',
|
103 |
-
'Organization of the Islamic Conference' => 'isco.gif',
|
104 |
-
'Isle of Man' => 'isma.gif',
|
105 |
-
'State of Israel' => 'isra.gif',
|
106 |
-
'Italian Republic' => 'ital.gif',
|
107 |
-
'Jamaica' => 'jama.gif',
|
108 |
-
'Japan' => 'japa.gif',
|
109 |
-
'The Bailiwick of Jersey' => 'jers.gif',
|
110 |
-
'Hashemite Kingdom of Jordan' => 'jord.gif',
|
111 |
-
'Republic of Kazakhstan' => 'kazk.gif',
|
112 |
-
'Republic of Kenya' => 'keny.gif',
|
113 |
-
'Republic of Kiribati' => 'kirb.gif',
|
114 |
-
'State of Kuwait' => 'kuwa.gif',
|
115 |
-
'Kyrgyz Republic' => 'kyrg.gif',
|
116 |
-
'Republic of Latvia' => 'latv.gif',
|
117 |
-
'Lebanese Republic' => 'leba.gif',
|
118 |
-
'Kingdom of Lesotho' => 'lest.gif',
|
119 |
-
'Republic of Liberia' => 'libe.gif',
|
120 |
-
'Principality of Liechtenstein' => 'liec.gif',
|
121 |
-
'Republic of Lithuania' => 'lith.gif',
|
122 |
-
'Grand Duchy of Luxembourg' => 'luxe.gif',
|
123 |
-
'Macao Special Administrative Region' => 'maca.gif',
|
124 |
-
'Republic of Macedonia' => 'mace.gif',
|
125 |
-
'Republic of Madagascar' => 'mada.gif',
|
126 |
-
'Republic of the Marshall Islands' => 'mais.gif',
|
127 |
-
'Republic of Maldives' => 'mald.gif',
|
128 |
-
'Republic of Mali' => 'mali.gif',
|
129 |
-
'Federation of Malaysia' => 'mals018.gif',
|
130 |
-
'Republic of Malta' => 'malt.gif',
|
131 |
-
'Republic of Malawi' => 'malw.gif',
|
132 |
-
'Overseas Department of Martinique' => 'mart.gif',
|
133 |
-
'Islamic Republic of Mauritania' => 'maur.gif',
|
134 |
-
'Territorial Collectivity of Mayotte' => 'mayt.gif',
|
135 |
-
'United Mexican States' => 'mexc.gif',
|
136 |
-
'Federated States of Micronesia' => 'micr.gif',
|
137 |
-
'Midway Islands' => 'miis.gif',
|
138 |
-
'Republic of Moldova' => 'mold.gif',
|
139 |
-
'Principality of Monaco' => 'mona.gif',
|
140 |
-
'Republic of Mongolia' => 'mong.gif',
|
141 |
-
'British Overseas Territory of Montserrat' => 'mont.gif',
|
142 |
-
'Kingdom of Morocco' => 'morc.gif',
|
143 |
-
'Republic of Mozambique' => 'moza.gif',
|
144 |
-
'Republic of Mauritius' => 'mrts.gif',
|
145 |
-
'Union of Myanmar' => 'myan.gif',
|
146 |
-
'Republic of Namibia' => 'namb.gif',
|
147 |
-
'North Atlantic Treaty Organization' => 'nato.gif',
|
148 |
-
'Republic of Nauru' => 'naur.gif',
|
149 |
-
'Turkish Republic of Northern Cyprus' => 'ncyp.gif',
|
150 |
-
'Netherlands Antilles' => 'nean.gif',
|
151 |
-
'Kingdom of Nepal' => 'nepa.gif',
|
152 |
-
'Kingdom of the Netherlands' => 'neth.gif',
|
153 |
-
'Territory of Norfolk Island' => 'nfis.gif',
|
154 |
-
'Federal Republic of Nigeria' => 'ngra.gif',
|
155 |
-
'Republic of Nicaragua' => 'nica.gif',
|
156 |
-
'Republic of Niger' => 'nigr.gif',
|
157 |
-
'Niue' => 'niue.gif',
|
158 |
-
'Commonwealth of the Northern Mariana Islands' => 'nmar.gif',
|
159 |
-
'Province of Northern Ireland' => 'noir.gif',
|
160 |
-
'Nordic Council' => 'nord.gif',
|
161 |
-
'Kingdom of Norway' => 'norw.gif',
|
162 |
-
'Territory of New Caledonia and Dependencies' => 'nwca.gif',
|
163 |
-
'New Zealand' => 'nwze.gif',
|
164 |
-
'Organization of American States' => 'oast.gif',
|
165 |
-
'Organization of African Unity' => 'oaun.gif',
|
166 |
-
'International Olympic Committee' => 'olym.gif',
|
167 |
-
'Sultanate of Oman' => 'oman.gif',
|
168 |
-
'Organization of Petroleum Exporting Countries' => 'opec.gif',
|
169 |
-
'Islamic Republic of Pakistan' => 'paks.gif',
|
170 |
-
'Republic of Palau' => 'pala.gif',
|
171 |
-
'Independent State of Papua New Guinea' => 'pang.gif',
|
172 |
-
'Republic of Paraguay' => 'para.gif',
|
173 |
-
'Republic of the Philippines' => 'phil.gif',
|
174 |
-
'British Overseas Territory of the Pitcairn Islands' => 'piis.gif',
|
175 |
-
'Republic of Poland' => 'pola.gif',
|
176 |
-
'Republic of Portugal' => 'port.gif',
|
177 |
-
'Commonwealth of Puerto Rico' => 'purc.gif',
|
178 |
-
'State of Qatar' => 'qata.gif',
|
179 |
-
'Russian Federation' => 'russ.gif',
|
180 |
-
'Republic of Rwanda' => 'rwan.gif',
|
181 |
-
'Kingdom of Saudi Arabia' => 'saar.gif',
|
182 |
-
'Republic of San Marino' => 'sama.gif',
|
183 |
-
'Nordic Sami Conference' => 'sami.gif',
|
184 |
-
'Sark' => 'sark.gif',
|
185 |
-
'Scotland' => 'scot.gif',
|
186 |
-
'Principality of Seborga' => 'sebo.gif',
|
187 |
-
'Republic of Sierra Leone' => 'sile.gif',
|
188 |
-
'Republic of Singapore' => 'sing.gif',
|
189 |
-
'Republic of Korea' => 'skor.gif',
|
190 |
-
'Republic of Slovenia' => 'slva.gif',
|
191 |
-
'Somali Republic' => 'smla.gif',
|
192 |
-
'Republic of Somaliland' => 'smld.gif',
|
193 |
-
'Republic of South Africa' => 'soaf.gif',
|
194 |
-
'Solomon Islands' => 'sois.gif',
|
195 |
-
'Kingdom of Spain' => 'span.gif',
|
196 |
-
'Secretariat of the Pacific Community' => 'spco.gif',
|
197 |
-
'Democratic Socialist Republic of Sri Lanka' => 'srla.gif',
|
198 |
-
'Saint Lucia' => 'stlu.gif',
|
199 |
-
'Republic of the Sudan' => 'suda.gif',
|
200 |
-
'Republic of Suriname' => 'surn.gif',
|
201 |
-
'Slovak Republic' => 'svka.gif',
|
202 |
-
'Kingdom of Sweden' => 'swdn.gif',
|
203 |
-
'Swiss Confederation' => 'swit.gif',
|
204 |
-
'Syrian Arab Republic' => 'syra.gif',
|
205 |
-
'Kingdom of Swaziland' => 'szld.gif',
|
206 |
-
'Republic of China' => 'taiw.gif',
|
207 |
-
'Republic of Tajikistan' => 'tajk.gif',
|
208 |
-
'United Republic of Tanzania' => 'tanz.gif',
|
209 |
-
'Kingdom of Thailand' => 'thal.gif',
|
210 |
-
'Autonomous Region of Tibet' => 'tibe.gif',
|
211 |
-
'Turkmenistan' => 'tkst.gif',
|
212 |
-
'Togolese Republic' => 'togo.gif',
|
213 |
-
'Tokelau' => 'toke.gif',
|
214 |
-
'Kingdom of Tonga' => 'tong.gif',
|
215 |
-
'Tristan da Cunha' => 'trdc.gif',
|
216 |
-
'Tromelin' => 'tris.gif',
|
217 |
-
'Republic of Tunisia' => 'tuns.gif',
|
218 |
-
'Republic of Turkey' => 'turk.gif',
|
219 |
-
'Tuvalu' => 'tuva.gif',
|
220 |
-
'United Arab Emirates' => 'uaem.gif',
|
221 |
-
'Republic of Uganda' => 'ugan.gif',
|
222 |
-
'Ukraine' => 'ukrn.gif',
|
223 |
-
'United Kingdom of Great Britain' => 'unkg.gif',
|
224 |
-
'United Nations' => 'unna.gif',
|
225 |
-
'United States of America' => 'unst.gif',
|
226 |
-
'Oriental Republic of Uruguay' => 'urgy.gif',
|
227 |
-
'Virgin Islands of the United States' => 'usvs.gif',
|
228 |
-
'Republic of Uzbekistan' => 'uzbk.gif',
|
229 |
-
'State of the Vatican City' => 'vacy.gif',
|
230 |
-
'Republic of Vanuatu' => 'vant.gif',
|
231 |
-
'Bolivarian Republic of Venezuela' => 'venz.gif',
|
232 |
-
'Republic of Yemen' => 'yemn.gif',
|
233 |
-
'Democratic Republic of Congo' => 'zare.gif',
|
234 |
-
'Republic of Zimbabwe' => 'zbwe.gif'
|
235 |
-
) ;
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/fonts/DejaVuSans.ttf
DELETED
Binary file
|
include/src/fonts/FF_FONT0-Bold.gdf
DELETED
Binary file
|
include/src/fonts/FF_FONT0.gdf
DELETED
Binary file
|
include/src/fonts/FF_FONT1-Bold.gdf
DELETED
Binary file
|
include/src/fonts/FF_FONT1.gdf
DELETED
Binary file
|
include/src/fonts/FF_FONT2-Bold.gdf
DELETED
Binary file
|
include/src/fonts/FF_FONT2.gdf
DELETED
Binary file
|
include/src/gd_image.inc.php
DELETED
@@ -1,2304 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: GD_IMAGE.INC.PHP
|
4 |
-
// Description: PHP Graph Plotting library. Low level image drawing routines
|
5 |
-
// Created: 2001-01-08, refactored 2008-03-29
|
6 |
-
// Ver: $Id: gd_image.inc.php 1922 2010-01-11 11:42:50Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
require_once 'jpgraph_rgb.inc.php';
|
12 |
-
require_once 'jpgraph_ttf.inc.php';
|
13 |
-
require_once 'imageSmoothArc.php';
|
14 |
-
|
15 |
-
// Line styles
|
16 |
-
define('LINESTYLE_SOLID',1);
|
17 |
-
define('LINESTYLE_DOTTED',2);
|
18 |
-
define('LINESTYLE_DASHED',3);
|
19 |
-
define('LINESTYLE_LONGDASH',4);
|
20 |
-
|
21 |
-
// The DEFAULT_GFORMAT sets the default graphic encoding format, i.e.
|
22 |
-
// PNG, JPG or GIF depending on what is installed on the target system
|
23 |
-
// in that order.
|
24 |
-
if( !DEFINED("DEFAULT_GFORMAT") ) {
|
25 |
-
define("DEFAULT_GFORMAT","auto");
|
26 |
-
}
|
27 |
-
|
28 |
-
//========================================================================
|
29 |
-
// CLASS Image
|
30 |
-
// Description: The very coor image drawing class that encapsulates all
|
31 |
-
// calls to the GD library
|
32 |
-
// Note: The class used by the library is the decendant
|
33 |
-
// class RotImage which extends the Image class with transparent
|
34 |
-
// rotation.
|
35 |
-
//=========================================================================
|
36 |
-
class Image {
|
37 |
-
public $img=null;
|
38 |
-
public $rgb=null;
|
39 |
-
public $img_format;
|
40 |
-
public $ttf=null;
|
41 |
-
public $line_style=LINESTYLE_SOLID;
|
42 |
-
public $current_color,$current_color_name;
|
43 |
-
public $original_width=0, $original_height=0;
|
44 |
-
public $plotwidth=0,$plotheight=0;
|
45 |
-
|
46 |
-
// for __get, __set
|
47 |
-
private $_left_margin=30,$_right_margin=30,$_top_margin=20,$_bottom_margin=30;
|
48 |
-
//private $_plotwidth=0,$_plotheight=0;
|
49 |
-
private $_width=0, $_height=0;
|
50 |
-
private $_line_weight=1;
|
51 |
-
|
52 |
-
protected $expired=true;
|
53 |
-
protected $lastx=0, $lasty=0;
|
54 |
-
protected $obs_list=array();
|
55 |
-
protected $font_size=12,$font_family=FF_DEFAULT, $font_style=FS_NORMAL;
|
56 |
-
protected $font_file='';
|
57 |
-
protected $text_halign="left",$text_valign="bottom";
|
58 |
-
protected $use_anti_aliasing=false;
|
59 |
-
protected $quality=null;
|
60 |
-
protected $colorstack=array(),$colorstackidx=0;
|
61 |
-
protected $canvascolor = 'white' ;
|
62 |
-
protected $langconv = null ;
|
63 |
-
protected $iInterlace=false;
|
64 |
-
protected $bbox_cache = array(); // STore the last found tetx bounding box
|
65 |
-
protected $ff_font0;
|
66 |
-
protected $ff_font0_bold;
|
67 |
-
protected $ff_font1;
|
68 |
-
protected $ff_font1_bold;
|
69 |
-
protected $ff_font2;
|
70 |
-
protected $ff_font2_bold;
|
71 |
-
|
72 |
-
|
73 |
-
//---------------
|
74 |
-
// CONSTRUCTOR
|
75 |
-
function __construct($aWidth=0,$aHeight=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) {
|
76 |
-
|
77 |
-
$this->original_width = $aWidth;
|
78 |
-
$this->original_height = $aHeight;
|
79 |
-
$this->CreateImgCanvas($aWidth, $aHeight);
|
80 |
-
|
81 |
-
if( $aSetAutoMargin ) {
|
82 |
-
$this->SetAutoMargin();
|
83 |
-
}
|
84 |
-
|
85 |
-
if( !$this->SetImgFormat($aFormat) ) {
|
86 |
-
JpGraphError::RaiseL(25081,$aFormat);//("JpGraph: Selected graphic format is either not supported or unknown [$aFormat]");
|
87 |
-
}
|
88 |
-
$this->ttf = new TTF();
|
89 |
-
$this->langconv = new LanguageConv();
|
90 |
-
|
91 |
-
$this->ff_font0 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT0.gdf");
|
92 |
-
$this->ff_font1 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1.gdf");
|
93 |
-
$this->ff_font2 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2.gdf");
|
94 |
-
$this->ff_font1_bold = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1-Bold.gdf");
|
95 |
-
$this->ff_font2_bold = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2-Bold.gdf");
|
96 |
-
}
|
97 |
-
|
98 |
-
// Enable interlacing in images
|
99 |
-
function SetInterlace($aFlg=true) {
|
100 |
-
$this->iInterlace=$aFlg;
|
101 |
-
}
|
102 |
-
|
103 |
-
// Should we use anti-aliasing. Note: This really slows down graphics!
|
104 |
-
function SetAntiAliasing($aFlg=true) {
|
105 |
-
$this->use_anti_aliasing = $aFlg;
|
106 |
-
if( function_exists('imageantialias') ) {
|
107 |
-
imageantialias($this->img,$aFlg);
|
108 |
-
}
|
109 |
-
else {
|
110 |
-
JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.')
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
function GetAntiAliasing() {
|
115 |
-
return $this->use_anti_aliasing ;
|
116 |
-
}
|
117 |
-
|
118 |
-
function CreateRawCanvas($aWidth=0,$aHeight=0) {
|
119 |
-
|
120 |
-
$aWidth *= SUPERSAMPLING_SCALE;
|
121 |
-
$aHeight *= SUPERSAMPLING_SCALE;
|
122 |
-
|
123 |
-
if( $aWidth <= 1 || $aHeight <= 1 ) {
|
124 |
-
JpGraphError::RaiseL(25082,$aWidth,$aHeight);//("Illegal sizes specified for width or height when creating an image, (width=$aWidth, height=$aHeight)");
|
125 |
-
}
|
126 |
-
|
127 |
-
$this->img = @imagecreatetruecolor($aWidth, $aHeight);
|
128 |
-
if( $this->img < 1 ) {
|
129 |
-
JpGraphError::RaiseL(25126);
|
130 |
-
//die("Can't create truecolor image. Check that you really have GD2 library installed.");
|
131 |
-
}
|
132 |
-
$this->SetAlphaBlending();
|
133 |
-
|
134 |
-
if( $this->iInterlace ) {
|
135 |
-
imageinterlace($this->img,1);
|
136 |
-
}
|
137 |
-
if( $this->rgb != null ) {
|
138 |
-
$this->rgb->img = $this->img ;
|
139 |
-
}
|
140 |
-
else {
|
141 |
-
$this->rgb = new RGB($this->img);
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
function CloneCanvasH() {
|
146 |
-
$oldimage = $this->img;
|
147 |
-
$this->CreateRawCanvas($this->width,$this->height);
|
148 |
-
imagecopy($this->img,$oldimage,0,0,0,0,$this->width,$this->height);
|
149 |
-
return $oldimage;
|
150 |
-
}
|
151 |
-
|
152 |
-
function CreateImgCanvas($aWidth=0,$aHeight=0) {
|
153 |
-
|
154 |
-
$old = array($this->img,$this->width,$this->height);
|
155 |
-
|
156 |
-
$aWidth = round($aWidth);
|
157 |
-
$aHeight = round($aHeight);
|
158 |
-
|
159 |
-
$this->width=$aWidth;
|
160 |
-
$this->height=$aHeight;
|
161 |
-
|
162 |
-
|
163 |
-
if( $aWidth==0 || $aHeight==0 ) {
|
164 |
-
// We will set the final size later.
|
165 |
-
// Note: The size must be specified before any other
|
166 |
-
// img routines that stroke anything are called.
|
167 |
-
$this->img = null;
|
168 |
-
$this->rgb = null;
|
169 |
-
return $old;
|
170 |
-
}
|
171 |
-
|
172 |
-
$this->CreateRawCanvas($aWidth,$aHeight);
|
173 |
-
// Set canvas color (will also be the background color for a
|
174 |
-
// a pallett image
|
175 |
-
$this->SetColor($this->canvascolor);
|
176 |
-
$this->FilledRectangle(0,0,$this->width-1,$this->height-1);
|
177 |
-
|
178 |
-
return $old ;
|
179 |
-
}
|
180 |
-
|
181 |
-
function CopyCanvasH($aToHdl,$aFromHdl,$aToX,$aToY,$aFromX,$aFromY,$aWidth,$aHeight,$aw=-1,$ah=-1) {
|
182 |
-
if( $aw === -1 ) {
|
183 |
-
$aw = $aWidth;
|
184 |
-
$ah = $aHeight;
|
185 |
-
$f = 'imagecopyresized';
|
186 |
-
}
|
187 |
-
else {
|
188 |
-
$f = 'imagecopyresampled';
|
189 |
-
}
|
190 |
-
$f($aToHdl,$aFromHdl,$aToX,$aToY,$aFromX,$aFromY, $aWidth,$aHeight,$aw,$ah);
|
191 |
-
}
|
192 |
-
|
193 |
-
function Copy($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1) {
|
194 |
-
$this->CopyCanvasH($this->img,$fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight);
|
195 |
-
}
|
196 |
-
|
197 |
-
function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) {
|
198 |
-
if( $aMix == 100 ) {
|
199 |
-
$this->CopyCanvasH($this->img,$fromImg,
|
200 |
-
$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight);
|
201 |
-
}
|
202 |
-
else {
|
203 |
-
if( ($fromWidth != -1 && ($fromWidth != $toWidth)) || ($fromHeight != -1 && ($fromHeight != $fromHeight)) ) {
|
204 |
-
// Create a new canvas that will hold the re-scaled original from image
|
205 |
-
if( $toWidth <= 1 || $toHeight <= 1 ) {
|
206 |
-
JpGraphError::RaiseL(25083);//('Illegal image size when copying image. Size for copied to image is 1 pixel or less.');
|
207 |
-
}
|
208 |
-
|
209 |
-
$tmpimg = @imagecreatetruecolor($toWidth, $toHeight);
|
210 |
-
|
211 |
-
if( $tmpimg < 1 ) {
|
212 |
-
JpGraphError::RaiseL(25084);//('Failed to create temporary GD canvas. Out of memory ?');
|
213 |
-
}
|
214 |
-
$this->CopyCanvasH($tmpimg,$fromImg,0,0,0,0,
|
215 |
-
$toWidth,$toHeight,$fromWidth,$fromHeight);
|
216 |
-
$fromImg = $tmpimg;
|
217 |
-
}
|
218 |
-
imagecopymerge($this->img,$fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$aMix);
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
static function GetWidth($aImg=null) {
|
223 |
-
if( $aImg === null ) {
|
224 |
-
$aImg = $this->img;
|
225 |
-
}
|
226 |
-
return imagesx($aImg);
|
227 |
-
}
|
228 |
-
|
229 |
-
static function GetHeight($aImg=null) {
|
230 |
-
if( $aImg === null ) {
|
231 |
-
$aImg = $this->img;
|
232 |
-
}
|
233 |
-
return imagesy($aImg);
|
234 |
-
}
|
235 |
-
|
236 |
-
static function CreateFromString($aStr) {
|
237 |
-
$img = imagecreatefromstring($aStr);
|
238 |
-
if( $img === false ) {
|
239 |
-
JpGraphError::RaiseL(25085);
|
240 |
-
//('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.');
|
241 |
-
}
|
242 |
-
return $img;
|
243 |
-
}
|
244 |
-
|
245 |
-
function SetCanvasH($aHdl) {
|
246 |
-
$this->img = $aHdl;
|
247 |
-
$this->rgb->img = $aHdl;
|
248 |
-
}
|
249 |
-
|
250 |
-
function SetCanvasColor($aColor) {
|
251 |
-
$this->canvascolor = $aColor ;
|
252 |
-
}
|
253 |
-
|
254 |
-
function SetAlphaBlending($aFlg=true) {
|
255 |
-
ImageAlphaBlending($this->img,$aFlg);
|
256 |
-
}
|
257 |
-
|
258 |
-
function SetAutoMargin() {
|
259 |
-
$min_bm=5;
|
260 |
-
$lm = min(40,$this->width/7);
|
261 |
-
$rm = min(20,$this->width/10);
|
262 |
-
$tm = max(5,$this->height/7);
|
263 |
-
$bm = max($min_bm,$this->height/6);
|
264 |
-
$this->SetMargin($lm,$rm,$tm,$bm);
|
265 |
-
}
|
266 |
-
|
267 |
-
//---------------
|
268 |
-
// PUBLIC METHODS
|
269 |
-
|
270 |
-
function SetFont($family,$style=FS_NORMAL,$size=10) {
|
271 |
-
$this->font_family=$family;
|
272 |
-
$this->font_style=$style;
|
273 |
-
$this->font_size=$size*SUPERSAMPLING_SCALE;
|
274 |
-
$this->font_file='';
|
275 |
-
if( ($this->font_family==FF_FONT1 || $this->font_family==FF_FONT2) && $this->font_style==FS_BOLD ){
|
276 |
-
++$this->font_family;
|
277 |
-
}
|
278 |
-
if( $this->font_family > FF_FONT2+1 ) { // A TTF font so get the font file
|
279 |
-
|
280 |
-
// Check that this PHP has support for TTF fonts
|
281 |
-
if( !function_exists('imagettfbbox') ) {
|
282 |
-
// use internal font when php is configured without '--with-ttf'
|
283 |
-
$this->font_family = FF_FONT1;
|
284 |
-
// JpGraphError::RaiseL(25087);//('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.');
|
285 |
-
} else {
|
286 |
-
$this->font_file = $this->ttf->File($this->font_family,$this->font_style);
|
287 |
-
}
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
// Get the specific height for a text string
|
292 |
-
function GetTextHeight($txt="",$angle=0) {
|
293 |
-
$tmp = preg_split('/\n/',$txt);
|
294 |
-
$n = count($tmp);
|
295 |
-
$m=0;
|
296 |
-
for($i=0; $i< $n; ++$i) {
|
297 |
-
$m = max($m,strlen($tmp[$i]));
|
298 |
-
}
|
299 |
-
|
300 |
-
if( $this->font_family <= FF_FONT2+1 ) {
|
301 |
-
if( $angle==0 ) {
|
302 |
-
$h = imagefontheight($this->font_family);
|
303 |
-
if( $h === false ) {
|
304 |
-
JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.');
|
305 |
-
}
|
306 |
-
|
307 |
-
return $n*$h;
|
308 |
-
}
|
309 |
-
else {
|
310 |
-
$w = @imagefontwidth($this->font_family);
|
311 |
-
if( $w === false ) {
|
312 |
-
JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.');
|
313 |
-
}
|
314 |
-
|
315 |
-
return $m*$w;
|
316 |
-
}
|
317 |
-
}
|
318 |
-
else {
|
319 |
-
$bbox = $this->GetTTFBBox($txt,$angle);
|
320 |
-
return $bbox[1]-$bbox[5]+1;
|
321 |
-
}
|
322 |
-
}
|
323 |
-
|
324 |
-
// Estimate font height
|
325 |
-
function GetFontHeight($angle=0) {
|
326 |
-
$txt = "XOMg";
|
327 |
-
return $this->GetTextHeight($txt,$angle);
|
328 |
-
}
|
329 |
-
|
330 |
-
// Approximate font width with width of letter "O"
|
331 |
-
function GetFontWidth($angle=0) {
|
332 |
-
$txt = 'O';
|
333 |
-
return $this->GetTextWidth($txt,$angle);
|
334 |
-
}
|
335 |
-
|
336 |
-
// Get actual width of text in absolute pixels. Note that the width is the
|
337 |
-
// texts projected with onto the x-axis. Call with angle=0 to get the true
|
338 |
-
// etxt width.
|
339 |
-
function GetTextWidth($txt,$angle=0) {
|
340 |
-
|
341 |
-
$tmp = preg_split('/\n/',$txt);
|
342 |
-
$n = count($tmp);
|
343 |
-
if( $this->font_family <= FF_FONT2+1 ) {
|
344 |
-
|
345 |
-
$m=0;
|
346 |
-
for($i=0; $i < $n; ++$i) {
|
347 |
-
$l=strlen($tmp[$i]);
|
348 |
-
if( $l > $m ) {
|
349 |
-
$m = $l;
|
350 |
-
}
|
351 |
-
}
|
352 |
-
|
353 |
-
if( $angle==0 ) {
|
354 |
-
$w = @imagefontwidth($this->font_family);
|
355 |
-
if( $w === false ) {
|
356 |
-
JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.');
|
357 |
-
}
|
358 |
-
return $m*$w;
|
359 |
-
}
|
360 |
-
else {
|
361 |
-
// 90 degrees internal so height becomes width
|
362 |
-
$h = @imagefontheight($this->font_family);
|
363 |
-
if( $h === false ) {
|
364 |
-
JpGraphError::RaiseL(25089);//('You have a misconfigured GD font support. The call to imagefontheight() fails.');
|
365 |
-
}
|
366 |
-
return $n*$h;
|
367 |
-
}
|
368 |
-
}
|
369 |
-
else {
|
370 |
-
// For TTF fonts we must walk through a lines and find the
|
371 |
-
// widest one which we use as the width of the multi-line
|
372 |
-
// paragraph
|
373 |
-
$m=0;
|
374 |
-
for( $i=0; $i < $n; ++$i ) {
|
375 |
-
$bbox = $this->GetTTFBBox($tmp[$i],$angle);
|
376 |
-
$mm = $bbox[2] - $bbox[0];
|
377 |
-
if( $mm > $m )
|
378 |
-
$m = $mm;
|
379 |
-
}
|
380 |
-
return $m;
|
381 |
-
}
|
382 |
-
}
|
383 |
-
|
384 |
-
|
385 |
-
// Draw text with a box around it
|
386 |
-
function StrokeBoxedText($x,$y,$txt,$dir=0,$fcolor="white",$bcolor="black",
|
387 |
-
$shadowcolor=false,$paragraph_align="left",
|
388 |
-
$xmarg=6,$ymarg=4,$cornerradius=0,$dropwidth=3) {
|
389 |
-
|
390 |
-
$oldx = $this->lastx;
|
391 |
-
$oldy = $this->lasty;
|
392 |
-
|
393 |
-
if( !is_numeric($dir) ) {
|
394 |
-
if( $dir=="h" ) $dir=0;
|
395 |
-
elseif( $dir=="v" ) $dir=90;
|
396 |
-
else JpGraphError::RaiseL(25090,$dir);//(" Unknown direction specified in call to StrokeBoxedText() [$dir]");
|
397 |
-
}
|
398 |
-
|
399 |
-
if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) {
|
400 |
-
$width=$this->GetTextWidth($txt,$dir) ;
|
401 |
-
$height=$this->GetTextHeight($txt,$dir) ;
|
402 |
-
}
|
403 |
-
else {
|
404 |
-
$width=$this->GetBBoxWidth($txt,$dir) ;
|
405 |
-
$height=$this->GetBBoxHeight($txt,$dir) ;
|
406 |
-
}
|
407 |
-
|
408 |
-
$height += 2*$ymarg;
|
409 |
-
$width += 2*$xmarg;
|
410 |
-
|
411 |
-
if( $this->text_halign=="right" ) $x -= $width;
|
412 |
-
elseif( $this->text_halign=="center" ) $x -= $width/2;
|
413 |
-
|
414 |
-
if( $this->text_valign=="bottom" ) $y -= $height;
|
415 |
-
elseif( $this->text_valign=="center" ) $y -= $height/2;
|
416 |
-
|
417 |
-
$olda = $this->SetAngle(0);
|
418 |
-
|
419 |
-
if( $shadowcolor ) {
|
420 |
-
$this->PushColor($shadowcolor);
|
421 |
-
$this->FilledRoundedRectangle($x-$xmarg+$dropwidth,$y-$ymarg+$dropwidth,
|
422 |
-
$x+$width+$dropwidth,$y+$height-$ymarg+$dropwidth,
|
423 |
-
$cornerradius);
|
424 |
-
$this->PopColor();
|
425 |
-
$this->PushColor($fcolor);
|
426 |
-
$this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg,
|
427 |
-
$x+$width,$y+$height-$ymarg,
|
428 |
-
$cornerradius);
|
429 |
-
$this->PopColor();
|
430 |
-
$this->PushColor($bcolor);
|
431 |
-
$this->RoundedRectangle($x-$xmarg,$y-$ymarg,
|
432 |
-
$x+$width,$y+$height-$ymarg,$cornerradius);
|
433 |
-
$this->PopColor();
|
434 |
-
}
|
435 |
-
else {
|
436 |
-
if( $fcolor ) {
|
437 |
-
$oc=$this->current_color;
|
438 |
-
$this->SetColor($fcolor);
|
439 |
-
$this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius);
|
440 |
-
$this->current_color=$oc;
|
441 |
-
}
|
442 |
-
if( $bcolor ) {
|
443 |
-
$oc=$this->current_color;
|
444 |
-
$this->SetColor($bcolor);
|
445 |
-
$this->RoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius);
|
446 |
-
$this->current_color=$oc;
|
447 |
-
}
|
448 |
-
}
|
449 |
-
|
450 |
-
$h=$this->text_halign;
|
451 |
-
$v=$this->text_valign;
|
452 |
-
$this->SetTextAlign("left","top");
|
453 |
-
|
454 |
-
$debug=false;
|
455 |
-
$this->StrokeText($x, $y, $txt, $dir, $paragraph_align,$debug);
|
456 |
-
|
457 |
-
$bb = array($x-$xmarg,$y+$height-$ymarg,$x+$width,$y+$height-$ymarg,
|
458 |
-
$x+$width,$y-$ymarg,$x-$xmarg,$y-$ymarg);
|
459 |
-
$this->SetTextAlign($h,$v);
|
460 |
-
|
461 |
-
$this->SetAngle($olda);
|
462 |
-
$this->lastx = $oldx;
|
463 |
-
$this->lasty = $oldy;
|
464 |
-
|
465 |
-
return $bb;
|
466 |
-
}
|
467 |
-
|
468 |
-
// Draw text with a box around it. This time the box will be rotated
|
469 |
-
// with the text. The previous method will just make a larger enough non-rotated
|
470 |
-
// box to hold the text inside.
|
471 |
-
function StrokeBoxedText2($x,$y,$txt,$dir=0,$fcolor="white",$bcolor="black",
|
472 |
-
$shadowcolor=false,$paragraph_align="left",
|
473 |
-
$xmarg=6,$ymarg=4,$cornerradius=0,$dropwidth=3) {
|
474 |
-
|
475 |
-
// This version of boxed text will stroke a rotated box round the text
|
476 |
-
// thta will follow the angle of the text.
|
477 |
-
// This has two implications:
|
478 |
-
// 1) This methos will only support TTF fonts
|
479 |
-
// 2) The only two alignment that makes sense are centered or baselined
|
480 |
-
|
481 |
-
if( $this->font_family <= FF_FONT2+1 ) {
|
482 |
-
JpGraphError::RaiseL(25131);//StrokeBoxedText2() Only support TTF fonts and not built in bitmap fonts
|
483 |
-
}
|
484 |
-
|
485 |
-
$oldx = $this->lastx;
|
486 |
-
$oldy = $this->lasty;
|
487 |
-
$dir = $this->NormAngle($dir);
|
488 |
-
|
489 |
-
if( !is_numeric($dir) ) {
|
490 |
-
if( $dir=="h" ) $dir=0;
|
491 |
-
elseif( $dir=="v" ) $dir=90;
|
492 |
-
else JpGraphError::RaiseL(25090,$dir);//(" Unknown direction specified in call to StrokeBoxedText() [$dir]");
|
493 |
-
}
|
494 |
-
|
495 |
-
$width=$this->GetTextWidth($txt,0) + 2*$xmarg;
|
496 |
-
$height=$this->GetTextHeight($txt,0) + 2*$ymarg ;
|
497 |
-
$rect_width=$this->GetBBoxWidth($txt,$dir) ;
|
498 |
-
$rect_height=$this->GetBBoxHeight($txt,$dir) ;
|
499 |
-
|
500 |
-
$baseline_offset = $this->bbox_cache[1]-1;
|
501 |
-
|
502 |
-
if( $this->text_halign=="center" ) {
|
503 |
-
if( $dir >= 0 && $dir <= 90 ) {
|
504 |
-
|
505 |
-
$x -= $rect_width/2;
|
506 |
-
$x += sin($dir*M_PI/180)*$height;
|
507 |
-
$y += $rect_height/2;
|
508 |
-
|
509 |
-
} elseif( $dir >= 270 && $dir <= 360 ) {
|
510 |
-
|
511 |
-
$x -= $rect_width/2;
|
512 |
-
$y -= $rect_height/2;
|
513 |
-
$y += cos($dir*M_PI/180)*$height;
|
514 |
-
|
515 |
-
} elseif( $dir >= 90 && $dir <= 180 ) {
|
516 |
-
|
517 |
-
$x += $rect_width/2;
|
518 |
-
$y += $rect_height/2;
|
519 |
-
$y += cos($dir*M_PI/180)*$height;
|
520 |
-
|
521 |
-
}
|
522 |
-
else {
|
523 |
-
// $dir > 180 && $dir < 270
|
524 |
-
$x += $rect_width/2;
|
525 |
-
$x += sin($dir*M_PI/180)*$height;
|
526 |
-
$y -= $rect_height/2;
|
527 |
-
}
|
528 |
-
}
|
529 |
-
|
530 |
-
// Rotate the box around this point
|
531 |
-
$this->SetCenter($x,$y);
|
532 |
-
$olda = $this->SetAngle(-$dir);
|
533 |
-
|
534 |
-
// We need to use adjusted coordinats for the box to be able
|
535 |
-
// to draw the box below the baseline. This cannot be done before since
|
536 |
-
// the rotating point must be the original x,y since that is arounbf the
|
537 |
-
// point where the text will rotate and we cannot change this since
|
538 |
-
// that is where the GD/GreeType will rotate the text
|
539 |
-
|
540 |
-
|
541 |
-
// For smaller <14pt font we need to do some additional
|
542 |
-
// adjustments to make it look good
|
543 |
-
if( $this->font_size < 14 ) {
|
544 |
-
$x -= 2;
|
545 |
-
$y += 2;
|
546 |
-
}
|
547 |
-
else {
|
548 |
-
// $y += $baseline_offset;
|
549 |
-
}
|
550 |
-
|
551 |
-
if( $shadowcolor ) {
|
552 |
-
$this->PushColor($shadowcolor);
|
553 |
-
$this->FilledRectangle($x-$xmarg+$dropwidth,$y+$ymarg+$dropwidth-$height,
|
554 |
-
$x+$width+$dropwidth,$y+$ymarg+$dropwidth);
|
555 |
-
//$cornerradius);
|
556 |
-
$this->PopColor();
|
557 |
-
$this->PushColor($fcolor);
|
558 |
-
$this->FilledRectangle($x-$xmarg, $y+$ymarg-$height,
|
559 |
-
$x+$width, $y+$ymarg);
|
560 |
-
//$cornerradius);
|
561 |
-
$this->PopColor();
|
562 |
-
$this->PushColor($bcolor);
|
563 |
-
$this->Rectangle($x-$xmarg,$y+$ymarg-$height,
|
564 |
-
$x+$width,$y+$ymarg);
|
565 |
-
//$cornerradius);
|
566 |
-
$this->PopColor();
|
567 |
-
}
|
568 |
-
else {
|
569 |
-
if( $fcolor ) {
|
570 |
-
$oc=$this->current_color;
|
571 |
-
$this->SetColor($fcolor);
|
572 |
-
$this->FilledRectangle($x-$xmarg,$y+$ymarg-$height,$x+$width,$y+$ymarg);//,$cornerradius);
|
573 |
-
$this->current_color=$oc;
|
574 |
-
}
|
575 |
-
if( $bcolor ) {
|
576 |
-
$oc=$this->current_color;
|
577 |
-
$this->SetColor($bcolor);
|
578 |
-
$this->Rectangle($x-$xmarg,$y+$ymarg-$height,$x+$width,$y+$ymarg);//,$cornerradius);
|
579 |
-
$this->current_color=$oc;
|
580 |
-
}
|
581 |
-
}
|
582 |
-
|
583 |
-
if( $this->font_size < 14 ) {
|
584 |
-
$x += 2;
|
585 |
-
$y -= 2;
|
586 |
-
}
|
587 |
-
else {
|
588 |
-
|
589 |
-
// Restore the original y before we stroke the text
|
590 |
-
// $y -= $baseline_offset;
|
591 |
-
|
592 |
-
}
|
593 |
-
|
594 |
-
$this->SetCenter(0,0);
|
595 |
-
$this->SetAngle($olda);
|
596 |
-
|
597 |
-
$h=$this->text_halign;
|
598 |
-
$v=$this->text_valign;
|
599 |
-
if( $this->text_halign == 'center') {
|
600 |
-
$this->SetTextAlign('center','basepoint');
|
601 |
-
}
|
602 |
-
else {
|
603 |
-
$this->SetTextAlign('basepoint','basepoint');
|
604 |
-
}
|
605 |
-
|
606 |
-
$debug=false;
|
607 |
-
$this->StrokeText($x, $y, $txt, $dir, $paragraph_align,$debug);
|
608 |
-
|
609 |
-
$bb = array($x-$xmarg, $y+$height-$ymarg,
|
610 |
-
$x+$width, $y+$height-$ymarg,
|
611 |
-
$x+$width, $y-$ymarg,
|
612 |
-
$x-$xmarg, $y-$ymarg);
|
613 |
-
|
614 |
-
$this->SetTextAlign($h,$v);
|
615 |
-
$this->SetAngle($olda);
|
616 |
-
|
617 |
-
$this->lastx = $oldx;
|
618 |
-
$this->lasty = $oldy;
|
619 |
-
|
620 |
-
return $bb;
|
621 |
-
}
|
622 |
-
|
623 |
-
// Set text alignment
|
624 |
-
function SetTextAlign($halign,$valign="bottom") {
|
625 |
-
$this->text_halign=$halign;
|
626 |
-
$this->text_valign=$valign;
|
627 |
-
}
|
628 |
-
|
629 |
-
function _StrokeBuiltinFont($x,$y,$txt,$dir,$paragraph_align,&$aBoundingBox,$aDebug=false) {
|
630 |
-
|
631 |
-
if( is_numeric($dir) && $dir!=90 && $dir!=0)
|
632 |
-
JpGraphError::RaiseL(25091);//(" Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.");
|
633 |
-
|
634 |
-
$h=$this->GetTextHeight($txt);
|
635 |
-
$fh=$this->GetFontHeight();
|
636 |
-
$w=$this->GetTextWidth($txt);
|
637 |
-
|
638 |
-
if( $this->text_halign=="right") {
|
639 |
-
$x -= $dir==0 ? $w : $h;
|
640 |
-
}
|
641 |
-
elseif( $this->text_halign=="center" ) {
|
642 |
-
// For center we subtract 1 pixel since this makes the middle
|
643 |
-
// be prefectly in the middle
|
644 |
-
$x -= $dir==0 ? $w/2-1 : $h/2;
|
645 |
-
}
|
646 |
-
if( $this->text_valign=="top" ) {
|
647 |
-
$y += $dir==0 ? $h : $w;
|
648 |
-
}
|
649 |
-
elseif( $this->text_valign=="center" ) {
|
650 |
-
$y += $dir==0 ? $h/2 : $w/2;
|
651 |
-
}
|
652 |
-
|
653 |
-
$use_font = $this->font_family;
|
654 |
-
|
655 |
-
if( $dir==90 ) {
|
656 |
-
imagestringup($this->img,$use_font,$x,$y,$txt,$this->current_color);
|
657 |
-
$aBoundingBox = array(round($x),round($y),round($x),round($y-$w),round($x+$h),round($y-$w),round($x+$h),round($y));
|
658 |
-
if( $aDebug ) {
|
659 |
-
// Draw bounding box
|
660 |
-
$this->PushColor('green');
|
661 |
-
$this->Polygon($aBoundingBox,true);
|
662 |
-
$this->PopColor();
|
663 |
-
}
|
664 |
-
}
|
665 |
-
else {
|
666 |
-
if( preg_match('/\n/',$txt) ) {
|
667 |
-
$tmp = preg_split('/\n/',$txt);
|
668 |
-
for($i=0; $i < count($tmp); ++$i) {
|
669 |
-
$w1 = $this->GetTextWidth($tmp[$i]);
|
670 |
-
if( $paragraph_align=="left" ) {
|
671 |
-
imagestring($this->img,$use_font,$x,$y-$h+1+$i*$fh,$tmp[$i],$this->current_color);
|
672 |
-
}
|
673 |
-
elseif( $paragraph_align=="right" ) {
|
674 |
-
imagestring($this->img,$use_font,$x+($w-$w1),$y-$h+1+$i*$fh,$tmp[$i],$this->current_color);
|
675 |
-
}
|
676 |
-
else {
|
677 |
-
imagestring($this->img,$use_font,$x+$w/2-$w1/2,$y-$h+1+$i*$fh,$tmp[$i],$this->current_color);
|
678 |
-
}
|
679 |
-
}
|
680 |
-
}
|
681 |
-
else {
|
682 |
-
//Put the text
|
683 |
-
imagestring($this->img,$use_font,$x,$y-$h+1,$txt,$this->current_color);
|
684 |
-
}
|
685 |
-
if( $aDebug ) {
|
686 |
-
// Draw the bounding rectangle and the bounding box
|
687 |
-
$p1 = array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y));
|
688 |
-
|
689 |
-
// Draw bounding box
|
690 |
-
$this->PushColor('green');
|
691 |
-
$this->Polygon($p1,true);
|
692 |
-
$this->PopColor();
|
693 |
-
|
694 |
-
}
|
695 |
-
$aBoundingBox=array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y));
|
696 |
-
}
|
697 |
-
}
|
698 |
-
|
699 |
-
function AddTxtCR($aTxt) {
|
700 |
-
// If the user has just specified a '\n'
|
701 |
-
// instead of '\n\t' we have to add '\r' since
|
702 |
-
// the width will be too muchy otherwise since when
|
703 |
-
// we print we stroke the individually lines by hand.
|
704 |
-
$e = explode("\n",$aTxt);
|
705 |
-
$n = count($e);
|
706 |
-
for($i=0; $i<$n; ++$i) {
|
707 |
-
$e[$i]=str_replace("\r","",$e[$i]);
|
708 |
-
}
|
709 |
-
return implode("\n\r",$e);
|
710 |
-
}
|
711 |
-
|
712 |
-
function NormAngle($a) {
|
713 |
-
// Normalize angle in degrees
|
714 |
-
// Normalize angle to be between 0-360
|
715 |
-
while( $a > 360 )
|
716 |
-
$a -= 360;
|
717 |
-
while( $a < -360 )
|
718 |
-
$a += 360;
|
719 |
-
if( $a < 0 )
|
720 |
-
$a = 360 + $a;
|
721 |
-
return $a;
|
722 |
-
}
|
723 |
-
|
724 |
-
function imagettfbbox_fixed($size, $angle, $fontfile, $text) {
|
725 |
-
|
726 |
-
|
727 |
-
if( ! USE_LIBRARY_IMAGETTFBBOX ) {
|
728 |
-
|
729 |
-
$bbox = @imagettfbbox($size, $angle, $fontfile, $text);
|
730 |
-
if( $bbox === false ) {
|
731 |
-
JpGraphError::RaiseL(25092,$this->font_file);
|
732 |
-
//("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.");
|
733 |
-
}
|
734 |
-
$this->bbox_cache = $bbox;
|
735 |
-
return $bbox;
|
736 |
-
}
|
737 |
-
|
738 |
-
// The built in imagettfbbox is buggy for angles != 0 so
|
739 |
-
// we calculate this manually by getting the bounding box at
|
740 |
-
// angle = 0 and then rotate the bounding box manually
|
741 |
-
$bbox = @imagettfbbox($size, 0, $fontfile, $text);
|
742 |
-
if( $bbox === false ) {
|
743 |
-
JpGraphError::RaiseL(25092,$this->font_file);
|
744 |
-
//("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.");
|
745 |
-
}
|
746 |
-
|
747 |
-
$angle = $this->NormAngle($angle);
|
748 |
-
|
749 |
-
$a = $angle*M_PI/180;
|
750 |
-
$ca = cos($a);
|
751 |
-
$sa = sin($a);
|
752 |
-
$ret = array();
|
753 |
-
|
754 |
-
// We always add 1 pixel to the left since the left edge of the bounding
|
755 |
-
// box is sometimes coinciding with the first pixel of the text
|
756 |
-
//$bbox[0] -= 1;
|
757 |
-
//$bbox[6] -= 1;
|
758 |
-
|
759 |
-
// For roatated text we need to add extra width for rotated
|
760 |
-
// text since the kerning and stroking of the TTF is not the same as for
|
761 |
-
// text at a 0 degree angle
|
762 |
-
|
763 |
-
if( $angle > 0.001 && abs($angle-360) > 0.001 ) {
|
764 |
-
$h = abs($bbox[7]-$bbox[1]);
|
765 |
-
$w = abs($bbox[2]-$bbox[0]);
|
766 |
-
|
767 |
-
$bbox[0] -= 2;
|
768 |
-
$bbox[6] -= 2;
|
769 |
-
// The width is underestimated so compensate for that
|
770 |
-
$bbox[2] += round($w*0.06);
|
771 |
-
$bbox[4] += round($w*0.06);
|
772 |
-
|
773 |
-
// and we also need to compensate with increased height
|
774 |
-
$bbox[5] -= round($h*0.1);
|
775 |
-
$bbox[7] -= round($h*0.1);
|
776 |
-
|
777 |
-
if( $angle > 90 ) {
|
778 |
-
// For angles > 90 we also need to extend the height further down
|
779 |
-
// by the baseline since that is also one more problem
|
780 |
-
$bbox[1] += round($h*0.15);
|
781 |
-
$bbox[3] += round($h*0.15);
|
782 |
-
|
783 |
-
// and also make it slighty less height
|
784 |
-
$bbox[7] += round($h*0.05);
|
785 |
-
$bbox[5] += round($h*0.05);
|
786 |
-
|
787 |
-
// And we need to move the box slightly top the rright (from a tetx perspective)
|
788 |
-
$bbox[0] += round($w*0.02);
|
789 |
-
$bbox[6] += round($w*0.02);
|
790 |
-
|
791 |
-
if( $angle > 180 ) {
|
792 |
-
// And we need to move the box slightly to the left (from a text perspective)
|
793 |
-
$bbox[0] -= round($w*0.02);
|
794 |
-
$bbox[6] -= round($w*0.02);
|
795 |
-
$bbox[2] -= round($w*0.02);
|
796 |
-
$bbox[4] -= round($w*0.02);
|
797 |
-
|
798 |
-
}
|
799 |
-
|
800 |
-
}
|
801 |
-
for($i = 0; $i < 7; $i += 2) {
|
802 |
-
$ret[$i] = round($bbox[$i] * $ca + $bbox[$i+1] * $sa);
|
803 |
-
$ret[$i+1] = round($bbox[$i+1] * $ca - $bbox[$i] * $sa);
|
804 |
-
}
|
805 |
-
$this->bbox_cache = $ret;
|
806 |
-
return $ret;
|
807 |
-
}
|
808 |
-
else {
|
809 |
-
$this->bbox_cache = $bbox;
|
810 |
-
return $bbox;
|
811 |
-
}
|
812 |
-
}
|
813 |
-
|
814 |
-
// Deprecated
|
815 |
-
function GetTTFBBox($aTxt,$aAngle=0) {
|
816 |
-
$bbox = $this->imagettfbbox_fixed($this->font_size,$aAngle,$this->font_file,$aTxt);
|
817 |
-
return $bbox;
|
818 |
-
}
|
819 |
-
|
820 |
-
function GetBBoxTTF($aTxt,$aAngle=0) {
|
821 |
-
// Normalize the bounding box to become a minimum
|
822 |
-
// enscribing rectangle
|
823 |
-
|
824 |
-
$aTxt = $this->AddTxtCR($aTxt);
|
825 |
-
|
826 |
-
if( !is_readable($this->font_file) ) {
|
827 |
-
JpGraphError::RaiseL(25093,$this->font_file);
|
828 |
-
//('Can not read font file ('.$this->font_file.') in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.');
|
829 |
-
}
|
830 |
-
$bbox = $this->imagettfbbox_fixed($this->font_size,$aAngle,$this->font_file,$aTxt);
|
831 |
-
|
832 |
-
if( $aAngle==0 ) return $bbox;
|
833 |
-
|
834 |
-
if( $aAngle >= 0 ) {
|
835 |
-
if( $aAngle <= 90 ) { //<=0
|
836 |
-
$bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1],
|
837 |
-
$bbox[2],$bbox[5],$bbox[6],$bbox[5]);
|
838 |
-
}
|
839 |
-
elseif( $aAngle <= 180 ) { //<= 2
|
840 |
-
$bbox = array($bbox[4],$bbox[7],$bbox[0],$bbox[7],
|
841 |
-
$bbox[0],$bbox[3],$bbox[4],$bbox[3]);
|
842 |
-
}
|
843 |
-
elseif( $aAngle <= 270 ) { //<= 3
|
844 |
-
$bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5],
|
845 |
-
$bbox[6],$bbox[1],$bbox[2],$bbox[1]);
|
846 |
-
}
|
847 |
-
else {
|
848 |
-
$bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3],
|
849 |
-
$bbox[4],$bbox[7],$bbox[0],$bbox[7]);
|
850 |
-
}
|
851 |
-
}
|
852 |
-
elseif( $aAngle < 0 ) {
|
853 |
-
if( $aAngle <= -270 ) { // <= -3
|
854 |
-
$bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1],
|
855 |
-
$bbox[2],$bbox[5],$bbox[6],$bbox[5]);
|
856 |
-
}
|
857 |
-
elseif( $aAngle <= -180 ) { // <= -2
|
858 |
-
$bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3],
|
859 |
-
$bbox[4],$bbox[7],$bbox[0],$bbox[7]);
|
860 |
-
}
|
861 |
-
elseif( $aAngle <= -90 ) { // <= -1
|
862 |
-
$bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5],
|
863 |
-
$bbox[6],$bbox[1],$bbox[2],$bbox[1]);
|
864 |
-
}
|
865 |
-
else {
|
866 |
-
$bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3],
|
867 |
-
$bbox[4],$bbox[7],$bbox[0],$bbox[7]);
|
868 |
-
}
|
869 |
-
}
|
870 |
-
return $bbox;
|
871 |
-
}
|
872 |
-
|
873 |
-
function GetBBoxHeight($aTxt,$aAngle=0) {
|
874 |
-
$box = $this->GetBBoxTTF($aTxt,$aAngle);
|
875 |
-
return abs($box[7]-$box[1]);
|
876 |
-
}
|
877 |
-
|
878 |
-
function GetBBoxWidth($aTxt,$aAngle=0) {
|
879 |
-
$box = $this->GetBBoxTTF($aTxt,$aAngle);
|
880 |
-
return $box[2]-$box[0]+1;
|
881 |
-
}
|
882 |
-
|
883 |
-
|
884 |
-
function _StrokeTTF($x,$y,$txt,$dir,$paragraph_align,&$aBoundingBox,$debug=false) {
|
885 |
-
|
886 |
-
// Setup default inter line margin for paragraphs to be
|
887 |
-
// 3% of the font height.
|
888 |
-
$ConstLineSpacing = 0.03 ;
|
889 |
-
|
890 |
-
// Remember the anchor point before adjustment
|
891 |
-
if( $debug ) {
|
892 |
-
$ox=$x;
|
893 |
-
$oy=$y;
|
894 |
-
}
|
895 |
-
|
896 |
-
if( !preg_match('/\n/',$txt) || ($dir>0 && preg_match('/\n/',$txt)) ) {
|
897 |
-
// Format a single line
|
898 |
-
|
899 |
-
$txt = $this->AddTxtCR($txt);
|
900 |
-
$bbox=$this->GetBBoxTTF($txt,$dir);
|
901 |
-
$width = $this->GetBBoxWidth($txt,$dir);
|
902 |
-
$height = $this->GetBBoxHeight($txt,$dir);
|
903 |
-
|
904 |
-
// The special alignment "basepoint" is mostly used internally
|
905 |
-
// in the library. This will put the anchor position at the left
|
906 |
-
// basepoint of the tetx. This is the default anchor point for
|
907 |
-
// TTF text.
|
908 |
-
|
909 |
-
if( $this->text_valign != 'basepoint' ) {
|
910 |
-
// Align x,y ot lower left corner of bbox
|
911 |
-
|
912 |
-
|
913 |
-
if( $this->text_halign=='right' ) {
|
914 |
-
$x -= $width;
|
915 |
-
$x -= $bbox[0];
|
916 |
-
}
|
917 |
-
elseif( $this->text_halign=='center' ) {
|
918 |
-
$x -= $width/2;
|
919 |
-
$x -= $bbox[0];
|
920 |
-
}
|
921 |
-
elseif( $this->text_halign=='baseline' ) {
|
922 |
-
// This is only support for text at 90 degree !!
|
923 |
-
// Do nothing the text is drawn at baseline by default
|
924 |
-
}
|
925 |
-
|
926 |
-
if( $this->text_valign=='top' ) {
|
927 |
-
$y -= $bbox[1]; // Adjust to bottom of text
|
928 |
-
$y += $height;
|
929 |
-
}
|
930 |
-
elseif( $this->text_valign=='center' ) {
|
931 |
-
$y -= $bbox[1]; // Adjust to bottom of text
|
932 |
-
$y += $height/2;
|
933 |
-
}
|
934 |
-
elseif( $this->text_valign=='baseline' ) {
|
935 |
-
// This is only support for text at 0 degree !!
|
936 |
-
// Do nothing the text is drawn at baseline by default
|
937 |
-
}
|
938 |
-
}
|
939 |
-
ImageTTFText ($this->img, $this->font_size, $dir, $x, $y,
|
940 |
-
$this->current_color,$this->font_file,$txt);
|
941 |
-
|
942 |
-
// Calculate and return the co-ordinates for the bounding box
|
943 |
-
$box = $this->imagettfbbox_fixed($this->font_size,$dir,$this->font_file,$txt);
|
944 |
-
$p1 = array();
|
945 |
-
|
946 |
-
for($i=0; $i < 4; ++$i) {
|
947 |
-
$p1[] = round($box[$i*2]+$x);
|
948 |
-
$p1[] = round($box[$i*2+1]+$y);
|
949 |
-
}
|
950 |
-
$aBoundingBox = $p1;
|
951 |
-
|
952 |
-
// Debugging code to highlight the bonding box and bounding rectangle
|
953 |
-
// For text at 0 degrees the bounding box and bounding rectangle are the
|
954 |
-
// same
|
955 |
-
if( $debug ) {
|
956 |
-
// Draw the bounding rectangle and the bounding box
|
957 |
-
|
958 |
-
$p = array();
|
959 |
-
$p1 = array();
|
960 |
-
|
961 |
-
for($i=0; $i < 4; ++$i) {
|
962 |
-
$p[] = $bbox[$i*2]+$x ;
|
963 |
-
$p[] = $bbox[$i*2+1]+$y;
|
964 |
-
$p1[] = $box[$i*2]+$x ;
|
965 |
-
$p1[] = $box[$i*2+1]+$y ;
|
966 |
-
}
|
967 |
-
|
968 |
-
// Draw bounding box
|
969 |
-
$this->PushColor('green');
|
970 |
-
$this->Polygon($p1,true);
|
971 |
-
$this->PopColor();
|
972 |
-
|
973 |
-
// Draw bounding rectangle
|
974 |
-
$this->PushColor('darkgreen');
|
975 |
-
$this->Polygon($p,true);
|
976 |
-
$this->PopColor();
|
977 |
-
|
978 |
-
// Draw a cross at the anchor point
|
979 |
-
$this->PushColor('red');
|
980 |
-
$this->Line($ox-15,$oy,$ox+15,$oy);
|
981 |
-
$this->Line($ox,$oy-15,$ox,$oy+15);
|
982 |
-
$this->PopColor();
|
983 |
-
}
|
984 |
-
}
|
985 |
-
else {
|
986 |
-
// Format a text paragraph
|
987 |
-
$fh=$this->GetFontHeight();
|
988 |
-
|
989 |
-
// Line margin is 25% of font height
|
990 |
-
$linemargin=round($fh*$ConstLineSpacing);
|
991 |
-
$fh += $linemargin;
|
992 |
-
$w=$this->GetTextWidth($txt);
|
993 |
-
|
994 |
-
$y -= $linemargin/2;
|
995 |
-
$tmp = preg_split('/\n/',$txt);
|
996 |
-
$nl = count($tmp);
|
997 |
-
$h = $nl * $fh;
|
998 |
-
|
999 |
-
if( $this->text_halign=='right') {
|
1000 |
-
$x -= $dir==0 ? $w : $h;
|
1001 |
-
}
|
1002 |
-
elseif( $this->text_halign=='center' ) {
|
1003 |
-
$x -= $dir==0 ? $w/2 : $h/2;
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
if( $this->text_valign=='top' ) {
|
1007 |
-
$y += $dir==0 ? $h : $w;
|
1008 |
-
}
|
1009 |
-
elseif( $this->text_valign=='center' ) {
|
1010 |
-
$y += $dir==0 ? $h/2 : $w/2;
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
// Here comes a tricky bit.
|
1014 |
-
// Since we have to give the position for the string at the
|
1015 |
-
// baseline this means thaht text will move slightly up
|
1016 |
-
// and down depending on any of it's character descend below
|
1017 |
-
// the baseline, for example a 'g'. To adjust the Y-position
|
1018 |
-
// we therefore adjust the text with the baseline Y-offset
|
1019 |
-
// as used for the current font and size. This will keep the
|
1020 |
-
// baseline at a fixed positoned disregarding the actual
|
1021 |
-
// characters in the string.
|
1022 |
-
$standardbox = $this->GetTTFBBox('Gg',$dir);
|
1023 |
-
$yadj = $standardbox[1];
|
1024 |
-
$xadj = $standardbox[0];
|
1025 |
-
$aBoundingBox = array();
|
1026 |
-
for($i=0; $i < $nl; ++$i) {
|
1027 |
-
$wl = $this->GetTextWidth($tmp[$i]);
|
1028 |
-
$bbox = $this->GetTTFBBox($tmp[$i],$dir);
|
1029 |
-
if( $paragraph_align=='left' ) {
|
1030 |
-
$xl = $x;
|
1031 |
-
}
|
1032 |
-
elseif( $paragraph_align=='right' ) {
|
1033 |
-
$xl = $x + ($w-$wl);
|
1034 |
-
}
|
1035 |
-
else {
|
1036 |
-
// Center
|
1037 |
-
$xl = $x + $w/2 - $wl/2 ;
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
// In theory we should adjust with full pre-lead to get the lines
|
1041 |
-
// lined up but this doesn't look good so therfore we only adjust with
|
1042 |
-
// half th pre-lead
|
1043 |
-
$xl -= $bbox[0]/2;
|
1044 |
-
$yl = $y - $yadj;
|
1045 |
-
//$xl = $xl- $xadj;
|
1046 |
-
ImageTTFText($this->img, $this->font_size, $dir, $xl, $yl-($h-$fh)+$fh*$i,
|
1047 |
-
$this->current_color,$this->font_file,$tmp[$i]);
|
1048 |
-
|
1049 |
-
// echo "xl=$xl,".$tmp[$i]." <br>";
|
1050 |
-
if( $debug ) {
|
1051 |
-
// Draw the bounding rectangle around each line
|
1052 |
-
$box=@ImageTTFBBox($this->font_size,$dir,$this->font_file,$tmp[$i]);
|
1053 |
-
$p = array();
|
1054 |
-
for($j=0; $j < 4; ++$j) {
|
1055 |
-
$p[] = $bbox[$j*2]+$xl;
|
1056 |
-
$p[] = $bbox[$j*2+1]+$yl-($h-$fh)+$fh*$i;
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
// Draw bounding rectangle
|
1060 |
-
$this->PushColor('darkgreen');
|
1061 |
-
$this->Polygon($p,true);
|
1062 |
-
$this->PopColor();
|
1063 |
-
}
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
// Get the bounding box
|
1067 |
-
$bbox = $this->GetBBoxTTF($txt,$dir);
|
1068 |
-
for($j=0; $j < 4; ++$j) {
|
1069 |
-
$bbox[$j*2]+= round($x);
|
1070 |
-
$bbox[$j*2+1]+= round($y - ($h-$fh) - $yadj);
|
1071 |
-
}
|
1072 |
-
$aBoundingBox = $bbox;
|
1073 |
-
|
1074 |
-
if( $debug ) {
|
1075 |
-
// Draw a cross at the anchor point
|
1076 |
-
$this->PushColor('red');
|
1077 |
-
$this->Line($ox-25,$oy,$ox+25,$oy);
|
1078 |
-
$this->Line($ox,$oy-25,$ox,$oy+25);
|
1079 |
-
$this->PopColor();
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
}
|
1083 |
-
}
|
1084 |
-
|
1085 |
-
function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) {
|
1086 |
-
|
1087 |
-
$x = round($x);
|
1088 |
-
$y = round($y);
|
1089 |
-
|
1090 |
-
// Do special language encoding
|
1091 |
-
$txt = $this->langconv->Convert($txt,$this->font_family);
|
1092 |
-
|
1093 |
-
if( !is_numeric($dir) ) {
|
1094 |
-
JpGraphError::RaiseL(25094);//(" Direction for text most be given as an angle between 0 and 90.");
|
1095 |
-
}
|
1096 |
-
|
1097 |
-
if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) {
|
1098 |
-
$this->_StrokeBuiltinFont($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug);
|
1099 |
-
}
|
1100 |
-
elseif( $this->font_family >= _FIRST_FONT && $this->font_family <= _LAST_FONT) {
|
1101 |
-
$this->_StrokeTTF($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug);
|
1102 |
-
}
|
1103 |
-
else {
|
1104 |
-
JpGraphError::RaiseL(25095);//(" Unknown font font family specification. ");
|
1105 |
-
}
|
1106 |
-
return $boundingbox;
|
1107 |
-
}
|
1108 |
-
|
1109 |
-
function SetMargin($lm,$rm,$tm,$bm) {
|
1110 |
-
|
1111 |
-
$this->left_margin=$lm;
|
1112 |
-
$this->right_margin=$rm;
|
1113 |
-
$this->top_margin=$tm;
|
1114 |
-
$this->bottom_margin=$bm;
|
1115 |
-
|
1116 |
-
$this->plotwidth = $this->width - $this->left_margin - $this->right_margin;
|
1117 |
-
$this->plotheight = $this->height - $this->top_margin - $this->bottom_margin;
|
1118 |
-
|
1119 |
-
if( $this->width > 0 && $this->height > 0 ) {
|
1120 |
-
if( $this->plotwidth < 0 || $this->plotheight < 0 ) {
|
1121 |
-
JpGraphError::RaiseL(25130, $this->plotwidth, $this->plotheight);
|
1122 |
-
//JpGraphError::raise("To small plot area. ($lm,$rm,$tm,$bm : $this->plotwidth x $this->plotheight). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.");
|
1123 |
-
}
|
1124 |
-
}
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
function SetTransparent($color) {
|
1128 |
-
imagecolortransparent ($this->img,$this->rgb->allocate($color));
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
function SetColor($color,$aAlpha=0) {
|
1132 |
-
$this->current_color_name = $color;
|
1133 |
-
$this->current_color=$this->rgb->allocate($color,$aAlpha);
|
1134 |
-
if( $this->current_color == -1 ) {
|
1135 |
-
$tc=imagecolorstotal($this->img);
|
1136 |
-
JpGraphError::RaiseL(25096);
|
1137 |
-
//("Can't allocate any more colors. Image has already allocated maximum of <b>$tc colors</b>. This might happen if you have anti-aliasing turned on together with a background image or perhaps gradient fill since this requires many, many colors. Try to turn off anti-aliasing. If there is still a problem try downgrading the quality of the background image to use a smaller pallete to leave some entries for your graphs. You should try to limit the number of colors in your background image to 64. If there is still problem set the constant DEFINE(\"USE_APPROX_COLORS\",true); in jpgraph.php This will use approximative colors when the palette is full. Unfortunately there is not much JpGraph can do about this since the palette size is a limitation of current graphic format and what the underlying GD library suppports.");
|
1138 |
-
}
|
1139 |
-
return $this->current_color;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
function PushColor($color) {
|
1143 |
-
if( $color != "" ) {
|
1144 |
-
$this->colorstack[$this->colorstackidx]=$this->current_color_name;
|
1145 |
-
$this->colorstack[$this->colorstackidx+1]=$this->current_color;
|
1146 |
-
$this->colorstackidx+=2;
|
1147 |
-
$this->SetColor($color);
|
1148 |
-
}
|
1149 |
-
else {
|
1150 |
-
JpGraphError::RaiseL(25097);//("Color specified as empty string in PushColor().");
|
1151 |
-
}
|
1152 |
-
}
|
1153 |
-
|
1154 |
-
function PopColor() {
|
1155 |
-
if( $this->colorstackidx < 1 ) {
|
1156 |
-
JpGraphError::RaiseL(25098);//(" Negative Color stack index. Unmatched call to PopColor()");
|
1157 |
-
}
|
1158 |
-
$this->current_color=$this->colorstack[--$this->colorstackidx];
|
1159 |
-
$this->current_color_name=$this->colorstack[--$this->colorstackidx];
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
|
1163 |
-
function SetLineWeight($weight) {
|
1164 |
-
$old = $this->line_weight;
|
1165 |
-
imagesetthickness($this->img,$weight);
|
1166 |
-
$this->line_weight = $weight;
|
1167 |
-
return $old;
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
function SetStartPoint($x,$y) {
|
1171 |
-
$this->lastx=round($x);
|
1172 |
-
$this->lasty=round($y);
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
function Arc($cx,$cy,$w,$h,$s,$e) {
|
1176 |
-
// GD Arc doesn't like negative angles
|
1177 |
-
while( $s < 0) $s += 360;
|
1178 |
-
while( $e < 0) $e += 360;
|
1179 |
-
imagearc($this->img,round($cx),round($cy),round($w),round($h),$s,$e,$this->current_color);
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
function FilledArc($xc,$yc,$w,$h,$s,$e,$style='') {
|
1183 |
-
$s = round($s);
|
1184 |
-
$e = round($e);
|
1185 |
-
while( $s < 0 ) $s += 360;
|
1186 |
-
while( $e < 0 ) $e += 360;
|
1187 |
-
if( $style=='' )
|
1188 |
-
$style=IMG_ARC_PIE;
|
1189 |
-
if( abs($s-$e) > 0 ) {
|
1190 |
-
imagefilledarc($this->img,round($xc),round($yc),round($w),round($h),$s,$e,$this->current_color,$style);
|
1191 |
-
// $this->DrawImageSmoothArc($this->img,round($xc),round($yc),round($w),round($h),$s,$e,$this->current_color,$style);
|
1192 |
-
}
|
1193 |
-
}
|
1194 |
-
|
1195 |
-
function FilledCakeSlice($cx,$cy,$w,$h,$s,$e) {
|
1196 |
-
$this->CakeSlice($cx,$cy,$w,$h,$s,$e,$this->current_color_name);
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
function CakeSlice($xc,$yc,$w,$h,$s,$e,$fillcolor="",$arccolor="") {
|
1200 |
-
$s = round($s); $e = round($e);
|
1201 |
-
$w = round($w); $h = round($h);
|
1202 |
-
$xc = round($xc); $yc = round($yc);
|
1203 |
-
if( $s == $e ) {
|
1204 |
-
// A full circle. We draw this a plain circle
|
1205 |
-
$this->PushColor($fillcolor);
|
1206 |
-
imagefilledellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color);
|
1207 |
-
|
1208 |
-
// If antialiasing is used then we often don't have any color no the surrounding
|
1209 |
-
// arc. So, we need to check for this special case so we don't send an empty
|
1210 |
-
// color to the push function. In this case we use the fill color for the arc as well
|
1211 |
-
if( $arccolor != '' ) {
|
1212 |
-
$this->PopColor();
|
1213 |
-
$this->PushColor($arccolor);
|
1214 |
-
}
|
1215 |
-
imageellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color);
|
1216 |
-
$this->Line($xc,$yc,cos($s*M_PI/180)*$w+$xc,$yc+sin($s*M_PI/180)*$h);
|
1217 |
-
$this->PopColor();
|
1218 |
-
}
|
1219 |
-
else {
|
1220 |
-
$this->PushColor($fillcolor);
|
1221 |
-
$this->FilledArc($xc,$yc,2*$w,2*$h,$s,$e);
|
1222 |
-
$this->PopColor();
|
1223 |
-
if( $arccolor != "" ) {
|
1224 |
-
$this->PushColor($arccolor);
|
1225 |
-
// We add 2 pixels to make the Arc() better aligned with
|
1226 |
-
// the filled arc.
|
1227 |
-
imagefilledarc($this->img,$xc,$yc,2*$w,2*$h,$s,$e,$this->current_color,IMG_ARC_NOFILL | IMG_ARC_EDGED ) ;
|
1228 |
-
$this->PopColor();
|
1229 |
-
}
|
1230 |
-
}
|
1231 |
-
}
|
1232 |
-
|
1233 |
-
function Ellipse($xc,$yc,$w,$h) {
|
1234 |
-
$this->Arc($xc,$yc,$w,$h,0,360);
|
1235 |
-
}
|
1236 |
-
|
1237 |
-
function Circle($xc,$yc,$r) {
|
1238 |
-
imageellipse($this->img,round($xc),round($yc),$r*2,$r*2,$this->current_color);
|
1239 |
-
// $this->DrawImageSmoothArc($this->img,round($xc),round($yc),$r*2+1,$r*2+1,0,360,$this->current_color);
|
1240 |
-
// $this->imageSmoothCircle($this->img, round($xc),round($yc), $r*2+1, $this->current_color);
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
function FilledCircle($xc,$yc,$r) {
|
1244 |
-
imagefilledellipse($this->img,round($xc),round($yc),2*$r,2*$r,$this->current_color);
|
1245 |
-
// $this->DrawImageSmoothArc($this->img, round($xc), round($yc), 2*$r, 2*$r, 0, 360, $this->current_color);
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
// Linear Color InterPolation
|
1249 |
-
function lip($f,$t,$p) {
|
1250 |
-
$p = round($p,1);
|
1251 |
-
$r = $f[0] + ($t[0]-$f[0])*$p;
|
1252 |
-
$g = $f[1] + ($t[1]-$f[1])*$p;
|
1253 |
-
$b = $f[2] + ($t[2]-$f[2])*$p;
|
1254 |
-
return array($r,$g,$b);
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
// Set line style dashed, dotted etc
|
1258 |
-
function SetLineStyle($s) {
|
1259 |
-
if( is_numeric($s) ) {
|
1260 |
-
if( $s<1 || $s>4 ) {
|
1261 |
-
JpGraphError::RaiseL(25101,$s);//(" Illegal numeric argument to SetLineStyle(): ($s)");
|
1262 |
-
}
|
1263 |
-
}
|
1264 |
-
elseif( is_string($s) ) {
|
1265 |
-
if( $s == "solid" ) $s=1;
|
1266 |
-
elseif( $s == "dotted" ) $s=2;
|
1267 |
-
elseif( $s == "dashed" ) $s=3;
|
1268 |
-
elseif( $s == "longdashed" ) $s=4;
|
1269 |
-
else {
|
1270 |
-
JpGraphError::RaiseL(25102,$s);//(" Illegal string argument to SetLineStyle(): $s");
|
1271 |
-
}
|
1272 |
-
}
|
1273 |
-
else {
|
1274 |
-
JpGraphError::RaiseL(25103,$s);//(" Illegal argument to SetLineStyle $s");
|
1275 |
-
}
|
1276 |
-
$old = $this->line_style;
|
1277 |
-
$this->line_style=$s;
|
1278 |
-
return $old;
|
1279 |
-
}
|
1280 |
-
|
1281 |
-
// Same as Line but take the line_style into account
|
1282 |
-
function StyleLine($x1,$y1,$x2,$y2,$aStyle='', $from_grid_class = false) {
|
1283 |
-
if( $this->line_weight <= 0 ) return;
|
1284 |
-
|
1285 |
-
if( $aStyle === '' ) {
|
1286 |
-
$aStyle = $this->line_style;
|
1287 |
-
}
|
1288 |
-
|
1289 |
-
$dashed_line_method = 'DashedLine';
|
1290 |
-
if ($from_grid_class) {
|
1291 |
-
$dashed_line_method = 'DashedLineForGrid';
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
// Add error check since dashed line will only work if anti-alias is disabled
|
1295 |
-
// this is a limitation in GD
|
1296 |
-
|
1297 |
-
if( $aStyle == 1 ) {
|
1298 |
-
// Solid style. We can handle anti-aliasing for this
|
1299 |
-
$this->Line($x1,$y1,$x2,$y2);
|
1300 |
-
}
|
1301 |
-
else {
|
1302 |
-
// Since the GD routines doesn't handle AA for styled line
|
1303 |
-
// we have no option than to turn it off to get any lines at
|
1304 |
-
// all if the weight > 1
|
1305 |
-
$oldaa = $this->GetAntiAliasing();
|
1306 |
-
if( $oldaa && $this->line_weight > 1 ) {
|
1307 |
-
$this->SetAntiAliasing(false);
|
1308 |
-
}
|
1309 |
-
|
1310 |
-
switch( $aStyle ) {
|
1311 |
-
case 2: // Dotted
|
1312 |
-
$this->$dashed_line_method($x1,$y1,$x2,$y2,2,6);
|
1313 |
-
break;
|
1314 |
-
case 3: // Dashed
|
1315 |
-
$this->$dashed_line_method($x1,$y1,$x2,$y2,5,9);
|
1316 |
-
break;
|
1317 |
-
case 4: // Longdashes
|
1318 |
-
$this->$dashed_line_method($x1,$y1,$x2,$y2,9,13);
|
1319 |
-
break;
|
1320 |
-
default:
|
1321 |
-
JpGraphError::RaiseL(25104,$this->line_style);//(" Unknown line style: $this->line_style ");
|
1322 |
-
break;
|
1323 |
-
}
|
1324 |
-
if( $oldaa ) {
|
1325 |
-
$this->SetAntiAliasing(true);
|
1326 |
-
}
|
1327 |
-
}
|
1328 |
-
}
|
1329 |
-
|
1330 |
-
function DashedLine($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) {
|
1331 |
-
|
1332 |
-
if( $this->line_weight <= 0 ) return;
|
1333 |
-
|
1334 |
-
// Add error check to make sure anti-alias is not enabled.
|
1335 |
-
// Dashed line does not work with anti-alias enabled. This
|
1336 |
-
// is a limitation in GD.
|
1337 |
-
if( $this->use_anti_aliasing ) {
|
1338 |
-
// JpGraphError::RaiseL(25129); // Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
$x1 = round($x1);
|
1342 |
-
$x2 = round($x2);
|
1343 |
-
$y1 = round($y1);
|
1344 |
-
$y2 = round($y2);
|
1345 |
-
|
1346 |
-
$dash_length *= SUPERSAMPLING_SCALE;
|
1347 |
-
$dash_space *= SUPERSAMPLING_SCALE;
|
1348 |
-
|
1349 |
-
$style = array_fill(0,$dash_length,$this->current_color);
|
1350 |
-
$style = array_pad($style,$dash_space,IMG_COLOR_TRANSPARENT);
|
1351 |
-
imagesetstyle($this->img, $style);
|
1352 |
-
imageline($this->img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);
|
1353 |
-
|
1354 |
-
$this->lastx = $x2;
|
1355 |
-
$this->lasty = $y2;
|
1356 |
-
}
|
1357 |
-
|
1358 |
-
function DashedLineForGrid($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) {
|
1359 |
-
|
1360 |
-
if( $this->line_weight <= 0 ) return;
|
1361 |
-
|
1362 |
-
// Add error check to make sure anti-alias is not enabled.
|
1363 |
-
// Dashed line does not work with anti-alias enabled. This
|
1364 |
-
// is a limitation in GD.
|
1365 |
-
if( $this->use_anti_aliasing ) {
|
1366 |
-
// JpGraphError::RaiseL(25129); // Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
$x1 = round($x1);
|
1370 |
-
$x2 = round($x2);
|
1371 |
-
$y1 = round($y1);
|
1372 |
-
$y2 = round($y2);
|
1373 |
-
|
1374 |
-
/*
|
1375 |
-
$dash_length *= $this->scale;
|
1376 |
-
$dash_space *= $this->scale;
|
1377 |
-
*/
|
1378 |
-
|
1379 |
-
$dash_length = 2;
|
1380 |
-
$dash_length = 4;
|
1381 |
-
imagesetthickness($this->img, 1);
|
1382 |
-
$style = array_fill(0,$dash_length, $this->current_color); //hexdec('CCCCCC'));
|
1383 |
-
$style = array_pad($style,$dash_space,IMG_COLOR_TRANSPARENT);
|
1384 |
-
imagesetstyle($this->img, $style);
|
1385 |
-
imageline($this->img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);
|
1386 |
-
|
1387 |
-
$this->lastx = $x2;
|
1388 |
-
$this->lasty = $y2;
|
1389 |
-
}
|
1390 |
-
|
1391 |
-
function Line($x1,$y1,$x2,$y2) {
|
1392 |
-
|
1393 |
-
if( $this->line_weight <= 0 ) return;
|
1394 |
-
|
1395 |
-
$x1 = round($x1);
|
1396 |
-
$x2 = round($x2);
|
1397 |
-
$y1 = round($y1);
|
1398 |
-
$y2 = round($y2);
|
1399 |
-
|
1400 |
-
imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color);
|
1401 |
-
// $this->DrawLine($this->img, $x1, $y1, $x2, $y2, $this->line_weight, $this->current_color);
|
1402 |
-
$this->lastx=$x2;
|
1403 |
-
$this->lasty=$y2;
|
1404 |
-
}
|
1405 |
-
|
1406 |
-
function Polygon($p,$closed=FALSE,$fast=FALSE) {
|
1407 |
-
|
1408 |
-
if( $this->line_weight <= 0 ) return;
|
1409 |
-
|
1410 |
-
$n=count($p);
|
1411 |
-
$oldx = $p[0];
|
1412 |
-
$oldy = $p[1];
|
1413 |
-
if( $fast ) {
|
1414 |
-
for( $i=2; $i < $n; $i+=2 ) {
|
1415 |
-
imageline($this->img,$oldx,$oldy,$p[$i],$p[$i+1],$this->current_color);
|
1416 |
-
$oldx = $p[$i];
|
1417 |
-
$oldy = $p[$i+1];
|
1418 |
-
}
|
1419 |
-
if( $closed ) {
|
1420 |
-
imageline($this->img,$p[$n*2-2],$p[$n*2-1],$p[0],$p[1],$this->current_color);
|
1421 |
-
}
|
1422 |
-
}
|
1423 |
-
else {
|
1424 |
-
for( $i=2; $i < $n; $i+=2 ) {
|
1425 |
-
$this->StyleLine($oldx,$oldy,$p[$i],$p[$i+1]);
|
1426 |
-
$oldx = $p[$i];
|
1427 |
-
$oldy = $p[$i+1];
|
1428 |
-
}
|
1429 |
-
if( $closed ) {
|
1430 |
-
$this->StyleLine($oldx,$oldy,$p[0],$p[1]);
|
1431 |
-
}
|
1432 |
-
}
|
1433 |
-
}
|
1434 |
-
|
1435 |
-
function FilledPolygon($pts) {
|
1436 |
-
$n=count($pts);
|
1437 |
-
if( $n == 0 ) {
|
1438 |
-
JpGraphError::RaiseL(25105);//('NULL data specified for a filled polygon. Check that your data is not NULL.');
|
1439 |
-
}
|
1440 |
-
for($i=0; $i < $n; ++$i) {
|
1441 |
-
$pts[$i] = round($pts[$i]);
|
1442 |
-
}
|
1443 |
-
$old = $this->line_weight;
|
1444 |
-
imagesetthickness($this->img,1);
|
1445 |
-
imagefilledpolygon($this->img,$pts,count($pts)/2,$this->current_color);
|
1446 |
-
$this->line_weight = $old;
|
1447 |
-
imagesetthickness($this->img,$old);
|
1448 |
-
}
|
1449 |
-
|
1450 |
-
function Rectangle($xl,$yu,$xr,$yl) {
|
1451 |
-
$this->Polygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl,$xl,$yu));
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
function FilledRectangle($xl,$yu,$xr,$yl) {
|
1455 |
-
$this->FilledPolygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl));
|
1456 |
-
}
|
1457 |
-
|
1458 |
-
function FilledRectangle2($xl,$yu,$xr,$yl,$color1,$color2,$style=1) {
|
1459 |
-
// Fill a rectangle with lines of two colors
|
1460 |
-
if( $style===1 ) {
|
1461 |
-
// Horizontal stripe
|
1462 |
-
if( $yl < $yu ) {
|
1463 |
-
$t = $yl; $yl=$yu; $yu=$t;
|
1464 |
-
}
|
1465 |
-
for( $y=$yu; $y <= $yl; ++$y) {
|
1466 |
-
$this->SetColor($color1);
|
1467 |
-
$this->Line($xl,$y,$xr,$y);
|
1468 |
-
++$y;
|
1469 |
-
$this->SetColor($color2);
|
1470 |
-
$this->Line($xl,$y,$xr,$y);
|
1471 |
-
}
|
1472 |
-
}
|
1473 |
-
else {
|
1474 |
-
if( $xl < $xl ) {
|
1475 |
-
$t = $xl; $xl=$xr; $xr=$t;
|
1476 |
-
}
|
1477 |
-
for( $x=$xl; $x <= $xr; ++$x) {
|
1478 |
-
$this->SetColor($color1);
|
1479 |
-
$this->Line($x,$yu,$x,$yl);
|
1480 |
-
++$x;
|
1481 |
-
$this->SetColor($color2);
|
1482 |
-
$this->Line($x,$yu,$x,$yl);
|
1483 |
-
}
|
1484 |
-
}
|
1485 |
-
}
|
1486 |
-
|
1487 |
-
function ShadowRectangle($xl,$yu,$xr,$yl,$fcolor=false,$shadow_width=4,$shadow_color='darkgray',$useAlpha=true) {
|
1488 |
-
// This is complicated by the fact that we must also handle the case where
|
1489 |
-
// the reactangle has no fill color
|
1490 |
-
$xl = floor($xl);
|
1491 |
-
$yu = floor($yu);
|
1492 |
-
$xr = floor($xr);
|
1493 |
-
$yl = floor($yl);
|
1494 |
-
$this->PushColor($shadow_color);
|
1495 |
-
$shadowAlpha=0;
|
1496 |
-
$this->SetLineWeight(1);
|
1497 |
-
$this->SetLineStyle('solid');
|
1498 |
-
$basecolor = $this->rgb->Color($shadow_color);
|
1499 |
-
$shadow_color = array($basecolor[0],$basecolor[1],$basecolor[2],);
|
1500 |
-
for( $i=0; $i < $shadow_width; ++$i ) {
|
1501 |
-
$this->SetColor($shadow_color,$shadowAlpha);
|
1502 |
-
$this->Line($xr-$shadow_width+$i, $yu+$shadow_width,
|
1503 |
-
$xr-$shadow_width+$i, $yl-$shadow_width-1+$i);
|
1504 |
-
$this->Line($xl+$shadow_width, $yl-$shadow_width+$i,
|
1505 |
-
$xr-$shadow_width+$i, $yl-$shadow_width+$i);
|
1506 |
-
if( $useAlpha ) $shadowAlpha += 1.0/$shadow_width;
|
1507 |
-
}
|
1508 |
-
|
1509 |
-
$this->PopColor();
|
1510 |
-
if( $fcolor==false ) {
|
1511 |
-
$this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1);
|
1512 |
-
}
|
1513 |
-
else {
|
1514 |
-
$this->PushColor($fcolor);
|
1515 |
-
$this->FilledRectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1);
|
1516 |
-
$this->PopColor();
|
1517 |
-
$this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1);
|
1518 |
-
}
|
1519 |
-
}
|
1520 |
-
|
1521 |
-
function FilledRoundedRectangle($xt,$yt,$xr,$yl,$r=5) {
|
1522 |
-
if( $r==0 ) {
|
1523 |
-
$this->FilledRectangle($xt,$yt,$xr,$yl);
|
1524 |
-
return;
|
1525 |
-
}
|
1526 |
-
|
1527 |
-
// To avoid overlapping fillings (which will look strange
|
1528 |
-
// when alphablending is enabled) we have no choice but
|
1529 |
-
// to fill the five distinct areas one by one.
|
1530 |
-
|
1531 |
-
// Center square
|
1532 |
-
$this->FilledRectangle($xt+$r,$yt+$r,$xr-$r,$yl-$r);
|
1533 |
-
// Top band
|
1534 |
-
$this->FilledRectangle($xt+$r,$yt,$xr-$r,$yt+$r);
|
1535 |
-
// Bottom band
|
1536 |
-
$this->FilledRectangle($xt+$r,$yl-$r,$xr-$r,$yl);
|
1537 |
-
// Left band
|
1538 |
-
$this->FilledRectangle($xt,$yt+$r,$xt+$r,$yl-$r);
|
1539 |
-
// Right band
|
1540 |
-
$this->FilledRectangle($xr-$r,$yt+$r,$xr,$yl-$r);
|
1541 |
-
|
1542 |
-
// Topleft & Topright arc
|
1543 |
-
$this->FilledArc($xt+$r,$yt+$r,$r*2,$r*2,180,270);
|
1544 |
-
$this->FilledArc($xr-$r,$yt+$r,$r*2,$r*2,270,360);
|
1545 |
-
|
1546 |
-
// Bottomleft & Bottom right arc
|
1547 |
-
$this->FilledArc($xt+$r,$yl-$r,$r*2,$r*2,90,180);
|
1548 |
-
$this->FilledArc($xr-$r,$yl-$r,$r*2,$r*2,0,90);
|
1549 |
-
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
function RoundedRectangle($xt,$yt,$xr,$yl,$r=5) {
|
1553 |
-
|
1554 |
-
if( $r==0 ) {
|
1555 |
-
$this->Rectangle($xt,$yt,$xr,$yl);
|
1556 |
-
return;
|
1557 |
-
}
|
1558 |
-
|
1559 |
-
// Top & Bottom line
|
1560 |
-
$this->Line($xt+$r,$yt,$xr-$r,$yt);
|
1561 |
-
$this->Line($xt+$r,$yl,$xr-$r,$yl);
|
1562 |
-
|
1563 |
-
// Left & Right line
|
1564 |
-
$this->Line($xt,$yt+$r,$xt,$yl-$r);
|
1565 |
-
$this->Line($xr,$yt+$r,$xr,$yl-$r);
|
1566 |
-
|
1567 |
-
// Topleft & Topright arc
|
1568 |
-
$this->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270);
|
1569 |
-
$this->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360);
|
1570 |
-
|
1571 |
-
// Bottomleft & Bottomright arc
|
1572 |
-
$this->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180);
|
1573 |
-
$this->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90);
|
1574 |
-
}
|
1575 |
-
|
1576 |
-
function FilledBevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='darkgray@0.4') {
|
1577 |
-
$this->FilledRectangle($x1,$y1,$x2,$y2);
|
1578 |
-
$this->Bevel($x1,$y1,$x2,$y2,$depth,$color1,$color2);
|
1579 |
-
}
|
1580 |
-
|
1581 |
-
function Bevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='black@0.5') {
|
1582 |
-
$this->PushColor($color1);
|
1583 |
-
for( $i=0; $i < $depth; ++$i ) {
|
1584 |
-
$this->Line($x1+$i,$y1+$i,$x1+$i,$y2-$i);
|
1585 |
-
$this->Line($x1+$i,$y1+$i,$x2-$i,$y1+$i);
|
1586 |
-
}
|
1587 |
-
$this->PopColor();
|
1588 |
-
|
1589 |
-
$this->PushColor($color2);
|
1590 |
-
for( $i=0; $i < $depth; ++$i ) {
|
1591 |
-
$this->Line($x1+$i,$y2-$i,$x2-$i,$y2-$i);
|
1592 |
-
$this->Line($x2-$i,$y1+$i,$x2-$i,$y2-$i-1);
|
1593 |
-
}
|
1594 |
-
$this->PopColor();
|
1595 |
-
}
|
1596 |
-
|
1597 |
-
function StyleLineTo($x,$y) {
|
1598 |
-
$this->StyleLine($this->lastx,$this->lasty,$x,$y);
|
1599 |
-
$this->lastx=$x;
|
1600 |
-
$this->lasty=$y;
|
1601 |
-
}
|
1602 |
-
|
1603 |
-
function LineTo($x,$y) {
|
1604 |
-
$this->Line($this->lastx,$this->lasty,$x,$y);
|
1605 |
-
$this->lastx=$x;
|
1606 |
-
$this->lasty=$y;
|
1607 |
-
}
|
1608 |
-
|
1609 |
-
function Point($x,$y) {
|
1610 |
-
imagesetpixel($this->img,round($x),round($y),$this->current_color);
|
1611 |
-
}
|
1612 |
-
|
1613 |
-
function Fill($x,$y) {
|
1614 |
-
imagefill($this->img,round($x),round($y),$this->current_color);
|
1615 |
-
}
|
1616 |
-
|
1617 |
-
function FillToBorder($x,$y,$aBordColor) {
|
1618 |
-
$bc = $this->rgb->allocate($aBordColor);
|
1619 |
-
if( $bc == -1 ) {
|
1620 |
-
JpGraphError::RaiseL(25106);//('Image::FillToBorder : Can not allocate more colors');
|
1621 |
-
}
|
1622 |
-
imagefilltoborder($this->img,round($x),round($y),$bc,$this->current_color);
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
function SetExpired($aFlg=true) {
|
1626 |
-
$this->expired = $aFlg;
|
1627 |
-
}
|
1628 |
-
|
1629 |
-
// Generate image header
|
1630 |
-
function Headers() {
|
1631 |
-
|
1632 |
-
// In case we are running from the command line with the client version of
|
1633 |
-
// PHP we can't send any headers.
|
1634 |
-
$sapi = php_sapi_name();
|
1635 |
-
if( $sapi == 'cli' ) return;
|
1636 |
-
|
1637 |
-
// These parameters are set by headers_sent() but they might cause
|
1638 |
-
// an undefined variable error unless they are initilized
|
1639 |
-
$file='';
|
1640 |
-
$lineno='';
|
1641 |
-
if( headers_sent($file,$lineno) ) {
|
1642 |
-
$file=basename($file);
|
1643 |
-
$t = new ErrMsgText();
|
1644 |
-
$msg = $t->Get(10,$file,$lineno);
|
1645 |
-
die($msg);
|
1646 |
-
}
|
1647 |
-
|
1648 |
-
if ($this->expired) {
|
1649 |
-
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
1650 |
-
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
|
1651 |
-
header("Cache-Control: no-cache, must-revalidate");
|
1652 |
-
header("Pragma: no-cache");
|
1653 |
-
}
|
1654 |
-
header("Content-type: image/$this->img_format");
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
// Adjust image quality for formats that allow this
|
1658 |
-
function SetQuality($q) {
|
1659 |
-
$this->quality = $q;
|
1660 |
-
}
|
1661 |
-
|
1662 |
-
// Stream image to browser or to file
|
1663 |
-
function Stream($aFile="") {
|
1664 |
-
$this->DoSupersampling();
|
1665 |
-
|
1666 |
-
$func="image".$this->img_format;
|
1667 |
-
if( $this->img_format=="jpeg" && $this->quality != null ) {
|
1668 |
-
$res = @$func($this->img,$aFile,$this->quality);
|
1669 |
-
}
|
1670 |
-
else {
|
1671 |
-
if( $aFile != "" ) {
|
1672 |
-
$res = @$func($this->img,$aFile);
|
1673 |
-
if( !$res ) {
|
1674 |
-
JpGraphError::RaiseL(25107,$aFile);//("Can't write to file '$aFile'. Check that the process running PHP has enough permission.");
|
1675 |
-
}
|
1676 |
-
}
|
1677 |
-
else {
|
1678 |
-
$res = @$func($this->img);
|
1679 |
-
if( !$res ) {
|
1680 |
-
JpGraphError::RaiseL(25108);//("Can't stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.");
|
1681 |
-
}
|
1682 |
-
|
1683 |
-
}
|
1684 |
-
}
|
1685 |
-
}
|
1686 |
-
|
1687 |
-
// Do SuperSampling using $scale
|
1688 |
-
function DoSupersampling() {
|
1689 |
-
if (SUPERSAMPLING_SCALE <= 1) {
|
1690 |
-
return $this->img;
|
1691 |
-
}
|
1692 |
-
|
1693 |
-
$dst_img = @imagecreatetruecolor($this->original_width, $this->original_height);
|
1694 |
-
imagecopyresampled($dst_img, $this->img, 0, 0, 0, 0, $this->original_width, $this->original_height, $this->width, $this->height);
|
1695 |
-
$this->Destroy();
|
1696 |
-
return $this->img = $dst_img;
|
1697 |
-
}
|
1698 |
-
|
1699 |
-
// Clear resources used by image (this is normally not used since all resources are/should be
|
1700 |
-
// returned when the script terminates
|
1701 |
-
function Destroy() {
|
1702 |
-
imagedestroy($this->img);
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
// Specify image format. Note depending on your installation
|
1706 |
-
// of PHP not all formats may be supported.
|
1707 |
-
function SetImgFormat($aFormat,$aQuality=75) {
|
1708 |
-
$this->quality = $aQuality;
|
1709 |
-
$aFormat = strtolower($aFormat);
|
1710 |
-
$tst = true;
|
1711 |
-
$supported = imagetypes();
|
1712 |
-
if( $aFormat=="auto" ) {
|
1713 |
-
if( $supported & IMG_PNG ) $this->img_format="png";
|
1714 |
-
elseif( $supported & IMG_JPG ) $this->img_format="jpeg";
|
1715 |
-
elseif( $supported & IMG_GIF ) $this->img_format="gif";
|
1716 |
-
elseif( $supported & IMG_WBMP ) $this->img_format="wbmp";
|
1717 |
-
elseif( $supported & IMG_XPM ) $this->img_format="xpm";
|
1718 |
-
else {
|
1719 |
-
JpGraphError::RaiseL(25109);//("Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.");
|
1720 |
-
}
|
1721 |
-
return true;
|
1722 |
-
}
|
1723 |
-
else {
|
1724 |
-
if( $aFormat=="jpeg" || $aFormat=="png" || $aFormat=="gif" ) {
|
1725 |
-
if( $aFormat=="jpeg" && !($supported & IMG_JPG) ) $tst=false;
|
1726 |
-
elseif( $aFormat=="png" && !($supported & IMG_PNG) ) $tst=false;
|
1727 |
-
elseif( $aFormat=="gif" && !($supported & IMG_GIF) ) $tst=false;
|
1728 |
-
elseif( $aFormat=="wbmp" && !($supported & IMG_WBMP) ) $tst=false;
|
1729 |
-
elseif( $aFormat=="xpm" && !($supported & IMG_XPM) ) $tst=false;
|
1730 |
-
else {
|
1731 |
-
$this->img_format=$aFormat;
|
1732 |
-
return true;
|
1733 |
-
}
|
1734 |
-
}
|
1735 |
-
else {
|
1736 |
-
$tst=false;
|
1737 |
-
}
|
1738 |
-
if( !$tst ) {
|
1739 |
-
JpGraphError::RaiseL(25110,$aFormat);//(" Your PHP installation does not support the chosen graphic format: $aFormat");
|
1740 |
-
}
|
1741 |
-
}
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
/**
|
1745 |
-
* Draw Line
|
1746 |
-
*/
|
1747 |
-
function DrawLine($im, $x1, $y1, $x2, $y2, $weight, $color) {
|
1748 |
-
if ($weight == 1) {
|
1749 |
-
return imageline($im,$x1,$y1,$x2,$y2,$color);
|
1750 |
-
}
|
1751 |
-
|
1752 |
-
$angle=(atan2(($y1 - $y2), ($x2 - $x1)));
|
1753 |
-
|
1754 |
-
$dist_x = $weight * (sin($angle)) / 2;
|
1755 |
-
$dist_y = $weight * (cos($angle)) / 2;
|
1756 |
-
|
1757 |
-
$p1x=ceil(($x1 + $dist_x));
|
1758 |
-
$p1y=ceil(($y1 + $dist_y));
|
1759 |
-
$p2x=ceil(($x2 + $dist_x));
|
1760 |
-
$p2y=ceil(($y2 + $dist_y));
|
1761 |
-
$p3x=ceil(($x2 - $dist_x));
|
1762 |
-
$p3y=ceil(($y2 - $dist_y));
|
1763 |
-
$p4x=ceil(($x1 - $dist_x));
|
1764 |
-
$p4y=ceil(($y1 - $dist_y));
|
1765 |
-
|
1766 |
-
$array=array($p1x,$p1y,$p2x,$p2y,$p3x,$p3y,$p4x,$p4y);
|
1767 |
-
imagefilledpolygon ( $im, $array, (count($array)/2), $color );
|
1768 |
-
|
1769 |
-
// for antialias
|
1770 |
-
imageline($im, $p1x, $p1y, $p2x, $p2y, $color);
|
1771 |
-
imageline($im, $p3x, $p3y, $p4x, $p4y, $color);
|
1772 |
-
return;
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
return imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color);
|
1777 |
-
$weight = 8;
|
1778 |
-
if ($weight <= 1) {
|
1779 |
-
return imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color);
|
1780 |
-
}
|
1781 |
-
|
1782 |
-
$pts = array();
|
1783 |
-
|
1784 |
-
$weight /= 2;
|
1785 |
-
|
1786 |
-
if ($y2 - $y1 == 0) {
|
1787 |
-
// x line
|
1788 |
-
$pts = array();
|
1789 |
-
$pts[] = $x1; $pts[] = $y1 - $weight;
|
1790 |
-
$pts[] = $x1; $pts[] = $y1 + $weight;
|
1791 |
-
$pts[] = $x2; $pts[] = $y2 + $weight;
|
1792 |
-
$pts[] = $x2; $pts[] = $y2 - $weight;
|
1793 |
-
|
1794 |
-
} elseif ($x2 - $x1 == 0) {
|
1795 |
-
// y line
|
1796 |
-
$pts = array();
|
1797 |
-
$pts[] = $x1 - $weight; $pts[] = $y1;
|
1798 |
-
$pts[] = $x1 + $weight; $pts[] = $y1;
|
1799 |
-
$pts[] = $x2 + $weight; $pts[] = $y2;
|
1800 |
-
$pts[] = $x2 - $weight; $pts[] = $y2;
|
1801 |
-
|
1802 |
-
} else {
|
1803 |
-
|
1804 |
-
var_dump($x1, $x2, $y1, $y2);
|
1805 |
-
$length = sqrt(pow($x2 - $x1, 2) + pow($y2 - $y1, 2));
|
1806 |
-
var_dump($length);exit;
|
1807 |
-
exit;
|
1808 |
-
|
1809 |
-
/*
|
1810 |
-
$lean = ($y2 - $y1) / ($x2 - $x1);
|
1811 |
-
$lean2 = -1 / $lean;
|
1812 |
-
$sin = $lean / ($y2 - $y1);
|
1813 |
-
$cos = $lean / ($x2 - $x1);
|
1814 |
-
|
1815 |
-
$pts[] = $x1 + (-$weight * $sin); $pts[] = $y1 + (-$weight * $cos);
|
1816 |
-
$pts[] = $x1 + (+$weight * $sin); $pts[] = $y1 + (+$weight * $cos);
|
1817 |
-
$pts[] = $x2 + (+$weight * $sin); $pts[] = $y2 + (+$weight * $cos);
|
1818 |
-
$pts[] = $x2 + (-$weight * $sin); $pts[] = $y2 + (-$weight * $cos);
|
1819 |
-
*/
|
1820 |
-
}
|
1821 |
-
|
1822 |
-
//print_r($pts);exit;
|
1823 |
-
if (count($pts)/2 < 3) {
|
1824 |
-
return;
|
1825 |
-
}
|
1826 |
-
|
1827 |
-
imagesetthickness($im, 1);
|
1828 |
-
imagefilledpolygon($im, $pts,count($pts)/2, $color);
|
1829 |
-
|
1830 |
-
|
1831 |
-
$weight *= 2;
|
1832 |
-
|
1833 |
-
// $this->DrawImageSmoothArc($im, $x1, $y1, $weight, $weight, 0, 360, $color);
|
1834 |
-
// $this->DrawImageSmoothArc($im, $x2, $y2, $weight, $weight, 0, 360, $color);
|
1835 |
-
}
|
1836 |
-
|
1837 |
-
|
1838 |
-
function DrawImageSmoothArc($im, $xc, $yc, $w, $h, $s, $e, $color, $style = null) {
|
1839 |
-
$tmp = $s;
|
1840 |
-
$s = (360 - $e) / 180 * M_PI;
|
1841 |
-
$e = (360 - $tmp) / 180 * M_PI;
|
1842 |
-
return imageSmoothArc($im, round($xc), round($yc), round($w), round($h), $this->CreateColorForImageSmoothArc($color), $s, $e);
|
1843 |
-
}
|
1844 |
-
|
1845 |
-
function CreateColorForImageSmoothArc($color) {
|
1846 |
-
$alpha = $color >> 24 & 0xFF;
|
1847 |
-
$red = $color >> 16 & 0xFF;
|
1848 |
-
$green = $color >> 8 & 0xFF;
|
1849 |
-
$blue = $color & 0xFF;
|
1850 |
-
|
1851 |
-
//var_dump($alpha, $red, $green, $blue);exit;
|
1852 |
-
|
1853 |
-
return array($red, $green, $blue, $alpha);
|
1854 |
-
}
|
1855 |
-
|
1856 |
-
function imageSmoothCircle( &$img, $cx, $cy, $cr, $color ) {
|
1857 |
-
$ir = $cr;
|
1858 |
-
$ix = 0;
|
1859 |
-
$iy = $ir;
|
1860 |
-
$ig = 2 * $ir - 3;
|
1861 |
-
$idgr = -6;
|
1862 |
-
$idgd = 4 * $ir - 10;
|
1863 |
-
$fill = imageColorExactAlpha( $img, $color[ 'R' ], $color[ 'G' ], $color[ 'B' ], 0 );
|
1864 |
-
imageLine( $img, $cx + $cr - 1, $cy, $cx, $cy, $fill );
|
1865 |
-
imageLine( $img, $cx - $cr + 1, $cy, $cx - 1, $cy, $fill );
|
1866 |
-
imageLine( $img, $cx, $cy + $cr - 1, $cx, $cy + 1, $fill );
|
1867 |
-
imageLine( $img, $cx, $cy - $cr + 1, $cx, $cy - 1, $fill );
|
1868 |
-
$draw = imageColorExactAlpha( $img, $color[ 'R' ], $color[ 'G' ], $color[ 'B' ], 42 );
|
1869 |
-
imageSetPixel( $img, $cx + $cr, $cy, $draw );
|
1870 |
-
imageSetPixel( $img, $cx - $cr, $cy, $draw );
|
1871 |
-
imageSetPixel( $img, $cx, $cy + $cr, $draw );
|
1872 |
-
imageSetPixel( $img, $cx, $cy - $cr, $draw );
|
1873 |
-
while ( $ix <= $iy - 2 ) {
|
1874 |
-
if ( $ig < 0 ) {
|
1875 |
-
$ig += $idgd;
|
1876 |
-
$idgd -= 8;
|
1877 |
-
$iy--;
|
1878 |
-
} else {
|
1879 |
-
$ig += $idgr;
|
1880 |
-
$idgd -= 4;
|
1881 |
-
}
|
1882 |
-
$idgr -= 4;
|
1883 |
-
$ix++;
|
1884 |
-
imageLine( $img, $cx + $ix, $cy + $iy - 1, $cx + $ix, $cy + $ix, $fill );
|
1885 |
-
imageLine( $img, $cx + $ix, $cy - $iy + 1, $cx + $ix, $cy - $ix, $fill );
|
1886 |
-
imageLine( $img, $cx - $ix, $cy + $iy - 1, $cx - $ix, $cy + $ix, $fill );
|
1887 |
-
imageLine( $img, $cx - $ix, $cy - $iy + 1, $cx - $ix, $cy - $ix, $fill );
|
1888 |
-
imageLine( $img, $cx + $iy - 1, $cy + $ix, $cx + $ix, $cy + $ix, $fill );
|
1889 |
-
imageLine( $img, $cx + $iy - 1, $cy - $ix, $cx + $ix, $cy - $ix, $fill );
|
1890 |
-
imageLine( $img, $cx - $iy + 1, $cy + $ix, $cx - $ix, $cy + $ix, $fill );
|
1891 |
-
imageLine( $img, $cx - $iy + 1, $cy - $ix, $cx - $ix, $cy - $ix, $fill );
|
1892 |
-
$filled = 0;
|
1893 |
-
for ( $xx = $ix - 0.45; $xx < $ix + 0.5; $xx += 0.2 ) {
|
1894 |
-
for ( $yy = $iy - 0.45; $yy < $iy + 0.5; $yy += 0.2 ) {
|
1895 |
-
if ( sqrt( pow( $xx, 2 ) + pow( $yy, 2 ) ) < $cr ) $filled += 4;
|
1896 |
-
}
|
1897 |
-
}
|
1898 |
-
$draw = imageColorExactAlpha( $img, $color[ 'R' ], $color[ 'G' ], $color[ 'B' ], ( 100 - $filled ) );
|
1899 |
-
imageSetPixel( $img, $cx + $ix, $cy + $iy, $draw );
|
1900 |
-
imageSetPixel( $img, $cx + $ix, $cy - $iy, $draw );
|
1901 |
-
imageSetPixel( $img, $cx - $ix, $cy + $iy, $draw );
|
1902 |
-
imageSetPixel( $img, $cx - $ix, $cy - $iy, $draw );
|
1903 |
-
imageSetPixel( $img, $cx + $iy, $cy + $ix, $draw );
|
1904 |
-
imageSetPixel( $img, $cx + $iy, $cy - $ix, $draw );
|
1905 |
-
imageSetPixel( $img, $cx - $iy, $cy + $ix, $draw );
|
1906 |
-
imageSetPixel( $img, $cx - $iy, $cy - $ix, $draw );
|
1907 |
-
}
|
1908 |
-
}
|
1909 |
-
|
1910 |
-
function __get($name) {
|
1911 |
-
|
1912 |
-
if (strpos($name, 'raw_') !== false) {
|
1913 |
-
// if $name == 'raw_left_margin' , return $this->_left_margin;
|
1914 |
-
$variable_name = '_' . str_replace('raw_', '', $name);
|
1915 |
-
return $this->$variable_name;
|
1916 |
-
}
|
1917 |
-
|
1918 |
-
$variable_name = '_' . $name;
|
1919 |
-
|
1920 |
-
if (isset($this->$variable_name)) {
|
1921 |
-
return $this->$variable_name * SUPERSAMPLING_SCALE;
|
1922 |
-
} else {
|
1923 |
-
JpGraphError::RaiseL('25132', $name);
|
1924 |
-
}
|
1925 |
-
}
|
1926 |
-
|
1927 |
-
function __set($name, $value) {
|
1928 |
-
$this->{'_'.$name} = $value;
|
1929 |
-
}
|
1930 |
-
|
1931 |
-
} // CLASS
|
1932 |
-
|
1933 |
-
//===================================================
|
1934 |
-
// CLASS RotImage
|
1935 |
-
// Description: Exactly as Image but draws the image at
|
1936 |
-
// a specified angle around a specified rotation point.
|
1937 |
-
//===================================================
|
1938 |
-
class RotImage extends Image {
|
1939 |
-
public $a=0;
|
1940 |
-
public $dx=0,$dy=0,$transx=0,$transy=0;
|
1941 |
-
private $m=array();
|
1942 |
-
|
1943 |
-
function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) {
|
1944 |
-
parent::__construct($aWidth,$aHeight,$aFormat,$aSetAutoMargin);
|
1945 |
-
$this->dx=$this->left_margin+$this->plotwidth/2;
|
1946 |
-
$this->dy=$this->top_margin+$this->plotheight/2;
|
1947 |
-
$this->SetAngle($a);
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
function SetCenter($dx,$dy) {
|
1951 |
-
$old_dx = $this->dx;
|
1952 |
-
$old_dy = $this->dy;
|
1953 |
-
$this->dx=$dx;
|
1954 |
-
$this->dy=$dy;
|
1955 |
-
$this->SetAngle($this->a);
|
1956 |
-
return array($old_dx,$old_dy);
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
function SetTranslation($dx,$dy) {
|
1960 |
-
$old = array($this->transx,$this->transy);
|
1961 |
-
$this->transx = $dx;
|
1962 |
-
$this->transy = $dy;
|
1963 |
-
return $old;
|
1964 |
-
}
|
1965 |
-
|
1966 |
-
function UpdateRotMatrice() {
|
1967 |
-
$a = $this->a;
|
1968 |
-
$a *= M_PI/180;
|
1969 |
-
$sa=sin($a); $ca=cos($a);
|
1970 |
-
// Create the rotation matrix
|
1971 |
-
$this->m[0][0] = $ca;
|
1972 |
-
$this->m[0][1] = -$sa;
|
1973 |
-
$this->m[0][2] = $this->dx*(1-$ca) + $sa*$this->dy ;
|
1974 |
-
$this->m[1][0] = $sa;
|
1975 |
-
$this->m[1][1] = $ca;
|
1976 |
-
$this->m[1][2] = $this->dy*(1-$ca) - $sa*$this->dx ;
|
1977 |
-
}
|
1978 |
-
|
1979 |
-
function SetAngle($a) {
|
1980 |
-
$tmp = $this->a;
|
1981 |
-
$this->a = $a;
|
1982 |
-
$this->UpdateRotMatrice();
|
1983 |
-
return $tmp;
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
function Circle($xc,$yc,$r) {
|
1987 |
-
list($xc,$yc) = $this->Rotate($xc,$yc);
|
1988 |
-
parent::Circle($xc,$yc,$r);
|
1989 |
-
}
|
1990 |
-
|
1991 |
-
function FilledCircle($xc,$yc,$r) {
|
1992 |
-
list($xc,$yc) = $this->Rotate($xc,$yc);
|
1993 |
-
parent::FilledCircle($xc,$yc,$r);
|
1994 |
-
}
|
1995 |
-
|
1996 |
-
|
1997 |
-
function Arc($xc,$yc,$w,$h,$s,$e) {
|
1998 |
-
list($xc,$yc) = $this->Rotate($xc,$yc);
|
1999 |
-
$s += $this->a;
|
2000 |
-
$e += $this->a;
|
2001 |
-
parent::Arc($xc,$yc,$w,$h,$s,$e);
|
2002 |
-
}
|
2003 |
-
|
2004 |
-
function FilledArc($xc,$yc,$w,$h,$s,$e,$style='') {
|
2005 |
-
list($xc,$yc) = $this->Rotate($xc,$yc);
|
2006 |
-
$s += $this->a;
|
2007 |
-
$e += $this->a;
|
2008 |
-
parent::FilledArc($xc,$yc,$w,$h,$s,$e);
|
2009 |
-
}
|
2010 |
-
|
2011 |
-
function SetMargin($lm,$rm,$tm,$bm) {
|
2012 |
-
parent::SetMargin($lm,$rm,$tm,$bm);
|
2013 |
-
$this->dx=$this->left_margin+$this->plotwidth/2;
|
2014 |
-
$this->dy=$this->top_margin+$this->plotheight/2;
|
2015 |
-
$this->UpdateRotMatrice();
|
2016 |
-
}
|
2017 |
-
|
2018 |
-
function Rotate($x,$y) {
|
2019 |
-
// Optimization. Ignore rotation if Angle==0 || Angle==360
|
2020 |
-
if( $this->a == 0 || $this->a == 360 ) {
|
2021 |
-
return array($x + $this->transx, $y + $this->transy );
|
2022 |
-
}
|
2023 |
-
else {
|
2024 |
-
$x1=round($this->m[0][0]*$x + $this->m[0][1]*$y,1) + $this->m[0][2] + $this->transx;
|
2025 |
-
$y1=round($this->m[1][0]*$x + $this->m[1][1]*$y,1) + $this->m[1][2] + $this->transy;
|
2026 |
-
return array($x1,$y1);
|
2027 |
-
}
|
2028 |
-
}
|
2029 |
-
|
2030 |
-
function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) {
|
2031 |
-
list($toX,$toY) = $this->Rotate($toX,$toY);
|
2032 |
-
parent::CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight,$aMix);
|
2033 |
-
|
2034 |
-
}
|
2035 |
-
|
2036 |
-
function ArrRotate($pnts) {
|
2037 |
-
$n = count($pnts)-1;
|
2038 |
-
for($i=0; $i < $n; $i+=2) {
|
2039 |
-
list ($x,$y) = $this->Rotate($pnts[$i],$pnts[$i+1]);
|
2040 |
-
$pnts[$i] = $x; $pnts[$i+1] = $y;
|
2041 |
-
}
|
2042 |
-
return $pnts;
|
2043 |
-
}
|
2044 |
-
|
2045 |
-
function DashedLine($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) {
|
2046 |
-
list($x1,$y1) = $this->Rotate($x1,$y1);
|
2047 |
-
list($x2,$y2) = $this->Rotate($x2,$y2);
|
2048 |
-
parent::DashedLine($x1,$y1,$x2,$y2,$dash_length,$dash_space);
|
2049 |
-
}
|
2050 |
-
|
2051 |
-
function Line($x1,$y1,$x2,$y2) {
|
2052 |
-
list($x1,$y1) = $this->Rotate($x1,$y1);
|
2053 |
-
list($x2,$y2) = $this->Rotate($x2,$y2);
|
2054 |
-
parent::Line($x1,$y1,$x2,$y2);
|
2055 |
-
}
|
2056 |
-
|
2057 |
-
function Rectangle($x1,$y1,$x2,$y2) {
|
2058 |
-
// Rectangle uses Line() so it will be rotated through that call
|
2059 |
-
parent::Rectangle($x1,$y1,$x2,$y2);
|
2060 |
-
}
|
2061 |
-
|
2062 |
-
function FilledRectangle($x1,$y1,$x2,$y2) {
|
2063 |
-
if( $y1==$y2 || $x1==$x2 )
|
2064 |
-
$this->Line($x1,$y1,$x2,$y2);
|
2065 |
-
else
|
2066 |
-
$this->FilledPolygon(array($x1,$y1,$x2,$y1,$x2,$y2,$x1,$y2));
|
2067 |
-
}
|
2068 |
-
|
2069 |
-
function Polygon($pnts,$closed=FALSE,$fast=FALSE) {
|
2070 |
-
// Polygon uses Line() so it will be rotated through that call unless
|
2071 |
-
// fast drawing routines are used in which case a rotate is needed
|
2072 |
-
if( $fast ) {
|
2073 |
-
parent::Polygon($this->ArrRotate($pnts));
|
2074 |
-
}
|
2075 |
-
else {
|
2076 |
-
parent::Polygon($pnts,$closed,$fast);
|
2077 |
-
}
|
2078 |
-
}
|
2079 |
-
|
2080 |
-
function FilledPolygon($pnts) {
|
2081 |
-
parent::FilledPolygon($this->ArrRotate($pnts));
|
2082 |
-
}
|
2083 |
-
|
2084 |
-
function Point($x,$y) {
|
2085 |
-
list($xp,$yp) = $this->Rotate($x,$y);
|
2086 |
-
parent::Point($xp,$yp);
|
2087 |
-
}
|
2088 |
-
|
2089 |
-
function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) {
|
2090 |
-
list($xp,$yp) = $this->Rotate($x,$y);
|
2091 |
-
return parent::StrokeText($xp,$yp,$txt,$dir,$paragraph_align,$debug);
|
2092 |
-
}
|
2093 |
-
}
|
2094 |
-
|
2095 |
-
//=======================================================================
|
2096 |
-
// CLASS ImgStreamCache
|
2097 |
-
// Description: Handle caching of graphs to files. All image output goes
|
2098 |
-
// through this class
|
2099 |
-
//=======================================================================
|
2100 |
-
class ImgStreamCache {
|
2101 |
-
private $cache_dir, $timeout=0; // Infinite timeout
|
2102 |
-
//---------------
|
2103 |
-
// CONSTRUCTOR
|
2104 |
-
function __construct($aCacheDir=CACHE_DIR) {
|
2105 |
-
$this->cache_dir = $aCacheDir;
|
2106 |
-
}
|
2107 |
-
|
2108 |
-
//---------------
|
2109 |
-
// PUBLIC METHODS
|
2110 |
-
|
2111 |
-
// Specify a timeout (in minutes) for the file. If the file is older then the
|
2112 |
-
// timeout value it will be overwritten with a newer version.
|
2113 |
-
// If timeout is set to 0 this is the same as infinite large timeout and if
|
2114 |
-
// timeout is set to -1 this is the same as infinite small timeout
|
2115 |
-
function SetTimeout($aTimeout) {
|
2116 |
-
$this->timeout=$aTimeout;
|
2117 |
-
}
|
2118 |
-
|
2119 |
-
// Output image to browser and also write it to the cache
|
2120 |
-
function PutAndStream($aImage,$aCacheFileName,$aInline,$aStrokeFileName) {
|
2121 |
-
|
2122 |
-
// Check if we should always stroke the image to a file
|
2123 |
-
if( _FORCE_IMGTOFILE ) {
|
2124 |
-
$aStrokeFileName = _FORCE_IMGDIR.GenImgName();
|
2125 |
-
}
|
2126 |
-
|
2127 |
-
if( $aStrokeFileName != '' ) {
|
2128 |
-
|
2129 |
-
if( $aStrokeFileName == 'auto' ) {
|
2130 |
-
$aStrokeFileName = GenImgName();
|
2131 |
-
}
|
2132 |
-
|
2133 |
-
if( file_exists($aStrokeFileName) ) {
|
2134 |
-
|
2135 |
-
// Wait for lock (to make sure no readers are trying to access the image)
|
2136 |
-
$fd = fopen($aStrokeFileName,'w');
|
2137 |
-
$lock = flock($fd, LOCK_EX);
|
2138 |
-
|
2139 |
-
// Since the image write routines only accepts a filename which must not
|
2140 |
-
// exist we need to delete the old file first
|
2141 |
-
if( !@unlink($aStrokeFileName) ) {
|
2142 |
-
$lock = flock($fd, LOCK_UN);
|
2143 |
-
JpGraphError::RaiseL(25111,$aStrokeFileName);
|
2144 |
-
//(" Can't delete cached image $aStrokeFileName. Permission problem?");
|
2145 |
-
}
|
2146 |
-
$aImage->Stream($aStrokeFileName);
|
2147 |
-
$lock = flock($fd, LOCK_UN);
|
2148 |
-
fclose($fd);
|
2149 |
-
|
2150 |
-
}
|
2151 |
-
else {
|
2152 |
-
$aImage->Stream($aStrokeFileName);
|
2153 |
-
}
|
2154 |
-
|
2155 |
-
return;
|
2156 |
-
}
|
2157 |
-
|
2158 |
-
if( $aCacheFileName != '' && USE_CACHE) {
|
2159 |
-
|
2160 |
-
$aCacheFileName = $this->cache_dir . $aCacheFileName;
|
2161 |
-
if( file_exists($aCacheFileName) ) {
|
2162 |
-
if( !$aInline ) {
|
2163 |
-
// If we are generating image off-line (just writing to the cache)
|
2164 |
-
// and the file exists and is still valid (no timeout)
|
2165 |
-
// then do nothing, just return.
|
2166 |
-
$diff=time()-filemtime($aCacheFileName);
|
2167 |
-
if( $diff < 0 ) {
|
2168 |
-
JpGraphError::RaiseL(25112,$aCacheFileName);
|
2169 |
-
//(" Cached imagefile ($aCacheFileName) has file date in the future!!");
|
2170 |
-
}
|
2171 |
-
if( $this->timeout>0 && ($diff <= $this->timeout*60) ) return;
|
2172 |
-
}
|
2173 |
-
|
2174 |
-
// Wait for lock (to make sure no readers are trying to access the image)
|
2175 |
-
$fd = fopen($aCacheFileName,'w');
|
2176 |
-
$lock = flock($fd, LOCK_EX);
|
2177 |
-
|
2178 |
-
if( !@unlink($aCacheFileName) ) {
|
2179 |
-
$lock = flock($fd, LOCK_UN);
|
2180 |
-
JpGraphError::RaiseL(25113,$aStrokeFileName);
|
2181 |
-
//(" Can't delete cached image $aStrokeFileName. Permission problem?");
|
2182 |
-
}
|
2183 |
-
$aImage->Stream($aCacheFileName);
|
2184 |
-
$lock = flock($fd, LOCK_UN);
|
2185 |
-
fclose($fd);
|
2186 |
-
|
2187 |
-
}
|
2188 |
-
else {
|
2189 |
-
$this->MakeDirs(dirname($aCacheFileName));
|
2190 |
-
if( !is_writeable(dirname($aCacheFileName)) ) {
|
2191 |
-
JpGraphError::RaiseL(25114,$aCacheFileName);
|
2192 |
-
//('PHP has not enough permissions to write to the cache file '.$aCacheFileName.'. Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.');
|
2193 |
-
}
|
2194 |
-
$aImage->Stream($aCacheFileName);
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
$res=true;
|
2198 |
-
// Set group to specified
|
2199 |
-
if( CACHE_FILE_GROUP != '' ) {
|
2200 |
-
$res = @chgrp($aCacheFileName,CACHE_FILE_GROUP);
|
2201 |
-
}
|
2202 |
-
if( CACHE_FILE_MOD != '' ) {
|
2203 |
-
$res = @chmod($aCacheFileName,CACHE_FILE_MOD);
|
2204 |
-
}
|
2205 |
-
if( !$res ) {
|
2206 |
-
JpGraphError::RaiseL(25115,$aStrokeFileName);
|
2207 |
-
//(" Can't set permission for cached image $aStrokeFileName. Permission problem?");
|
2208 |
-
}
|
2209 |
-
|
2210 |
-
$aImage->Destroy();
|
2211 |
-
if( $aInline ) {
|
2212 |
-
if ($fh = @fopen($aCacheFileName, "rb") ) {
|
2213 |
-
$aImage->Headers();
|
2214 |
-
fpassthru($fh);
|
2215 |
-
return;
|
2216 |
-
}
|
2217 |
-
else {
|
2218 |
-
JpGraphError::RaiseL(25116,$aFile);//(" Cant open file from cache [$aFile]");
|
2219 |
-
}
|
2220 |
-
}
|
2221 |
-
}
|
2222 |
-
elseif( $aInline ) {
|
2223 |
-
$aImage->Headers();
|
2224 |
-
$aImage->Stream();
|
2225 |
-
return;
|
2226 |
-
}
|
2227 |
-
}
|
2228 |
-
|
2229 |
-
function IsValid($aCacheFileName) {
|
2230 |
-
$aCacheFileName = $this->cache_dir.$aCacheFileName;
|
2231 |
-
if ( USE_CACHE && file_exists($aCacheFileName) ) {
|
2232 |
-
$diff=time()-filemtime($aCacheFileName);
|
2233 |
-
if( $this->timeout>0 && ($diff > $this->timeout*60) ) {
|
2234 |
-
return false;
|
2235 |
-
}
|
2236 |
-
else {
|
2237 |
-
return true;
|
2238 |
-
}
|
2239 |
-
}
|
2240 |
-
else {
|
2241 |
-
return false;
|
2242 |
-
}
|
2243 |
-
}
|
2244 |
-
|
2245 |
-
function StreamImgFile($aImage,$aCacheFileName) {
|
2246 |
-
$aCacheFileName = $this->cache_dir.$aCacheFileName;
|
2247 |
-
if ( $fh = @fopen($aCacheFileName, 'rb') ) {
|
2248 |
-
$lock = flock($fh, LOCK_SH);
|
2249 |
-
$aImage->Headers();
|
2250 |
-
fpassthru($fh);
|
2251 |
-
$lock = flock($fh, LOCK_UN);
|
2252 |
-
fclose($fh);
|
2253 |
-
return true;
|
2254 |
-
}
|
2255 |
-
else {
|
2256 |
-
JpGraphError::RaiseL(25117,$aCacheFileName);//(" Can't open cached image \"$aCacheFileName\" for reading.");
|
2257 |
-
}
|
2258 |
-
}
|
2259 |
-
|
2260 |
-
// Check if a given image is in cache and in that case
|
2261 |
-
// pass it directly on to web browser. Return false if the
|
2262 |
-
// image file doesn't exist or exists but is to old
|
2263 |
-
function GetAndStream($aImage,$aCacheFileName) {
|
2264 |
-
if( $this->Isvalid($aCacheFileName) ) {
|
2265 |
-
$this->StreamImgFile($aImage,$aCacheFileName);
|
2266 |
-
}
|
2267 |
-
else {
|
2268 |
-
return false;
|
2269 |
-
}
|
2270 |
-
}
|
2271 |
-
|
2272 |
-
//---------------
|
2273 |
-
// PRIVATE METHODS
|
2274 |
-
// Create all necessary directories in a path
|
2275 |
-
function MakeDirs($aFile) {
|
2276 |
-
$dirs = array();
|
2277 |
-
// In order to better work when open_basedir is enabled
|
2278 |
-
// we do not create directories in the root path
|
2279 |
-
while ( $aFile != '/' && !(file_exists($aFile)) ) {
|
2280 |
-
$dirs[] = $aFile.'/';
|
2281 |
-
$aFile = dirname($aFile);
|
2282 |
-
}
|
2283 |
-
for ($i = sizeof($dirs)-1; $i>=0; $i--) {
|
2284 |
-
if(! @mkdir($dirs[$i],0777) ) {
|
2285 |
-
JpGraphError::RaiseL(25118,$aFile);//(" Can't create directory $aFile. Make sure PHP has write permission to this directory.");
|
2286 |
-
}
|
2287 |
-
// We also specify mode here after we have changed group.
|
2288 |
-
// This is necessary if Apache user doesn't belong the
|
2289 |
-
// default group and hence can't specify group permission
|
2290 |
-
// in the previous mkdir() call
|
2291 |
-
if( CACHE_FILE_GROUP != "" ) {
|
2292 |
-
$res=true;
|
2293 |
-
$res =@chgrp($dirs[$i],CACHE_FILE_GROUP);
|
2294 |
-
$res = @chmod($dirs[$i],0777);
|
2295 |
-
if( !$res ) {
|
2296 |
-
JpGraphError::RaiseL(25119,$aFile);//(" Can't set permissions for $aFile. Permission problems?");
|
2297 |
-
}
|
2298 |
-
}
|
2299 |
-
}
|
2300 |
-
return true;
|
2301 |
-
}
|
2302 |
-
} // CLASS Cache
|
2303 |
-
|
2304 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imageSmoothArc.php
DELETED
@@ -1,344 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright (c) 2006-2008 Ulrich Mierendorff
|
6 |
-
|
7 |
-
Permission is hereby granted, free of charge, to any person obtaining a
|
8 |
-
copy of this software and associated documentation files (the "Software"),
|
9 |
-
to deal in the Software without restriction, including without limitation
|
10 |
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11 |
-
and/or sell copies of the Software, and to permit persons to whom the
|
12 |
-
Software is furnished to do so, subject to the following conditions:
|
13 |
-
|
14 |
-
The above copyright notice and this permission notice shall be included in
|
15 |
-
all copies or substantial portions of the Software.
|
16 |
-
|
17 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19 |
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
20 |
-
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21 |
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22 |
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
23 |
-
DEALINGS IN THE SOFTWARE.
|
24 |
-
|
25 |
-
Changelog:
|
26 |
-
version 1.1
|
27 |
-
- improved the rendering speed by ~20%
|
28 |
-
|
29 |
-
- Thanks to Matthias Mächler for fixing some small errors:
|
30 |
-
* uninitialized variables
|
31 |
-
* deprecated passing of $img reference in imageSmoothArc ()
|
32 |
-
|
33 |
-
version 1.0
|
34 |
-
Release of rewritten script
|
35 |
-
|
36 |
-
*/
|
37 |
-
|
38 |
-
function imageSmoothArcDrawSegment (&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $seg)
|
39 |
-
{
|
40 |
-
// Originally written from scratch by Ulrich Mierendorff, 06/2006
|
41 |
-
// Rewritten and improved, 04/2007, 07/2007
|
42 |
-
|
43 |
-
// Please do not use THIS function directly. Scroll down to imageSmoothArc(...).
|
44 |
-
|
45 |
-
$fillColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], $color[3] );
|
46 |
-
|
47 |
-
$xStart = abs($a * cos($start));
|
48 |
-
$yStart = abs($b * sin($start));
|
49 |
-
$xStop = abs($a * cos($stop));
|
50 |
-
$yStop = abs($b * sin($stop));
|
51 |
-
$dxStart = 0;
|
52 |
-
$dyStart = 0;
|
53 |
-
$dxStop = 0;
|
54 |
-
$dyStop = 0;
|
55 |
-
if ($xStart != 0)
|
56 |
-
$dyStart = $yStart/$xStart;
|
57 |
-
if ($xStop != 0)
|
58 |
-
$dyStop = $yStop/$xStop;
|
59 |
-
if ($yStart != 0)
|
60 |
-
$dxStart = $xStart/$yStart;
|
61 |
-
if ($yStop != 0)
|
62 |
-
$dxStop = $xStop/$yStop;
|
63 |
-
if (abs($xStart) >= abs($yStart)) {
|
64 |
-
$aaStartX = true;
|
65 |
-
} else {
|
66 |
-
$aaStartX = false;
|
67 |
-
}
|
68 |
-
if ($xStop >= $yStop) {
|
69 |
-
$aaStopX = true;
|
70 |
-
} else {
|
71 |
-
$aaStopX = false;
|
72 |
-
}
|
73 |
-
//$xp = +1; $yp = -1; $xa = +1; $ya = 0;
|
74 |
-
for ( $x = 0; $x < $a; $x += 1 ) {
|
75 |
-
/*$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
76 |
-
|
77 |
-
$error = $y - (int)($y);
|
78 |
-
$y = (int)($y);
|
79 |
-
|
80 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );*/
|
81 |
-
|
82 |
-
$_y1 = $dyStop*$x;
|
83 |
-
$_y2 = $dyStart*$x;
|
84 |
-
if ($xStart > $xStop)
|
85 |
-
{
|
86 |
-
$error1 = $_y1 - (int)($_y1);
|
87 |
-
$error2 = 1 - $_y2 + (int)$_y2;
|
88 |
-
$_y1 = $_y1-$error1;
|
89 |
-
$_y2 = $_y2+$error2;
|
90 |
-
}
|
91 |
-
else
|
92 |
-
{
|
93 |
-
$error1 = 1 - $_y1 + (int)$_y1;
|
94 |
-
$error2 = $_y2 - (int)($_y2);
|
95 |
-
$_y1 = $_y1+$error1;
|
96 |
-
$_y2 = $_y2-$error2;
|
97 |
-
}
|
98 |
-
/*
|
99 |
-
if ($aaStopX)
|
100 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
101 |
-
if ($aaStartX)
|
102 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
103 |
-
*/
|
104 |
-
|
105 |
-
if ($seg == 0 || $seg == 2)
|
106 |
-
{
|
107 |
-
$i = $seg;
|
108 |
-
if (!($start > $i*M_PI/2 && $x > $xStart)) {
|
109 |
-
if ($i == 0) {
|
110 |
-
$xp = +1; $yp = -1; $xa = +1; $ya = 0;
|
111 |
-
} else {
|
112 |
-
$xp = -1; $yp = +1; $xa = 0; $ya = +1;
|
113 |
-
}
|
114 |
-
if ( $stop < ($i+1)*(M_PI/2) && $x <= $xStop ) {
|
115 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
116 |
-
$y1 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*($x)+$xa, $cy+$yp*($y1+1)+$ya, $diffColor1);
|
117 |
-
|
118 |
-
} else {
|
119 |
-
$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
120 |
-
$error = $y - (int)($y);
|
121 |
-
$y = (int)($y);
|
122 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
123 |
-
$y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor);
|
124 |
-
}
|
125 |
-
if ($start > $i*M_PI/2 && $x <= $xStart) {
|
126 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
127 |
-
$y2 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor2);
|
128 |
-
} else {
|
129 |
-
$y2 = 0;
|
130 |
-
}
|
131 |
-
if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya , $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor);
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
if ($seg == 1 || $seg == 3)
|
136 |
-
{
|
137 |
-
$i = $seg;
|
138 |
-
if (!($stop < ($i+1)*M_PI/2 && $x > $xStop)) {
|
139 |
-
if ($i == 1) {
|
140 |
-
$xp = -1; $yp = -1; $xa = 0; $ya = 0;
|
141 |
-
} else {
|
142 |
-
$xp = +1; $yp = +1; $xa = 1; $ya = 1;
|
143 |
-
}
|
144 |
-
if ( $start > $i*M_PI/2 && $x < $xStart ) {
|
145 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
146 |
-
$y1 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor2);
|
147 |
-
|
148 |
-
} else {
|
149 |
-
$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
150 |
-
$error = $y - (int)($y);
|
151 |
-
$y = (int) $y;
|
152 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
153 |
-
$y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor);
|
154 |
-
}
|
155 |
-
if ($stop < ($i+1)*M_PI/2 && $x <= $xStop) {
|
156 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
157 |
-
$y2 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor1);
|
158 |
-
} else {
|
159 |
-
$y2 = 0;
|
160 |
-
}
|
161 |
-
if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya, $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor);
|
162 |
-
}
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
///YYYYY
|
167 |
-
|
168 |
-
for ( $y = 0; $y < $b; $y += 1 ) {
|
169 |
-
/*$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
170 |
-
|
171 |
-
$error = $x - (int)($x);
|
172 |
-
$x = (int)($x);
|
173 |
-
|
174 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
175 |
-
*/
|
176 |
-
$_x1 = $dxStop*$y;
|
177 |
-
$_x2 = $dxStart*$y;
|
178 |
-
if ($yStart > $yStop)
|
179 |
-
{
|
180 |
-
$error1 = $_x1 - (int)($_x1);
|
181 |
-
$error2 = 1 - $_x2 + (int)$_x2;
|
182 |
-
$_x1 = $_x1-$error1;
|
183 |
-
$_x2 = $_x2+$error2;
|
184 |
-
}
|
185 |
-
else
|
186 |
-
{
|
187 |
-
$error1 = 1 - $_x1 + (int)$_x1;
|
188 |
-
$error2 = $_x2 - (int)($_x2);
|
189 |
-
$_x1 = $_x1+$error1;
|
190 |
-
$_x2 = $_x2-$error2;
|
191 |
-
}
|
192 |
-
/*
|
193 |
-
if (!$aaStopX)
|
194 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
195 |
-
if (!$aaStartX)
|
196 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
197 |
-
*/
|
198 |
-
|
199 |
-
if ($seg == 0 || $seg == 2)
|
200 |
-
{
|
201 |
-
$i = $seg;
|
202 |
-
if (!($start > $i*M_PI/2 && $y > $yStop)) {
|
203 |
-
if ($i == 0) {
|
204 |
-
$xp = +1; $yp = -1; $xa = 1; $ya = 0;
|
205 |
-
} else {
|
206 |
-
$xp = -1; $yp = +1; $xa = 0; $ya = 1;
|
207 |
-
}
|
208 |
-
if ( $stop < ($i+1)*(M_PI/2) && $y <= $yStop ) {
|
209 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
210 |
-
$x1 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*($y)+$ya, $diffColor1);
|
211 |
-
}
|
212 |
-
if ($start > $i*M_PI/2 && $y < $yStart) {
|
213 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
214 |
-
$x2 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*($y)+$ya, $diffColor2);
|
215 |
-
} else {
|
216 |
-
$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
217 |
-
$error = $x - (int)($x);
|
218 |
-
$x = (int)($x);
|
219 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
220 |
-
$x1 = $x; if ($y < $aaAngleY && $y <= $yStop ) imageSetPixel($img, $cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor);
|
221 |
-
}
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
if ($seg == 1 || $seg == 3)
|
226 |
-
{
|
227 |
-
$i = $seg;
|
228 |
-
if (!($stop < ($i+1)*M_PI/2 && $y > $yStart)) {
|
229 |
-
if ($i == 1) {
|
230 |
-
$xp = -1; $yp = -1; $xa = 0; $ya = 0;
|
231 |
-
} else {
|
232 |
-
$xp = +1; $yp = +1; $xa = 1; $ya = 1;
|
233 |
-
}
|
234 |
-
if ( $start > $i*M_PI/2 && $y < $yStart ) {
|
235 |
-
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
236 |
-
$x1 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*$y+$ya, $diffColor2);
|
237 |
-
}
|
238 |
-
if ($stop < ($i+1)*M_PI/2 && $y <= $yStop) {
|
239 |
-
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
240 |
-
$x2 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*$y+$ya, $diffColor1);
|
241 |
-
} else {
|
242 |
-
$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
243 |
-
$error = $x - (int)($x);
|
244 |
-
$x = (int)($x);
|
245 |
-
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
246 |
-
$x1 = $x; if ($y < $aaAngleY && $y < $yStart) imageSetPixel($img,$cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor);
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
|
254 |
-
function imageSmoothArc ( &$img, $cx, $cy, $w, $h, $color, $start, $stop)
|
255 |
-
{
|
256 |
-
// Originally written from scratch by Ulrich Mierendorff, 06/2006
|
257 |
-
// Rewritten and improved, 04/2007, 07/2007
|
258 |
-
// compared to old version:
|
259 |
-
// + Support for transparency added
|
260 |
-
// + Improved quality of edges & antialiasing
|
261 |
-
|
262 |
-
// note: This function does not represent the fastest way to draw elliptical
|
263 |
-
// arcs. It was written without reading any papers on that subject. Better
|
264 |
-
// algorithms may be twice as fast or even more.
|
265 |
-
|
266 |
-
// what it cannot do: It does not support outlined arcs, only filled
|
267 |
-
|
268 |
-
// Parameters:
|
269 |
-
// $cx - Center of ellipse, X-coord
|
270 |
-
// $cy - Center of ellipse, Y-coord
|
271 |
-
// $w - Width of ellipse ($w >= 2)
|
272 |
-
// $h - Height of ellipse ($h >= 2 )
|
273 |
-
// $color - Color of ellipse as a four component array with RGBA
|
274 |
-
// $start - Starting angle of the arc, no limited range!
|
275 |
-
// $stop - Stop angle of the arc, no limited range!
|
276 |
-
// $start _can_ be greater than $stop!
|
277 |
-
// If any value is not in the given range, results are undefined!
|
278 |
-
|
279 |
-
// This script does not use any special algorithms, everything is completely
|
280 |
-
// written from scratch; see http://de.wikipedia.org/wiki/Ellipse for formulas.
|
281 |
-
|
282 |
-
while ($start < 0)
|
283 |
-
$start += 2*M_PI;
|
284 |
-
while ($stop < 0)
|
285 |
-
$stop += 2*M_PI;
|
286 |
-
|
287 |
-
while ($start > 2*M_PI)
|
288 |
-
$start -= 2*M_PI;
|
289 |
-
|
290 |
-
while ($stop > 2*M_PI)
|
291 |
-
$stop -= 2*M_PI;
|
292 |
-
|
293 |
-
|
294 |
-
if ($start > $stop)
|
295 |
-
{
|
296 |
-
imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, $start, 2*M_PI);
|
297 |
-
imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, 0, $stop);
|
298 |
-
return;
|
299 |
-
}
|
300 |
-
|
301 |
-
$a = 1.0*round ($w/2);
|
302 |
-
$b = 1.0*round ($h/2);
|
303 |
-
$cx = 1.0*round ($cx);
|
304 |
-
$cy = 1.0*round ($cy);
|
305 |
-
|
306 |
-
$aaAngle = atan(($b*$b)/($a*$a)*tan(0.25*M_PI));
|
307 |
-
$aaAngleX = $a*cos($aaAngle);
|
308 |
-
$aaAngleY = $b*sin($aaAngle);
|
309 |
-
|
310 |
-
$a -= 0.5; // looks better...
|
311 |
-
$b -= 0.5;
|
312 |
-
|
313 |
-
for ($i=0; $i<4;$i++)
|
314 |
-
{
|
315 |
-
if ($start < ($i+1)*M_PI/2)
|
316 |
-
{
|
317 |
-
if ($start > $i*M_PI/2)
|
318 |
-
{
|
319 |
-
if ($stop > ($i+1)*M_PI/2)
|
320 |
-
{
|
321 |
-
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY , $color, $start, ($i+1)*M_PI/2, $i);
|
322 |
-
}
|
323 |
-
else
|
324 |
-
{
|
325 |
-
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $i);
|
326 |
-
break;
|
327 |
-
}
|
328 |
-
}
|
329 |
-
else
|
330 |
-
{
|
331 |
-
if ($stop > ($i+1)*M_PI/2)
|
332 |
-
{
|
333 |
-
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, ($i+1)*M_PI/2, $i);
|
334 |
-
}
|
335 |
-
else
|
336 |
-
{
|
337 |
-
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, $stop, $i);
|
338 |
-
break;
|
339 |
-
}
|
340 |
-
}
|
341 |
-
}
|
342 |
-
}
|
343 |
-
}
|
344 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_balls.inc.php
DELETED
@@ -1,1061 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_ROUNDBALLS.INC
|
4 |
-
// Description: Base64 encoded images for small round markers
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_balls.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
class ImgData_Balls extends ImgData {
|
12 |
-
protected $name = 'Round Balls';
|
13 |
-
protected $an = array(MARK_IMG_LBALL => 'imgdata_large',
|
14 |
-
MARK_IMG_MBALL => 'imgdata_small',
|
15 |
-
MARK_IMG_SBALL => 'imgdata_xsmall',
|
16 |
-
MARK_IMG_BALL => 'imgdata_xsmall');
|
17 |
-
protected $colors,$index,$maxidx;
|
18 |
-
private $colors_1 = array('blue','lightblue','brown','darkgreen',
|
19 |
-
'green','purple','red','gray','yellow','silver','gray');
|
20 |
-
private $index_1 = array('blue'=>9,'lightblue'=>1,'brown'=>6,'darkgreen'=>7,
|
21 |
-
'green'=>8,'purple'=>4,'red'=>0,'gray'=>5,'silver'=>3,'yellow'=>2);
|
22 |
-
private $maxidx_1 = 9 ;
|
23 |
-
|
24 |
-
private $colors_2 = array('blue','bluegreen','brown','cyan',
|
25 |
-
'darkgray','greengray','gray','green',
|
26 |
-
'greenblue','lightblue','lightred',
|
27 |
-
'purple','red','white','yellow');
|
28 |
-
|
29 |
-
|
30 |
-
private $index_2 = array('blue'=>9,'bluegreen'=>13,'brown'=>8,'cyan'=>12,
|
31 |
-
'darkgray'=>5,'greengray'=>6,'gray'=>2,'green'=>10,
|
32 |
-
'greenblue'=>3,'lightblue'=>1,'lightred'=>14,
|
33 |
-
'purple'=>7,'red'=>0,'white'=>11,'yellow'=>4);
|
34 |
-
|
35 |
-
private $maxidx_2 = 14 ;
|
36 |
-
|
37 |
-
|
38 |
-
private $colors_3 = array('bluegreen','cyan','darkgray','greengray',
|
39 |
-
'gray','graypurple','green','greenblue','lightblue',
|
40 |
-
'lightred','navy','orange','purple','red','yellow');
|
41 |
-
|
42 |
-
private $index_3 = array('bluegreen'=>1,'cyan'=>11,'darkgray'=>14,'greengray'=>10,
|
43 |
-
'gray'=>3,'graypurple'=>4,'green'=>9,'greenblue'=>7,
|
44 |
-
'lightblue'=>13,'lightred'=>0,'navy'=>2,'orange'=>12,
|
45 |
-
'purple'=>8,'red'=>5,'yellow'=>6);
|
46 |
-
private $maxidx_3 = 14 ;
|
47 |
-
|
48 |
-
protected $imgdata_large, $imgdata_small, $imgdata_xsmall ;
|
49 |
-
|
50 |
-
|
51 |
-
function GetImg($aMark,$aIdx) {
|
52 |
-
switch( $aMark ) {
|
53 |
-
case MARK_IMG_SBALL:
|
54 |
-
case MARK_IMG_BALL:
|
55 |
-
$this->colors = $this->colors_3;
|
56 |
-
$this->index = $this->index_3 ;
|
57 |
-
$this->maxidx = $this->maxidx_3 ;
|
58 |
-
break;
|
59 |
-
case MARK_IMG_MBALL:
|
60 |
-
$this->colors = $this->colors_2;
|
61 |
-
$this->index = $this->index_2 ;
|
62 |
-
$this->maxidx = $this->maxidx_2 ;
|
63 |
-
break;
|
64 |
-
default:
|
65 |
-
$this->colors = $this->colors_1;
|
66 |
-
$this->index = $this->index_1 ;
|
67 |
-
$this->maxidx = $this->maxidx_1 ;
|
68 |
-
break;
|
69 |
-
}
|
70 |
-
return parent::GetImg($aMark,$aIdx);
|
71 |
-
}
|
72 |
-
|
73 |
-
function __construct() {
|
74 |
-
|
75 |
-
//==========================================================
|
76 |
-
// File: bl_red.png
|
77 |
-
//==========================================================
|
78 |
-
$this->imgdata_large[0][0]= 1072 ;
|
79 |
-
$this->imgdata_large[0][1]=
|
80 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAByF'.
|
81 |
-
'BMVEX/////////xsb/vb3/lIz/hIT/e3v/c3P/c2v/a2v/Y2P/'.
|
82 |
-
'UlL/Skr/SkL/Qjn/MTH/MSn/KSn/ISH/IRj/GBj/GBD/EBD/EA'.
|
83 |
-
'j/CAj/CAD/AAD3QkL3MTH3KSn3KSH3GBj3EBD3CAj3AAD1zMzv'.
|
84 |
-
'QkLvISHvIRjvGBjvEBDvEAjvAADnUlLnSkrnMTnnKSnnIRjnGB'.
|
85 |
-
'DnEBDnCAjnAADec3PeSkreISHeGBjeGBDeEAjWhITWa2vWUlLW'.
|
86 |
-
'SkrWISnWGBjWEBDWEAjWCAjWAADOnp7Oa2vOGCHOGBjOGBDOEB'.
|
87 |
-
'DOCAjOAADJrq7Gt7fGGBjGEBDGCAjGAADEpKS/v7+9QkK9GBC9'.
|
88 |
-
'EBC9CAi9AAC1e3u1a2u1Skq1KSm1EBC1CAi1AACtEBCtCBCtCA'.
|
89 |
-
'itAACngYGlCAilAACghIScOTmcCAicAACYgYGUGAiUCAiUAAiU'.
|
90 |
-
'AACMKSmMEACMAACEa2uEGAiEAAB7GBh7CAB7AABzOTlzGBBzCA'.
|
91 |
-
'BzAABrSkprOTlrGBhrAABjOTljAABaQkJaOTlaCABaAABSKSlS'.
|
92 |
-
'GBhSAABKKSlKGBhKAABCGBhCCABCAAA5CAA5AAAxCAAxAAApCA'.
|
93 |
-
'ApAAAhAAAYAACc9eRyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
94 |
-
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFD'.
|
95 |
-
'UHLytKAAAB4UlEQVR4nGNgIAK4mGjrmNq6BmFIWMmISUpKSmk5'.
|
96 |
-
'B8ZEokj4qoiLiQCBgqald3xaBpKMj6y4sLCQkJCIvIaFV0RaUR'.
|
97 |
-
'lCSk5cWEiAn19ASN7QwisuraihHiajKyEixM/NwckjoKrvEACU'.
|
98 |
-
'qumpg7pAUlREiJdNmZmLT9/cMzwps7Smc3I2WEpGUkxYkJuFiY'.
|
99 |
-
'lTxszePzY1v7Shc2oX2D+K4iLCgjzsrOw8embuYUmZeTVtPVOn'.
|
100 |
-
'gqSslYAOF+Ln4ZHWtXMPTcjMrWno7J82rRgoZWOsqaCgrqaqqm'.
|
101 |
-
'fn5peQmlsK1DR52vRaoFSIs5GRoYG5ub27n19CYm5pdVPnxKnT'.
|
102 |
-
'pjWDpLydnZwcHTz8QxMSEnJLgDL9U6dNnQ6Sio4PDAgICA+PTU'.
|
103 |
-
'zNzSkph8hADIxKS46Pj0tKTc3MLSksqWrtmQySAjuDIT8rKy0r'.
|
104 |
-
'Kz+vtLSmur6jb9JUIJgGdjxDQUVRUVFpaUVNQ1NrZ9+kKVOmTZ'.
|
105 |
-
'k6vR0sldJUAwQNTU2dnX0TgOJTQLrSIYFY2dPW1NbW2TNxwtQp'.
|
106 |
-
'U6ZMmjJt2rRGWNB3TO7vnzh5MsgSoB6gy7sREdY7bRrQEDAGOb'.
|
107 |
-
'wXOQW0TJsOEpwClmxBTTbZ7UDVIPkp7dkYaYqhuLa5trYYUxwL'.
|
108 |
-
'AADzm6uekAAcXAAAAABJRU5ErkJggg==' ;
|
109 |
-
|
110 |
-
//==========================================================
|
111 |
-
// File: bl_bluegreen.png
|
112 |
-
//==========================================================
|
113 |
-
$this->imgdata_large[1][0]= 1368 ;
|
114 |
-
$this->imgdata_large[1][1]=
|
115 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'.
|
116 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
117 |
-
'B3RJTUUH0wMMFi8hE9b2uAAABOVJREFUeNq9lk2sJFUVx3+3qv'.
|
118 |
-
'tW95t57zFvhiFxmCFRUJRoNCQiJARMhiFx/Igxii5goTG6ZDAu'.
|
119 |
-
'/EhcSCIrTAgLEiKsJ8ywABNZEMJXEDYCukAmjgjzBkK/j35V1d'.
|
120 |
-
'333FtV97io97pfzwxfG86qcu/N+Z3zP+fcW/Apmfk4hx57+R/6'.
|
121 |
-
'Rqmc9ykhsWjlsUngAA1fXIQ7b73pI/186IGHnn9dH/8frC8v4I'.
|
122 |
-
'PiG53uaerR4GmKkv31mB8cyfjd946ZTwR66qVX9OTWIi8UKUv9'.
|
123 |
-
'BOrZXpYZvFeiBvzI0fgSUSFKwbVG+Pl1V3HH0VvNR4KeeukV/f'.
|
124 |
-
'PmMmdHhst76aXD64AbeVQ9bjNHaiGOC2o3wLrAb2/4LL/84ffn'.
|
125 |
-
'fCdzkOdayKpLppBemrBsU5Y1Zdmm9LJdGU6E/t4M24Q26jRDRL'.
|
126 |
-
'j3mdc49cSTekFsMzs5XuTsyLDUNSDQ25NwKOly9YIl22MYhJr/'.
|
127 |
-
'uoDtBBoT0CxBRGYOAhibIaOCe//2MpfM6KHnX9cXipSlbkKWmS'.
|
128 |
-
'nk9iv38J0jixw7vJfrTMYBOvhSoQHJBS09ANELloAGDxW8tfoW'.
|
129 |
-
'J+5/UC8CPS0LU7r3SpYarr7M8rmFjMPLXT6/33L4si7Z2GCrQC'.
|
130 |
-
'+0ctlOaNs9DReV8vSLr85ndPLpZ/WNvHW+01kAVFBOGvJx0wYg'.
|
131 |
-
'Sp47RIQ4Emwa8FGJXlDxSCFo5YlVgAo2hwPue/hRndboTV3EW2'.
|
132 |
-
'Wp3k6wBp8q56QiWzecW6vwQfnPRkAWhFgILnq08jQ+R2nlUzzN'.
|
133 |
-
'uES9Q7Vd+9fba7NmWJW61db2247qACmcjxXr45psYphsFGSLBu'.
|
134 |
-
'kIajxqtjNwHkvAjQt0sg3crhPA2+fPz0CuyNFOghsGsr19mnFg'.
|
135 |
-
'DGwrRm8UoAtNmQPQtRXDgdC4HImCFEKcCE0oieUWUYq2LtbiGp'.
|
136 |
-
'mBQmppfIkjw45DK0QNNkvQ0jMBtPL0UnDRM1rN+cxKwzvOo2NP'.
|
137 |
-
'tykR9a1kfpZNDLMG6QDYJqCTBvUe1+uxs+YKyPoGrTwY2HhvC4'.
|
138 |
-
'CDWQd5d4xNApNQEEMgjgLdUCLBQ5cprL/trwNwKG2IUmDqDFd5'.
|
139 |
-
'sr5BWrlxuSdLDFEFlqAzXGc4zFjupqh6uqYihpxJcEgp026l2w'.
|
140 |
-
'7wFUv7Z6AvrfRo/n0OYzPwIKE3HUKAJg2otMBiElnsF7wngis9'.
|
141 |
-
'3ZDjNnLi7huCWUZfueZKTu/M0V3HvmkOFDVxVKDG04ScejSgW5'.
|
142 |
-
'V0q5JYFEghuDLHlTmToqDeGOCKIVtrW9hsdmXufEcNLPSXuPHa'.
|
143 |
-
'a+bvuh9df5AH/v5PDFmbWQC3Mx+TVvfGVTRB2CodNgT2JBX003'.
|
144 |
-
'aANZAYS/BxCv32TV/l2C03G7jgmfjGiT/qmeEmibEYm7XzAO2k'.
|
145 |
-
'A+pbgHhBgydqu54YO5eRiLCy7yDvPP6Xqf+5Z+Lu277OYuOpiw'.
|
146 |
-
'H15oBmlNOMcmK5RbP+PrEscGU+DSAxdg4CICIkxnLP8aNz63Og'.
|
147 |
-
'H3/rdvOb795GVhuaYo0oBc3GGrEsUPVTwO6a7LYd+X51x3Hu/t'.
|
148 |
-
'lP5tS65FN+6okn9U+n/sqb596dTvhOF+02myXTmkQNrOw7yD3H'.
|
149 |
-
'j14E+UDQjp24/0E9/eKrbA4HH3aMK1b2ccvXvswjv//1J/s5ud'.
|
150 |
-
'Due/hRPfP+OmfOrk7vrn7a48ihA3zh8CH+8Iuffiw/n4r9H1ZZ'.
|
151 |
-
'0zz7G56hAAAAAElFTkSuQmCC' ;
|
152 |
-
|
153 |
-
//==========================================================
|
154 |
-
// File: bl_yellow.png
|
155 |
-
//==========================================================
|
156 |
-
$this->imgdata_large[2][0]= 1101 ;
|
157 |
-
$this->imgdata_large[2][1]=
|
158 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'.
|
159 |
-
'BMVEX//////////+///+f//9b//8b//73//7X//63//6X//5T/'.
|
160 |
-
'/4z//4T//3P//2v//1r//0r//0L//zH//yn//yH//xj//xD//w'.
|
161 |
-
'j//wD/90L/9zn/9zH/9xj/9xD/9wj/9wD39yn37zn37zH37yH3'.
|
162 |
-
'7xD37wj37wDv70Lv50rv50Lv5znv5yHv5xjv5wjv5wDn51Ln5x'.
|
163 |
-
'Dn3jHn3iHn3hjn3hDn3gje3oze3nPe3lLe1oze1nPe1lLe1ine'.
|
164 |
-
'1iHe1hje1hDe1gje1gDW1qXW1mvWzqXWzkLWzhjWzhDWzgjWzg'.
|
165 |
-
'DOzrXOzq3OzpzOzgDOxkrOxinOxhjOxhDOxgjOxgDGxqXGxnvG'.
|
166 |
-
'xmvGvRjGvRDGvQjGvQDFxbnAvr6/v7+9vaW9vZS9vQi9vQC9tR'.
|
167 |
-
'C9tQi9tQC7u7W1tZS1tXu1tTG1tQi1rRC1rQi1rQCtrYytrSGt'.
|
168 |
-
'rQitrQCtpYStpSGtpQitpQClpYSlpXulpQClnBClnAilnACcnG'.
|
169 |
-
'ucnAicnACclAiclACUlFqUlCmUlAiUlACUjFKUjAiUjACMjFKM'.
|
170 |
-
'jEqMjACMhACEhACEewB7ezF7exB7ewB7cwBzcylzcwBzaxBzaw'.
|
171 |
-
'BraxhrawhrawBrYxBrYwBjYwBjWgBaWgBaUgCXBwRMAAAAAXRS'.
|
172 |
-
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
173 |
-
'LdfvwAAAAHdElNRQfTAwkRFBKiJZ4hAAAB7ElEQVR4nI3S+1vS'.
|
174 |
-
'UBgHcB67WJmIMWAVdDHEDLBC6Go0slj3Ft0m9RRBWQEmFZFDEM'.
|
175 |
-
'Qgt0EMFBY7p/+198hj1kM/9N1+++x73rOd6XT/kStnTx4fPzd9'.
|
176 |
-
'uwfOjFhomj7smAhwj/6Cm2O0xUwy6g7cCL99uCW3jtBmE7lsdr'.
|
177 |
-
'fvejgpzP7uEDFRRoqy2k8xQPnypo2BUMP6waF9Vpf3ciiSzErL'.
|
178 |
-
'XTkPc0zDe3bsHDAcc00yoVgqL3UWN2iENpspff+2vn6D0+NnZ9'.
|
179 |
-
'6lC5K6RuSqBTZn1O/a3rd7v/MSez+WyIpVFX8GuuCA9SjD4N6B'.
|
180 |
-
'oRNTfo5PCAVR0fBXoIuOQzab1XjwwNHx00GOj8/nKtV1DdeArk'.
|
181 |
-
'24R+0ul9PjmbrHPYl+EipyU0OoQSjg8/m83kl/MMhx0fjCkqio'.
|
182 |
-
'SMOE7t4JMAzDsizH81AqSdW2hroLPg4/CEF4PhKNx98vlevrbY'.
|
183 |
-
'QQXgV6kXwVfjkTiSXmhYVcSa7DIE1DOENe7GM6lUym0l+EXKks'.
|
184 |
-
'K20VAeH2M0JvVgrZfL5Qqkiy0lRVaMBd7H7EZUmsiJJcrTdVja'.
|
185 |
-
'wGpdbTLj3/3qwrUOjAfGgg4LnNA5tdQx14Hm00QFBm65hfNzAm'.
|
186 |
-
'+yIFhFtzuj+z2MI/MQn6Uez5pz4Ua41G7VumB/6RX4zMr1TKBr'.
|
187 |
-
'SXAAAAAElFTkSuQmCC' ;
|
188 |
-
|
189 |
-
//==========================================================
|
190 |
-
// File: bl_silver.png
|
191 |
-
//==========================================================
|
192 |
-
$this->imgdata_large[3][0]= 1481 ;
|
193 |
-
$this->imgdata_large[3][1]=
|
194 |
-
'iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAADAF'.
|
195 |
-
'BMVEUAAADOzs7Gxsa9vb21tbXOxsbOzsbGzsb3///O1ta1vb2c'.
|
196 |
-
'paVSWlpKWlpSY2ve5+97hIze7/9aY2vO5/9zhJRaa3tSY3PGzt'.
|
197 |
-
'aMlJxrc3tja3NKUlpCSlK1vcZze4RSWmPW5/+Upb3G3v9zhJxS'.
|
198 |
-
'Y3t7jKVaa4TO3veltc6ElK1re5Rjc4ycpbV7hJRaY3M5QlLn7/'.
|
199 |
-
'/Gzt6lrb2EjJzO3v9ja3vG1ve9zu+1xueltdacrc6UpcaMnL1C'.
|
200 |
-
'SlqElLV7jK1zhKVre5zW3u/O1ue1vc6ttcaMlKVze4xrc4RSWm'.
|
201 |
-
'tKUmPG1v+9zve1xu+tveeltd6crdbe5/+9xt6cpb17hJxaY3s5'.
|
202 |
-
'QlrW3vfO1u/Gzue1vdattc6lrcaUnLWMlK2EjKVze5Rrc4xja4'.
|
203 |
-
'RSWnNKUmtCSmO9xuecpcZ7hKVaY4TW3v/O1vfGzu+1vd6ttdal'.
|
204 |
-
'rc69xu+UnL2MlLWEjK1ze5xrc5R7hK1ja4zO1v+1veettd6lrd'.
|
205 |
-
'aMlL3Gzv/39//W1t7Gxs61tb29vcatrbWlpa2cnKWUlJyEhIx7'.
|
206 |
-
'e4TW1ufGxta1tcZSUlqcnK3W1u+UlKW9vda1tc57e4ytrcalpb'.
|
207 |
-
'1ra3vOzu9jY3OUlK29vd6MjKWEhJxaWmtSUmNzc4xKSlpjY3tK'.
|
208 |
-
'SmNCQlqUjJzOxs7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
209 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
210 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
211 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
212 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
213 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
214 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
|
215 |
-
'AAAAAAAAAAAAAAAAAAAAAAAAD///9fnkWVAAAAAnRSTlP/AOW3'.
|
216 |
-
'MEoAAAABYktHRP+lB/LFAAAACXBIWXMAAABFAAAARQBP+QatAA'.
|
217 |
-
'AB/klEQVR42mNgxAsYqCdd3+lcb4hLmj8wMMvEu8DCMqYbU9op'.
|
218 |
-
'UEFB2MTb26eyysomFl06XEEhUCHLpAKo2z/fujikEUVaXUFBMB'.
|
219 |
-
'BouLePuV+VVWGRciIXknSEsImCQd3//xwmPr65llaFcSFJHkjS'.
|
220 |
-
'3iYmWUDZ//8NfCr989NjNUMSUyTg0jneSiaCINn/gmlVQM12qg'.
|
221 |
-
'lJnp5waTMTE5NAkCyHWZW/lXWNfUlikmdYK0zax7siS4EDKJtd'.
|
222 |
-
'mQeU1XRwLBdLkRGASucWmGVnZ4dnhZvn5lmm29iVOWpnJqcuko'.
|
223 |
-
'JKR1Wm5eTkRKYF5eblp9sU2ZeUJiV7zbfVg0pH56UFBQXNjIqK'.
|
224 |
-
'jgkujItX1koKTVmYajsdKu2qETVhwgSXiUDZ2Bn9xqUeoZ5e0t'.
|
225 |
-
'LzYYZ3B092ndjtOnmKTmycW1s7SHa+l5dtB8zlccE6RlN0dGbM'.
|
226 |
-
'mDVbd5KupNBcL6+F82XgHouLj5vRP2PWLGNdd4+ppnxe8tJec6'.
|
227 |
-
'XnNsKkm0uVQ5RDRHQTPTym68nPlZbvkfYCexsa5rpJ2qXa5Umm'.
|
228 |
-
'ocmec3m8vHjmSs+fgxyhC5JDQ8WSPT2lvbzm8vDIe0nbtiBLN8'.
|
229 |
-
'8BigNdu1B6Lsje+fPbUFMLi5TMfGmvHi/puUAv23q2YCTFNqH5'.
|
230 |
-
'MvPnSwPh3HasCbm3XUpv+nS5VtrkEkwAANSTpGHdye9PAAAASn'.
|
231 |
-
'RFWHRzaWduYXR1cmUANGJkODkyYmE4MWZhNTk4MTIyNDJjNjUx'.
|
232 |
-
'NzZhY2UxMDAzOGFhZjdhZWIyNzliNTM2ZGFmZDlkM2RiNDU3Zm'.
|
233 |
-
'NlNT9CliMAAAAASUVORK5CYII=' ;
|
234 |
-
|
235 |
-
//==========================================================
|
236 |
-
// File: bl_purple.png
|
237 |
-
//==========================================================
|
238 |
-
$this->imgdata_large[4][0]= 1149 ;
|
239 |
-
$this->imgdata_large[4][1]=
|
240 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACAV'.
|
241 |
-
'BMVEX/////////7///5///1v//xv//rf//pf//lP//jP//hP//'.
|
242 |
-
'c///a///Wv//Wvf/Uv//Sv//Qv//Qvf/Off/Mf//Kf//If//If'.
|
243 |
-
'f/GP//GPf/EP//EPf/CP//CPf/CO//AP//APf3Oe/3Kff3Ke/3'.
|
244 |
-
'Ie/3GO/3EO/3AO/vSu/vSufvOefvMefvIefvGOfvEOfvCOfvAO'.
|
245 |
-
'fnUufnSufnMd7nId7nGN7nGNbnEN7nCN7nAN7ejN7ejNbec97e'.
|
246 |
-
'c9beUtbeQtbeIdbeGNbeENbeCNbeANbWpdbWa9bWQs7WGM7WEM'.
|
247 |
-
'7WCM7WAM7Otc7Orc7OnM7OSsbOIb3OGMbOEMbOCMbOAM7OAMbG'.
|
248 |
-
'pcbGnMbGe8bGa8bGKbXGEL3GCL3GAL3FucXBu73AvsC/v7+9pb'.
|
249 |
-
'29Ka29GLW9ELW9CLW9AL29ALW5rrm1lLW1e7W1MbW1GKW1EK21'.
|
250 |
-
'CLW1CK21AK2tjK2thKWtMaWtIaWtGJytCK2tCKWtAK2tAKWlhK'.
|
251 |
-
'Wle6WlEJylCJylAKWlAJyca5ycGJScEJScCJScAJycAJSUWpSU'.
|
252 |
-
'UoyUKZSUEIyUCIyUAJSUAIyMUoyMSoyMIYSMEISMCISMAIyMAI'.
|
253 |
-
'SECHuEAISEAHt7MXt7EHt7CHt7AHt7AHNzKXNzEGtzAHNzAGtr'.
|
254 |
-
'GGtrEGNrCGtrAGtrAGNjCFpjAGNjAFpaAFpaAFIpZn4bAAAAAX'.
|
255 |
-
'RSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsS'.
|
256 |
-
'AdLdfvwAAAAHdElNRQfTAwkRFB0ymoOwAAAB9UlEQVR4nGNgIA'.
|
257 |
-
'K42hhqGtm5+WFIWClKycvLK6gbuARGoEj4aMjLSElISUir6Tt7'.
|
258 |
-
'x+aEIWR8leQlwEBSTc/CK7awLguuR0lGQkJMVFRUTFJVzwko1d'.
|
259 |
-
'oFk9OQl5IQE+Dh5hVR0TV3CkkvbJgyASJjDZIR5GBl5eRX0TH1'.
|
260 |
-
'DEqrbJ2ypBEspSgvJSXKw8bMxMavbOLoGZNf1TZlybw4oIyfLN'.
|
261 |
-
'BxotxsLEzsQiaOHkFpBQ2905esrAZK2SpIAaUEuDm5+LTNPAKj'.
|
262 |
-
'C+pbps1evrIDKGWnLictKSkuLKyoZQyUya9o7Z2+YMXKGUApew'.
|
263 |
-
'M9PTVdXR0TEwf3wOjUirruafOXL18xFyjl72Kpb25qaurg4REU'.
|
264 |
-
'EFVe2zJ5zpLlK1aCpbydnZ2dnDwDA6NTopLLeiZNXbB8BcTAyP'.
|
265 |
-
'TQ0JDg4KCY1NS83JKmiVOBepYvX9UPlAovzEiPSU/LLyior2vq'.
|
266 |
-
'mjZr3vLlIF01IC+XVhUWFlZW1Lc290ycOGfxohVATSsXx4Oksn'.
|
267 |
-
'vaWlsb2tq6J0+bM2/RohVA81asbIcEYueU3t7JU6ZNnwNyGkhm'.
|
268 |
-
'+cp5CRCppJnzZ8+ZM3/JUogECBbBIixr8Yqly8FCy8F6ltUgoj'.
|
269 |
-
'lz7sqVK2ByK+cVMSCDxoUrwWDVysXt8WhJKqG4Y8bcuTP6qrGk'.
|
270 |
-
'QwwAABiMu7T4HMi4AAAAAElFTkSuQmCC' ;
|
271 |
-
|
272 |
-
//==========================================================
|
273 |
-
// File: bl_gray.png
|
274 |
-
//==========================================================
|
275 |
-
$this->imgdata_large[5][0]= 905 ;
|
276 |
-
$this->imgdata_large[5][1]=
|
277 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAABO1'.
|
278 |
-
'BMVEX////////3///39/fv7+/e5+fW3t7Wzs7WxsbG1tbGzsbG'.
|
279 |
-
'xsbDxMS/v7++wMC+v7+9zsa9xsa9vb29tbW9ra29pa24uLi1xs'.
|
280 |
-
'a1vb21tbWxtrattbWmpqalra2cra2cpaWcnJycjIyUpaWUnJyU'.
|
281 |
-
'lJSUjIyMnJyMnJSMlJSMlIyMjJSMjIyElJSElIyEjIyEhIR7jI'.
|
282 |
-
'x7hIR7hHt7e3t7e3N7e2tzhIRze3tze3Nzc3Nre3trc3Nrc2tr'.
|
283 |
-
'a2tjc3Njc2tja3Nja2tjY2NjWlpaa2taY2taY2NaY1paWlpaUl'.
|
284 |
-
'JSY2NSY1pSWlpSWlJSUlJSUkpKWlpKWlJKUlpKUlJKUkpKSkpK'.
|
285 |
-
'SkJCUlJCUkJCSkpCSkJCQkI5Sko5QkI5Qjk5OUI5OTkxQkIxOT'.
|
286 |
-
'kxMTkxMTEpMTEhMTEhKSkYISEpy7AFAAAAAXRSTlMAQObYZgAA'.
|
287 |
-
'AAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdE'.
|
288 |
-
'lNRQfTAwkRFQfW40uLAAABx0lEQVR4nI3SbXfSMBQA4NV3nce5'.
|
289 |
-
'TecAHUywRMHSgFuBCFsQUqwBS1OsWQh0GTj//y8wZUzdwQ/efM'.
|
290 |
-
'tzcm/uuXdj4z9ic/PR9k4qk1qDnf0X2/uZzKt8GaRvSubg4LVp'.
|
291 |
-
'mkWzCGAT/i3Zsm2XNQHLsm2n2937LaaNnGoJFAEo27B50qN0ay'.
|
292 |
-
'Wg26lXsw8fP8nmzcJb2CbsnF5JmmCE8ncN404KvLfsYwd7/MdV'.
|
293 |
-
'Pdgl/VbKMIzbuwVgVZw2JlSKJTVJ3609vWUY957lgAUd1KNcqr'.
|
294 |
-
'yWnOcOPn8q7d5/8PywAqsOOiVDrn42NFk+HQ7dVuXNYeFdBTpN'.
|
295 |
-
'nY5JdZl8xI5Y+HXYaTVqEDp1hAnRohZM03EUjMdhn5wghOoNnD'.
|
296 |
-
'wSK7KiiDPqEtz+iD4ctdyAifNYzUnScBSxwPd6GLfRURW7Ay5i'.
|
297 |
-
'pS5bmrY8348C5vvUI+TLiIVSJrVA0heK/GDkJxYMRoyfCSmk4s'.
|
298 |
-
'uWc3yic/oBo4yF374LGQs5Xw0GyQljI8bYmEsxVUoKxa6HMpAT'.
|
299 |
-
'vgyhU2mR8uU1pXmsa8ezqb6U4mwWF/5MeY8uLtQ0nmmQ8UWYvb'.
|
300 |
-
'EcJaYWar7QhztrO5Wr4Q4hDbAG/4hfTAF2iCiWrCEAAAAASUVO'.
|
301 |
-
'RK5CYII=' ;
|
302 |
-
|
303 |
-
//==========================================================
|
304 |
-
// File: bl_brown.png
|
305 |
-
//==========================================================
|
306 |
-
$this->imgdata_large[6][0]= 1053 ;
|
307 |
-
$this->imgdata_large[6][1]=
|
308 |
-
'iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABoV'.
|
309 |
-
'BMVEX////Gzs7GvbXGrZTGpXu9nHO1nHO1nIy9taXGxs7GtaXO'.
|
310 |
-
'nHPGlFrGjEq9hEq1hEqte0Klczmcazmce1KtnIzGxsbGvb3OlF'.
|
311 |
-
'LOlFq9hFKte0qcc0KUYzGEWimMc1K9ta3OnGvOnGPWnGO9jFq9'.
|
312 |
-
'jFKlc0KUazmMYzl7UilzUjGtpZzGxr3GnGPWpWvepXO1hFJ7Wj'.
|
313 |
-
'FrSiFjUjG1ra3GnHPvxpT/5733zpythFKUa0KEYzlzUilaOSF7'.
|
314 |
-
'Wjm9jErvvYz/99b///f/78bnrYS1hFqle0p7UjFrSiljQiFCMR'.
|
315 |
-
'iMhHO9lGvGjFLWnGv/3q3////erXuthEqlc0paQiFKMRhSQin/'.
|
316 |
-
'1qX/997//++cc0pjSilaQilKORhCKRiclIy9pYzGlGPntYT33q'.
|
317 |
-
'3vvZSEWjlSOSE5KRB7c2O1lHutczmthFqte1JrWkqtjGtCKRBa'.
|
318 |
-
'SjmljGuca0KMYzGMaznOztaclISUYzmEWjFKOSF7a1qEYzFaSi'.
|
319 |
-
'GUjISEa0pKOSm9vb2llIxaQhg5IQiEc2tzY0paORilnJy1raVS'.
|
320 |
-
'OSljUkJjWkKTpvQWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'.
|
321 |
-
'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkREiei'.
|
322 |
-
'zP2EAAAB9UlEQVR4nGWS/VfSUBjHL5QluhhBxtwyWcCus5Blpm'.
|
323 |
-
'wDC4ONaWXCyBi7RMZmpQ2Bypm9W/byV3cHHo/W88s95/s5z/d5'.
|
324 |
-
'uwCcCh/4L3zAf+bs0NC588On9QAYGSUuBINk6GI4cmnsBLk8Go'.
|
325 |
-
'1SFEGMkzRzZeLq5JE8FvDHouw1lqXiCZJOcnCKnx4AcP0GBqmZ'.
|
326 |
-
'mRgRT9MMB4Wbs7cGSXNRik3dnp9fiMUzNCNKgpzN9bsaWaQo9s'.
|
327 |
-
'7dfH7pXiFTZCBU1JK27LmtBO8TDx7mV1eXHqXXyiIUFLWiVzHx'.
|
328 |
-
'BxcJIvV4/cn6wkqmWOOwmVE3UQOAp6HxRKL5bGPj+VwhUhalFq'.
|
329 |
-
'8alm5vAt+LlySZTsebzcKrraIIW4JqZC3N3ga+1+EQTZKZta1M'.
|
330 |
-
'pCZCSeDViqVrThsEdsLJZLJYLpZrHVGScrKBvTQNtQHY6XIM02'.
|
331 |
-
'E6Ik7odRW1Dzy3N28n3kGuB3tQagm7UMBFXI/sATAs7L5vdbEs'.
|
332 |
-
'8Lycm923NB0j5wMe6KOsKIIyxcuqauxbrmlqyEWfPmPy5assY1'.
|
333 |
-
'U1SvWKZWom9nK/HfQ3+v2HYZSMStayTNN0PYKqg11P1nWsWq7u'.
|
334 |
-
'4gJeY8g9PLrddNXRdW8Iryv86I3ja/9s26gvukhDdvUQnIjlKr'.
|
335 |
-
'IdZCNH+3Xw779qbG63f//ZOzb6C4+ofdbzERrSAAAAAElFTkSu'.
|
336 |
-
'QmCC' ;
|
337 |
-
|
338 |
-
//==========================================================
|
339 |
-
// File: bl_darkgreen.png
|
340 |
-
//==========================================================
|
341 |
-
$this->imgdata_large[7][0]= 1113 ;
|
342 |
-
$this->imgdata_large[7][1]=
|
343 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'.
|
344 |
-
'BMVEX////////3///v///n/+/e99bW/+/W99bO786/v7++vr69'.
|
345 |
-
'/96999a7wb24vbu1/9a1zqW1u7itxrWosq6l772l1qWlxrWlxq'.
|
346 |
-
'2lva2cxpSU562U3q2UxqWUvaWUpZyM77WM57WMvYyMtZyMrZyM'.
|
347 |
-
'pZSMnJSEvZyEtYyErZSElIx7zpR7xpx7xpR7vZR7jIRz1pRzxp'.
|
348 |
-
'RzjIRrzpRrzoxrxoxrtYRrrYxrrXtrpYRrhHNjzoxjxoxjxoRj'.
|
349 |
-
'vYRjtYRjrXtjpXtjlGNje2tazoxazoRaxoxaxoRavYRatYRatX'.
|
350 |
-
'tarXtapXNanHNajFpae2tSzoRSxoRSvXtStXtSrXtSrXNSpXNS'.
|
351 |
-
'nHNSnGtSlGtSlGNSjGtSjGNKvXtKtXNKrXNKpWtKnGtKlGNKjG'.
|
352 |
-
'NKhGNKhFJKc1pKa1JCrWtCpWtCnGtClGNCjGNCjFpChFpCe1JC'.
|
353 |
-
'a1JCY1I5pWs5nGM5lGM5jFo5hFo5e1o5c0o5WkoxjFoxhFoxhF'.
|
354 |
-
'Ixe1Ixc1Ixc0oxa0ophFIpe0opc0opa0opa0IpY0IpWkIpWjkp'.
|
355 |
-
'UkIpUjkhc0oha0IhY0IhWjkhWjEhUjkhUjEhSjEhSikhQjEhQi'.
|
356 |
-
'kYWjkYSjEYSikYQjEYQikQSikQQikQQiEQOSExf8saAAAAAXRS'.
|
357 |
-
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
358 |
-
'LdfvwAAAAHdElNRQfTAwkRFCaDkWqUAAAB+ElEQVR4nI3S+1vS'.
|
359 |
-
'UBgHcGZlPV0ks/vFrmQWFimJjiwiYUJWjFBWFhClyZCy5hLrwA'.
|
360 |
-
'x2EIwJC1w7zf2vnU0re+iHvs9++7x7zznvORbLf+TA6ct9fYMX'.
|
361 |
-
'jrfAUYefpp+/iM1ykxf/lmuhUZ/PTwXC8dml5Wcd23o5H5Mk6b'.
|
362 |
-
'5NUU8icXbhS67rNzn9JDnguOEYGQtEEtwC+Crs3RJ76P5A/znr'.
|
363 |
-
'vsNX7wQnEiwHCtK7TTkW8rvdZ9uJtvZTLkxpHhSrP66bNEj7/P'.
|
364 |
-
'3WNoLYeeSWQQCIpe9lQw7RNEU5rDsIYtcJ14Nocg7kRUlBNkxn'.
|
365 |
-
'YmGKcp7cv3vPwR7XOJPmc0VYU3Sv0e9NOBAYG7Hbz/cMjTMveZ'.
|
366 |
-
'CHkqxuTBv0PhYJB4N3XR6PJ5rMAPMnpGUxDX1IxSeMTEaZp1OZ'.
|
367 |
-
'nGAIQiYtsalUIhFlmGTy3sO3AizJCKn6DKYryxzHsWyaneMzr6'.
|
368 |
-
'cWxRVZVlFTe4SpE3zm+U/4+whyiwJcWVMQNr3XONirVWAklxcE'.
|
369 |
-
'EdbqchPhjhVzGpeqhUKhWBQhLElr9fo3pDaQPrw5xOl1CGG1JE'.
|
370 |
-
'k1uYEBIVkrb02+o6RItfq6rBhbw/tuINT96766KhuqYpY3UFPF'.
|
371 |
-
'BbY/19yZ1XF1U0UNBa9T7rZsz80K0jWk6bpWGW55UzbvTHZ+3t'.
|
372 |
-
'vbAv/IT+K1uCmhIrKJAAAAAElFTkSuQmCC' ;
|
373 |
-
|
374 |
-
//==========================================================
|
375 |
-
// File: bl_green.png
|
376 |
-
//==========================================================
|
377 |
-
$this->imgdata_large[8][0]= 1484 ;
|
378 |
-
$this->imgdata_large[8][1]=
|
379 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'.
|
380 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
381 |
-
'B3RJTUUH0wMMFjM4kcoDJQAABVlJREFUeNq9ll2MJFUVx3/11V'.
|
382 |
-
'Vd/TE9vU0v4zLDwJIF16jBqLAPhsRXEiDqg0QTJiQSjcSNvCzw'.
|
383 |
-
'sBEDDxizhvAAxBgf1oR9QF9NiE9ESFZkQyZB5WtddmdnZ3qqqr'.
|
384 |
-
'uqbt367Cofqu3ZZpWVaDzJfbkf53//55z/PVdZXV3l/2H6f7Lp'.
|
385 |
-
'5VdOV/4Nb+GmHpUeA7AdBNxc3kafNb73jRPK9Xwon8ToxVefqU'.
|
386 |
-
'b91wibH5EkCQBCizFihTSviHUHR0hWws9xe3wvJ7/7nPKpgX5y'.
|
387 |
-
'9oFqt3eOgWniRBoAbUBGGqZUibSYaeoT2B5bnkdaSA6793Cv/S'.
|
388 |
-
'QPPbihXBfo5VdOV+8dfgnvwAU62YH5fCZ12sDujFkwyegCqTrB'.
|
389 |
-
'iUOKTOJKj8jr88jS8zy6cXwBTP048nuHX0I0nDlIp7RpTG7kM0'.
|
390 |
-
'sdyAYsTVukUuWGhlWHMq0ITL92lnUp9R1Obz/GmTNnqn9bDD8/'.
|
391 |
-
'+0D1oX0O0zQZZDYCsK2j3Gl9jQqDfHiei8GfiKVLlsZkJaBAN1'.
|
392 |
-
'0i6PgwUbB0GxG5/PrtE/xLRr959Znqw9452oVNI+jiJhnr1pe4'.
|
393 |
-
'k29zB1/nFr5Kj7tpt1YYhJ0FJ7nUYbcJQBgahN2MzeCP/OipR6'.
|
394 |
-
'prgN6Qr6ELFQFUWoRpNVjlKwxZB8DCpE+PtfEKqV1cUzxpVudu'.
|
395 |
-
'GTBHA5Y1g99e+dUio9O/P1Vpq+/WE5GGjDSMoAtAQjrf3C52IP'.
|
396 |
-
'QxpY4WK2hpReka9Gfrhqgz0bACRoCWjDh56kQ1z9FeuUUQxVhK'.
|
397 |
-
'B92sD1VahM+bAJgcoJhGjP/6Ln8rAgDiRCVRKiIzxMkkodBJ85'.
|
398 |
-
'im1IlEHbE4k1xyNveL4YP8HarmGJIOpqyjeQmfNHmTvnqZTWBt'.
|
399 |
-
'vIJXpPwlukJSuSTKGK3pEwtJmiX00ZlInTyNscImO6XBITvH1c'.
|
400 |
-
'8vVt2OucdKvIyeKRTNCivsEMgcpg6taYs30nfq0Gqg6hOSSFJ4'.
|
401 |
-
'BSnJPht0IqEjWmOGocEI6F0J94F0qaL6BntTF0MtUfweKQKAPU'.
|
402 |
-
'Wwp4OcVnQAmVb0p9DLOzjEhEKnGRmoRc7EzRGlwA6NujAKG4yP'.
|
403 |
-
'6Sjwc4aVznZ7DK0xXdkDoJf0kGmFBniFBOBGcZSCCSKd0IwN0k'.
|
404 |
-
'IS+QZWCGVZex4BnUxya3+Zt9iugQbcRFpIAtuHvAZulPUdLhUJ'.
|
405 |
-
'RqegI3WcqaSXddlT3idsWMSRRGkEtNwmyTifAwyBo7LP+11J0e'.
|
406 |
-
'7tM7pZOYblHkBLcqZ5LcYtw6Wbd4CM3SpE9foYZsIHoqDKCrbz'.
|
407 |
-
'mLSQtPwmuhXgtBLs0GBdbXOhFGB7WBKO2F8GXt9/VO97Ya3atF'.
|
408 |
-
'7nUHnwGjGGQqcPxFEdFqURkEidiZszAERoYIsGju1hq21kWee3'.
|
409 |
-
'bw15+8WpsvAy3K1+i3JkkhZyPpxxjjPOsfOYiZ+TFhLPzQnHOU'.
|
410 |
-
'tpzGB2dgA4tscIkKIx19Cxg/fPL7vQJu47eXt1VvsDK8pwPueZ'.
|
411 |
-
'PuZoQMOqhRoJHSs0kKLBWjvjYinmeQGw1TaX1RFdfZ3LMzYLjA'.
|
412 |
-
'C++dkn6AaH2Nobk6cxEzdnuG0TdC8zvdJkN0hqkFkO/jwL0fxa'.
|
413 |
-
'so8sBcuFzQ+/+MRC+BeAHnpwQzn++ee5KT9Eshuy46dcKAXm32'.
|
414 |
-
'0uzPQhS4GttkH2GQID2Wc0Y4LtAbDxhZ/x5A+e/uTG9+jGceXH'.
|
415 |
-
'9/ySnnIXnUzOxXe1038mW3ZynNmam4yYWkO+f9cv+Oljz16/lV'.
|
416 |
-
'9tDz/9nerc1hm8ZEScSRK7VvtYl1i1dklsOKyvc+zg/bzw1O8+'.
|
417 |
-
'/efkajt56kR1ydlEJBc5H46xzbrJ3dY9wrB7hGcff+6/+279L+'.
|
418 |
-
'0fHxyiE8XMLl4AAAAASUVORK5CYII=' ;
|
419 |
-
|
420 |
-
//==========================================================
|
421 |
-
// File: bl_blue.png
|
422 |
-
//==========================================================
|
423 |
-
$this->imgdata_large[9][0]= 1169 ;
|
424 |
-
$this->imgdata_large[9][1]=
|
425 |
-
'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACEF'.
|
426 |
-
'BMVEX/////////7//35//v1v/exv/Wvf/Wrf/Wpf/Orf+/v7+9'.
|
427 |
-
'tc69jP+9hP+5ucW1tc6tlP+rq7Wlpdalpcalpb2cnM6cnMacc/'.
|
428 |
-
'+cWv+UlLWUjN6UjK2Uc/+Ma/+MUv+EhKWEa/+EQvd7e8Z7e7V7'.
|
429 |
-
'e6V7c957Wv9za9Zza8ZzSv9ra5xrSv9rOf9rMe9jUudjQv9jOe'.
|
430 |
-
'9aWpRaUt5aUpRaSu9aSudSUoxSSs5SSoxSMf9KQtZKOfdKMedK'.
|
431 |
-
'Kf9KKe9CKf9CKb1CKa1CIfdCIedCId45MXs5Kfc5If85Iec5Id'.
|
432 |
-
'Y5GP8xMbUxMXsxKc4xKZQxIf8xGP8xGO8xGN4xGNYxGL0xGK0p'.
|
433 |
-
'KXMpIYwpGP8pGO8pGOcpGNYpGM4pEP8pEPcpEOcpEN4pENYpEM'.
|
434 |
-
'YpEL0hGKUhEP8hEPchEO8hEOchEN4hENYhEM4hEMYhELUhCP8h'.
|
435 |
-
'CO8hCN4YGJwYGGsYEL0YEK0YEHMYCN4YCM4YCMYYCL0YCKUYAP'.
|
436 |
-
'8QEJQQEIwQEHsQEGsQCM4QCLUQCK0QCKUQCJwQCJQQCIwQCHMQ'.
|
437 |
-
'CGsQAP8QAPcQAO8QAOcQAN4QANYQAM4QAMYQAL0QALUQAKUQAJ'.
|
438 |
-
'QQAIQICGsICGMIAO8IANYIAL0IALUIAK0IAKUIAJwIAJQIAIwI'.
|
439 |
-
'AIQIAHsIAHMIAGsIAGMAAN4AAMYAAK0AAJQAAIwAAIQAAHMAAG'.
|
440 |
-
'sAAGMAAFrR1dDlAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
441 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFRPMOZ'.
|
442 |
-
'/2AAAB+klEQVR4nGNgIAIIqeqZmBqpi2JISNml5lVXV3d198Yo'.
|
443 |
-
'oUjwm1SnxsbGRsSm5ZfNXO4tjCTjVh0ABhFx6QV9E1Y0S8JkuN'.
|
444 |
-
'3yAgLc7W3t/QPi4jPKJ8ye1yoIlTKpjvVy15eVUbN0i4zKLJ8w'.
|
445 |
-
'ae6qcKgLqmMj3PUFWFl5NJ0CExLLJzbNW7BWCyxlXR0ba6/Axs'.
|
446 |
-
'zELmfnkRBT0QiSKgXJCOflxUbYy3KyMHEoOrtEZ1c2TZ6/cMl6'.
|
447 |
-
'eaCUamdsbIC7tjgPr4SBS3BMMVDTwkXr1hsDpYy6UmMj/O0tdX'.
|
448 |
-
'QNbDxjknJLWqYsXLx0vStQynxGflpkZGCgs7Onp29SbtNkoMy6'.
|
449 |
-
'pevCgFJWy3oyMuKjgoKCPWNCvEuqWhcsWrJ06XqQlPnMvrKyrM'.
|
450 |
-
'TomJjkZAfHlNa2qdOWrlu63gcopbG8v7+hvLwip7g4JdSxsLZu'.
|
451 |
-
'8dKlS9ettwBKic2eNXHChIkTG5tKqgpr2uo6loLAehWQx0LnzJ'.
|
452 |
-
'49p6mpeXLLlNq6RUvqly6dvnR9Bx9ISnnlvLmT582bMr9t4aL2'.
|
453 |
-
'+vrp60GaDCGB6Ld6wfwFCxYCJZYsXQ+SmL6+FBryInVrFi1atH'.
|
454 |
-
'jJkqVQsH6pNCzCJNvXrQW6CmQJREYFEc2CYevXrwMLAyXXl0oz'.
|
455 |
-
'IAOt0vVQUGSIkabkDV3DwlzNVDAksAAAfUbNQRCwr88AAAAASU'.
|
456 |
-
'VORK5CYII=' ;
|
457 |
-
|
458 |
-
//==========================================================
|
459 |
-
// File: bs_red.png
|
460 |
-
//==========================================================
|
461 |
-
$this->imgdata_small[0][0]= 437 ;
|
462 |
-
$this->imgdata_small[0][1]=
|
463 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'.
|
464 |
-
'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'.
|
465 |
-
'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'.
|
466 |
-
'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'.
|
467 |
-
'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'.
|
468 |
-
'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
469 |
-
'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGDNEMgOYAAAAm0'.
|
470 |
-
'lEQVR4nI3Q3RKCIBAFYGZMy9RKzX7MVUAUlQTe/+kS0K49d3wD'.
|
471 |
-
'7JlFaG+CvIR3FvzPXgpLatxevVVS+Jzv0BDGk/UJwOkQ1ph2g/'.
|
472 |
-
'Ct5ACX4wNT1o/zzUoJUFUGBiGfVnDTYGJgmrWy8iKEtp0Bpd2d'.
|
473 |
-
'jLGu56MB7f4JOOfDJAwoNwslk/jOUi+Jts6RVNrC1hkhPy50Ef'.
|
474 |
-
'u79/ADQMQSGQ8bBywAAAAASUVORK5CYII=' ;
|
475 |
-
|
476 |
-
|
477 |
-
//==========================================================
|
478 |
-
// File: bs_lightblue.png
|
479 |
-
//==========================================================
|
480 |
-
$this->imgdata_small[1][0]= 657 ;
|
481 |
-
$this->imgdata_small[1][1]=
|
482 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABVl'.
|
483 |
-
'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'.
|
484 |
-
'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'.
|
485 |
-
'+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'.
|
486 |
-
'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'.
|
487 |
-
'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'.
|
488 |
-
'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'.
|
489 |
-
'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'.
|
490 |
-
'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'.
|
491 |
-
'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'.
|
492 |
-
'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'.
|
493 |
-
'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGTok'.
|
494 |
-
'9Yp9AAAAtElEQVR4nGNgIBaw8wkpKghzwvksPAKiUsraprYiLF'.
|
495 |
-
'ARXkE2JiZ1PXMHXzGIAIekOFBE08TGLTCOCyzCLyvDxsZqZOnk'.
|
496 |
-
'E56kAhaRV9NQUjW2tPcMjs9wBYsY6Oobmlk7egRGpxZmgkW0zC'.
|
497 |
-
'2s7Jy9giKT8gohaiQcnVzc/UNjkrMLCyHmcHr7BYREJKTlFxbm'.
|
498 |
-
'QOxiEIuKTUzJKgQCaZibpdOzQfwCOZibGRi4dcJyw3S4iQ4HAL'.
|
499 |
-
'qvIlIAMH7YAAAAAElFTkSuQmCC' ;
|
500 |
-
|
501 |
-
//==========================================================
|
502 |
-
// File: bs_gray.png
|
503 |
-
//==========================================================
|
504 |
-
$this->imgdata_small[2][0]= 550 ;
|
505 |
-
$this->imgdata_small[2][1]=
|
506 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAABI1'.
|
507 |
-
'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'.
|
508 |
-
'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'.
|
509 |
-
'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'.
|
510 |
-
'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'.
|
511 |
-
'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'.
|
512 |
-
'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'.
|
513 |
-
'3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'.
|
514 |
-
'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'.
|
515 |
-
'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIA'.
|
516 |
-
'AAsSAdLdfvwAAAAHdElNRQfTAwkUGiIctEHoAAAAfElEQVR4nI'.
|
517 |
-
'2N2xKDIAwF+bZ2kAa8cNFosBD//yvKWGh9dN+yk9kjxH28R7ze'.
|
518 |
-
'wzBOYSX6CaNB927Z9qZ66KTSNmBM7UU9Hx2c5qjmJaWCaV5j4t'.
|
519 |
-
'o1ANr40sn5a+x4biElrqHgrXMeac/c1nEpFHG0LSFoo/jO/BeF'.
|
520 |
-
'lJnFbT58ayUf0BpA8wAAAABJRU5ErkJggg==' ;
|
521 |
-
|
522 |
-
//==========================================================
|
523 |
-
// File: bs_greenblue.png
|
524 |
-
//==========================================================
|
525 |
-
$this->imgdata_small[3][0]= 503 ;
|
526 |
-
$this->imgdata_small[3][1]=
|
527 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAxl'.
|
528 |
-
'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'.
|
529 |
-
'9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'.
|
530 |
-
'17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'.
|
531 |
-
'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'.
|
532 |
-
'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'.
|
533 |
-
'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'.
|
534 |
-
'dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfT'.
|
535 |
-
'AwkUGTIqLgJPAAAAqklEQVR4nI2QVxOCMBCEM6Mi2OiCvSslJB'.
|
536 |
-
'CUoqjn//9TYgCfubf9Zu9uZxFqO+rscO7b6l/LljMZX29J2pNr'.
|
537 |
-
'YjmX4ZaIEs2NeiWO19NNacl8rHAyD4LR6jjw6PMRdTjZE0JOiU'.
|
538 |
-
'dDv2ALTlzRvSdCCfAHGCc7yRPSrAQRQOWxKc3C/IUjBlDdUcM8'.
|
539 |
-
'97vFGwBY9QsZGBc/A4DWZNbeXIPWZEZI0c2lqSute/gCO9MXGY'.
|
540 |
-
'4/IOkAAAAASUVORK5CYII=' ;
|
541 |
-
|
542 |
-
//==========================================================
|
543 |
-
// File: bs_yellow.png
|
544 |
-
//==========================================================
|
545 |
-
$this->imgdata_small[4][0]= 507 ;
|
546 |
-
$this->imgdata_small[4][1]=
|
547 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAzF'.
|
548 |
-
'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'.
|
549 |
-
'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'.
|
550 |
-
'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'.
|
551 |
-
'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'.
|
552 |
-
'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'.
|
553 |
-
'50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'.
|
554 |
-
'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAH'.
|
555 |
-
'dElNRQfTAwkUGSDZl3MHAAAAqElEQVR4nI3QWRNDMBAA4My09E'.
|
556 |
-
'IF1SME0VT1okXvM/3//6kEfbZv+81eswA0DfHxRpOV+M+zkDGG'.
|
557 |
-
'rL63zCoJ2ef2RLZDIqNqYexyvFrY9ePkxGWdpvfzC7tEGtIRly'.
|
558 |
-
'nqzboFKMlizAXbNnZyiFUKAy4bZ+B6W0lRaQDLmg4h/k7eFwDL'.
|
559 |
-
'OWIky8qhXUBQ7gKGmsxpC+ah1TdriwByqG8GQNDNr6kLjf/wAx'.
|
560 |
-
'KgEq+FpPbfAAAAAElFTkSuQmCC' ;
|
561 |
-
|
562 |
-
//==========================================================
|
563 |
-
// File: bs_darkgray.png
|
564 |
-
//==========================================================
|
565 |
-
$this->imgdata_small[5][0]= 611 ;
|
566 |
-
$this->imgdata_small[5][1]=
|
567 |
-
'iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAABJl'.
|
568 |
-
'BMVEX////////o8v/f6O7W4OnR3PXL1OTL0evEyLvCzePAwMC/'.
|
569 |
-
'v7a8wsq7t7C1xum1vtS1q6GzopmyxeKsrsOqvNWoq7anvN+nsb'.
|
570 |
-
'qhrcGgqbGfpq6cp7+bqMuVmJKRm7yPlKKMnL6FkKWFipOEkLSE'.
|
571 |
-
'j6qEhoqAiaB+jqd8haF7hZR4iJt4g5l3hZl2gIt2cod1hJVzeY'.
|
572 |
-
'VzboJvhp9sfJJsb41peY1pd5xpdoVod4xndI5lcHxka4BjcYVg'.
|
573 |
-
'Z3BfboFbb4lbZnZbYntaZ4laZYVZV3JYYWpXX3JWWm5VX4RVW2'.
|
574 |
-
'NUYX9SXHxPWn5OVFxNWWtNVXVMVWFKV3xHUGZGU3dGTldFSlxE'.
|
575 |
-
'Sk9ESXBCRlNBS3k/SGs/RU4+R1k9R2U6RFU2PUg0PEQxNU0ECL'.
|
576 |
-
'QWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAA'.
|
577 |
-
'CxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGQmbJetrAAAAtklEQV'.
|
578 |
-
'R4nGNgwAK4JZTNNOWlYDxhMT4ZDTOzQE1uMF9CiJWVU0LbxDlS'.
|
579 |
-
'G8QVF+FnZ2KRNHAIiPUHaZGSlmZj5lH19A1KjLUA8lXU5MWllF'.
|
580 |
-
'yjo30TYr2BfG19G11b37CEeN84H38gX1HbwTUkOjo+zjfG3hLI'.
|
581 |
-
'l1exCvCNCwnxjfMz0gTyRdXNHXx9fUNCQu2MwU6SN3ZwD42LCH'.
|
582 |
-
'W30IK4T8vUJSAkNMhDiwPqYiktXWN9JZj7UQAAjWEfhlG+kScA'.
|
583 |
-
'AAAASUVORK5CYII=' ;
|
584 |
-
|
585 |
-
|
586 |
-
//==========================================================
|
587 |
-
// File: bs_darkgreen.png
|
588 |
-
//==========================================================
|
589 |
-
$this->imgdata_small[6][0]= 666 ;
|
590 |
-
$this->imgdata_small[6][1]=
|
591 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABX1'.
|
592 |
-
'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'.
|
593 |
-
'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'.
|
594 |
-
'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'.
|
595 |
-
'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'.
|
596 |
-
'6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'.
|
597 |
-
'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'.
|
598 |
-
'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'.
|
599 |
-
'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'.
|
600 |
-
'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'.
|
601 |
-
'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'.
|
602 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
603 |
-
'RQfTAwkUGRjxlcuZAAAAtElEQVR4nGNgIBZw8osqqIpzw/msfI'.
|
604 |
-
'IiUmr6lo6SbFARASEOJiYtQ2uXADmIAJeEGFBE18LBMySBBywi'.
|
605 |
-
'LC/LwcFiZuvmH5WiAxZR0tRW1DC3dfYJS8zyAouYGBibWtm7+o'.
|
606 |
-
'TEpZfkgEX0rG3snNx9Q2NSCksgaqRd3Ty8gyLiU/NKSiDmcPsF'.
|
607 |
-
'BodHJ2UUlZTkQ+xikIlNSE7LLgECZagL2VQyc0H8YnV2uD94jS'.
|
608 |
-
'ILIo14iQ4HALarJBNwbJVNAAAAAElFTkSuQmCC' ;
|
609 |
-
|
610 |
-
//==========================================================
|
611 |
-
// File: bs_purple.png
|
612 |
-
//==========================================================
|
613 |
-
$this->imgdata_small[7][0]= 447 ;
|
614 |
-
$this->imgdata_small[7][1]=
|
615 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAnF'.
|
616 |
-
'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'.
|
617 |
-
'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'.
|
618 |
-
'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'.
|
619 |
-
'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'.
|
620 |
-
'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
621 |
-
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGS'.
|
622 |
-
'o5QpoZAAAAnElEQVR4nI3Q2xJDMBAG4MyQokWrZz3oSkJISJH3'.
|
623 |
-
'f7dK0Gv/Xb7J7vyzCK0NjtPsHuH/2wlhTE7LnTNLCO/TFQjjIp'.
|
624 |
-
'hHAA6bY06LSqppMAY47x+04HXTba2kAFlmQKr+YuVDCGUG2k6/'.
|
625 |
-
'rNwYK8rKwKCnPxHnVS0aA3rag4UQslUGhrlk0Kpv1+sx3tLZ6w'.
|
626 |
-
'dtYemMkOsnz8R3V9/hB87DEu2Wos5+AAAAAElFTkSuQmCC' ;
|
627 |
-
|
628 |
-
|
629 |
-
//==========================================================
|
630 |
-
// File: bs_brown.png
|
631 |
-
//==========================================================
|
632 |
-
$this->imgdata_small[8][0]= 677 ;
|
633 |
-
$this->imgdata_small[8][1]=
|
634 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABaF'.
|
635 |
-
'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'.
|
636 |
-
'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'.
|
637 |
-
'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'.
|
638 |
-
'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'.
|
639 |
-
'/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'.
|
640 |
-
'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'.
|
641 |
-
'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'.
|
642 |
-
'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'.
|
643 |
-
'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'.
|
644 |
-
'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'.
|
645 |
-
'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLd'.
|
646 |
-
'fvwAAAAHdElNRQfTAwkUGho0tvl2AAAAtklEQVR4nGNgIBaoSg'.
|
647 |
-
'mLKGpowfkGMty8AqJKpi4mRlAROR5ONg4JFUv3YHOIgDo/HwsT'.
|
648 |
-
'q6yps29EsjZYREFIkJ2ZS9/OMzA20wEsIi8uKSZtaOPmH5WSFw'.
|
649 |
-
'YW0VRW07Vw8vCLSMguLwCL6FlaObp6B0TGZxSXQ9TouHv6+IXG'.
|
650 |
-
'JGYWlpdDzNEKCgmPjkvLKS0vL4LYxWAen5SelV8OBNZQFxrZ5h'.
|
651 |
-
'aC+GX2MDczMBh7pZakehkTHQ4AA0Am/jsB5gkAAAAASUVORK5C'.
|
652 |
-
'YII=' ;
|
653 |
-
|
654 |
-
//==========================================================
|
655 |
-
// File: bs_blue.png
|
656 |
-
//==========================================================
|
657 |
-
$this->imgdata_small[9][0]= 436 ;
|
658 |
-
$this->imgdata_small[9][1]=
|
659 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'.
|
660 |
-
'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'.
|
661 |
-
'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'.
|
662 |
-
'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'.
|
663 |
-
'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'.
|
664 |
-
'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
665 |
-
'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGhNNakHSAAAAmk'.
|
666 |
-
'lEQVR4nI3P2xKCIBAGYGfM6SBWo1nauIqogaDA+z9dK9Lhrv47'.
|
667 |
-
'vtl/2A2CfxNlJRRp9IETYGraJeEb7ocLNKznia8A7Db7umWDUG'.
|
668 |
-
'sxAzhurxRHxok4KQGqCuEhlL45oU1D2w5BztY4KRhj/bCAsetM'.
|
669 |
-
'2uObjwvY8/oX50JItYDxSyZSTrO2mNhvGMbaWAevnbFIcpuTr7'.
|
670 |
-
't+5AkyfBIKSJHdSQAAAABJRU5ErkJggg==' ;
|
671 |
-
|
672 |
-
//==========================================================
|
673 |
-
// File: bs_green.png
|
674 |
-
//==========================================================
|
675 |
-
$this->imgdata_small[10][0]= 452 ;
|
676 |
-
$this->imgdata_small[10][1]=
|
677 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAn1'.
|
678 |
-
'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'.
|
679 |
-
'/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'.
|
680 |
-
'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'.
|
681 |
-
'5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'.
|
682 |
-
'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'.
|
683 |
-
'AIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAw'.
|
684 |
-
'kUGgW5vvSDAAAAnklEQVR4nI3QSxKCMAwA0M4gqCgoiiJ+kEAL'.
|
685 |
-
'LQUq0PufzX7ENdnlJZNkgtDS2CYZvK6bf+7EoKLA9cH5SQzv6A'.
|
686 |
-
'YloTywsAbYr44FrlgrXCMJwHl3xxVtuuFkJAPIcw2tGB9GcFli'.
|
687 |
-
'oqEf5GTkSUhVMw2TtD0XSlnDOw3SznE5520vNEi7CwW9+Ayjyq'.
|
688 |
-
'U/3+yPuq5gvhkhL0xlGnqL//AFf14UIh4mkEkAAAAASUVORK5C'.
|
689 |
-
'YII=' ;
|
690 |
-
|
691 |
-
|
692 |
-
//==========================================================
|
693 |
-
// File: bs_white.png
|
694 |
-
//==========================================================
|
695 |
-
$this->imgdata_small[11][0]= 480 ;
|
696 |
-
$this->imgdata_small[11][1]=
|
697 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAADwMZRfAAAABm'.
|
698 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
699 |
-
'B3RJTUUH0wMLFTsY/ewvBQAAAW1JREFUeJytkz2u4jAUhT/jic'.
|
700 |
-
'gfBUKiZhE0bIKeVbCWrIKenp6eDiGlCEEEBArIxvzGU4xeZjLk'.
|
701 |
-
'jWb05lRXuvbx+exr4bouX1Xjyw7Atz81F4uFBYjjGIDhcCjq1o'.
|
702 |
-
'k6nN1uZwFerxfP55Msy1itVmRZBsB4PK6YveHkeW5d18XzPIIg'.
|
703 |
-
'wPd9Wq0WnU6HMAxJkoQoiuynOIfDwUopkVIihKAoCgAcx6Hdbm'.
|
704 |
-
'OMIU1T5vN55eBKEikljUYDIX6kFUKU9e8aDAZlmjcca+1b7TgO'.
|
705 |
-
'1+uVy+VS9nzfr8e53++VzdZaiqIgz3OMMWitOZ/PaK0JgqDeRC'.
|
706 |
-
'mF53lIKYGfr3O73TDGoJQiTVO01nS73XqT4/FIs9kkCAIej0eZ'.
|
707 |
-
'brPZEMcxSZKgtQZgMpmIWpN+vy+m06n1PK9yTx8Gy+WS/X5Pr9'.
|
708 |
-
'er9GuHLYoiG4YhSilOpxPr9Zrtdlti/JriU5MPjUYjq7UuEWaz'.
|
709 |
-
'2d+P/b/qv/zi75oetJcv7QQXAAAAAElFTkSuQmCC' ;
|
710 |
-
|
711 |
-
|
712 |
-
//==========================================================
|
713 |
-
// File: bs_cyan.png
|
714 |
-
//==========================================================
|
715 |
-
$this->imgdata_small[12][0]= 633 ;
|
716 |
-
$this->imgdata_small[12][1]=
|
717 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABPl'.
|
718 |
-
'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'.
|
719 |
-
'//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'.
|
720 |
-
'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'.
|
721 |
-
'/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'.
|
722 |
-
'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'.
|
723 |
-
'3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'.
|
724 |
-
'4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'.
|
725 |
-
'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'.
|
726 |
-
'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'.
|
727 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
728 |
-
'AHdElNRQfTAwkUGQDi+VPPAAAAtElEQVR4nGNgIBawikipyIiy'.
|
729 |
-
'wfksfJpGRkamNtr8LFARPiMFHmFDcztXfwGoFi0jLiZuZRtnry'.
|
730 |
-
'BddrCIiJEGL6eklYO7X3iCOFhE2thESdHawdUnJDZFDiyiamZh'.
|
731 |
-
'aevk5h0UlZSpBhaRtbN3dPHwDY5MSM+EqBFzc/f0DgiLTkjLzI'.
|
732 |
-
'SYw6bjHxgaEZeckZmpD7GLQSAqJj4xNRMIBGFuFtRLA/ENhGBu'.
|
733 |
-
'ZmDgkJBXl5fgIDocAAKcINaFePT4AAAAAElFTkSuQmCC' ;
|
734 |
-
|
735 |
-
//==========================================================
|
736 |
-
// File: bs_bluegreen.png
|
737 |
-
//==========================================================
|
738 |
-
$this->imgdata_small[13][0]= 493 ;
|
739 |
-
$this->imgdata_small[13][1]=
|
740 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAvV'.
|
741 |
-
'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'.
|
742 |
-
'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'.
|
743 |
-
'8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'.
|
744 |
-
'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'.
|
745 |
-
'0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'.
|
746 |
-
'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'.
|
747 |
-
'AJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGxNUcXCT'.
|
748 |
-
'AAAAqUlEQVR4nI2Q1xKCMBREM2NHLCCogAGCjd6SqLT8/2cZKT'.
|
749 |
-
'6zb3tm987OBWCsXoejp8rC35fi4+l6gXFZlD0Rz6fZ1tdDmKR9'.
|
750 |
-
'RdOmkzmP7DDpilfX3SzvRgQ/Vr1uiZplfsCBiVf03RJd140wgj'.
|
751 |
-
'kmNqMtuYXcxyYmNWJdRoYwzpM9qRvGujuCmSR7q7ARY00/MiWk'.
|
752 |
-
'sCnjkobNEm1+HknDZgAqR0GKU43+wxdu2hYzbsHU6AAAAABJRU'.
|
753 |
-
'5ErkJggg==' ;
|
754 |
-
|
755 |
-
//==========================================================
|
756 |
-
// File: bs_lightred.png
|
757 |
-
//==========================================================
|
758 |
-
$this->imgdata_small[14][0]= 532 ;
|
759 |
-
$this->imgdata_small[14][1]=
|
760 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAA3l'.
|
761 |
-
'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'.
|
762 |
-
'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'.
|
763 |
-
'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'.
|
764 |
-
'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'.
|
765 |
-
'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'.
|
766 |
-
'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'.
|
767 |
-
'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
768 |
-
'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGjoP2Nm+AAAAr0'.
|
769 |
-
'lEQVR4nGNgIBaYiOk62imYwPnMkiIyso76yhJSzFARMxkRNk49'.
|
770 |
-
'a3t5OW6oFk1LVkYOfWUHKxUXiEYzLS12DnN3VXkjIRtFsIiSk5'.
|
771 |
-
'6evqGqhYGKugAfWMRa1FpD2UHeQEXQRlgALCJur+rgbCUNFOAS'.
|
772 |
-
'hqjRkZe3MpBTcwEKCEPMMTGSs3Xz8OQHCnBBHckt6OJpIyAMBD'.
|
773 |
-
'wwN/MYc4H4LK4wNzMwmGrzcvFqmxIdDgDiHRT6VVQkrAAAAABJ'.
|
774 |
-
'RU5ErkJggg==' ;
|
775 |
-
|
776 |
-
//==========================================================
|
777 |
-
// File: bxs_lightred.png
|
778 |
-
//==========================================================
|
779 |
-
$this->imgdata_xsmall[0][0]= 432 ;
|
780 |
-
$this->imgdata_xsmall[0][1]=
|
781 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAA3l'.
|
782 |
-
'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'.
|
783 |
-
'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'.
|
784 |
-
'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'.
|
785 |
-
'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'.
|
786 |
-
'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'.
|
787 |
-
'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'.
|
788 |
-
'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
789 |
-
'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKBOgGhWjAAAAS0'.
|
790 |
-
'lEQVR4nGNgQAEmunYmEJaMCKe1vBxYzJKVQ9lKBSSupKdnaKGi'.
|
791 |
-
'zgdkiqs6WKnYcIGYJnK2HvzCwmCNgi42wsLCECNMeXlNUY0HAL'.
|
792 |
-
'DaB7Du8MiEAAAAAElFTkSuQmCC' ;
|
793 |
-
|
794 |
-
//==========================================================
|
795 |
-
// File: bxs_bluegreen.png
|
796 |
-
//==========================================================
|
797 |
-
$this->imgdata_xsmall[1][0]= 397 ;
|
798 |
-
$this->imgdata_xsmall[1][1]=
|
799 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAvV'.
|
800 |
-
'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'.
|
801 |
-
'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'.
|
802 |
-
'8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'.
|
803 |
-
'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'.
|
804 |
-
'0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'.
|
805 |
-
'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'.
|
806 |
-
'AJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKDVyF5Be'.
|
807 |
-
'AAAASUlEQVR4nGNgQAFmYqJcEJaEOJ+UrD5YTJKFTZrfGCQuaq'.
|
808 |
-
'glLWvMaQ5kqujo6hnbKIKYXPr68gp2dmCNJiZAlh3ECGsREWtU'.
|
809 |
-
'4wF1kwdpAHfnSwAAAABJRU5ErkJggg==' ;
|
810 |
-
|
811 |
-
//==========================================================
|
812 |
-
// File: bxs_navy.png
|
813 |
-
//==========================================================
|
814 |
-
$this->imgdata_xsmall[2][0]= 353 ;
|
815 |
-
$this->imgdata_xsmall[2][1]=
|
816 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'.
|
817 |
-
'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'.
|
818 |
-
'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'.
|
819 |
-
'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'.
|
820 |
-
'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'.
|
821 |
-
'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
822 |
-
'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJxXO4axZAAAAR0'.
|
823 |
-
'lEQVR4nGNgQAGskhKsEJaslIi8ijpYTJaDU1FVAyQuKSujoKKh'.
|
824 |
-
'LQ5kSigpqWro6oOYrOoaWroGBmCNWiCWAdQwUVFWVOMBOp4GCJ'.
|
825 |
-
's5S60AAAAASUVORK5CYII=' ;
|
826 |
-
|
827 |
-
//==========================================================
|
828 |
-
// File: bxs_gray.png
|
829 |
-
//==========================================================
|
830 |
-
$this->imgdata_xsmall[3][0]= 492 ;
|
831 |
-
$this->imgdata_xsmall[3][1]=
|
832 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABI1'.
|
833 |
-
'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'.
|
834 |
-
'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'.
|
835 |
-
'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'.
|
836 |
-
'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'.
|
837 |
-
'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'.
|
838 |
-
'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'.
|
839 |
-
'3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'.
|
840 |
-
'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'.
|
841 |
-
'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEA'.
|
842 |
-
'AAsRAX9kX5EAAAAHdElNRQfTAwkUKC74clmyAAAAQklEQVR4nG'.
|
843 |
-
'NgQAVBYVCGt5dXYEQ0mOnp5h4QFgVmeri6+4dHxYMVeHoFRUTH'.
|
844 |
-
'gTUFBIZBWAwMkZEx8bFQM2Lj0UwHANc/DV6yq/BiAAAAAElFTk'.
|
845 |
-
'SuQmCC' ;
|
846 |
-
|
847 |
-
//==========================================================
|
848 |
-
// File: bxs_graypurple.png
|
849 |
-
//==========================================================
|
850 |
-
$this->imgdata_xsmall[4][0]= 542 ;
|
851 |
-
$this->imgdata_xsmall[4][1]=
|
852 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABSl'.
|
853 |
-
'BMVEX////////11P/MqdvKrNfAwMC+u7+9u7+4rr24lsi3rby3'.
|
854 |
-
'lMe1rLq1o720q7i0oL20ksSzoryyqbaykMGxlb2wkL+vnbiujb'.
|
855 |
-
'2sjLuri7qpl7GoirWoibenmK2mla6mjLKmhrSllauki7CjhrCj'.
|
856 |
-
'hLGihLChg6+ggq2fkqadkKOcfqqai6Gag6WYe6WXeqSWeaOTd6'.
|
857 |
-
'CTd5+Rdp6RdZ6RdZ2Qg5eOc5qMcpiLcZeJb5WIbpOHbZKGbJGE'.
|
858 |
-
'a4+CaY2AZ4t/Z4p/Zop/Zol+Zol7ZIZ6Y4V5YoR1ZH11X391Xn'.
|
859 |
-
'9zXX1yXXtxXHtvWnluWXhsV3VqVnNpVXJoVHFnU3BmUm9jUGth'.
|
860 |
-
'VGdgTmheTGZcS2RcSmRaSWJYR19XRl5SQllRQlhQQVdPQFZOP1'.
|
861 |
-
'VLPlFJO09IPE5IOk5FOEtEN0lDOEpDOElDNklCNkc/M0XhbrfD'.
|
862 |
-
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
863 |
-
'EAAAsRAX9kX5EAAAAHdElNRQfTAwkUKCgREfyHAAAATUlEQVR4'.
|
864 |
-
'nGNgQAEcIko8EBY3M5Ougy+IxSXMwmTsFsAHZMqrSRvZB0W7A5'.
|
865 |
-
'k6FlYugXEZICaPr394Um4uSAFDRFRCbm4uxAihsDAhVOMBHT0L'.
|
866 |
-
'hkeRpo8AAAAASUVORK5CYII=' ;
|
867 |
-
|
868 |
-
//==========================================================
|
869 |
-
// File: bxs_red.png
|
870 |
-
//==========================================================
|
871 |
-
$this->imgdata_xsmall[5][0]= 357 ;
|
872 |
-
$this->imgdata_xsmall[5][1]=
|
873 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'.
|
874 |
-
'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'.
|
875 |
-
'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'.
|
876 |
-
'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'.
|
877 |
-
'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'.
|
878 |
-
'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'.
|
879 |
-
'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIyjy5SVMAAAAS0'.
|
880 |
-
'lEQVR4nGNgQAFsUpJsEJastIi8ijpYTJaDU0FVgxXIlJKVUVDR'.
|
881 |
-
'0BYHMiUUlVQ1dPVBTDZ1dS1dAwOQAgYtbSDLAGIEq6goK6rxAD'.
|
882 |
-
'yXBg73lwGUAAAAAElFTkSuQmCC' ;
|
883 |
-
|
884 |
-
//==========================================================
|
885 |
-
// File: bxs_yellow.png
|
886 |
-
//==========================================================
|
887 |
-
$this->imgdata_xsmall[6][0]= 414 ;
|
888 |
-
$this->imgdata_xsmall[6][1]=
|
889 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAzF'.
|
890 |
-
'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'.
|
891 |
-
'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'.
|
892 |
-
'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'.
|
893 |
-
'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'.
|
894 |
-
'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'.
|
895 |
-
'50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'.
|
896 |
-
'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAH'.
|
897 |
-
'dElNRQfTAwkUIzoBXFQEAAAAS0lEQVR4nGNgQAFsDhJsEJaTo5'.
|
898 |
-
'2skj5YzMnSSk7ZwBzIlOSUklPiMxYHMnW4FXT5VNVBTDZeXiNV'.
|
899 |
-
'QUGQAgYBYyBLEGIEq5gYK6rxAH4kBmHBaMQQAAAAAElFTkSuQm'.
|
900 |
-
'CC' ;
|
901 |
-
|
902 |
-
//==========================================================
|
903 |
-
// File: bxs_greenblue.png
|
904 |
-
//==========================================================
|
905 |
-
$this->imgdata_xsmall[7][0]= 410 ;
|
906 |
-
$this->imgdata_xsmall[7][1]=
|
907 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAxl'.
|
908 |
-
'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'.
|
909 |
-
'9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'.
|
910 |
-
'17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'.
|
911 |
-
'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'.
|
912 |
-
'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'.
|
913 |
-
'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'.
|
914 |
-
'dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfT'.
|
915 |
-
'AwkUJy5/6kV9AAAATUlEQVR4nGNgQAGCyuyCEJaGugKHviVYzF'.
|
916 |
-
'hO3sxCWwDIVNLTM9PXtpEGMhW12Cy0DR1ATEFLSxZ7BweQAgYd'.
|
917 |
-
'HUMHBweIEQKiogKoxgMAo/4H5AfSehsAAAAASUVORK5CYII=' ;
|
918 |
-
|
919 |
-
//==========================================================
|
920 |
-
// File: bxs_purple.png
|
921 |
-
//==========================================================
|
922 |
-
$this->imgdata_xsmall[8][0]= 364 ;
|
923 |
-
$this->imgdata_xsmall[8][1]=
|
924 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAnF'.
|
925 |
-
'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'.
|
926 |
-
'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'.
|
927 |
-
'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'.
|
928 |
-
'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'.
|
929 |
-
'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
930 |
-
'HUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIj'.
|
931 |
-
'mBTjT/AAAASUlEQVR4nGNgQAGskhKsEJaCrJiSuhZYTEFASFlD'.
|
932 |
-
'GyQuqSCnrK6tJwpkiquoamgbGIGYrFpaugbGxmCNunpAljHECB'.
|
933 |
-
'ZBQRZU4wFSMAZsXeM71AAAAABJRU5ErkJggg==' ;
|
934 |
-
|
935 |
-
//==========================================================
|
936 |
-
// File: bxs_green.png
|
937 |
-
//==========================================================
|
938 |
-
$this->imgdata_xsmall[9][0]= 370 ;
|
939 |
-
$this->imgdata_xsmall[9][1]=
|
940 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAn1'.
|
941 |
-
'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'.
|
942 |
-
'/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'.
|
943 |
-
'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'.
|
944 |
-
'5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'.
|
945 |
-
'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'.
|
946 |
-
'AIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAw'.
|
947 |
-
'kUKBrZxq0HAAAATElEQVR4nGNgQAGccrIcEJaivISyhjaIxa7I'.
|
948 |
-
'I6CiqcMKZMopKqho6OhLA5kyqmqaOobGICartraeoYkJSAGDnj'.
|
949 |
-
'6QZQIxgk1Skg3VeABlVgbItqEBUwAAAABJRU5ErkJggg==' ;
|
950 |
-
|
951 |
-
//==========================================================
|
952 |
-
// File: bxs_darkgreen.png
|
953 |
-
//==========================================================
|
954 |
-
$this->imgdata_xsmall[10][0]= 563 ;
|
955 |
-
$this->imgdata_xsmall[10][1]=
|
956 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABX1'.
|
957 |
-
'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'.
|
958 |
-
'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'.
|
959 |
-
'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'.
|
960 |
-
'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'.
|
961 |
-
'6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'.
|
962 |
-
'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'.
|
963 |
-
'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'.
|
964 |
-
'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'.
|
965 |
-
'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'.
|
966 |
-
'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'.
|
967 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
968 |
-
'RQfTAwkUKCFozUQjAAAATUlEQVR4nGNgQAGcoqrcEJYQB5OhSw'.
|
969 |
-
'CIxSXGwWThGcIDZCppK5o7hyV6AZl6NnbuoSmFICZ3YHB0RkkJ'.
|
970 |
-
'SAFDbEJaSUkJxAjeyEheVOMBQj4MOEkWew4AAAAASUVORK5CYI'.
|
971 |
-
'I=' ;
|
972 |
-
|
973 |
-
//==========================================================
|
974 |
-
// File: bxs_cyan.png
|
975 |
-
//==========================================================
|
976 |
-
$this->imgdata_xsmall[11][0]= 530 ;
|
977 |
-
$this->imgdata_xsmall[11][1]=
|
978 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABPl'.
|
979 |
-
'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'.
|
980 |
-
'//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'.
|
981 |
-
'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'.
|
982 |
-
'/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'.
|
983 |
-
'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'.
|
984 |
-
'3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'.
|
985 |
-
'4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'.
|
986 |
-
'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'.
|
987 |
-
'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'.
|
988 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAA'.
|
989 |
-
'AHdElNRQfTAwkUKQFKuFWqAAAATUlEQVR4nGNgQAGsUjJsEJaR'.
|
990 |
-
'grC5qz9YzIiL28YriB3IlDZRsnYNiZUDMmXtHT2CE9JBTDb/wI'.
|
991 |
-
'jkzEyQAoaomMTMzEyIERzy8hyoxgMAN2MLVPW0f4gAAAAASUVO'.
|
992 |
-
'RK5CYII=' ;
|
993 |
-
|
994 |
-
//==========================================================
|
995 |
-
// File: bxs_orange.png
|
996 |
-
//==========================================================
|
997 |
-
$this->imgdata_xsmall[12][0]= 572 ;
|
998 |
-
$this->imgdata_xsmall[12][1]=
|
999 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABaF'.
|
1000 |
-
'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'.
|
1001 |
-
'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'.
|
1002 |
-
'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'.
|
1003 |
-
'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'.
|
1004 |
-
'/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'.
|
1005 |
-
'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'.
|
1006 |
-
'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'.
|
1007 |
-
'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'.
|
1008 |
-
'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'.
|
1009 |
-
'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'.
|
1010 |
-
'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9k'.
|
1011 |
-
'X5EAAAAHdElNRQfTAwkUJBSSy88MAAAATUlEQVR4nGNgQAGqwo'.
|
1012 |
-
'paEBYPJ4eKezCIpc7HwmrqG6ENZMpLihm6RaWEAZl6Vo7ekRnF'.
|
1013 |
-
'IKZWSHhcTnk5SAFDfFJWeXk5xAjj1FRjVOMBeFwNcWYSLjsAAA'.
|
1014 |
-
'AASUVORK5CYII=' ;
|
1015 |
-
|
1016 |
-
//==========================================================
|
1017 |
-
// File: bxs_lightblue.png
|
1018 |
-
//==========================================================
|
1019 |
-
$this->imgdata_xsmall[13][0]= 554 ;
|
1020 |
-
$this->imgdata_xsmall[13][1]=
|
1021 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABVl'.
|
1022 |
-
'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'.
|
1023 |
-
'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'.
|
1024 |
-
'+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'.
|
1025 |
-
'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'.
|
1026 |
-
'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'.
|
1027 |
-
'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'.
|
1028 |
-
'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'.
|
1029 |
-
'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'.
|
1030 |
-
'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'.
|
1031 |
-
'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'.
|
1032 |
-
'gAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJziL'.
|
1033 |
-
'PvAsAAAATUlEQVR4nGNgQAHsQgqcEJYgG5Oegy+IxSHOxmTiFs'.
|
1034 |
-
'gFZMprKBnbB8e7AplaFlbOQUl5ICanX0BEWmEhSAFDVGxKYWEh'.
|
1035 |
-
'xAjusDBuVOMBJO8LrFHRAykAAAAASUVORK5CYII=' ;
|
1036 |
-
|
1037 |
-
//==========================================================
|
1038 |
-
// File: bxs_darkgray.png
|
1039 |
-
//==========================================================
|
1040 |
-
$this->imgdata_xsmall[14][0]= 574 ;
|
1041 |
-
$this->imgdata_xsmall[14][1]=
|
1042 |
-
'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABm'.
|
1043 |
-
'JLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsRAAALEQF/ZF+RAAAB'.
|
1044 |
-
'iElEQVR42k3QPU8TYRwA8P//ebkXrgdIColXRAOEkJqbaExMut'.
|
1045 |
-
'DBhE1GNjYHPg+DG6ODiU6QOLjVxITBcFKBYCstlAC2Bz17fe76'.
|
1046 |
-
'vLD6+wg/1FpTRFR5lpaub/u1eGBGaAT4HneD4OlXx7avtDYUjT'.
|
1047 |
-
'HQabd2Ti8e3vVSKzxrtHS32wIpFVldno22Nqvvg2Bhl0gp/aNm'.
|
1048 |
-
'vJ3qqXAtLIva+ks1H0wqlSXi4+d6+OFTfRsAfHJx2d1od24rZP'.
|
1049 |
-
'xP2HzopINr1mkesX7ccojqif0v9crxWXODZTno3+dNGA7uWLsd'.
|
1050 |
-
'mUYU4fHJCViMG9umLBmM4L6fagZGg9QKfjZ+Qfy3C3G/B3mugF'.
|
1051 |
-
'IHHNcDf64E3KJALApk2p8CSolUUqLjFkyxOGMsTtFyJ+Wz57NQ'.
|
1052 |
-
'8DghS4sLB0svioeZZo7nPhFoUKZDIVFbglkTTnl5/rC8snjAkJ'.
|
1053 |
-
'Bk/XV5LxHC/v7tR8jzTFPbg8LENK9WX0Vv31T2AEmCSmlKCCoh'.
|
1054 |
-
'ROnP1U1tPFYjJBRcbtzSf+GPsFTAQBq1n4AAAABKdEVYdHNpZ2'.
|
1055 |
-
'5hdHVyZQBiYzYyMDIyNjgwYThjODMyMmUxNjk0NWUzZjljOGFh'.
|
1056 |
-
'N2VmZWFhMjA4OTE2ZjkwOTdhZWE1MzYyMjk0MWRkM2I5EqaPDA'.
|
1057 |
-
'AAAABJRU5ErkJggg==' ;
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
|
1061 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_bevels.inc.php
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_BEVELS.INC
|
4 |
-
// Description: Base64 encoded images for round bevels
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_bevels.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
class ImgData_Bevels extends ImgData {
|
12 |
-
protected $name = 'Round Bevels';
|
13 |
-
protected $an = array(MARK_IMG_BEVEL => 'imgdata');
|
14 |
-
|
15 |
-
protected $colors = array('green','purple','orange','red','yellow');
|
16 |
-
protected $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3);
|
17 |
-
protected $maxidx = 4 ;
|
18 |
-
|
19 |
-
protected $imgdata ;
|
20 |
-
|
21 |
-
function __construct() {
|
22 |
-
//==========================================================
|
23 |
-
// File: bullets_balls_red_013.png
|
24 |
-
//==========================================================
|
25 |
-
$this->imgdata[0][0]= 337 ;
|
26 |
-
$this->imgdata[0][1]=
|
27 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
28 |
-
'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'.
|
29 |
-
'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'.
|
30 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
31 |
-
'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'.
|
32 |
-
'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'.
|
33 |
-
'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'.
|
34 |
-
'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'.
|
35 |
-
'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'.
|
36 |
-
'==' ;
|
37 |
-
|
38 |
-
//==========================================================
|
39 |
-
// File: bullets_balls_green_013.png
|
40 |
-
//==========================================================
|
41 |
-
$this->imgdata[1][0]= 344 ;
|
42 |
-
$this->imgdata[1][1]=
|
43 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
44 |
-
'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'.
|
45 |
-
'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'.
|
46 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
47 |
-
'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'.
|
48 |
-
'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'.
|
49 |
-
'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'.
|
50 |
-
'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'.
|
51 |
-
'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'.
|
52 |
-
'VORK5CYII=' ;
|
53 |
-
|
54 |
-
//==========================================================
|
55 |
-
// File: bullets_balls_oy_035.png
|
56 |
-
//==========================================================
|
57 |
-
$this->imgdata[2][0]= 341 ;
|
58 |
-
$this->imgdata[2][1]=
|
59 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
60 |
-
'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'.
|
61 |
-
'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'.
|
62 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
63 |
-
'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'.
|
64 |
-
'+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'.
|
65 |
-
'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'.
|
66 |
-
'5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'.
|
67 |
-
'9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'.
|
68 |
-
'5CYII=' ;
|
69 |
-
|
70 |
-
//==========================================================
|
71 |
-
// File: bullets_balls_oy_036.png
|
72 |
-
//==========================================================
|
73 |
-
$this->imgdata[3][0]= 340 ;
|
74 |
-
$this->imgdata[3][1]=
|
75 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
76 |
-
'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'.
|
77 |
-
'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'.
|
78 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
79 |
-
'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'.
|
80 |
-
'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'.
|
81 |
-
'4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'.
|
82 |
-
'7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'.
|
83 |
-
'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ;
|
84 |
-
|
85 |
-
//==========================================================
|
86 |
-
// File: bullets_balls_pp_019.png
|
87 |
-
//==========================================================
|
88 |
-
$this->imgdata[4][0]= 334 ;
|
89 |
-
$this->imgdata[4][1]=
|
90 |
-
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
91 |
-
'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'.
|
92 |
-
'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'.
|
93 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
94 |
-
'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'.
|
95 |
-
'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'.
|
96 |
-
'5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'.
|
97 |
-
'4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'.
|
98 |
-
'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ;
|
99 |
-
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
|
104 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_diamonds.inc.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_DIAMONDS.INC
|
4 |
-
// Description: Base64 encoded images for diamonds
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_diamonds.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
class ImgData_Diamonds extends ImgData {
|
12 |
-
protected $name = 'Diamonds';
|
13 |
-
protected $an = array(MARK_IMG_DIAMOND =>'imgdata');
|
14 |
-
protected $colors = array('lightblue','darkblue','gray',
|
15 |
-
'blue','pink','purple','red','yellow');
|
16 |
-
protected $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6,
|
17 |
-
'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3);
|
18 |
-
|
19 |
-
protected $maxidx = 7 ;
|
20 |
-
protected $imgdata ;
|
21 |
-
|
22 |
-
function __construct() {
|
23 |
-
//==========================================================
|
24 |
-
// File: diam_red.png
|
25 |
-
//==========================================================
|
26 |
-
$this->imgdata[0][0]= 668 ;
|
27 |
-
$this->imgdata[0][1]=
|
28 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
29 |
-
'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'.
|
30 |
-
'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'.
|
31 |
-
'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'.
|
32 |
-
'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'.
|
33 |
-
'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'.
|
34 |
-
'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'.
|
35 |
-
'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'.
|
36 |
-
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
37 |
-
'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'.
|
38 |
-
'1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'.
|
39 |
-
'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'.
|
40 |
-
'/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'.
|
41 |
-
'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'.
|
42 |
-
'+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'.
|
43 |
-
'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'.
|
44 |
-
'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'.
|
45 |
-
'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ;
|
46 |
-
|
47 |
-
//==========================================================
|
48 |
-
// File: diam_pink.png
|
49 |
-
//==========================================================
|
50 |
-
$this->imgdata[1][0]= 262 ;
|
51 |
-
$this->imgdata[1][1]=
|
52 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
53 |
-
'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'.
|
54 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
55 |
-
'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
56 |
-
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
57 |
-
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
58 |
-
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
59 |
-
'==' ;
|
60 |
-
|
61 |
-
//==========================================================
|
62 |
-
// File: diam_blue.png
|
63 |
-
//==========================================================
|
64 |
-
$this->imgdata[2][0]= 662 ;
|
65 |
-
$this->imgdata[2][1]=
|
66 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'.
|
67 |
-
'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'.
|
68 |
-
'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'.
|
69 |
-
'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'.
|
70 |
-
'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'.
|
71 |
-
'/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'.
|
72 |
-
'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'.
|
73 |
-
'9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'.
|
74 |
-
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
75 |
-
'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'.
|
76 |
-
'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'.
|
77 |
-
'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'.
|
78 |
-
'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'.
|
79 |
-
'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'.
|
80 |
-
'6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'.
|
81 |
-
'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'.
|
82 |
-
'5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'.
|
83 |
-
'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ;
|
84 |
-
|
85 |
-
//==========================================================
|
86 |
-
// File: diam_yellow.png
|
87 |
-
//==========================================================
|
88 |
-
$this->imgdata[3][0]= 262 ;
|
89 |
-
$this->imgdata[3][1]=
|
90 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
91 |
-
'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'.
|
92 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
93 |
-
'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
94 |
-
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
95 |
-
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
96 |
-
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
97 |
-
'==' ;
|
98 |
-
|
99 |
-
//==========================================================
|
100 |
-
// File: diam_lightblue.png
|
101 |
-
//==========================================================
|
102 |
-
$this->imgdata[4][0]= 671 ;
|
103 |
-
$this->imgdata[4][1]=
|
104 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'.
|
105 |
-
'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'.
|
106 |
-
'//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'.
|
107 |
-
'8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'.
|
108 |
-
'//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'.
|
109 |
-
'8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'.
|
110 |
-
'1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'.
|
111 |
-
'+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'.
|
112 |
-
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
113 |
-
'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'.
|
114 |
-
'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'.
|
115 |
-
'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'.
|
116 |
-
'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'.
|
117 |
-
'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'.
|
118 |
-
'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'.
|
119 |
-
'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'.
|
120 |
-
'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'.
|
121 |
-
'7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ;
|
122 |
-
|
123 |
-
//==========================================================
|
124 |
-
// File: diam_purple.png
|
125 |
-
//==========================================================
|
126 |
-
$this->imgdata[5][0]= 657 ;
|
127 |
-
$this->imgdata[5][1]=
|
128 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
129 |
-
'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'.
|
130 |
-
'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'.
|
131 |
-
'+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'.
|
132 |
-
'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'.
|
133 |
-
'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'.
|
134 |
-
'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'.
|
135 |
-
'/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'.
|
136 |
-
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
137 |
-
'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'.
|
138 |
-
'1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'.
|
139 |
-
'+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'.
|
140 |
-
'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'.
|
141 |
-
'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'.
|
142 |
-
'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'.
|
143 |
-
'25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'.
|
144 |
-
'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'.
|
145 |
-
'EdF1ECWW1SAAAAAElFTkSuQmCC' ;
|
146 |
-
|
147 |
-
//==========================================================
|
148 |
-
// File: diam_gray.png
|
149 |
-
//==========================================================
|
150 |
-
$this->imgdata[6][0]= 262 ;
|
151 |
-
$this->imgdata[6][1]=
|
152 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
153 |
-
'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'.
|
154 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
155 |
-
'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
156 |
-
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
157 |
-
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
158 |
-
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
159 |
-
'==' ;
|
160 |
-
|
161 |
-
//==========================================================
|
162 |
-
// File: diam_blgr.png
|
163 |
-
//==========================================================
|
164 |
-
$this->imgdata[7][0]= 262 ;
|
165 |
-
$this->imgdata[7][1]=
|
166 |
-
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
167 |
-
'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'.
|
168 |
-
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
169 |
-
'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
170 |
-
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
171 |
-
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
172 |
-
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
173 |
-
'==' ;
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_pushpins.inc.php
DELETED
@@ -1,517 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_PUSHPINS.INC
|
4 |
-
// Description: Base64 encoded images for pushpins
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_pushpins.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
class ImgData_PushPins extends ImgData {
|
12 |
-
protected $name = 'Push pins';
|
13 |
-
protected $an = array(MARK_IMG_PUSHPIN => 'imgdata_small',
|
14 |
-
MARK_IMG_SPUSHPIN => 'imgdata_small',
|
15 |
-
MARK_IMG_LPUSHPIN => 'imgdata_large');
|
16 |
-
|
17 |
-
protected $colors = array('blue','green','orange','pink','red');
|
18 |
-
protected $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4 ) ;
|
19 |
-
protected $maxidx = 4 ;
|
20 |
-
protected $imgdata_large, $imgdata_small ;
|
21 |
-
|
22 |
-
function __construct() {
|
23 |
-
|
24 |
-
// The anchor should be where the needle "hits" the paper
|
25 |
-
// (bottom left corner)
|
26 |
-
$this->anchor_x = 0;
|
27 |
-
$this->anchor_y = 1;
|
28 |
-
|
29 |
-
//==========================================================
|
30 |
-
// File: ppl_red.png
|
31 |
-
//==========================================================
|
32 |
-
$this->imgdata_large[0][0]= 2490 ;
|
33 |
-
$this->imgdata_large[0][1]=
|
34 |
-
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
35 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
36 |
-
'B3RJTUUH0wMKBh4Ryh89CgAACUdJREFUeJy9mNtTFFcexz+/7p'.
|
37 |
-
'4Lw1wZJKDGCAwmDAqUySamcCq1ed6k9mn3UfMP7F+1T3nYqn2J'.
|
38 |
-
'lZdoDEjpbq0KG8EBFBFBEJye6Zmenkv32Ydu5GYiUMmeqq6uqT'.
|
39 |
-
'6Xz3zP73aOcIKmAQkIFyD3N/jrBPwlKjLQEglVlJKyUjR3u7cc'.
|
40 |
-
'WLoP3/4dvv03LNrQ8I6x1rFbDML9kOmHvh7IRHU9JKmUSG8vpF'.
|
41 |
-
'IoXX/TV0AiEM5A5jT0noFMFMJHXUt/d5f9TUAbhtQ3cPFruDog'.
|
42 |
-
'8klHMnmO0dGYe/myOJGINEwTz3F2higFXgy8PpAkOC+h8hoaCt'.
|
43 |
-
'4ppHFcQAWSgOQlyI/p+lUjmRxWAwNJd3xca/f34yoFi4tgmjtD'.
|
44 |
-
'NIFkJ4xcgBCgVqEBFJ9DqcZea/gNAAVEg7AOGYnHe9XoaJd3+X'.
|
45 |
-
'LISSSwnz6lsbKCZ9sHh4UVdBkwdA6cPwNnIfJPmC3Ctgft3wwQ'.
|
46 |
-
'QPkvTZJJnbExzfvsM2nMzVG7e5fG48d4lnXwTwEYCjJxuHQBog'.
|
47 |
-
'BHUfKkgAIIhiGk06hTp/Dm5qS1uYlXLvtWd4gPgIiCrAEcVckT'.
|
48 |
-
'Ab5p7TaYJrK1hQaEenrwSiVfQdc91P0kSp7Ii89D5ksY/kAkLy'.
|
49 |
-
'IZXFdXkQjS1YUSEbdcRu168V6+HTUNIKJDRwdE+sBIQmP9Ld59'.
|
50 |
-
'bEBA3of4F/D+uXb7rGaaCSmXI3pPj64PDaHCYfEqFVSjgWo2D2'.
|
51 |
-
'73XlJNQTgCyQykIuBWoNKEeh1aLXBPBCggGdBOgxZVSjoajVhH'.
|
52 |
-
'o5HWlIpq4bCQSgm9vXhK4ZZKh5SUYygp4J1EQVUD9xlU18BJQD'.
|
53 |
-
'bUbJ5T5XJStyxN9fSI099P3baxV1dRloW2h2ivx/yakg2ot6F1'.
|
54 |
-
'EkCa4G1D+zVEq5ArKTWM42Q6HUczQV7U66w9e0ZpdRXlOIQ5vF'.
|
55 |
-
'VHUXILKify4jiEzkOqC3peQMoBQymFlMt4Dx6wUSxSsm2UZXEK'.
|
56 |
-
'P30QvOUt8/2Sd78CdWwFDTA+gsw3cOlPcPUD+CQB52oQ21RKXM'.
|
57 |
-
'eRhGXhOg7VoKrx8KuS4ygZhVg3ZI8FGIfwR9BVgAtfwxdXdP3L'.
|
58 |
-
'86nUR91dXelNXTeWWy10paQHX602YAP1ADASAL7LJvFtMpOCc0'.
|
59 |
-
'cG3FHuGlz6Gr4YEpnoTCbzsdHRbOzy5RCRiLRMk5rjyOtAimwA'.
|
60 |
-
'U4U3SurBN/0wnAASBCVDIKpB4kiAB5Ub0/UvO9LpPAMDGfn005'.
|
61 |
-
'AxPCzxep3Q6iqPLUseBoufCZRsAE6g5g5kKIDfKUj3wnpAG8QB'.
|
62 |
-
'/Z1OIqANQuI65AtwNScyYXR2XlAXL2YZHzcklRKWl5GVFXFtGx'.
|
63 |
-
'MoAiV/EQaAGH6BUQNWgQpwFngv+Ca8KUAQEBcwgTJHyMV7679R'.
|
64 |
-
'XS8YqdSI6u/PMD5ukMtJY3GR2uQkr5aXeWVZOEALmA8WsIAxfL'.
|
65 |
-
'd0goVLAdCOd+/YpgqeVtBv4yiA++q/RKKXixe7GB8PSyoljcVF'.
|
66 |
-
'yg8fyubyMpulEk2lyAIfAAvAC+B+oOQFoAt/+0rAejB/EzjNri'.
|
67 |
-
'vvqNnCd64jxcE39V8spnP+vMbAgDSePKE2NcXm06dslMuUlcID'.
|
68 |
-
'TuFvqwXMBU8N39bGgRR+ki0Dz4L5DSAe9NGD7zq+6kcN1L6H2b'.
|
69 |
-
'ao5WWaQHllRTafPmWrVMJUimoAQrBYJFjQwre7B6A8YAi8LCgD'.
|
70 |
-
'5DVo6/hbb/iHK1KggvFeD3hHziQKEMuiNTNDbXGRTdtmw7Iwla'.
|
71 |
-
'KGH0oqwbscLOoG46rAY6AOzRhY74PT6QuUKEN4PegXxd/yEDTT'.
|
72 |
-
'YMWOk+oEaLkuFdNk0zTZwjfkavDUArXWgGXgFb4dEShXhfYqlI'.
|
73 |
-
'ow3w9rg3B6ED60IOOA5oEYQBrcpG+mj9bg0VG8GMJhVDZLyzAo'.
|
74 |
-
'VSq8rFYxXXefcjVgG9+uisDrXUCApoKSBcUHMBmHhfcgNwhtD3'.
|
75 |
-
'q9IG6Lr15b4OUTmPwBJt8JqGuapp05o0mhoHnptLQfPsR+8IBK'.
|
76 |
-
'uYyNH3yr+B77LHheA3tK1Ta+IrMeTL2C6Xl48TOsNWDDgAz7s5'.
|
77 |
-
'/r+krP/eddCsbj8fDQ4GBm9MqVvvRXX2VULBayRGRzaYn1SoWa'.
|
78 |
-
'UjgB4PIB5QK4ZgBXBKaAHxQsrED1H7CRgCUPwgHZDqACmhWwXv'.
|
79 |
-
'2aDRqGYeRyufS169cvThQKV88PDuYbW1vJ5VRK+5euqxWlPMdX'.
|
80 |
-
'SRqgreHbZGN3ijfKBXBTAeh2Fdwi2MofshP/dvKwCmKhp4m83Y'.
|
81 |
-
'vj8Xg4l8tlCoXC0MTExMTFkZE/1m37wvLGRvKRacoD1209E7Fc'.
|
82 |
-
'pZwYREOQqEJ4z3HskHLsz4AoXykPIBSN0t3dTTQafROoHdumXC'.
|
83 |
-
'4fjoMiog0ODiauX7+eLxQKV3O53ETdti88nJnJ3rl505ifmWm3'.
|
84 |
-
'arWSodR8GNbycDoNHy5C5jFold1k8d+DyvELNwg93d18/vnn9P'.
|
85 |
-
'X1oes6nufx/Plz7t+/fxhQKSWJRCI5NjaWHxkZKdj1+sjSwkJm'.
|
86 |
-
'+uZN/dZ337VqCwullGUVdZjsgIUC5LqhrUPvCugWuApeApPAzY'.
|
87 |
-
'PKHWyaphGNRunt7WVwcBARwfM8Ojo6sCzrMKBhGLphGFEF2Wq1'.
|
88 |
-
'2jc7M5OZ/vHH0MPbt93awkJJmeZsC6ZaMK3DCwvWdNioQUb5B6'.
|
89 |
-
'AdBR+9SzkAz/NwHIeXL18iIui6TjgcJplMMjY2th8wHo+Hh4aG'.
|
90 |
-
'MsPDw6fddru7+Phxx51bt/RbN260qwsLpZhlFZsw9QJ+2Pbrga'.
|
91 |
-
'oJG2FY2oKwuTtVEz9uV34NbqdtbW0xPT1NNBoF4MyZM1y5coWu'.
|
92 |
-
'rq5dQBHRcrlc4tq1a/l8Pj9RMs38ndu3Ez//9JNXLRZNyuXZJk'.
|
93 |
-
'xVYKoExQpsK/+IaAuYb7no8zjC/R+A4zisrq7u+53NZjl16tQ+'.
|
94 |
-
'QIlEIslsNpuPRCJXZ2dnh2/duNFRW1oy07a96MKd575yxRqU1B'.
|
95 |
-
'5vPMpF5HHa1tYW9+7do7Ozc/eQpZTSQ6FQt1Lq8pMnT/5w7969'.
|
96 |
-
'nuLcXE1rNufO9fRMhlKpOyvt9qPtVmvb25fFfvvWbrepVCqHwo'.
|
97 |
-
'xaX19vff/996ZhGC8qlkW9Wt1Onz073fXxxz+6MB+9e9dUjuO+'.
|
98 |
-
'7ebq9wLdB9hoNCrr6+s/4wf3FCJW3fPmTZhXsNWCprjuW66Dfr'.
|
99 |
-
'928KAfBhJAEgiJSLuzs7OSTqctoFkqlZRt26j/I+L/AGjPTN4d'.
|
100 |
-
'Nqn4AAAAAElFTkSuQmCC' ;
|
101 |
-
|
102 |
-
//==========================================================
|
103 |
-
// File: ppl_orange.png
|
104 |
-
//==========================================================
|
105 |
-
$this->imgdata_large[1][0]= 2753 ;
|
106 |
-
$this->imgdata_large[1][1]=
|
107 |
-
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
108 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
109 |
-
'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw'.
|
110 |
-
'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT'.
|
111 |
-
'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv'.
|
112 |
-
'rp857pgfAOQ4AMOJdg4R/hX96Hf06bvDc5iT07i8yeg8ksiIAI'.
|
113 |
-
'4TBi/ds9/vivD/njapNHvRBfHXMu410AM+BUoVSF05NQsi1sO4'.
|
114 |
-
'8402AXwLQTuP31OAZO2aG0MEn14iSlnI1z3LnMk8IZYJyBwjIs'.
|
115 |
-
'/TWsVIWPJkvMFS4zMfMhUp5BsoCpAAEBLYKaMFGn00jBxnvu02'.
|
116 |
-
'35+JHmSJEnBpQEcPo38MmCxd/nS9Ry71Ga/g1W9a8gn0GsHkgA'.
|
117 |
-
'6DGjxkqb5CoO+YxF3A3p+jGjQUzoK+L/V0ADzFMwtSR8eLbAr8'.
|
118 |
-
'uXOTf9NzhTc0geSLUQcYHgYEH786RMg0zWJHV2Aitv4x/HpHVS'.
|
119 |
-
'QA2YBqTTGIUq5qkPMWaWkVwPnPtAA/BevmZcjxaaUtHh8pJJGu'.
|
120 |
-
'DpCB9FvT7A7YT7S3p5vFMNzmWo/O0MSx/Ms3TqI8r59zFTfUQe'.
|
121 |
-
'I7SBODE3tnfoIxYnNHligwik0zAzDdVpyKbA8sff5YAeMEwgkV'.
|
122 |
-
'cufQeTJzZoCsaFLKXPTnNpoUTNsSgJmNoGsuNQjIDwYD2HlnZy'.
|
123 |
-
'k++yxTKXZfKTU8zOpjhneeQYkorSmGERtIlICBKRbLX+y98YN3'.
|
124 |
-
'ADcNIm+bJD4U3pPnmbEaRgYVRTGBkDSSsmxKfY7ZLuDJA4hdjl'.
|
125 |
-
'JEgyBB2SJOvQ9RzTpNKoEwNq0CNFvOXR3/HxMgYVPObaz8kPmh'.
|
126 |
-
'hkEWMatAfRONGGvLizyOE9P8KkpwhPDAgQKJQbELUD0oOIhbbH'.
|
127 |
-
'JeVTmowxjAgZutB5AoOngA+2DdYrcTyOyYZP9+QpBvI29vwEhb'.
|
128 |
-
'It042BVQgDy9KTMfkwQG1A9ACCLlgBBGUwxxoc52WDh2ATyEPp'.
|
129 |
-
'1hoaPvrEBh0Dq5an9OUsl/9hylk5b5c+mowLc4E2Jtw4Eoljyf'.
|
130 |
-
'ogA/AGEAagNRjGyUxOmEycyVA5EWDBxrmUp3ytLIv/NJP69Goh'.
|
131 |
-
'+9mFydIvS5PZYkvH1oY/RFtKymlwBFQAgQd+kAA6qSQ8pvn2mp'.
|
132 |
-
'SkJkuVFHPHBnQMrEt5Sl+e4/Lvp51PF1PF5Xy6WMvOWZXMom8z'.
|
133 |
-
'OZTQ8+j5sbQiMEwopsCIwRtBGIJSCdzbTGo9NimkDcgdC7Bg49'.
|
134 |
-
'TG5n4/nfr0Si77WdYp1YzyZEkWPdteaEnB7pPqBTxuIf/VgciE'.
|
135 |
-
'SgasCPwh+GNIkaNNag1RiPge5pEhMQVjfoLcF+eoXSvbKxedwn'.
|
136 |
-
'LKzC3KWbOi5/sW5a44/SHFUSgVA7SCzRG0AvA9mPOgFIETgu4n'.
|
137 |
-
'Ww0wNQWFAqRSL6D2ZQYBdDrQ7R7jXiwgRcvIL02makuTmWtpM/'.
|
138 |
-
'+BlLMl5vuWzLVEuwH6oYnR1KS8kJINGXMM2YdfRlALoQoQQKeb'.
|
139 |
-
'bDVwoMdxQMaLCwLo96HZTF5HbrEhmOftianfZisfzueKv7ZmrX'.
|
140 |
-
'MsjhxKXZGBjzyeEHmSE3oWiggtyVGmE8DTIXTC5NxgAxOAGUM8'.
|
141 |
-
'fun9mnSSLQ/CxNzOTgJ3LIMgoGwkKBiiMyaVviHVkdCO4FEKNv'.
|
142 |
-
'LQzWBYHfITPa4UBVM0LR/WB7ARJsdDDTjA6deYFIFUOimJ3d0E'.
|
143 |
-
'sNdLavYYgBpthqKcjiiJRO8K6CK0CsJTjfQAGaJtD9vQFAxNNQ'.
|
144 |
-
'1FB0yBAfA8gdMAIagLoCVAen0M00zMOTYShNDtoHs9CAIUoI4E'.
|
145 |
-
'1IBihCdNhsMhsj6NuV7BCC2IBpBqQaaFOENCCeiEsO1BO4RQgy'.
|
146 |
-
'I5Hm4k4oIU9MrgZSAdBeTabZz+ODxKQRRBFBJo6IUc51anYRQo'.
|
147 |
-
'dto+24FNxYCiaWKkQsj00KkO4gxRRkAngJ868M0u3OkkM+hxQA'.
|
148 |
-
'cQ7YD7GO5XYSsPZybh/TCkFIYY+kWniTW4Q7jXgHvHMhiRpmuW'.
|
149 |
-
'ca08GZkkZ/nY6TZMNhCnf2CuPoDVJvxpB+q9BHA8Ag1uH+oP4c'.
|
150 |
-
'YEPCzDwmzSLquShHW/E0YRbG/BjZtw40hAy7aNzJlzRn75E6N0'.
|
151 |
-
'qiwTzafI7kOU3gWrhzZC2iHcbsPqLlxvJnCt4KC1RYAL3I5hzY'.
|
152 |
-
'Xv/huePYCtITQMKEnyB4KQvMURuJvw889HGSwUCs7CwkLpo6tX'.
|
153 |
-
'Ty/+7nel6VLGDn/8N9m+eZuo1UP8iNhLau6b3RfmOsHBGTUYw9'.
|
154 |
-
'WBNeDrGB4+h/4qNLKwTnLbHj9CJw/6GoIh9Jpvq0HHcayFhYXi'.
|
155 |
-
'l3/4w9LK8vLKexfma3G/mb/3n1njTivS7tNQaaU1grQDjJ868D'.
|
156 |
-
'Axx6vmxnBrY9C9IcSbSXbavNjb/S3eN6/0m1JcKBScixcvllZW'.
|
157 |
-
'Vi6uLC8v12q1v/M8b/HxVjP//YYr32yE4dYWvShO0ogi14xwxq'.
|
158 |
-
'F4rbnxZ3cMjtpvEEeMvwA0TdOYn5/PffHFF7Vr166tvPeLXyx7'.
|
159 |
-
'nrd4+/btyg/frFo//Xgncnd67qCn78earQqcmYD3fSi1wPCTSV'.
|
160 |
-
'3gzqvm9uFOMl5nUAqFQn5paal26dKla57vf7D+6FHph9VV88af'.
|
161 |
-
'vgq79bo70e3VT2l9A3hYg4UiRALVHTCHSZvYBm4A//6quf8zoG'.
|
162 |
-
'3bpuM4acMwKr1+//SDe/dK31+/bv90/Xrcq9fduNW6rbVeC+E7'.
|
163 |
-
'gWdD2DKg4UEpBmPcm10RuScida31ntb62HAigoigDw6Gh0axWH'.
|
164 |
-
'QWFhZKi4uLZ+I4PrVer2e+u37dXPvqq6hbr7tOp1NXWq89h6/b'.
|
165 |
-
'8FBB34WGBesdcPrj38lkMkGlUuml0+mu53nR3t4eo9HoSLhMJk'.
|
166 |
-
'OlUiGdTuN5Hq7rvgA0TdO4cOFC7vPPP6/VarXldqdTu7m2lrv7'.
|
167 |
-
'7beq++BBO263b/tKrfWSXlbvwJ6CuAtDgTYiaBFMw6BSqfDxxx'.
|
168 |
-
'+rarWqGo0GN2/eZGtrC6XenAkRoVKpcPXqVWZmZmg0Gty6desF'.
|
169 |
-
'oIhIOp3Ol8vlmmVZK3fv3Lm09uc/Zwbr653ccPgoNIzvnmn99Z'.
|
170 |
-
'7W9QG46lAaM5mM2l95GIYUi0VOnz7N7OwsWmsymQzyuse5Q8Mw'.
|
171 |
-
'DNLpNDMzM5w/f/7A6AGgUkoajYa9urpayOXzUz/fvZutr68Pim'.
|
172 |
-
'F4/2y1+n2o9Q/ru7uPesPhXnyo4A+vfHp6mmazybNnz9jZ2UFr'.
|
173 |
-
'TbPZJAhe+8/aS0Mphed5NBoNABqNBqPR6MWBVWstvu/nnj9/Pv'.
|
174 |
-
'vo0aPq5uZmPBgM/qcwPf39xV/9ajU1M3Nvq9PZaw8GoT50PjdN'.
|
175 |
-
'k6mpKa5cucL58+eJ45j19XWePHnCzs4OnudhmiaWZRGGIVH05r'.
|
176 |
-
'yEYYjrumxubrKxsfFyDQJ6NBp1Pc+7C4jWumBaVm+kVL2l1H2l'.
|
177 |
-
'1G6otS+H6V6z8u3tbVzXpdFooJRicXGRqakptre3uXXr1ltrcT'.
|
178 |
-
'Qa8ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr'.
|
179 |
-
'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP'.
|
180 |
-
'n5N4cAAAAASUVORK5CYII=' ;
|
181 |
-
|
182 |
-
//==========================================================
|
183 |
-
// File: ppl_pink.png
|
184 |
-
//==========================================================
|
185 |
-
$this->imgdata_large[2][0]= 2779 ;
|
186 |
-
$this->imgdata_large[2][1]=
|
187 |
-
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
188 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
189 |
-
'B3RJTUUH0wMLFQolY9lkpgAACmhJREFUeJy9mOtzFNl5h5+3b9'.
|
190 |
-
'Mz0kzPBWmEVtIiWYhIiC0HCDhB8lb8ISk7nzdZ5+/zJ/8BTmpT'.
|
191 |
-
'660CZLwG1pVFgBkgGIHECEaa+/T9nHzQCCQuRpCNz6mp6g893U'.
|
192 |
-
'8/c37ve3qEjxiC4OA4n/Lp/EUu/tsMM/+aEWduVBx7WhdkShcY'.
|
193 |
-
'xUH2zo0Dwod/5N6vf8V//PoGdx8M8EOFPtK9jI8BdHCcMuVSmf'.
|
194 |
-
'LxHLmSZdm2U8xIbmKETDGDZZnIy4dBbCynyGhphurEDBOlHFnn'.
|
195 |
-
'qPcyPxTOwDCOccw7w5nlBRZWylI+ny/mZ6rL1dzUZ5/IWGZU3D'.
|
196 |
-
'ZIOMQDDaJcHDVGWUbJBi9odVr0QoVSPzigIEaZ8vgSS/8wZU3/'.
|
197 |
-
'k1fylipz5dLM2WlrZqHKaGCKbEbontq3KAKWQyZfZKTgYqc9Bp'.
|
198 |
-
'2I2PcJ4ogk/UEBQcwipbFZmT13vDBx8fhnE1Ofnp9yJopFyT3X'.
|
199 |
-
'yANfks0QHSQMDaL37pOxMLIu2UyVkjVKLjyKSeuD8dAYCFkso1'.
|
200 |
-
'gYMaeWJ40T56cl8yAi/O4FSa2P6kYczIDsgVpAqcDImZPMuAB1'.
|
201 |
-
'dkLQtcc8a/bwox8IUHAxZVxGZMouSLVYwKuMkD5IxN+JSdsRJB'.
|
202 |
-
'pexuTVgYYM6EoGmxkmg3/hEhNUMr/hd7dqbOzExMn/GRDAxWZc'.
|
203 |
-
'j3I8HiXfMjF2FQowKw7pjoN6E/Llw/GBJj8qxVOMlX4ipxc/lY'.
|
204 |
-
'kl2zBLkmrTcEzMkoNoRLVidLi/9g+Z3I+1xRHX5EcAihxnbPRv'.
|
205 |
-
'OTU9kZSmpKPy9FTGrLimPZ1H+UiyGaF67w6n7E1DwMngFDxGvc'.
|
206 |
-
'w70v0xZUby5IxjlIyMssUJrJwVWkXBdbXvSvwEibcSdKCAFI16'.
|
207 |
-
'4/sc0SRo9cGAGq1DwvQFzV6DVuBiV4zYnlEts6A2TSPcSiXoxo'.
|
208 |
-
'QqJCEEFMbQ2b69o5qMiOOPqIMQkagu/aSL7waE8101WFShLjk9'.
|
209 |
-
'yxgEvjRUiyYd+gwAjY2J9VpXfZ/JEXLhDp3OR6U4T97+hEnPwx'.
|
210 |
-
'tv4HsRjy2tTQSFzQgDUnwSLBQRI+x1ZgcH87Vcv4SF19Kt0ezS'.
|
211 |
-
'1h9s0Ma25pgr/YJfnLnEysok0+ezjM6EBLldGqKIJYuDRhOQEJ'.
|
212 |
-
'Oih8X9Q0xmcXNjlCofBJgn78wxVz7L2YWf8tPPz1hnfjbjzfxN'.
|
213 |
-
'qVwutq2etZXUQSXikcXGIgUiUkJSDIQMJgYGJsaB3c7b1qQ4GZ'.
|
214 |
-
'xSkdGZIwMeNLfK6uezMnvJK3pLxeVixfvMsyVjSNSO6IV9adPG'.
|
215 |
-
'AArkEEz8oUkFmBjYGO80qfd6pCWIayD59wIKcsjcKqufn7JO/S'.
|
216 |
-
'xfyi+5c24pey5rZ09mJRNkiDdT/tzbkBr3SYkpMYpgEaIJSYhI'.
|
217 |
-
'kSOY1GhilAQk5ntDIojxCZ/kf87Pl85xbuWEnLiUy+cW3NNuJX'.
|
218 |
-
'MmY5meKf6mT7wZS+THdOjxlG06tIlIOMZxchSxcFFEGAwAGGME'.
|
219 |
-
'jwyZYSnWL3cXWiIUbUI6hO/vxXuFOV84ycmlBWthNeflTjuzTi'.
|
220 |
-
'lzJmM5s46Ej0J63/ZoPmoy6PYxtYVNhmfs0mbAND1mmKVMBY1L'.
|
221 |
-
'mxA1LN7WgXQbCApNhKJHRIM+DQbv7yQGhjnJ5NgFuXBuxpu5mD'.
|
222 |
-
'udm3LPuY7pmZLUE6L1SIJaIPFuDAqyw9lnwDYv6NFHkWJh4ZDB'.
|
223 |
-
'wCBFD3uMxsTAwcBAiElpE/KcPg36dIiOvpsRxDCyhmlP2YY9ZU'.
|
224 |
-
'v8NMb/1id+FGO0DTztkSXLOONUqeITsMkW2zwnJEIDFhYGx+A1'.
|
225 |
-
'kwK4mASkvKDPc3p0iYhRRwYUhZLUTyV6Eu0t4s1Y4kcx6W6KaM'.
|
226 |
-
'EZThcXH59RRhGEgIAddnBwNEBKqqpUtWBIF22YDIhJsbEkJqFN'.
|
227 |
-
'qLtERHs7GnUkwISEQAf0uj30bY39PzbiC6qrDu2cExJ69Nhhhz'.
|
228 |
-
'59UlIUipCQOnVi4sjG7ubJBy6um0C+he/0iDHQKIQERYyKFLqr'.
|
229 |
-
'SI/W6kJCnvOcrWSLSquC1/Jw9Ks3R0FQKHr0uMc9bnCDGjX69A'.
|
230 |
-
'H0XlcJkibN5jOe/alCZStHbjJL9lSMLkXExvCXRiDV6GZEeGeX'.
|
231 |
-
'3TvvBVQoEjfBL/v0rT75Th7VU5C8gktI6NLlMY+5yU3WWGODDf'.
|
232 |
-
'r098tHpNFNH7/2lKdXXdz7efLzVaqJIBOCmK8AJUlI6g0aV+9y'.
|
233 |
-
'9+p7AR3bMQpTBWPy7yeN6fy0jNwewfpvC9Xe+3kFoUuXe9zj5n'.
|
234 |
-
'BusEGHjh6GIAGawC2FWuvSvbbF1maFylZAsC1ISZADBiVNSJrP'.
|
235 |
-
'eX73MY//skHP85z5+fnSxQsXj//4n39cmnPn7LbZlsajBmEnBL'.
|
236 |
-
'1nuEGDG9x4aa5Ldz+h0RCuBqwBv1Wo+7vs9r7n++0MmYeAM+zB'.
|
237 |
-
'+61EK1QUEnbbtN+9Bh3Hsebn54u//PdfLq9eWl2ZnZ1dSnaSwu'.
|
238 |
-
'Pin40b9g3doKE0WoNIl65xj3v75njd3BBubQi6ExKmDWkMRKSl'.
|
239 |
-
'tSbVKQcMao1Go5Ugb0+x53nOyZMnSysrKydXLq1cWlxa/McgCB'.
|
240 |
-
'Yev3hU+GPrD3I5/q94k3pXYQY58q6B5Bs0HB//neaGx00gyWaz'.
|
241 |
-
'VCoV7bquCoKAnZ0dfN/f03egLGj0m3XQNE1jdnY2/+WXXy6trq'.
|
242 |
-
'6uzP3oR5eCIFi4detW5feXL1vr679Let37zVB3/mQytjXJwmSB'.
|
243 |
-
'wikHp9ShY0RESqObwPrr5oBERKhUKly4cIFqtUq9XufmzZtsbW'.
|
244 |
-
'2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr'.
|
245 |
-
'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw'.
|
246 |
-
'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v'.
|
247 |
-
'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ'.
|
248 |
-
'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk'.
|
249 |
-
'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW'.
|
250 |
-
'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+'.
|
251 |
-
'++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t'.
|
252 |
-
'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw'.
|
253 |
-
'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo'.
|
254 |
-
'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t'.
|
255 |
-
'+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly'.
|
256 |
-
'9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe'.
|
257 |
-
'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV'.
|
258 |
-
'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50'.
|
259 |
-
'1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK'.
|
260 |
-
'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E'.
|
261 |
-
'rkJggg==' ;
|
262 |
-
|
263 |
-
//==========================================================
|
264 |
-
// File: ppl_blue.png
|
265 |
-
//==========================================================
|
266 |
-
$this->imgdata_large[3][0]= 2284 ;
|
267 |
-
$this->imgdata_large[3][1]=
|
268 |
-
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
269 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
270 |
-
'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF'.
|
271 |
-
'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1'.
|
272 |
-
'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa'.
|
273 |
-
'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7'.
|
274 |
-
'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO'.
|
275 |
-
'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf'.
|
276 |
-
'7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE'.
|
277 |
-
'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i'.
|
278 |
-
'7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp4e'.
|
279 |
-
'7CIEHomxDiuVdGTqUnf/ZeOjR8fpiVXZul5ZrY3bWwbdcLr/dA'.
|
280 |
-
'AAIpAwQjUWIjQ+g9HZvswiCgBVF9/SI6OSLGzo0i+oLi6+Utbq'.
|
281 |
-
'+bKEftgwOE/0Ohocf66M+cBjo22U2RQLIHMhmYnvaOpR9S8bSU'.
|
282 |
-
'UqCURGpRkuMZMm9cIvPGJZLj0yBjT2LprkiSkykx9cuXIhOnUs'.
|
283 |
-
'm+QNC2XdG02ggBTcvFabsPWwTPpBAChSCgh4kYBpoeplWp47Qs'.
|
284 |
-
'7EYDt21xINzd5GCAxLExRl89Z+nHjpbKMmjbmkgfDzI0JEW53K'.
|
285 |
-
'Jaa6NcAOEX8v52uJzsBlAS6u0hcnTIccPRqhWPCUcLD+s1EaUp'.
|
286 |
-
'HCEhEMCyHNpt9SjgIU12A6iw6xb123vYhaaKjB9tlgMD5X+uBp'.
|
287 |
-
'zdkpg6azA8EaNQtKlVba+Xez4eCntnJrsDdFsW5nYFpxlFN846'.
|
288 |
-
'DXe8utkM4mhi+EgQmjYbS2WqexZKk6BpjwJ2YlK5VjeA3pNDiH'.
|
289 |
-
'YjRWPzPE7tmBo8EWwGhkXx+z3uXL7D3rU97LIF8RBEAl6lK/Uo'.
|
290 |
-
'6JNM1rZ2aTcr3eUgIQOGTgbdwXMGyRejenLYTvQGbAdRuetSud'.
|
291 |
-
'OivVuFZgtCEgICghICnZoMhmlVTPR49LCAEkQUhk/B7KXe0MWf'.
|
292 |
-
'nxj8xVR/cDheK14WZmtVMJSBnlGoN6FmQq0FLfdwJgORKPHRo/'.
|
293 |
-
'Snzx4G0F/FjJ4KiOdmjPCrrx8bffnMybMv9MQGNG3rzlVqtR1B'.
|
294 |
-
'sh/CYXCD4Aag1oCW7ZnUOjSp6WFi/QNEB8Y7BfTNjZyCmUvJ0I'.
|
295 |
-
'XXT47MTp98Ybon9VZCk8cVazfqlNargsY34G7ByAlIjkHd9CCr'.
|
296 |
-
'LbBdiHViUgiECuDKYCdz8b2cywREdiYZOj8zNnLuzOTzx6ODp+'.
|
297 |
-
'OaGaqwVzBFqz0Idhz2loE7YEwBLaAJLQcKbW8qjAcBF5Jh0AMP'.
|
298 |
-
'IOHe6kxgtb3UMO2OxkF//ffK28nQqxfvm3szrtnDVa799Qb/+v'.
|
299 |
-
'NtsbNSpm3tAv8B+w7Ub0FhAyoBcMPec9oK6raXk48ziQBXQcmC'.
|
300 |
-
'pT3YqHa0mpEBkTR6wz/Jjo2cy04+fzwxdDquNfQKO7sFUbpu0c'.
|
301 |
-
'wp3JoAYsA42Bbkl4GCryUNDEM7Avm6Z/CgSYBWG8pNuFuDu1Wo'.
|
302 |
-
'tjoxKIJGeHIiM/jmK9NnX5ycuJQMtUcqXPvLDTa+qIie4hAJ1U'.
|
303 |
-
'vdrmO2HaDfB931twJgAn1A4lGT96obPHPLBbhVgUoTHHWo9aAA'.
|
304 |
-
'JVAKpyKEmQNzWRENAsL18ycKjAFN/9gCNvzLB/390MMmE7pnDi'.
|
305 |
-
'Bvwt0K5Jv3O+0oB22nJ1Vvjb/UMhOpcKknqN1OiMB2DNHU2G5s'.
|
306 |
-
'sVndpGJVcZXjX1IAlvw9PmhRQcOFPhsSDkiBrQR1G7brgs0a7D'.
|
307 |
-
'ag3FK4rguqBXarI4Nt1SJv5gls7TEWtJDRBO2GwnIs8maevFnA'.
|
308 |
-
'Gx6awLZvzeTBu4kFbLigijC47pscpx0xyDfkvtUEnlarCDtrUC'.
|
309 |
-
't2HGIhvPHVdVwqjTIrxRU2a5uUrYoP0QZ2gMvACl7+3V/LuKDq'.
|
310 |
-
'sJuDy597516+CEezIHXv7vcgXQu2l+Bvn8He9Y4AE4kgk5P9DE'.
|
311 |
-
'R6aFdq5Et5Nit3yTf3m9sBcsAN3+D98c0Fit5JawE25r1zg1Fo'.
|
312 |
-
'5B8GFD7g+nVYnu8EUEop9XTa0N/9dUbqcphP/rDJzbUClVbpgR'.
|
313 |
-
'y2fXM3fND95qj75J8AC6BWPINfVSBieK+x+6cS5UCzCLu3oFV9'.
|
314 |
-
'GqCMx2NGOp2Znpv7aXZudsool3T5J/179sxVlHJ4kGPrP2COBX'.
|
315 |
-
'/7DmiApWCjxIMXpYNznYuXM+6TAKWUMppOZzLvv//ery5cuDCT'.
|
316 |
-
'SqVS336bCwr1JfAPB9r+2KAFwJS+OcETzZHz/7v3etl6ipz77X'.
|
317 |
-
'GAMh6PG+l0OjM3NzczOzs3k0pNnFlbW43+e/GKtMqrblSsF03V'.
|
318 |
-
'WHcJA0PjIAzvg9JTze2H67g9DjAwOTmZ+uCDD96anZ2dnZiYmF'.
|
319 |
-
'5dW41++Lvfa1fnr7qllVK9103mXNTnJgPA+YugsvB3HTaEl+Qs'.
|
320 |
-
'AZ/yeHPPDCiTyaRx5syZbGoilV1dW00szC9oV+avusuLy0Xd0X'.
|
321 |
-
'MgFkDM+zkYBZEHV8f7wwKu84zmngQoNU0LaZoWUa4K31y5qX/8'.
|
322 |
-
'4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel'.
|
323 |
-
'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN'.
|
324 |
-
'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj'.
|
325 |
-
'6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+'.
|
326 |
-
'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN'.
|
327 |
-
'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb'.
|
328 |
-
'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg==' ;
|
329 |
-
|
330 |
-
//==========================================================
|
331 |
-
// File: ppl_green.png
|
332 |
-
//==========================================================
|
333 |
-
$this->imgdata_large[4][0]= 2854 ;
|
334 |
-
$this->imgdata_large[4][1]=
|
335 |
-
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
336 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
337 |
-
'B3RJTUUH0wMLFQ4hANhluwAACrNJREFUeJytmF1zE1eagJ+3u9'.
|
338 |
-
'XdkvUty2AbmLEtEzDBgZ0UpDBOalNTUzU3czl7tct/2n+wt3M/'.
|
339 |
-
'NVM12SSTQQSyW2TA+QAJQogtYYFtyfrqL3WfvWj5g8AEjzfvhS'.
|
340 |
-
'SXjk8//Zz3Pf3qCMcJAWxMKlT4kH+jwu/FknnJSUItKFHzCrKA'.
|
341 |
-
'BggBQx5ziz/wn/yBz3hED4/oaJfSjgVoYjJJgTLTZCjohp7IGT'.
|
342 |
-
'k5aZ4kb+bRTR30Q7djj8f/kpPMUSCFedRL6W8e8qMQNE6S4xpv'.
|
343 |
-
'c5HrTPFubiJ3ZnlyOXV59rJYU5Z00h1c3d0brxAiUkScRijisk'.
|
344 |
-
'6XLTyiN3s8HuAJpniXa/q8/pt8Or+0kF8oXJm5YiydWcIpOrJu'.
|
345 |
-
'rjOQwd54AQwsMpTJYhPSoYuLQ58An/DnBQSdImXO8avsTPbqpc'.
|
346 |
-
'lLp67OXDVzMznZLGxSs2qyIRu4at8gKHQEC50kE1icxqCAdxST'.
|
347 |
-
'xjEA44tqaJlERl8uLWvvnX5PHuQfcCdxh5qq0aX76vj4WgWyXO'.
|
348 |
-
'QiNgBP8IAaddr08X8+wHFmJSQhBbPAZGoSZSt5wQs6qoNC7UEd'.
|
349 |
-
'4AEoLIQSCaCCy78Dv8Tiv1hjjW1CRj8XIAgEKqDtt9keboMJZa'.
|
350 |
-
'vMjuzQVd3Xr9prTJo+GF/jKZea95R25Lxs8jg5qFGiwDnOS0mW'.
|
351 |
-
'NE0rjNRIt3WbklUCA9mV3Zdz8OBT/JfCQLB0SKYVVjGFYSfx/E'.
|
352 |
-
'26ow4e6uDujlPFQpE0FU6P8qNTHdXJdEdda0qf0itWBVM3pa/3'.
|
353 |
-
'ccUlIECJet0cAJoeYk5EZCeS5IwEoerSxccJBwRqFFf38QCTaO'.
|
354 |
-
'TRVFKJm3NTbtLNSyh2IkhIXsvLCesEGNCWdmwyruSD/z9kUlRc'.
|
355 |
-
'3bqNlSxhJNJ43p5JITrOEis8Qtr0cXEpU/JT/pmO18n2vb42pU'.
|
356 |
-
'3JnDnHMBqyPlpnoAaxhr2llv1ZUBqEGlqYwDQMsskMOcMgVL3Y'.
|
357 |
-
'ZOQTHAcQQiIGjHCwCaiovjrv4hbcpKuJJjIcDHm685RGr4GLCx'.
|
358 |
-
'YHkAcrLoAoDSLBiAQrMkjqybHJCbxgh+7xAC1MpsgzwRwD3qHL'.
|
359 |
-
'WyTIBdlAa6u2rHfXaew06PV78ZZjAwleNnkolECoH5i090wOcY'.
|
360 |
-
'+TgwYzFHiPi1zkOkXexeAMASnVU+LiyiA1wFUuaqggACLizeWw'.
|
361 |
-
'ycMzyssmVYKkbpGyC5T+OUALk2mKLHKWf+ED/az+YW42d66YL+'.
|
362 |
-
'aNrmEEzQCFEnKw368EgEvcN1m80eTIQIt0TFOjMJHkzNEBBYPp'.
|
363 |
-
'sblf8QHzrORO5JaWZ5ZLl6cuJyyxpNPv4PZdoT+GyIxBfI5uUg'.
|
364 |
-
'eJMCwP2/bIHO1JEudcgUUWOceKNq99mCvnzs5PzRcuTV4y5mRO'.
|
365 |
-
'SMIjo47z5S7a94oQCNKgJsZwO7D/IDNg3/LLhRNXt4JohBb4aG'.
|
366 |
-
'82GLdXcf93mQ+Y43r2RHZp+cRy6cqJK4l8MS+tdItaqiYtc0Mm'.
|
367 |
-
'QpfJARh98HYh9IiXVcaAo58wGb+LBAjbSPgCOcoSa0wzxXtc08'.
|
368 |
-
'/pv8mfyL+9MLVQvDJ1JVHJV6SZbFI1qtTsB+KlehRtRTGE8Afo'.
|
369 |
-
'P4DRcAxiEudhAHjjzz+ubgX4oHowakHQOlqzICQwyVPITGVOXi'.
|
370 |
-
'xfLF6aumzmczl5lHzMff2+fCdPaGttEkXoLQAO9B7C6EugPYby'.
|
371 |
-
'gVPjGXc5eIbNAJPjGwiAbaAJUQv8wVG7GROkJFpyOqn/ovgLba'.
|
372 |
-
'44L0+sDaraXb6jzq7aBQWjBOyUoHcaopOgmaA3IRyNDZnA1HjO'.
|
373 |
-
'HSBkr7eEFDAEngHrQCf+/s2A8cSiSkqcKUeeTjwFy2Jd78t3+L'.
|
374 |
-
'TR4itIiBLwLQhzkJyB5Cx4HXDaENVQCBAQcRqFIHTRaBIvuYXg'.
|
375 |
-
'AdsouuNxEL0ZUBHnSQp66R73zYfUtQ6OytKT8RckQAJQoLtgO5'.
|
376 |
-
'BJgj0D/WfgdyHaAHx8THoUcbGx8ciwhUl3bDEiToURPooeI7pH'.
|
377 |
-
'MziK9Yd9nU5a6GgKjOH41vsgI4hAcyC5AZkapF+AoYNrjjsuhx'.
|
378 |
-
'FbtPmeB5ykyQQzTPAWAQWC8S9oAI0QRRuPb9jkmyMZNAOTklvC'.
|
379 |
-
'GGYZaFkGmkVAh8h4DtKFMIBunG+pB5B5AIkGBDsQ+qBiL20caj'.
|
380 |
-
'zhJknq5KlgMkLjJHJos4kYEbFJi5vc5eYbATVN02bNWe19+32t'.
|
381 |
-
'aJWlFm3wbf8Rz5NbDFJdlOFBF/g7cBf0JkrbBb+F6j1DOduEkU'.
|
382 |
-
'8bWCOiSofPWadBnSZDWmgUkEMGhZCINut8S/0NBtPptFlZrBSu'.
|
383 |
-
'vnt1+ndnflfIp9OJ/279Ubbbd+lP7KBKPoEBsgnqLph/BRzwdS'.
|
384 |
-
'LnBUFvHcfdpRsGPAGqwMco6jynz+e0SPKYCHMfLX5VKHwcenR+'.
|
385 |
-
'Igd1XTcqlUr+xn/cePv91fevzy8sLO2OtrOpWkqL7gXKSAVRdh'.
|
386 |
-
'ZFEmEXoYkwBNqovoc/3GHH3aUR+jwC1oD/AWrANi4hGwyBzqEG'.
|
387 |
-
'Vvb77Dgi0eT1VZzJZMxKpVJYXV1dXF1dXVm6sPSvruue3Xzcyj'.
|
388 |
-
'6/syvDzwj0lNazK6Fj5LFCRZouZpBABj6jXouu3+Np6HNvDHaf'.
|
389 |
-
'g91t74msbMuOJicnSSaTKKUQEUQEpRSO69But1/dB0VEm5uby9'.
|
390 |
-
'y4cWNpdXX1+sLCworrume//PuXpeqnVeOban0U1PW2kcx+O9L7'.
|
391 |
-
'Te9sUB4lWFR9SqNtNGcHx+/RDD2+Am4D94CnQA8OjjlEhMnyJC'.
|
392 |
-
'srK8zOzu7BiYioMAzZ2Njg9u3brwIqpSSXy2WXl5eXLly4sOo4'.
|
393 |
-
'zoV6vV6oflrVP/7Tx8Hmw1Zb6ydqmpWp7ha8h4O3gjOhzVANmF'.
|
394 |
-
'XPMNQWvdDnCXCXuHR+APqH4fbCtm2mp6eZn59H13WJuYXRaKSU'.
|
395 |
-
'UiSTyVcBdV3XDcOwRaTU7/en19bWCn/79G+JL/76RbhZ22y7u+'.
|
396 |
-
'6ahl71nPDz/nO17m7wAxlabFOihy4+DvAcqAMbPzZ3OFzX5dmz'.
|
397 |
-
'Z2iahoiosUUVhiGNRgPHcV4GzGQy5uLiYuH8+fMzo9FoslarJW'.
|
398 |
-
'9+elP75E+fBJu1zY7qqpqBUW3T/niohnVvy+1zm5aVtp+WE2XT'.
|
399 |
-
'nrHFzbjh1tYLz3XdPjD4R3BKKba2tqhWq4dzUO3noBPn4H5PKy'.
|
400 |
-
'LaO++8U7hx48byhQsXVne7u6tf3/v64t3P7mbq9+odt+OuaWi3'.
|
401 |
-
'PLxbW2ytubjbQCgiMnt6VlaurWgz0zM0m02q1WrUaDSUUuqI56'.
|
402 |
-
'ivDxE5MCgiYllWtlwuL5mmufLV/a/O/uXPf9Ff1F+80Lv6Yx29'.
|
403 |
-
'2qHzyZBh3cdvc7gaTZuZkzPh/Py8ACqVSv1/uPZDKXUAGEWRtF'.
|
404 |
-
'qtxEcffZTL5XLF+2v39fqjeivshA/TpP83JLwzYFBzcA4370Cc'.
|
405 |
-
'S81nTRBUs9lkOByi1GuOPI4Rh3+26JZlnSkWi781DOPXvV4v3+'.
|
406 |
-
'/2G0R8kSBxB/jew+tERK+c49m2TblcxrZtXNfl+fPneJ6HZVmU'.
|
407 |
-
'y2VJJpNyaJ9TSinlOA5bW1u4rntkQA0oAG8D54gb9W3ianxM3A'.
|
408 |
-
'e/cn73U3Hq1Cm5du2aPjs7a+ztcSIShmE4ajQa6tatWzQajZ+0'.
|
409 |
-
'fbiKI+It4SvijVUj7kL2qvGfgkskEqTTaZmcnDROnTplJhIJTU'.
|
410 |
-
'QiwPd9P/Q8T6XTaQzDIAiCfzjP/wFVfszuFqdHXgAAAABJRU5E'.
|
411 |
-
'rkJggg==' ;
|
412 |
-
|
413 |
-
|
414 |
-
//==========================================================
|
415 |
-
// File: pp_red.png
|
416 |
-
//==========================================================
|
417 |
-
$this->imgdata_small[0][0]= 384 ;
|
418 |
-
$this->imgdata_small[0][1]=
|
419 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
420 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
421 |
-
'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og'.
|
422 |
-
'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G'.
|
423 |
-
'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I'.
|
424 |
-
'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw'.
|
425 |
-
'3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ'.
|
426 |
-
'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN'.
|
427 |
-
'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg'.
|
428 |
-
's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA'.
|
429 |
-
'AElFTkSuQmCC' ;
|
430 |
-
|
431 |
-
//==========================================================
|
432 |
-
// File: pp_orange.png
|
433 |
-
//==========================================================
|
434 |
-
$this->imgdata_small[1][0]= 403 ;
|
435 |
-
$this->imgdata_small[1][1]=
|
436 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
437 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
438 |
-
'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S'.
|
439 |
-
'3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g'.
|
440 |
-
'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml'.
|
441 |
-
'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C'.
|
442 |
-
'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I'.
|
443 |
-
'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD'.
|
444 |
-
'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL'.
|
445 |
-
'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA'.
|
446 |
-
'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg==' ;
|
447 |
-
|
448 |
-
//==========================================================
|
449 |
-
// File: pp_pink.png
|
450 |
-
//==========================================================
|
451 |
-
$this->imgdata_small[2][0]= 419 ;
|
452 |
-
$this->imgdata_small[2][1]=
|
453 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
454 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
455 |
-
'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi'.
|
456 |
-
'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg'.
|
457 |
-
'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx'.
|
458 |
-
'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF'.
|
459 |
-
'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF'.
|
460 |
-
'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede'.
|
461 |
-
'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB'.
|
462 |
-
'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM'.
|
463 |
-
'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU'.
|
464 |
-
'VORK5CYII=' ;
|
465 |
-
|
466 |
-
|
467 |
-
//==========================================================
|
468 |
-
// File: pp_blue.png
|
469 |
-
//==========================================================
|
470 |
-
$this->imgdata_small[3][0]= 883 ;
|
471 |
-
$this->imgdata_small[3][1]=
|
472 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1'.
|
473 |
-
'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz'.
|
474 |
-
'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM'.
|
475 |
-
'yZAP/MAADMADPMAGbMAJnMAMzMAP//AAD/ADP/AGb/AJn/AMz/'.
|
476 |
-
'AP8AMwAAMzMAM2YAM5kAM8wAM/8zMwAzMzMzM2YzM5kzM8wzM/'.
|
477 |
-
'9mMwBmMzNmM2ZmM5lmM8xmM/+ZMwCZMzOZM2aZM5mZM8yZM//M'.
|
478 |
-
'MwDMMzPMM2bMM5nMM8zMM///MwD/MzP/M2b/M5n/M8z/M/8AZg'.
|
479 |
-
'AAZjMAZmYAZpkAZswAZv8zZgAzZjMzZmYzZpkzZswzZv9mZgBm'.
|
480 |
-
'ZjNmZmZmZplmZsxmZv+ZZgCZZjOZZmaZZpmZZsyZZv/MZgDMZj'.
|
481 |
-
'PMZmbMZpnMZszMZv//ZgD/ZjP/Zmb/Zpn/Zsz/Zv8AmQAAmTMA'.
|
482 |
-
'mWYAmZkAmcwAmf8zmQAzmTMzmWYzmZkzmcwzmf9mmQBmmTNmmW'.
|
483 |
-
'ZmmZlmmcxmmf+ZmQCZmTOZmWaZmZmZmcyZmf/MmQDMmTPMmWbM'.
|
484 |
-
'mZnMmczMmf//mQD/mTP/mWb/mZn/mcz/mf8AzAAAzDMAzGYAzJ'.
|
485 |
-
'kAzMwAzP8zzAAzzDMzzGYzzJkzzMwzzP9mzABmzDNmzGZmzJlm'.
|
486 |
-
'zMxmzP+ZzACZzDOZzGaZzJmZzMyZzP/MzADMzDPMzGbMzJnMzM'.
|
487 |
-
'zMzP//zAD/zDP/zGb/zJn/zMz/zP8A/wAA/zMA/2YA/5kA/8wA'.
|
488 |
-
'//8z/wAz/zMz/2Yz/5kz/8wz//9m/wBm/zNm/2Zm/5lm/8xm//'.
|
489 |
-
'+Z/wCZ/zOZ/2aZ/5mZ/8yZ///M/wDM/zPM/2bM/5nM/8zM////'.
|
490 |
-
'/wD//zP//2b//5n//8z///9jJVUgAAAAAXRSTlMAQObYZgAAAA'.
|
491 |
-
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
492 |
-
'RQfTAwkWGTNerea3AAAAYUlEQVR4nHXNwQ3AIAxDUUfyoROxRZ'.
|
493 |
-
'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM'.
|
494 |
-
'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w'.
|
495 |
-
'bN4SMue4/KbwAAAABJRU5ErkJggg==' ;
|
496 |
-
|
497 |
-
//==========================================================
|
498 |
-
// File: pp_green.png
|
499 |
-
//==========================================================
|
500 |
-
$this->imgdata_small[4][0]= 447 ;
|
501 |
-
$this->imgdata_small[4][1]=
|
502 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
503 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
504 |
-
'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f'.
|
505 |
-
'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ'.
|
506 |
-
'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG'.
|
507 |
-
'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL'.
|
508 |
-
'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho'.
|
509 |
-
'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv'.
|
510 |
-
'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV'.
|
511 |
-
'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA'.
|
512 |
-
'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ'.
|
513 |
-
'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC' ;
|
514 |
-
}
|
515 |
-
}
|
516 |
-
|
517 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_squares.inc.php
DELETED
@@ -1,150 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_SQUARES.INC
|
4 |
-
// Description: Base64 encoded images for squares
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_squares.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
class ImgData_Squares extends ImgData {
|
12 |
-
protected $name = 'Squares';
|
13 |
-
protected $an = array(MARK_IMG_SQUARE =>'imgdata');
|
14 |
-
|
15 |
-
protected $colors = array('bluegreen','blue','green',
|
16 |
-
'lightblue','orange','purple','red','yellow');
|
17 |
-
protected $index = array('bluegreen' =>2,'blue'=>5,'green'=>6,
|
18 |
-
'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1);
|
19 |
-
protected $maxidx = 7 ;
|
20 |
-
protected $imgdata ;
|
21 |
-
|
22 |
-
function ImgData_Squares () {
|
23 |
-
//==========================================================
|
24 |
-
//sq_lblue.png
|
25 |
-
//==========================================================
|
26 |
-
$this->imgdata[0][0]= 362 ;
|
27 |
-
$this->imgdata[0][1]=
|
28 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'.
|
29 |
-
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
30 |
-
'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'.
|
31 |
-
'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'.
|
32 |
-
'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'.
|
33 |
-
'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'.
|
34 |
-
'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'.
|
35 |
-
'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'.
|
36 |
-
'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'.
|
37 |
-
'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ;
|
38 |
-
|
39 |
-
//==========================================================
|
40 |
-
//sq_yellow.png
|
41 |
-
//==========================================================
|
42 |
-
$this->imgdata[1][0]= 338 ;
|
43 |
-
$this->imgdata[1][1]=
|
44 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'.
|
45 |
-
'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'.
|
46 |
-
'/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'.
|
47 |
-
'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'.
|
48 |
-
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'.
|
49 |
-
'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'.
|
50 |
-
'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'.
|
51 |
-
'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'.
|
52 |
-
'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'.
|
53 |
-
'I=' ;
|
54 |
-
|
55 |
-
//==========================================================
|
56 |
-
//sq_blgr.png
|
57 |
-
//==========================================================
|
58 |
-
$this->imgdata[2][0]= 347 ;
|
59 |
-
$this->imgdata[2][1]=
|
60 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'.
|
61 |
-
'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'.
|
62 |
-
'0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'.
|
63 |
-
'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'.
|
64 |
-
'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'.
|
65 |
-
'1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'.
|
66 |
-
'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'.
|
67 |
-
'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'.
|
68 |
-
'0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'.
|
69 |
-
'AASUVORK5CYII=' ;
|
70 |
-
|
71 |
-
//==========================================================
|
72 |
-
//sq_red.png
|
73 |
-
//==========================================================
|
74 |
-
$this->imgdata[3][0]= 324 ;
|
75 |
-
$this->imgdata[3][1]=
|
76 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
77 |
-
'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'.
|
78 |
-
'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'.
|
79 |
-
'3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'.
|
80 |
-
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'.
|
81 |
-
'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'.
|
82 |
-
'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'.
|
83 |
-
'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'.
|
84 |
-
'/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ;
|
85 |
-
|
86 |
-
//==========================================================
|
87 |
-
//sq_pink.png
|
88 |
-
//==========================================================
|
89 |
-
$this->imgdata[4][0]= 445 ;
|
90 |
-
$this->imgdata[4][1]=
|
91 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'.
|
92 |
-
'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'.
|
93 |
-
'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'.
|
94 |
-
'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'.
|
95 |
-
'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'.
|
96 |
-
'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'.
|
97 |
-
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'.
|
98 |
-
'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'.
|
99 |
-
'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'.
|
100 |
-
'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'.
|
101 |
-
'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'.
|
102 |
-
'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ;
|
103 |
-
|
104 |
-
//==========================================================
|
105 |
-
//sq_blue.png
|
106 |
-
//==========================================================
|
107 |
-
$this->imgdata[5][0]= 283 ;
|
108 |
-
$this->imgdata[5][1]=
|
109 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'.
|
110 |
-
'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'.
|
111 |
-
'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'.
|
112 |
-
'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'.
|
113 |
-
'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'.
|
114 |
-
'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'.
|
115 |
-
'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'.
|
116 |
-
'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ;
|
117 |
-
|
118 |
-
//==========================================================
|
119 |
-
//sq_green.png
|
120 |
-
//==========================================================
|
121 |
-
$this->imgdata[6][0]= 325 ;
|
122 |
-
$this->imgdata[6][1]=
|
123 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
124 |
-
'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'.
|
125 |
-
'6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'.
|
126 |
-
'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'.
|
127 |
-
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'.
|
128 |
-
'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'.
|
129 |
-
'5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'.
|
130 |
-
'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'.
|
131 |
-
'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ;
|
132 |
-
|
133 |
-
//==========================================================
|
134 |
-
//sq_orange.png
|
135 |
-
//==========================================================
|
136 |
-
$this->imgdata[7][0]= 321 ;
|
137 |
-
$this->imgdata[7][1]=
|
138 |
-
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'.
|
139 |
-
'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'.
|
140 |
-
'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'.
|
141 |
-
'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'.
|
142 |
-
'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'.
|
143 |
-
'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'.
|
144 |
-
'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'.
|
145 |
-
'1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'.
|
146 |
-
'AbWuGMOr5COSAAAAAElFTkSuQmCC' ;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/imgdata_stars.inc.php
DELETED
@@ -1,144 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: IMGDATA_STARS.INC
|
4 |
-
// Description: Base64 encoded images for stars
|
5 |
-
// Created: 2003-03-20
|
6 |
-
// Ver: $Id: imgdata_stars.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
|
12 |
-
class ImgData_Stars extends ImgData {
|
13 |
-
protected $name = 'Stars';
|
14 |
-
protected $an = array(MARK_IMG_STAR => 'imgdata');
|
15 |
-
|
16 |
-
protected $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow');
|
17 |
-
protected $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1,
|
18 |
-
'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6);
|
19 |
-
protected $maxidx = 7 ;
|
20 |
-
protected $imgdata ;
|
21 |
-
|
22 |
-
function __construct() {
|
23 |
-
//==========================================================
|
24 |
-
// File: bstar_green_001.png
|
25 |
-
//==========================================================
|
26 |
-
$this->imgdata[0][0]= 329 ;
|
27 |
-
$this->imgdata[0][1]=
|
28 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'.
|
29 |
-
'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'.
|
30 |
-
'/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'.
|
31 |
-
'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
32 |
-
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'.
|
33 |
-
'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'.
|
34 |
-
'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'.
|
35 |
-
'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'.
|
36 |
-
'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ;
|
37 |
-
//==========================================================
|
38 |
-
// File: bstar_blred.png
|
39 |
-
//==========================================================
|
40 |
-
$this->imgdata[1][0]= 325 ;
|
41 |
-
$this->imgdata[1][1]=
|
42 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
43 |
-
'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'.
|
44 |
-
'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'.
|
45 |
-
'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
46 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'.
|
47 |
-
'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
48 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
49 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
50 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
51 |
-
|
52 |
-
//==========================================================
|
53 |
-
// File: bstar_red_001.png
|
54 |
-
//==========================================================
|
55 |
-
$this->imgdata[2][0]= 325 ;
|
56 |
-
$this->imgdata[2][1]=
|
57 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
58 |
-
'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'.
|
59 |
-
'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'.
|
60 |
-
'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
61 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'.
|
62 |
-
'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
63 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
64 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
65 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
66 |
-
|
67 |
-
//==========================================================
|
68 |
-
// File: bstar_blgr_001.png
|
69 |
-
//==========================================================
|
70 |
-
$this->imgdata[3][0]= 325 ;
|
71 |
-
$this->imgdata[3][1]=
|
72 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
73 |
-
'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'.
|
74 |
-
'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'.
|
75 |
-
'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
76 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'.
|
77 |
-
'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
78 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
79 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
80 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
81 |
-
|
82 |
-
//==========================================================
|
83 |
-
// File: bstar_blgr_002.png
|
84 |
-
//==========================================================
|
85 |
-
$this->imgdata[4][0]= 325 ;
|
86 |
-
$this->imgdata[4][1]=
|
87 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
88 |
-
'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'.
|
89 |
-
'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'.
|
90 |
-
'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
91 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'.
|
92 |
-
'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
93 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
94 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
95 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
96 |
-
|
97 |
-
//==========================================================
|
98 |
-
// File: bstar_blue_001.png
|
99 |
-
//==========================================================
|
100 |
-
$this->imgdata[5][0]= 325 ;
|
101 |
-
$this->imgdata[5][1]=
|
102 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
103 |
-
'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'.
|
104 |
-
'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'.
|
105 |
-
'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
106 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'.
|
107 |
-
'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
108 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
109 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
110 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
111 |
-
|
112 |
-
//==========================================================
|
113 |
-
// File: bstar_oy_007.png
|
114 |
-
//==========================================================
|
115 |
-
$this->imgdata[6][0]= 325 ;
|
116 |
-
$this->imgdata[6][1]=
|
117 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
118 |
-
'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'.
|
119 |
-
'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'.
|
120 |
-
'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
121 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'.
|
122 |
-
'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
123 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
124 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
125 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
126 |
-
|
127 |
-
//==========================================================
|
128 |
-
// File: bstar_lred.png
|
129 |
-
//==========================================================
|
130 |
-
$this->imgdata[7][0]= 325 ;
|
131 |
-
$this->imgdata[7][1]=
|
132 |
-
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
133 |
-
'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'.
|
134 |
-
'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'.
|
135 |
-
'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
136 |
-
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'.
|
137 |
-
'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
138 |
-
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
139 |
-
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
140 |
-
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/jpg-config.inc.php
DELETED
@@ -1,138 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: JPG-CONFIG.INC
|
4 |
-
// Description: Configuration file for JpGraph library
|
5 |
-
// Created: 2004-03-27
|
6 |
-
// Ver: $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
|
12 |
-
//------------------------------------------------------------------------
|
13 |
-
// Directories for cache and font directory.
|
14 |
-
//
|
15 |
-
// CACHE_DIR:
|
16 |
-
// The full absolute name of the directory to be used to store the
|
17 |
-
// cached image files. This directory will not be used if the USE_CACHE
|
18 |
-
// define (further down) is false. If you enable the cache please note that
|
19 |
-
// this directory MUST be readable and writable for the process running PHP.
|
20 |
-
// Must end with '/'
|
21 |
-
//
|
22 |
-
// TTF_DIR:
|
23 |
-
// Directory where TTF fonts can be found. Must end with '/'
|
24 |
-
//
|
25 |
-
// The default values used if these defines are left commented out are:
|
26 |
-
//
|
27 |
-
// UNIX:
|
28 |
-
// CACHE_DIR /tmp/jpgraph_cache/
|
29 |
-
// TTF_DIR /usr/share/fonts/truetype/
|
30 |
-
// MBTTF_DIR /usr/share/fonts/truetype/
|
31 |
-
//
|
32 |
-
// WINDOWS:
|
33 |
-
// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
|
34 |
-
// TTF_DIR $SERVER_SYSTEMROOT/fonts/
|
35 |
-
// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
|
36 |
-
//
|
37 |
-
//------------------------------------------------------------------------
|
38 |
-
// define('CACHE_DIR','/tmp/jpgraph_cache/');
|
39 |
-
// define('TTF_DIR','/usr/share/fonts/TrueType/');
|
40 |
-
// define('MBTTF_DIR','/usr/share/fonts/TrueType/');
|
41 |
-
|
42 |
-
//-------------------------------------------------------------------------
|
43 |
-
// Cache directory specification for use with CSIM graphs that are
|
44 |
-
// using the cache.
|
45 |
-
// The directory must be the filesysystem name as seen by PHP
|
46 |
-
// and the 'http' version must be the same directory but as
|
47 |
-
// seen by the HTTP server relative to the 'htdocs' ddirectory.
|
48 |
-
// If a relative path is specified it is taken to be relative from where
|
49 |
-
// the image script is executed.
|
50 |
-
// Note: The default setting is to create a subdirectory in the
|
51 |
-
// directory from where the image script is executed and store all files
|
52 |
-
// there. As ususal this directory must be writeable by the PHP process.
|
53 |
-
define('CSIMCACHE_DIR','csimcache/');
|
54 |
-
define('CSIMCACHE_HTTP_DIR','csimcache/');
|
55 |
-
|
56 |
-
//------------------------------------------------------------------------
|
57 |
-
// Various JpGraph Settings. Adjust accordingly to your
|
58 |
-
// preferences. Note that cache functionality is turned off by
|
59 |
-
// default (Enable by setting USE_CACHE to true)
|
60 |
-
//------------------------------------------------------------------------
|
61 |
-
|
62 |
-
// Deafult locale for error messages.
|
63 |
-
// This defaults to English = 'en'
|
64 |
-
define('DEFAULT_ERR_LOCALE','en');
|
65 |
-
|
66 |
-
// Deafult graphic format set to 'auto' which will automatically
|
67 |
-
// choose the best available format in the order png,gif,jpeg
|
68 |
-
// (The supported format depends on what your PHP installation supports)
|
69 |
-
define('DEFAULT_GFORMAT','auto');
|
70 |
-
|
71 |
-
// Should the cache be used at all? By setting this to false no
|
72 |
-
// files will be generated in the cache directory.
|
73 |
-
// The difference from READ_CACHE being that setting READ_CACHE to
|
74 |
-
// false will still create the image in the cache directory
|
75 |
-
// just not use it. By setting USE_CACHE=false no files will even
|
76 |
-
// be generated in the cache directory.
|
77 |
-
define('USE_CACHE',false);
|
78 |
-
|
79 |
-
// Should we try to find an image in the cache before generating it?
|
80 |
-
// Set this define to false to bypass the reading of the cache and always
|
81 |
-
// regenerate the image. Note that even if reading the cache is
|
82 |
-
// disabled the cached will still be updated with the newly generated
|
83 |
-
// image. Set also 'USE_CACHE' below.
|
84 |
-
define('READ_CACHE',true);
|
85 |
-
|
86 |
-
// Determine if the error handler should be image based or purely
|
87 |
-
// text based. Image based makes it easier since the script will
|
88 |
-
// always return an image even in case of errors.
|
89 |
-
define('USE_IMAGE_ERROR_HANDLER',true);
|
90 |
-
|
91 |
-
// Should the library examine the global php_errmsg string and convert
|
92 |
-
// any error in it to a graphical representation. This is handy for the
|
93 |
-
// occasions when, for example, header files cannot be found and this results
|
94 |
-
// in the graph not being created and just a 'red-cross' image would be seen.
|
95 |
-
// This should be turned off for a production site.
|
96 |
-
define('CATCH_PHPERRMSG',true);
|
97 |
-
|
98 |
-
// Determine if the library should also setup the default PHP
|
99 |
-
// error handler to generate a graphic error mesage. This is useful
|
100 |
-
// during development to be able to see the error message as an image
|
101 |
-
// instead as a 'red-cross' in a page where an image is expected.
|
102 |
-
define('INSTALL_PHP_ERR_HANDLER',false);
|
103 |
-
|
104 |
-
// Should usage of deprecated functions and parameters give a fatal error?
|
105 |
-
// (Useful to check if code is future proof.)
|
106 |
-
define('ERR_DEPRECATED',true);
|
107 |
-
|
108 |
-
// The builtin GD function imagettfbbox() fuction which calculates the bounding box for
|
109 |
-
// text using TTF fonts is buggy. By setting this define to true the library
|
110 |
-
// uses its own compensation for this bug. However this will give a
|
111 |
-
// slightly different visual apparance than not using this compensation.
|
112 |
-
// Enabling this compensation will in general give text a bit more space to more
|
113 |
-
// truly reflect the actual bounding box which is a bit larger than what the
|
114 |
-
// GD function thinks.
|
115 |
-
define('USE_LIBRARY_IMAGETTFBBOX',true);
|
116 |
-
|
117 |
-
//------------------------------------------------------------------------
|
118 |
-
// The following constants should rarely have to be changed !
|
119 |
-
//------------------------------------------------------------------------
|
120 |
-
|
121 |
-
// What group should the cached file belong to
|
122 |
-
// (Set to '' will give the default group for the 'PHP-user')
|
123 |
-
// Please note that the Apache user must be a member of the
|
124 |
-
// specified group since otherwise it is impossible for Apache
|
125 |
-
// to set the specified group.
|
126 |
-
define('CACHE_FILE_GROUP','www');
|
127 |
-
|
128 |
-
// What permissions should the cached file have
|
129 |
-
// (Set to '' will give the default persmissions for the 'PHP-user')
|
130 |
-
define('CACHE_FILE_MOD',0664);
|
131 |
-
|
132 |
-
// Default theme class name
|
133 |
-
define('DEFAULT_THEME_CLASS', 'UniversalTheme');
|
134 |
-
|
135 |
-
define('SUPERSAMPLING', true);
|
136 |
-
define('SUPERSAMPLING_SCALE', 1);
|
137 |
-
|
138 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/src/jpgraph.php
DELETED
@@ -1,5629 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//=======================================================================
|
3 |
-
// File: JPGRAPH.PHP
|
4 |
-
// Description: PHP Graph Plotting library. Base module.
|
5 |
-
// Created: 2001-01-08
|
6 |
-
// Ver: $Id: jpgraph.php 1924 2010-01-11 14:03:26Z ljp $
|
7 |
-
//
|
8 |
-
// Copyright (c) Asial Corporation. All rights reserved.
|
9 |
-
//========================================================================
|
10 |
-
|
11 |
-
require_once('jpg-config.inc.php');
|
12 |
-
require_once('jpgraph_gradient.php');
|
13 |
-
require_once('jpgraph_errhandler.inc.php');
|
14 |
-
require_once('jpgraph_ttf.inc.php');
|
15 |
-
require_once('jpgraph_rgb.inc.php');
|
16 |
-
require_once('jpgraph_text.inc.php');
|
17 |
-
require_once('jpgraph_legend.inc.php');
|
18 |
-
require_once('jpgraph_theme.inc.php');
|
19 |
-
require_once('gd_image.inc.php');
|
20 |
-
|
21 |
-
// Version info
|
22 |
-
define('JPG_VERSION','3.5.0b1');
|
23 |
-
|
24 |
-
// Minimum required PHP version
|
25 |
-
define('MIN_PHPVERSION','5.1.0');
|
26 |
-
|
27 |
-
// Special file name to indicate that we only want to calc
|
28 |
-
// the image map in the call to Graph::Stroke() used
|
29 |
-
// internally from the GetHTMLCSIM() method.
|
30 |
-
define('_CSIM_SPECIALFILE','_csim_special_');
|
31 |
-
|
32 |
-
// HTTP GET argument that is used with image map
|
33 |
-
// to indicate to the script to just generate the image
|
34 |
-
// and not the full CSIM HTML page.
|
35 |
-
define('_CSIM_DISPLAY','_jpg_csimd');
|
36 |
-
|
37 |
-
// Special filename for Graph::Stroke(). If this filename is given
|
38 |
-
// then the image will NOT be streamed to browser of file. Instead the
|
39 |
-
// Stroke call will return the handler for the created GD image.
|
40 |
-
define('_IMG_HANDLER','__handle');
|
41 |
-
|
42 |
-
// Special filename for Graph::Stroke(). If this filename is given
|
43 |
-
// the image will be stroked to a file with a name based on the script name.
|
44 |
-
define('_IMG_AUTO','auto');
|
45 |
-
|
46 |
-
// Tick density
|
47 |
-
define("TICKD_DENSE",1);
|
48 |
-
define("TICKD_NORMAL",2);
|
49 |
-
define("TICKD_SPARSE",3);
|
50 |
-
define("TICKD_VERYSPARSE",4);
|
51 |
-
|
52 |
-
// Side for ticks and labels.
|
53 |
-
define("SIDE_LEFT",-1);
|
54 |
-
define("SIDE_RIGHT",1);
|
55 |
-
define("SIDE_DOWN",-1);
|
56 |
-
define("SIDE_BOTTOM",-1);
|
57 |
-
define("SIDE_UP",1);
|
58 |
-
define("SIDE_TOP",1);
|
59 |
-
|
60 |
-
// Legend type stacked vertical or horizontal
|
61 |
-
define("LEGEND_VERT",0);
|
62 |
-
define("LEGEND_HOR",1);
|
63 |
-
|
64 |
-
// Mark types for plot marks
|
65 |
-
define("MARK_SQUARE",1);
|
66 |
-
define("MARK_UTRIANGLE",2);
|
67 |
-
define("MARK_DTRIANGLE",3);
|
68 |
-
define("MARK_DIAMOND",4);
|
69 |
-
define("MARK_CIRCLE",5);
|
70 |
-
define("MARK_FILLEDCIRCLE",6);
|
71 |
-
define("MARK_CROSS",7);
|
72 |
-
define("MARK_STAR",8);
|
73 |
-
define("MARK_X",9);
|
74 |
-
define("MARK_LEFTTRIANGLE",10);
|
75 |
-
define("MARK_RIGHTTRIANGLE",11);
|
76 |
-
define("MARK_FLASH",12);
|
77 |
-
define("MARK_IMG",13);
|
78 |
-
define("MARK_FLAG1",14);
|
79 |
-
define("MARK_FLAG2",15);
|
80 |
-
define("MARK_FLAG3",16);
|
81 |
-
define("MARK_FLAG4",17);
|
82 |
-
|
83 |
-
// Builtin images
|
84 |
-
define("MARK_IMG_PUSHPIN",50);
|
85 |
-
define("MARK_IMG_SPUSHPIN",50);
|
86 |
-
define("MARK_IMG_LPUSHPIN",51);
|
87 |
-
define("MARK_IMG_DIAMOND",52);
|
88 |
-
define("MARK_IMG_SQUARE",53);
|
89 |
-
define("MARK_IMG_STAR",54);
|
90 |
-
define("MARK_IMG_BALL",55);
|
91 |
-
define("MARK_IMG_SBALL",55);
|
92 |
-
define("MARK_IMG_MBALL",56);
|
93 |
-
define("MARK_IMG_LBALL",57);
|
94 |
-
define("MARK_IMG_BEVEL",58);
|
95 |
-
|
96 |
-
// Inline defines
|
97 |
-
define("INLINE_YES",1);
|
98 |
-
define("INLINE_NO",0);
|
99 |
-
|
100 |
-
// Format for background images
|
101 |
-
define("BGIMG_FILLPLOT",1);
|
102 |
-
define("BGIMG_FILLFRAME",2);
|
103 |
-
define("BGIMG_COPY",3);
|
104 |
-
define("BGIMG_CENTER",4);
|
105 |
-
define("BGIMG_FREE",5);
|
106 |
-
|
107 |
-
// Depth of objects
|
108 |
-
define("DEPTH_BACK",0);
|
109 |
-
define("DEPTH_FRONT",1);
|
110 |
-
|
111 |
-
// Direction
|
112 |
-
define("VERTICAL",1);
|
113 |
-
define("HORIZONTAL",0);
|
114 |
-
|
115 |
-
// Axis styles for scientific style axis
|
116 |
-
define('AXSTYLE_SIMPLE',1);
|
117 |
-
define('AXSTYLE_BOXIN',2);
|
118 |
-
define('AXSTYLE_BOXOUT',3);
|
119 |
-
define('AXSTYLE_YBOXIN',4);
|
120 |
-
define('AXSTYLE_YBOXOUT',5);
|
121 |
-
|
122 |
-
// Style for title backgrounds
|
123 |
-
define('TITLEBKG_STYLE1',1);
|
124 |
-
define('TITLEBKG_STYLE2',2);
|
125 |
-
define('TITLEBKG_STYLE3',3);
|
126 |
-
define('TITLEBKG_FRAME_NONE',0);
|
127 |
-
define('TITLEBKG_FRAME_FULL',1);
|
128 |
-
define('TITLEBKG_FRAME_BOTTOM',2);
|
129 |
-
define('TITLEBKG_FRAME_BEVEL',3);
|
130 |
-
define('TITLEBKG_FILLSTYLE_HSTRIPED',1);
|
131 |
-
define('TITLEBKG_FILLSTYLE_VSTRIPED',2);
|
132 |
-
define('TITLEBKG_FILLSTYLE_SOLID',3);
|
133 |
-
|
134 |
-
// Styles for axis labels background
|
135 |
-
define('LABELBKG_NONE',0);
|
136 |
-
define('LABELBKG_XAXIS',1);
|
137 |
-
define('LABELBKG_YAXIS',2);
|
138 |
-
define('LABELBKG_XAXISFULL',3);
|
139 |
-
define('LABELBKG_YAXISFULL',4);
|
140 |
-
define('LABELBKG_XYFULL',5);
|
141 |
-
define('LABELBKG_XY',6);
|
142 |
-
|
143 |
-
|
144 |
-
// Style for background gradient fills
|
145 |
-
define('BGRAD_FRAME',1);
|
146 |
-
define('BGRAD_MARGIN',2);
|
147 |
-
define('BGRAD_PLOT',3);
|
148 |
-
|
149 |
-
// Width of tab titles
|
150 |
-
define('TABTITLE_WIDTHFIT',0);
|
151 |
-
define('TABTITLE_WIDTHFULL',-1);
|
152 |
-
|
153 |
-
// Defines for 3D skew directions
|
154 |
-
define('SKEW3D_UP',0);
|
155 |
-
define('SKEW3D_DOWN',1);
|
156 |
-
define('SKEW3D_LEFT',2);
|
157 |
-
define('SKEW3D_RIGHT',3);
|
158 |
-
|
159 |
-
// For internal use only
|
160 |
-
define("_JPG_DEBUG",false);
|
161 |
-
define("_FORCE_IMGTOFILE",false);
|
162 |
-
define("_FORCE_IMGDIR",'/tmp/jpgimg/');
|
163 |
-
|
164 |
-
|
165 |
-
//
|
166 |
-
// Automatic settings of path for cache and font directory
|
167 |
-
// if they have not been previously specified
|
168 |
-
//
|
169 |
-
if(USE_CACHE) {
|
170 |
-
if (!defined('CACHE_DIR')) {
|
171 |
-
if ( strstr( PHP_OS, 'WIN') ) {
|
172 |
-
if( empty($_SERVER['TEMP']) ) {
|
173 |
-
$t = new ErrMsgText();
|
174 |
-
$msg = $t->Get(11,$file,$lineno);
|
175 |
-
die($msg);
|
176 |
-
}
|
177 |
-
else {
|
178 |
-
define('CACHE_DIR', $_SERVER['TEMP'] . '/');
|
179 |
-
}
|
180 |
-
} else {
|
181 |
-
define('CACHE_DIR','/tmp/jpgraph_cache/');
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
elseif( !defined('CACHE_DIR') ) {
|
186 |
-
define('CACHE_DIR', '');
|
187 |
-
}
|
188 |
-
|
189 |
-
//
|
190 |
-
// Setup path for western/latin TTF fonts
|
191 |
-
//
|
192 |
-
if (!defined('TTF_DIR')) {
|
193 |
-
if (strstr( PHP_OS, 'WIN') ) {
|
194 |
-
$sroot = getenv('SystemRoot');
|
195 |
-
if( empty($sroot) ) {
|
196 |
-
$t = new ErrMsgText();
|
197 |
-
$msg = $t->Get(12,$file,$lineno);
|
198 |
-
die($msg);
|
199 |
-
}
|
200 |
-
else {
|
201 |
-
define('TTF_DIR', $sroot.'/fonts/');
|
202 |
-
}
|
203 |
-
} else {
|
204 |
-
define('TTF_DIR','/usr/share/fonts/truetype/');
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
//
|
209 |
-
// Setup path for MultiByte TTF fonts (japanese, chinese etc.)
|
210 |
-
//
|
211 |
-
if (!defined('MBTTF_DIR')) {
|
212 |
-
if (strstr( PHP_OS, 'WIN') ) {
|
213 |
-
$sroot = getenv('SystemRoot');
|
214 |
-
if( empty($sroot) ) {
|
215 |
-
$t = new ErrMsgText();
|
216 |
-
$msg = $t->Get(12,$file,$lineno);
|
217 |
-
die($msg);
|
218 |
-
}
|
219 |
-
else {
|
220 |
-
define('MBTTF_DIR', $sroot.'/fonts/');
|
221 |
-
}
|
222 |
-
} else {
|
223 |
-
define('MBTTF_DIR','/usr/share/fonts/truetype/');
|
224 |
-
}
|
225 |
-
}
|
226 |
-
|
227 |
-
//
|
228 |
-
// Check minimum PHP version
|
229 |
-
//
|
230 |
-
function CheckPHPVersion($aMinVersion) {
|
231 |
-
list($majorC, $minorC, $editC) = preg_split('/[\/.-]/', PHP_VERSION);
|
232 |
-
list($majorR, $minorR, $editR) = preg_split('/[\/.-]/', $aMinVersion);
|
233 |
-
|
234 |
-
if ($majorC != $majorR) return false;
|
235 |
-
if ($majorC < $majorR) return false;
|
236 |
-
// same major - check minor
|
237 |
-
if ($minorC > $minorR) return true;
|
238 |
-
if ($minorC < $minorR) return false;
|
239 |
-
// and same minor
|
240 |
-
if ($editC >= $editR) return true;
|
241 |
-
return true;
|
242 |
-
}
|
243 |
-
|
244 |
-
//
|
245 |
-
// Make sure PHP version is high enough
|
246 |
-
//
|
247 |
-
if( !CheckPHPVersion(MIN_PHPVERSION) ) {
|
248 |
-
JpGraphError::RaiseL(13,PHP_VERSION,MIN_PHPVERSION);
|
249 |
-
die();
|
250 |
-
}
|
251 |
-
|
252 |
-
//
|
253 |
-
// Make GD sanity check
|
254 |
-
//
|
255 |
-
if( !function_exists("imagetypes") || !function_exists('imagecreatefromstring') ) {
|
256 |
-
JpGraphError::RaiseL(25001);
|
257 |
-
//("This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)");
|
258 |
-
}
|
259 |
-
|
260 |
-
//
|
261 |
-
// Setup PHP error handler
|
262 |
-
//
|
263 |
-
function _phpErrorHandler($errno,$errmsg,$filename, $linenum, $vars) {
|
264 |
-
// Respect current error level
|
265 |
-
if( $errno & error_reporting() ) {
|
266 |
-
JpGraphError::RaiseL(25003,basename($filename),$linenum,$errmsg);
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
270 |
-
if( INSTALL_PHP_ERR_HANDLER ) {
|
271 |
-
set_error_handler("_phpErrorHandler");
|
272 |
-
}
|
273 |
-
|
274 |
-
//
|
275 |
-
// Check if there were any warnings, perhaps some wrong includes by the user. In this
|
276 |
-
// case we raise it immediately since otherwise the image will not show and makes
|
277 |
-
// debugging difficult. This is controlled by the user setting CATCH_PHPERRMSG
|
278 |
-
//
|
279 |
-
if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG && !preg_match('/|Deprecated|/i', $GLOBALS['php_errormsg']) ) {
|
280 |
-
JpGraphError::RaiseL(25004,$GLOBALS['php_errormsg']);
|
281 |
-
}
|
282 |
-
|
283 |
-
// Useful mathematical function
|
284 |
-
function sign($a) {return $a >= 0 ? 1 : -1;}
|
285 |
-
|
286 |
-
//
|
287 |
-
// Utility function to generate an image name based on the filename we
|
288 |
-
// are running from and assuming we use auto detection of graphic format
|
289 |
-
// (top level), i.e it is safe to call this function
|
290 |
-
// from a script that uses JpGraph
|
291 |
-
//
|
292 |
-
function GenImgName() {
|
293 |
-
// Determine what format we should use when we save the images
|
294 |
-
$supported = imagetypes();
|
295 |
-
if( $supported & IMG_PNG ) $img_format="png";
|
296 |
-
elseif( $supported & IMG_GIF ) $img_format="gif";
|
297 |
-
elseif( $supported & IMG_JPG ) $img_format="jpeg";
|
298 |
-
elseif( $supported & IMG_WBMP ) $img_format="wbmp";
|
299 |
-
elseif( $supported & IMG_XPM ) $img_format="xpm";
|
300 |
-
|
301 |
-
|
302 |
-
if( !isset($_SERVER['PHP_SELF']) ) {
|
303 |
-
JpGraphError::RaiseL(25005);
|
304 |
-
//(" Can't access PHP_SELF, PHP global variable. You can't run PHP from command line if you want to use the 'auto' naming of cache or image files.");
|
305 |
-
}
|
306 |
-
$fname = basename($_SERVER['PHP_SELF']);
|
307 |
-
if( !empty($_SERVER['QUERY_STRING']) ) {
|
308 |
-
$q = @$_SERVER['QUERY_STRING'];
|
309 |
-
$fname .= '_'.preg_replace("/\W/", "_", $q).'.'.$img_format;
|
310 |
-
}
|
311 |
-
else {
|
312 |
-
$fname = substr($fname,0,strlen($fname)-4).'.'.$img_format;
|
313 |
-
}
|
314 |
-
return $fname;
|
315 |
-
}
|
316 |
-
|
317 |
-
//===================================================
|
318 |
-
// CLASS JpgTimer
|
319 |
-
// Description: General timing utility class to handle
|
320 |
-
// time measurement of generating graphs. Multiple
|
321 |
-
// timers can be started.
|
322 |
-
//===================================================
|
323 |
-
class JpgTimer {
|
324 |
-
private $start, $idx;
|
325 |
-
|
326 |
-
function __construct() {
|
327 |
-
$this->idx=0;
|
328 |
-
}
|
329 |
-
|
330 |
-
// Push a new timer start on stack
|
331 |
-
function Push() {
|
332 |
-
list($ms,$s)=explode(" ",microtime());
|
333 |
-
$this->start[$this->idx++]=floor($ms*1000) + 1000*$s;
|
334 |
-
}
|
335 |
-
|
336 |
-
// Pop the latest timer start and return the diff with the
|
337 |
-
// current time
|
338 |
-
function Pop() {
|
339 |
-
assert($this->idx>0);
|
340 |
-
list($ms,$s)=explode(" ",microtime());
|
341 |
-
$etime=floor($ms*1000) + (1000*$s);
|
342 |
-
$this->idx--;
|
343 |
-
return $etime-$this->start[$this->idx];
|
344 |
-
}
|
345 |
-
} // Class
|
346 |
-
|
347 |
-
//===================================================
|
348 |
-
// CLASS DateLocale
|
349 |
-
// Description: Hold localized text used in dates
|
350 |
-
//===================================================
|
351 |
-
class DateLocale {
|
352 |
-
|
353 |
-
public $iLocale = 'C'; // environmental locale be used by default
|
354 |
-
private $iDayAbb = null, $iShortDay = null, $iShortMonth = null, $iMonthName = null;
|
355 |
-
|
356 |
-
function __construct() {
|
357 |
-
settype($this->iDayAbb, 'array');
|
358 |
-
settype($this->iShortDay, 'array');
|
359 |
-
settype($this->iShortMonth, 'array');
|
360 |
-
settype($this->iMonthName, 'array');
|
361 |
-
$this->Set('C');
|
362 |
-
}
|
363 |
-
|
364 |
-
function Set($aLocale) {
|
365 |
-
if ( in_array($aLocale, array_keys($this->iDayAbb)) ){
|
366 |
-
$this->iLocale = $aLocale;
|
367 |
-
return TRUE; // already cached nothing else to do!
|
368 |
-
}
|
369 |
-
|
370 |
-
$pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME
|
371 |
-
|
372 |
-
if (is_array($aLocale)) {
|
373 |
-
foreach ($aLocale as $loc) {
|
374 |
-
$res = @setlocale(LC_TIME, $loc);
|
375 |
-
if ( $res ) {
|
376 |
-
$aLocale = $loc;
|
377 |
-
break;
|
378 |
-
}
|
379 |
-
}
|
380 |
-
}
|
381 |
-
else {
|
382 |
-
$res = @setlocale(LC_TIME, $aLocale);
|
383 |
-
}
|
384 |
-
|
385 |
-
if ( ! $res ) {
|
386 |
-
JpGraphError::RaiseL(25007,$aLocale);
|
387 |
-
//("You are trying to use the locale ($aLocale) which your PHP installation does not support. Hint: Use '' to indicate the default locale for this geographic region.");
|
388 |
-
return FALSE;
|
389 |
-
}
|
390 |
-
|
391 |
-
$this->iLocale = $aLocale;
|
392 |
-
for( $i = 0, $ofs = 0 - strftime('%w'); $i < 7; $i++, $ofs++ ) {
|
393 |
-
$day = strftime('%a', strtotime("$ofs day"));
|
394 |
-
$day[0] = strtoupper($day[0]);
|
395 |
-
$this->iDayAbb[$aLocale][]= $day[0];
|
396 |
-
$this->iShortDay[$aLocale][]= $day;
|
397 |
-
}
|
398 |
-
|
399 |
-
for($i=1; $i<=12; ++$i) {
|
400 |
-
list($short ,$full) = explode('|', strftime("%b|%B",strtotime("2001-$i-01")));
|
401 |
-
$this->iShortMonth[$aLocale][] = ucfirst($short);
|
402 |
-
$this->iMonthName [$aLocale][] = ucfirst($full);
|
403 |
-
}
|
404 |
-
|
405 |
-
setlocale(LC_TIME, $pLocale);
|
406 |
-
|
407 |
-
return TRUE;
|
408 |
-
}
|
409 |
-
|
410 |
-
|
411 |
-
function GetDayAbb() {
|
412 |
-
return $this->iDayAbb[$this->iLocale];
|
413 |
-
}
|
414 |
-
|
415 |
-
function GetShortDay() {
|
416 |
-
return $this->iShortDay[$this->iLocale];
|
417 |
-
}
|
418 |
-
|
419 |
-
function GetShortMonth() {
|
420 |
-
return $this->iShortMonth[$this->iLocale];
|
421 |
-
}
|
422 |
-
|
423 |
-
function GetShortMonthName($aNbr) {
|
424 |
-
return $this->iShortMonth[$this->iLocale][$aNbr];
|
425 |
-
}
|
426 |
-
|
427 |
-
function GetLongMonthName($aNbr) {
|
428 |
-
return $this->iMonthName[$this->iLocale][$aNbr];
|
429 |
-
}
|
430 |
-
|
431 |
-
function GetMonth() {
|
432 |
-
return $this->iMonthName[$this->iLocale];
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
// Global object handlers
|
437 |
-
$gDateLocale = new DateLocale();
|
438 |
-
$gJpgDateLocale = new DateLocale();
|
439 |
-
|
440 |
-
//=======================================================
|
441 |
-
// CLASS Footer
|
442 |
-
// Description: Encapsulates the footer line in the Graph
|
443 |
-
//=======================================================
|
444 |
-
class Footer {
|
445 |
-
public $iLeftMargin = 3, $iRightMargin = 3, $iBottomMargin = 3 ;
|
446 |
-
public $left,$center,$right;
|
447 |
-
private $iTimer=null, $itimerpoststring='';
|
448 |
-
|
449 |
-
function __construct() {
|
450 |
-
$this->left = new Text();
|
451 |
-
$this->left->ParagraphAlign('left');
|
452 |
-
$this->center = new Text();
|
453 |
-
$this->center->ParagraphAlign('center');
|
454 |
-
$this->right = new Text();
|
455 |
-
$this->right->ParagraphAlign('right');
|
456 |
-
}
|
457 |
-
|
458 |
-
function SetTimer($aTimer,$aTimerPostString='') {
|
459 |
-
$this->iTimer = $aTimer;
|
460 |
-
$this->itimerpoststring = $aTimerPostString;
|
461 |
-
}
|
462 |
-
|
463 |
-
function SetMargin($aLeft=3,$aRight=3,$aBottom=3) {
|
464 |
-
$this->iLeftMargin = $aLeft;
|
465 |
-
$this->iRightMargin = $aRight;
|
466 |
-
$this->iBottomMargin = $aBottom;
|
467 |
-
}
|
468 |
-
|
469 |
-
function Stroke($aImg) {
|
470 |
-
$y = $aImg->height - $this->iBottomMargin;
|
471 |
-
$x = $this->iLeftMargin;
|
472 |
-
$this->left->Align('left','bottom');
|
473 |
-
$this->left->Stroke($aImg,$x,$y);
|
474 |
-
|
475 |
-
$x = ($aImg->width - $this->iLeftMargin - $this->iRightMargin)/2;
|
476 |
-
$this->center->Align('center','bottom');
|
477 |
-
$this->center->Stroke($aImg,$x,$y);
|
478 |
-
|
479 |
-
$x = $aImg->width - $this->iRightMargin;
|
480 |
-
$this->right->Align('right','bottom');
|
481 |
-
if( $this->iTimer != null ) {
|
482 |
-
$this->right->Set( $this->right->t . sprintf('%.3f',$this->iTimer->Pop()/1000.0) . $this->itimerpoststring );
|
483 |
-
}
|
484 |
-
$this->right->Stroke($aImg,$x,$y);
|
485 |
-
}
|
486 |
-
}
|
487 |
-
|
488 |
-
|
489 |
-
//===================================================
|
490 |
-
// CLASS Graph
|
491 |
-
// Description: Main class to handle graphs
|
492 |
-
//===================================================
|
493 |
-
class Graph {
|
494 |
-
public $cache=null; // Cache object (singleton)
|
495 |
-
public $img=null; // Img object (singleton)
|
496 |
-
public $plots=array(); // Array of all plot object in the graph (for Y 1 axis)
|
497 |
-
public $y2plots=array(); // Array of all plot object in the graph (for Y 2 axis)
|
498 |
-
public $ynplots=array();
|
499 |
-
public $xscale=null; // X Scale object (could be instance of LinearScale or LogScale
|
500 |
-
public $yscale=null,$y2scale=null, $ynscale=array();
|
501 |
-
public $iIcons = array(); // Array of Icons to add to
|
502 |
-
public $cache_name; // File name to be used for the current graph in the cache directory
|
503 |
-
public $xgrid=null; // X Grid object (linear or logarithmic)
|
504 |
-
public $ygrid=null,$y2grid=null; //dito for Y
|
505 |
-
public $doframe,$frame_color, $frame_weight; // Frame around graph
|
506 |
-
public $boxed=false, $box_color='black', $box_weight=1; // Box around plot area
|
507 |
-
public $doshadow=false,$shadow_width=4,$shadow_color='gray@0.5'; // Shadow for graph
|
508 |
-
public $xaxis=null; // X-axis (instane of Axis class)
|
509 |
-
public $yaxis=null, $y2axis=null, $ynaxis=array(); // Y axis (instance of Axis class)
|
510 |
-
public $margin_color; // Margin color of graph
|
511 |
-
public $plotarea_color=array(255,255,255); // Plot area color
|
512 |
-
public $title,$subtitle,$subsubtitle; // Title and subtitle(s) text object
|
513 |
-
public $axtype="linlin"; // Type of axis
|
514 |
-
public $xtick_factor,$ytick_factor; // Factor to determine the maximum number of ticks depending on the plot width
|
515 |
-
public $texts=null, $y2texts=null; // Text object to ge shown in the graph
|
516 |
-
public $lines=null, $y2lines=null;
|
517 |
-
public $bands=null, $y2bands=null;
|
518 |
-
public $text_scale_off=0, $text_scale_abscenteroff=-1; // Text scale in fractions and for centering bars
|
519 |
-
public $background_image='',$background_image_type=-1,$background_image_format="png";
|
520 |
-
public $background_image_bright=0,$background_image_contr=0,$background_image_sat=0;
|
521 |
-
public $background_image_xpos=0,$background_image_ypos=0;
|
522 |
-
public $image_bright=0, $image_contr=0, $image_sat=0;
|
523 |
-
public $inline;
|
524 |
-
public $showcsim=0,$csimcolor="red";//debug stuff, draw the csim boundaris on the image if <>0
|
525 |
-
public $grid_depth=DEPTH_BACK; // Draw grid under all plots as default
|
526 |
-
public $iAxisStyle = AXSTYLE_SIMPLE;
|
527 |
-
public $iCSIMdisplay=false,$iHasStroked = false;
|
528 |
-
public $footer;
|
529 |
-
public $csimcachename = '', $csimcachetimeout = 0, $iCSIMImgAlt='';
|
530 |
-
public $iDoClipping = false;
|
531 |
-
public $y2orderback=true;
|
532 |
-
public $tabtitle;
|
533 |
-
public $bkg_gradtype=-1,$bkg_gradstyle=BGRAD_MARGIN;
|
534 |
-
public $bkg_gradfrom='navy', $bkg_gradto='silver';
|
535 |
-
public $plot_gradtype=-1,$plot_gradstyle=BGRAD_MARGIN;
|
536 |
-
public $plot_gradfrom='silver', $plot_gradto='navy';
|
537 |
-
|
538 |
-
public $titlebackground = false;
|
539 |
-
public $titlebackground_color = 'lightblue',
|
540 |
-
$titlebackground_style = 1,
|
541 |
-
$titlebackground_framecolor,
|
542 |
-
$titlebackground_framestyle,
|
543 |
-
$titlebackground_frameweight,
|
544 |
-
$titlebackground_bevelheight;
|
545 |
-
public $titlebkg_fillstyle=TITLEBKG_FILLSTYLE_SOLID;
|
546 |
-
public $titlebkg_scolor1='black',$titlebkg_scolor2='white';
|
547 |
-
public $framebevel, $framebeveldepth;
|
548 |
-
public $framebevelborder, $framebevelbordercolor;
|
549 |
-
public $framebevelcolor1, $framebevelcolor2;
|
550 |
-
public $background_image_mix=100;
|
551 |
-
public $background_cflag = '';
|
552 |
-
public $background_cflag_type = BGIMG_FILLPLOT;
|
553 |
-
public $background_cflag_mix = 100;
|
554 |
-
public $iImgTrans=false,
|
555 |
-
$iImgTransHorizon = 100,$iImgTransSkewDist=150,
|
556 |
-
$iImgTransDirection = 1, $iImgTransMinSize = true,
|
557 |
-
$iImgTransFillColor='white',$iImgTransHighQ=false,
|
558 |
-
$iImgTransBorder=false,$iImgTransHorizonPos=0.5;
|
559 |
-
public $legend;
|
560 |
-
public $graph_theme;
|
561 |
-
protected $iYAxisDeltaPos=50;
|
562 |
-
protected $iIconDepth=DEPTH_BACK;
|
563 |
-
protected $iAxisLblBgType = 0,
|
564 |
-
$iXAxisLblBgFillColor = 'lightgray', $iXAxisLblBgColor = 'black',
|
565 |
-
$iYAxisLblBgFillColor = 'lightgray', $iYAxisLblBgColor = 'black';
|
566 |
-
protected $iTables=NULL;
|
567 |
-
|
568 |
-
protected $isRunningClear = false;
|
569 |
-
protected $inputValues;
|
570 |
-
protected $isAfterSetScale = false;
|
571 |
-
|
572 |
-
// aWIdth Width in pixels of image
|
573 |
-
// aHeight Height in pixels of image
|
574 |
-
// aCachedName Name for image file in cache directory
|
575 |
-
// aTimeOut Timeout in minutes for image in cache
|
576 |
-
// aInline If true the image is streamed back in the call to Stroke()
|
577 |
-
// If false the image is just created in the cache
|
578 |
-
function __construct($aWidth=300,$aHeight=200,$aCachedName='',$aTimeout=0,$aInline=true) {
|
579 |
-
|
580 |
-
if( !is_numeric($aWidth) || !is_numeric($aHeight) ) {
|
581 |
-
JpGraphError::RaiseL(25008);//('Image width/height argument in Graph::Graph() must be numeric');
|
582 |
-
}
|
583 |
-
|
584 |
-
// Initialize frame and margin
|
585 |
-
$this->InitializeFrameAndMargin();
|
586 |
-
|
587 |
-
// Automatically generate the image file name based on the name of the script that
|
588 |
-
// generates the graph
|
589 |
-
if( $aCachedName == 'auto' ) {
|
590 |
-
$aCachedName=GenImgName();
|
591 |
-
}
|
592 |
-
|
593 |
-
// Should the image be streamed back to the browser or only to the cache?
|
594 |
-
$this->inline=$aInline;
|
595 |
-
|
596 |
-
$this->img = new RotImage($aWidth,$aHeight);
|
597 |
-
$this->cache = new ImgStreamCache();
|
598 |
-
|
599 |
-
// Window doesn't like '?' in the file name so replace it with an '_'
|
600 |
-
$aCachedName = str_replace("?","_",$aCachedName);
|
601 |
-
$this->SetupCache($aCachedName, $aTimeout);
|
602 |
-
|
603 |
-
$this->title = new Text();
|
604 |
-
$this->title->ParagraphAlign('center');
|
605 |
-
$this->title->SetFont(FF_DEFAULT,FS_NORMAL); //FF_FONT2, FS_BOLD
|
606 |
-
$this->title->SetMargin(5);
|
607 |
-
$this->title->SetAlign('center');
|
608 |
-
|
609 |
-
$this->subtitle = new Text();
|
610 |
-
$this->subtitle->ParagraphAlign('center');
|
611 |
-
$this->subtitle->SetMargin(3);
|
612 |
-
$this->subtitle->SetAlign('center');
|
613 |
-
|
614 |
-
$this->subsubtitle = new Text();
|
615 |
-
$this->subsubtitle->ParagraphAlign('center');
|
616 |
-
$this->subsubtitle->SetMargin(3);
|
617 |
-
$this->subsubtitle->SetAlign('center');
|
618 |
-
|
619 |
-
$this->legend = new Legend();
|
620 |
-
$this->footer = new Footer();
|
621 |
-
|
622 |
-
// If the cached version exist just read it directly from the
|
623 |
-
// cache, stream it back to browser and exit
|
624 |
-
if( $aCachedName!='' && READ_CACHE && $aInline ) {
|
625 |
-
if( $this->cache->GetAndStream($this->img,$aCachedName) ) {
|
626 |
-
exit();
|
627 |
-
}
|
628 |
-
}
|
629 |
-
|
630 |
-
$this->SetTickDensity(); // Normal density
|
631 |
-
|
632 |
-
$this->tabtitle = new GraphTabTitle();
|
633 |
-
|
634 |
-
if (!$this->isRunningClear) {
|
635 |
-
$this->inputValues = array();
|
636 |
-
$this->inputValues['aWidth'] = $aWidth;
|
637 |
-
$this->inputValues['aHeight'] = $aHeight;
|
638 |
-
$this->inputValues['aCachedName'] = $aCachedName;
|
639 |
-
$this->inputValues['aTimeout'] = $aTimeout;
|
640 |
-
$this->inputValues['aInline'] = $aInline;
|
641 |
-
|
642 |
-
$theme_class = DEFAULT_THEME_CLASS;
|
643 |
-
if (class_exists($theme_class)) {
|
644 |
-
$this->graph_theme = new $theme_class();
|
645 |
-
}
|
646 |
-
}
|
647 |
-
}
|
648 |
-
|
649 |
-
function InitializeFrameAndMargin() {
|
650 |
-
$this->doframe=true;
|
651 |
-
$this->frame_color='black';
|
652 |
-
$this->frame_weight=1;
|
653 |
-
|
654 |
-
$this->titlebackground_framecolor = 'blue';
|
655 |
-
$this->titlebackground_framestyle = 2;
|
656 |
-
$this->titlebackground_frameweight = 1;
|
657 |
-
$this->titlebackground_bevelheight = 3;
|
658 |
-
$this->titlebkg_fillstyle=TITLEBKG_FILLSTYLE_SOLID;
|
659 |
-
$this->titlebkg_scolor1='black';
|
660 |
-
$this->titlebkg_scolor2='white';
|
661 |
-
$this->framebevel = false;
|
662 |
-
$this->framebeveldepth = 2;
|
663 |
-
$this->framebevelborder = false;
|
664 |
-
$this->framebevelbordercolor='black';
|
665 |
-
$this->framebevelcolor1='white@0.4';
|
666 |
-
$this->framebevelcolor2='black@0.4';
|
667 |
-
|
668 |
-
$this->margin_color = array(250,250,250);
|
669 |
-
}
|
670 |
-
|
671 |
-
function SetupCache($aFilename,$aTimeout=60) {
|
672 |
-
$this->cache_name = $aFilename;
|
673 |
-
$this->cache->SetTimeOut($aTimeout);
|
674 |
-
}
|
675 |
-
|
676 |
-
// Enable final image perspective transformation
|
677 |
-
function Set3DPerspective($aDir=1,$aHorizon=100,$aSkewDist=120,$aQuality=false,$aFillColor='#FFFFFF',$aBorder=false,$aMinSize=true,$aHorizonPos=0.5) {
|
678 |
-
$this->iImgTrans = true;
|
679 |
-
$this->iImgTransHorizon = $aHorizon;
|
680 |
-
$this->iImgTransSkewDist= $aSkewDist;
|
681 |
-
$this->iImgTransDirection = $aDir;
|
682 |
-
$this->iImgTransMinSize = $aMinSize;
|
683 |
-
$this->iImgTransFillColor=$aFillColor;
|
684 |
-
$this->iImgTransHighQ=$aQuality;
|
685 |
-
$this->iImgTransBorder=$aBorder;
|
686 |
-
$this->iImgTransHorizonPos=$aHorizonPos;
|
687 |
-
}
|
688 |
-
|
689 |
-
function SetUserFont($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
690 |
-
$this->img->ttf->SetUserFont($aNormal,$aBold,$aItalic,$aBoldIt);
|
691 |
-
}
|
692 |
-
|
693 |
-
function SetUserFont1($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
694 |
-
$this->img->ttf->SetUserFont1($aNormal,$aBold,$aItalic,$aBoldIt);
|
695 |
-
}
|
696 |
-
|
697 |
-
function SetUserFont2($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
698 |
-
$this->img->ttf->SetUserFont2($aNormal,$aBold,$aItalic,$aBoldIt);
|
699 |
-
}
|
700 |
-
|
701 |
-
function SetUserFont3($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
702 |
-
$this->img->ttf->SetUserFont3($aNormal,$aBold,$aItalic,$aBoldIt);
|
703 |
-
}
|
704 |
-
|
705 |
-
// Set Image format and optional quality
|
706 |
-
function SetImgFormat($aFormat,$aQuality=75) {
|
707 |
-
$this->img->SetImgFormat($aFormat,$aQuality);
|
708 |
-
}
|
709 |
-
|
710 |
-
// Should the grid be in front or back of the plot?
|
711 |
-
function SetGridDepth($aDepth) {
|
712 |
-
$this->grid_depth=$aDepth;
|
713 |
-
}
|
714 |
-
|
715 |
-
function SetIconDepth($aDepth) {
|
716 |
-
$this->iIconDepth=$aDepth;
|
717 |
-
}
|
718 |
-
|
719 |
-
// Specify graph angle 0-360 degrees.
|
720 |
-
function SetAngle($aAngle) {
|
721 |
-
$this->img->SetAngle($aAngle);
|
722 |
-
}
|
723 |
-
|
724 |
-
function SetAlphaBlending($aFlg=true) {
|
725 |
-
$this->img->SetAlphaBlending($aFlg);
|
726 |
-
}
|
727 |
-
|
728 |
-
// Shortcut to image margin
|
729 |
-
function SetMargin($lm,$rm,$tm,$bm) {
|
730 |
-
$this->img->SetMargin($lm,$rm,$tm,$bm);
|
731 |
-
}
|
732 |
-
|
733 |
-
function SetY2OrderBack($aBack=true) {
|
734 |
-
$this->y2orderback = $aBack;
|
735 |
-
}
|
736 |
-
|
737 |
-
// Rotate the graph 90 degrees and set the margin
|
738 |
-
// when we have done a 90 degree rotation
|
739 |
-
function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) {
|
740 |
-
$lm = $lm ==0 ? floor(0.2 * $this->img->width) : $lm ;
|
741 |
-
$rm = $rm ==0 ? floor(0.1 * $this->img->width) : $rm ;
|
742 |
-
$tm = $tm ==0 ? floor(0.2 * $this->img->height) : $tm ;
|
743 |
-
$bm = $bm ==0 ? floor(0.1 * $this->img->height) : $bm ;
|
744 |
-
|
745 |
-
$adj = ($this->img->height - $this->img->width)/2;
|
746 |
-
$this->img->SetMargin($tm-$adj,$bm-$adj,$rm+$adj,$lm+$adj);
|
747 |
-
$this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2));
|
748 |
-
$this->SetAngle(90);
|
749 |
-
if( empty($this->yaxis) || empty($this->xaxis) ) {
|
750 |
-
JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()');
|
751 |
-
}
|
752 |
-
$this->xaxis->SetLabelAlign('right','center');
|
753 |
-
$this->yaxis->SetLabelAlign('center','bottom');
|
754 |
-
}
|
755 |
-
|
756 |
-
function SetClipping($aFlg=true) {
|
757 |
-
$this->iDoClipping = $aFlg ;
|
758 |
-
}
|
759 |
-
|
760 |
-
// Add a plot object to the graph
|
761 |
-
function Add($aPlot) {
|
762 |
-
if( $aPlot == null ) {
|
763 |
-
JpGraphError::RaiseL(25010);//("Graph::Add() You tried to add a null plot to the graph.");
|
764 |
-
}
|
765 |
-
if( is_array($aPlot) && count($aPlot) > 0 ) {
|
766 |
-
$cl = $aPlot[0];
|
767 |
-
}
|
768 |
-
else {
|
769 |
-
$cl = $aPlot;
|
770 |
-
}
|
771 |
-
|
772 |
-
if( $cl instanceof Text ) $this->AddText($aPlot);
|
773 |
-
elseif( class_exists('PlotLine',false) && ($cl instanceof PlotLine) ) $this->AddLine($aPlot);
|
774 |
-
elseif( class_exists('PlotBand',false) && ($cl instanceof PlotBand) ) $this->AddBand($aPlot);
|
775 |
-
elseif( class_exists('IconPlot',false) && ($cl instanceof IconPlot) ) $this->AddIcon($aPlot);
|
776 |
-
elseif( class_exists('GTextTable',false) && ($cl instanceof GTextTable) ) $this->AddTable($aPlot);
|
777 |
-
else {
|
778 |
-
if( is_array($aPlot) ) {
|
779 |
-
$this->plots = array_merge($this->plots,$aPlot);
|
780 |
-
}
|
781 |
-
else {
|
782 |
-
$this->plots[] = $aPlot;
|
783 |
-
}
|
784 |
-
}
|
785 |
-
|
786 |
-
if ($this->graph_theme) {
|
787 |
-
$this->graph_theme->SetupPlot($aPlot);
|
788 |
-
}
|
789 |
-
}
|
790 |
-
|
791 |
-
function AddTable($aTable) {
|
792 |
-
if( is_array($aTable) ) {
|
793 |
-
for($i=0; $i < count($aTable); ++$i ) {
|
794 |
-
$this->iTables[]=$aTable[$i];
|
795 |
-
}
|
796 |
-
}
|
797 |
-
else {
|
798 |
-
$this->iTables[] = $aTable ;
|
799 |
-
}
|
800 |
-
}
|
801 |
-
|
802 |
-
function AddIcon($aIcon) {
|
803 |
-
if( is_array($aIcon) ) {
|
804 |
-
for($i=0; $i < count($aIcon); ++$i ) {
|
805 |
-
$this->iIcons[]=$aIcon[$i];
|
806 |
-
}
|
807 |
-
}
|
808 |
-
else {
|
809 |
-
$this->iIcons[] = $aIcon ;
|
810 |
-
}
|
811 |
-
}
|
812 |
-
|
813 |
-
// Add plot to second Y-scale
|
814 |
-
function AddY2($aPlot) {
|
815 |
-
if( $aPlot == null ) {
|
816 |
-
JpGraphError::RaiseL(25011);//("Graph::AddY2() You tried to add a null plot to the graph.");
|
817 |
-
}
|
818 |
-
|
819 |
-
if( is_array($aPlot) && count($aPlot) > 0 ) {
|
820 |
-
$cl = $aPlot[0];
|
821 |
-
}
|
822 |
-
else {
|
823 |
-
$cl = $aPlot;
|
824 |
-
}
|
825 |
-
|
826 |
-
if( $cl instanceof Text ) {
|
827 |
-
$this->AddText($aPlot,true);
|
828 |
-
}
|
829 |
-
elseif( class_exists('PlotLine',false) && ($cl instanceof PlotLine) ) {
|
830 |
-
$this->AddLine($aPlot,true);
|
831 |
-
}
|
832 |
-
elseif( class_exists('PlotBand',false) && ($cl instanceof PlotBand) ) {
|
833 |
-
$this->AddBand($aPlot,true);
|
834 |
-
}
|
835 |
-
else {
|
836 |
-
$this->y2plots[] = $aPlot;
|
837 |
-
}
|
838 |
-
|
839 |
-
if ($this->graph_theme) {
|
840 |
-
$this->graph_theme->SetupPlot($aPlot);
|
841 |
-
}
|
842 |
-
}
|
843 |
-
|
844 |
-
// Add plot to the extra Y-axises
|
845 |
-
function AddY($aN,$aPlot) {
|
846 |
-
|
847 |
-
if( $aPlot == null ) {
|
848 |
-
JpGraphError::RaiseL(25012);//("Graph::AddYN() You tried to add a null plot to the graph.");
|
849 |
-
}
|
850 |
-
|
851 |
-
if( is_array($aPlot) && count($aPlot) > 0 ) {
|
852 |
-
$cl = $aPlot[0];
|
853 |
-
}
|
854 |
-
else {
|
855 |
-
$cl = $aPlot;
|
856 |
-
}
|
857 |
-
|
858 |
-
if( ($cl instanceof Text) ||
|
859 |
-
(class_exists('PlotLine',false) && ($cl instanceof PlotLine)) ||
|
860 |
-
(class_exists('PlotBand',false) && ($cl instanceof PlotBand)) ) {
|
861 |
-
JpGraph::RaiseL(25013);//('You can only add standard plots to multiple Y-axis');
|
862 |
-
}
|
863 |
-
else {
|
864 |
-
$this->ynplots[$aN][] = $aPlot;
|
865 |
-
}
|
866 |
-
|
867 |
-
if ($this->graph_theme) {
|
868 |
-
$this->graph_theme->SetupPlot($aPlot);
|
869 |
-
}
|
870 |
-
}
|
871 |
-
|
872 |
-
// Add text object to the graph
|
873 |
-
function AddText($aTxt,$aToY2=false) {
|
874 |
-
if( $aTxt == null ) {
|
875 |
-
JpGraphError::RaiseL(25014);//("Graph::AddText() You tried to add a null text to the graph.");
|
876 |
-
}
|
877 |
-
if( $aToY2 ) {
|
878 |
-
if( is_array($aTxt) ) {
|
879 |
-
for($i=0; $i < count($aTxt); ++$i ) {
|
880 |
-
$this->y2texts[]=$aTxt[$i];
|
881 |
-
}
|
882 |
-
}
|
883 |
-
else {
|
884 |
-
$this->y2texts[] = $aTxt;
|
885 |
-
}
|
886 |
-
}
|
887 |
-
else {
|
888 |
-
if( is_array($aTxt) ) {
|
889 |
-
for($i=0; $i < count($aTxt); ++$i ) {
|
890 |
-
$this->texts[]=$aTxt[$i];
|
891 |
-
}
|
892 |
-
}
|
893 |
-
else {
|
894 |
-
$this->texts[] = $aTxt;
|
895 |
-
}
|
896 |
-
}
|
897 |
-
}
|
898 |
-
|
899 |
-
// Add a line object (class PlotLine) to the graph
|
900 |
-
function AddLine($aLine,$aToY2=false) {
|
901 |
-
if( $aLine == null ) {
|
902 |
-
JpGraphError::RaiseL(25015);//("Graph::AddLine() You tried to add a null line to the graph.");
|
903 |
-
}
|
904 |
-
|
905 |
-
if( $aToY2 ) {
|
906 |
-
if( is_array($aLine) ) {
|
907 |
-
for($i=0; $i < count($aLine); ++$i ) {
|
908 |
-
//$this->y2lines[]=$aLine[$i];
|
909 |
-
$this->y2plots[]=$aLine[$i];
|
910 |
-
}
|
911 |
-
}
|
912 |
-
else {
|
913 |
-
//$this->y2lines[] = $aLine;
|
914 |
-
$this->y2plots[]=$aLine;
|
915 |
-
}
|
916 |
-
}
|
917 |
-
else {
|
918 |
-
if( is_array($aLine) ) {
|
919 |
-
for($i=0; $i<count($aLine); ++$i ) {
|
920 |
-
//$this->lines[]=$aLine[$i];
|
921 |
-
$this->plots[]=$aLine[$i];
|
922 |
-
}
|
923 |
-
}
|
924 |
-
else {
|
925 |
-
//$this->lines[] = $aLine;
|
926 |
-
$this->plots[] = $aLine;
|
927 |
-
}
|
928 |
-
}
|
929 |
-
}
|
930 |
-
|
931 |
-
// Add vertical or horizontal band
|
932 |
-
function AddBand($aBand,$aToY2=false) {
|
933 |
-
if( $aBand == null ) {
|
934 |
-
JpGraphError::RaiseL(25016);//(" Graph::AddBand() You tried to add a null band to the graph.");
|
935 |
-
}
|
936 |
-
|
937 |
-
if( $aToY2 ) {
|
938 |
-
if( is_array($aBand) ) {
|
939 |
-
for($i=0; $i < count($aBand); ++$i ) {
|
940 |
-
$this->y2bands[] = $aBand[$i];
|
941 |
-
}
|
942 |
-
}
|
943 |
-
else {
|
944 |
-
$this->y2bands[] = $aBand;
|
945 |
-
}
|
946 |
-
}
|
947 |
-
else {
|
948 |
-
if( is_array($aBand) ) {
|
949 |
-
for($i=0; $i < count($aBand); ++$i ) {
|
950 |
-
$this->bands[] = $aBand[$i];
|
951 |
-
}
|
952 |
-
}
|
953 |
-
else {
|
954 |
-
$this->bands[] = $aBand;
|
955 |
-
}
|
956 |
-
}
|
957 |
-
}
|
958 |
-
|
959 |
-
function SetPlotGradient($aFrom='navy',$aTo='silver',$aGradType=2) {
|
960 |
-
$this->plot_gradtype=$aGradType;
|
961 |
-
$this->plot_gradfrom = $aFrom;
|
962 |
-
$this->plot_gradto = $aTo;
|
963 |
-
}
|
964 |
-
|
965 |
-
function SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2,$aStyle=BGRAD_FRAME) {
|
966 |
-
$this->bkg_gradtype=$aGradType;
|
967 |
-
$this->bkg_gradstyle=$aStyle;
|
968 |
-
$this->bkg_gradfrom = $aFrom;
|
969 |
-
$this->bkg_gradto = $aTo;
|
970 |
-
}
|
971 |
-
|
972 |
-
// Set a country flag in the background
|
973 |
-
function SetBackgroundCFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) {
|
974 |
-
$this->background_cflag = $aName;
|
975 |
-
$this->background_cflag_type = $aBgType;
|
976 |
-
$this->background_cflag_mix = $aMix;
|
977 |
-
}
|
978 |
-
|
979 |
-
// Alias for the above method
|
980 |
-
function SetBackgroundCountryFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) {
|
981 |
-
$this->background_cflag = $aName;
|
982 |
-
$this->background_cflag_type = $aBgType;
|
983 |
-
$this->background_cflag_mix = $aMix;
|
984 |
-
}
|
985 |
-
|
986 |
-
|
987 |
-
// Specify a background image
|
988 |
-
function SetBackgroundImage($aFileName,$aBgType=BGIMG_FILLPLOT,$aImgFormat='auto') {
|
989 |
-
|
990 |
-
// Get extension to determine image type
|
991 |
-
if( $aImgFormat == 'auto' ) {
|
992 |
-
$e = explode('.',$aFileName);
|
993 |
-
if( !$e ) {
|
994 |
-
JpGraphError::RaiseL(25018,$aFileName);//('Incorrect file name for Graph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type');
|
995 |
-
}
|
996 |
-
|
997 |
-
$valid_formats = array('png', 'jpg', 'gif');
|
998 |
-
$aImgFormat = strtolower($e[count($e)-1]);
|
999 |
-
if ($aImgFormat == 'jpeg') {
|
1000 |
-
$aImgFormat = 'jpg';
|
1001 |
-
}
|
1002 |
-
elseif (!in_array($aImgFormat, $valid_formats) ) {
|
1003 |
-
JpGraphError::RaiseL(25019,$aImgFormat);//('Unknown file extension ($aImgFormat) in Graph::SetBackgroundImage() for filename: '.$aFileName);
|
1004 |
-
}
|
1005 |
-
}
|
1006 |
-
|
1007 |
-
$this->background_image = $aFileName;
|
1008 |
-
$this->background_image_type=$aBgType;
|
1009 |
-
$this->background_image_format=$aImgFormat;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
function SetBackgroundImageMix($aMix) {
|
1013 |
-
$this->background_image_mix = $aMix ;
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
// Adjust background image position
|
1017 |
-
function SetBackgroundImagePos($aXpos,$aYpos) {
|
1018 |
-
$this->background_image_xpos = $aXpos ;
|
1019 |
-
$this->background_image_ypos = $aYpos ;
|
1020 |
-
}
|
1021 |
-
|
1022 |
-
// Specify axis style (boxed or single)
|
1023 |
-
function SetAxisStyle($aStyle) {
|
1024 |
-
$this->iAxisStyle = $aStyle ;
|
1025 |
-
}
|
1026 |
-
|
1027 |
-
// Set a frame around the plot area
|
1028 |
-
function SetBox($aDrawPlotFrame=true,$aPlotFrameColor=array(0,0,0),$aPlotFrameWeight=1) {
|
1029 |
-
$this->boxed = $aDrawPlotFrame;
|
1030 |
-
$this->box_weight = $aPlotFrameWeight;
|
1031 |
-
$this->box_color = $aPlotFrameColor;
|
1032 |
-
}
|
1033 |
-
|
1034 |
-
// Specify color for the plotarea (not the margins)
|
1035 |
-
function SetColor($aColor) {
|
1036 |
-
$this->plotarea_color=$aColor;
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
// Specify color for the margins (all areas outside the plotarea)
|
1040 |
-
function SetMarginColor($aColor) {
|
1041 |
-
$this->margin_color=$aColor;
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
// Set a frame around the entire image
|
1045 |
-
function SetFrame($aDrawImgFrame=true,$aImgFrameColor=array(0,0,0),$aImgFrameWeight=1) {
|
1046 |
-
$this->doframe = $aDrawImgFrame;
|
1047 |
-
$this->frame_color = $aImgFrameColor;
|
1048 |
-
$this->frame_weight = $aImgFrameWeight;
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
function SetFrameBevel($aDepth=3,$aBorder=false,$aBorderColor='black',$aColor1='white@0.4',$aColor2='darkgray@0.4',$aFlg=true) {
|
1052 |
-
$this->framebevel = $aFlg ;
|
1053 |
-
$this->framebeveldepth = $aDepth ;
|
1054 |
-
$this->framebevelborder = $aBorder ;
|
1055 |
-
$this->framebevelbordercolor = $aBorderColor ;
|
1056 |
-
$this->framebevelcolor1 = $aColor1 ;
|
1057 |
-
$this->framebevelcolor2 = $aColor2 ;
|
1058 |
-
|
1059 |
-
$this->doshadow = false ;
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
// Set the shadow around the whole image
|
1063 |
-
function SetShadow($aShowShadow=true,$aShadowWidth=5,$aShadowColor='darkgray') {
|
1064 |
-
$this->doshadow = $aShowShadow;
|
1065 |
-
$this->shadow_color = $aShadowColor;
|
1066 |
-
$this->shadow_width = $aShadowWidth;
|
1067 |
-
$this->footer->iBottomMargin += $aShadowWidth;
|
1068 |
-
$this->footer->iRightMargin += $aShadowWidth;
|
1069 |
-
}
|
1070 |
-
|
1071 |
-
// Specify x,y scale. Note that if you manually specify the scale
|
1072 |
-
// you must also specify the tick distance with a call to Ticks::Set()
|
1073 |
-
function SetScale($aAxisType,$aYMin=1,$aYMax=1,$aXMin=1,$aXMax=1) {
|
1074 |
-
$this->axtype = $aAxisType;
|
1075 |
-
|
1076 |
-
if( $aYMax < $aYMin || $aXMax < $aXMin ) {
|
1077 |
-
JpGraphError::RaiseL(25020);//('Graph::SetScale(): Specified Max value must be larger than the specified Min value.');
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
$yt=substr($aAxisType,-3,3);
|
1081 |
-
if( $yt == 'lin' ) {
|
1082 |
-
$this->yscale = new LinearScale($aYMin,$aYMax);
|
1083 |
-
}
|
1084 |
-
elseif( $yt == 'int' ) {
|
1085 |
-
$this->yscale = new LinearScale($aYMin,$aYMax);
|
1086 |
-
$this->yscale->SetIntScale();
|
1087 |
-
}
|
1088 |
-
elseif( $yt == 'log' ) {
|
1089 |
-
$this->yscale = new LogScale($aYMin,$aYMax);
|
1090 |
-
}
|
1091 |
-
else {
|
1092 |
-
JpGraphError::RaiseL(25021,$aAxisType);//("Unknown scale specification for Y-scale. ($aAxisType)");
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
$xt=substr($aAxisType,0,3);
|
1096 |
-
if( $xt == 'lin' || $xt == 'tex' ) {
|
1097 |
-
$this->xscale = new LinearScale($aXMin,$aXMax,'x');
|
1098 |
-
$this->xscale->textscale = ($xt == 'tex');
|
1099 |
-
}
|
1100 |
-
elseif( $xt == 'int' ) {
|
1101 |
-
$this->xscale = new LinearScale($aXMin,$aXMax,'x');
|
1102 |
-
$this->xscale->SetIntScale();
|
1103 |
-
}
|
1104 |
-
elseif( $xt == 'dat' ) {
|
1105 |
-
$this->xscale = new DateScale($aXMin,$aXMax,'x');
|
1106 |
-
}
|
1107 |
-
elseif( $xt == 'log' ) {
|
1108 |
-
$this->xscale = new LogScale($aXMin,$aXMax,'x');
|
1109 |
-
}
|
1110 |
-
else {
|
1111 |
-
JpGraphError::RaiseL(25022,$aAxisType);//(" Unknown scale specification for X-scale. ($aAxisType)");
|
1112 |
-
}
|
1113 |
-
|
1114 |
-
$this->xaxis = new Axis($this->img,$this->xscale);
|
1115 |
-
$this->yaxis = new Axis($this->img,$this->yscale);
|
1116 |
-
$this->xgrid = new Grid($this->xaxis);
|
1117 |
-
$this->ygrid = new Grid($this->yaxis);
|
1118 |
-
$this->ygrid->Show();
|
1119 |
-
|
1120 |
-
|
1121 |
-
if (!$this->isRunningClear) {
|
1122 |
-
$this->inputValues['aAxisType'] = $aAxisType;
|
1123 |
-
$this->inputValues['aYMin'] = $aYMin;
|
1124 |
-
$this->inputValues['aYMax'] = $aYMax;
|
1125 |
-
$this->inputValues['aXMin'] = $aXMin;
|
1126 |
-
$this->inputValues['aXMax'] = $aXMax;
|
1127 |
-
|
1128 |
-
if ($this->graph_theme) {
|
1129 |
-
$this->graph_theme->ApplyGraph($this);
|
1130 |
-
}
|
1131 |
-
}
|
1132 |
-
|
1133 |
-
$this->isAfterSetScale = true;
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
// Specify secondary Y scale
|
1137 |
-
function SetY2Scale($aAxisType='lin',$aY2Min=1,$aY2Max=1) {
|
1138 |
-
if( $aAxisType == 'lin' ) {
|
1139 |
-
$this->y2scale = new LinearScale($aY2Min,$aY2Max);
|
1140 |
-
}
|
1141 |
-
elseif( $aAxisType == 'int' ) {
|
1142 |
-
$this->y2scale = new LinearScale($aY2Min,$aY2Max);
|
1143 |
-
$this->y2scale->SetIntScale();
|
1144 |
-
}
|
1145 |
-
elseif( $aAxisType == 'log' ) {
|
1146 |
-
$this->y2scale = new LogScale($aY2Min,$aY2Max);
|
1147 |
-
}
|
1148 |
-
else {
|
1149 |
-
JpGraphError::RaiseL(25023,$aAxisType);//("JpGraph: Unsupported Y2 axis type: $aAxisType\nMust be one of (lin,log,int)");
|
1150 |
-
}
|
1151 |
-
|
1152 |
-
$this->y2axis = new Axis($this->img,$this->y2scale);
|
1153 |
-
$this->y2axis->scale->ticks->SetDirection(SIDE_LEFT);
|
1154 |
-
$this->y2axis->SetLabelSide(SIDE_RIGHT);
|
1155 |
-
$this->y2axis->SetPos('max');
|
1156 |
-
$this->y2axis->SetTitleSide(SIDE_RIGHT);
|
1157 |
-
|
1158 |
-
// Deafult position is the max x-value
|
1159 |
-
$this->y2grid = new Grid($this->y2axis);
|
1160 |
-
|
1161 |
-
if ($this->graph_theme) {
|
1162 |
-
$this->graph_theme->ApplyGraph($this);
|
1163 |
-
}
|
1164 |
-
}
|
1165 |
-
|
1166 |
-
// Set the delta position (in pixels) between the multiple Y-axis
|
1167 |
-
function SetYDeltaDist($aDist) {
|
1168 |
-
$this->iYAxisDeltaPos = $aDist;
|
1169 |
-
}
|
1170 |
-
|
1171 |
-
// Specify secondary Y scale
|
1172 |
-
function SetYScale($aN,$aAxisType="lin",$aYMin=1,$aYMax=1) {
|
1173 |
-
|
1174 |
-
if( $aAxisType == 'lin' ) {
|
1175 |
-
$this->ynscale[$aN] = new LinearScale($aYMin,$aYMax);
|
1176 |
-
}
|
1177 |
-
elseif( $aAxisType == 'int' ) {
|
1178 |
-
$this->ynscale[$aN] = new LinearScale($aYMin,$aYMax);
|
1179 |
-
$this->ynscale[$aN]->SetIntScale();
|
1180 |
-
}
|
1181 |
-
elseif( $aAxisType == 'log' ) {
|
1182 |
-
$this->ynscale[$aN] = new LogScale($aYMin,$aYMax);
|
1183 |
-
}
|
1184 |
-
else {
|
1185 |
-
JpGraphError::RaiseL(25024,$aAxisType);//("JpGraph: Unsupported Y axis type: $aAxisType\nMust be one of (lin,log,int)");
|
1186 |
-
}
|
1187 |
-
|
1188 |
-
$this->ynaxis[$aN] = new Axis($this->img,$this->ynscale[$aN]);
|
1189 |
-
$this->ynaxis[$aN]->scale->ticks->SetDirection(SIDE_LEFT);
|
1190 |
-
$this->ynaxis[$aN]->SetLabelSide(SIDE_RIGHT);
|
1191 |
-
|
1192 |
-
if ($this->graph_theme) {
|
1193 |
-
$this->graph_theme->ApplyGraph($this);
|
1194 |
-
}
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
// Specify density of ticks when autoscaling 'normal', 'dense', 'sparse', 'verysparse'
|
1198 |
-
// The dividing factor have been determined heuristically according to my aesthetic
|
1199 |
-
// sense (or lack off) y.m.m.v !
|
1200 |
-
function SetTickDensity($aYDensity=TICKD_NORMAL,$aXDensity=TICKD_NORMAL) {
|
1201 |
-
$this->xtick_factor=30;
|
1202 |
-
$this->ytick_factor=25;
|
1203 |
-
switch( $aYDensity ) {
|
1204 |
-
case TICKD_DENSE:
|
1205 |
-
$this->ytick_factor=12;
|
1206 |
-
break;
|
1207 |
-
case TICKD_NORMAL:
|
1208 |
-
$this->ytick_factor=25;
|
1209 |
-
break;
|
1210 |
-
case TICKD_SPARSE:
|
1211 |
-
$this->ytick_factor=40;
|
1212 |
-
break;
|
1213 |
-
case TICKD_VERYSPARSE:
|
1214 |
-
$this->ytick_factor=100;
|
1215 |
-
break;
|
1216 |
-
default:
|
1217 |
-
JpGraphError::RaiseL(25025,$densy);//("JpGraph: Unsupported Tick density: $densy");
|
1218 |
-
}
|
1219 |
-
switch( $aXDensity ) {
|
1220 |
-
case TICKD_DENSE:
|
1221 |
-
$this->xtick_factor=15;
|
1222 |
-
break;
|
1223 |
-
case TICKD_NORMAL:
|
1224 |
-
$this->xtick_factor=30;
|
1225 |
-
break;
|
1226 |
-
case TICKD_SPARSE:
|
1227 |
-
$this->xtick_factor=45;
|
1228 |
-
break;
|
1229 |
-
case TICKD_VERYSPARSE:
|
1230 |
-
$this->xtick_factor=60;
|
1231 |
-
break;
|
1232 |
-
default:
|
1233 |
-
JpGraphError::RaiseL(25025,$densx);//("JpGraph: Unsupported Tick density: $densx");
|
1234 |
-
}
|
1235 |
-
}
|
1236 |
-
|
1237 |
-
|
1238 |
-
// Get a string of all image map areas
|
1239 |
-
function GetCSIMareas() {
|
1240 |
-
if( !$this->iHasStroked ) {
|
1241 |
-
$this->Stroke(_CSIM_SPECIALFILE);
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
$csim = $this->title->GetCSIMAreas();
|
1245 |
-
$csim .= $this->subtitle->GetCSIMAreas();
|
1246 |
-
$csim .= $this->subsubtitle->GetCSIMAreas();
|
1247 |
-
$csim .= $this->legend->GetCSIMAreas();
|
1248 |
-
|
1249 |
-
if( $this->y2axis != NULL ) {
|
1250 |
-
$csim .= $this->y2axis->title->GetCSIMAreas();
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
if( $this->texts != null ) {
|
1254 |
-
$n = count($this->texts);
|
1255 |
-
for($i=0; $i < $n; ++$i ) {
|
1256 |
-
$csim .= $this->texts[$i]->GetCSIMAreas();
|
1257 |
-
}
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
if( $this->y2texts != null && $this->y2scale != null ) {
|
1261 |
-
$n = count($this->y2texts);
|
1262 |
-
for($i=0; $i < $n; ++$i ) {
|
1263 |
-
$csim .= $this->y2texts[$i]->GetCSIMAreas();
|
1264 |
-
}
|
1265 |
-
}
|
1266 |
-
|
1267 |
-
if( $this->yaxis != null && $this->xaxis != null ) {
|
1268 |
-
$csim .= $this->yaxis->title->GetCSIMAreas();
|
1269 |
-
$csim .= $this->xaxis->title->GetCSIMAreas();
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
$n = count($this->plots);
|
1273 |
-
for( $i=0; $i < $n; ++$i ) {
|
1274 |
-
$csim .= $this->plots[$i]->GetCSIMareas();
|
1275 |
-
}
|
1276 |
-
|
1277 |
-
$n = count($this->y2plots);
|
1278 |
-
for( $i=0; $i < $n; ++$i ) {
|
1279 |
-
$csim .= $this->y2plots[$i]->GetCSIMareas();
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
$n = count($this->ynaxis);
|
1283 |
-
for( $i=0; $i < $n; ++$i ) {
|
1284 |
-
$m = count($this->ynplots[$i]);
|
1285 |
-
for($j=0; $j < $m; ++$j ) {
|
1286 |
-
$csim .= $this->ynplots[$i][$j]->GetCSIMareas();
|
1287 |
-
}
|
1288 |
-
}
|
1289 |
-
|
1290 |
-
$n = count($this->iTables);
|
1291 |
-
for( $i=0; $i < $n; ++$i ) {
|
1292 |
-
$csim .= $this->iTables[$i]->GetCSIMareas();
|
1293 |
-
}
|
1294 |
-
|
1295 |
-
return $csim;
|
1296 |
-
}
|
1297 |
-
|
1298 |
-
// Get a complete <MAP>..</MAP> tag for the final image map
|
1299 |
-
function GetHTMLImageMap($aMapName) {
|
1300 |
-
$im = "<map name=\"$aMapName\" id=\"$aMapName\" >\n";
|
1301 |
-
$im .= $this->GetCSIMareas();
|
1302 |
-
$im .= "</map>";
|
1303 |
-
return $im;
|
1304 |
-
}
|
1305 |
-
|
1306 |
-
function CheckCSIMCache($aCacheName,$aTimeOut=60) {
|
1307 |
-
global $_SERVER;
|
1308 |
-
|
1309 |
-
if( $aCacheName=='auto' ) {
|
1310 |
-
$aCacheName=basename($_SERVER['PHP_SELF']);
|
1311 |
-
}
|
1312 |
-
|
1313 |
-
$urlarg = $this->GetURLArguments();
|
1314 |
-
$this->csimcachename = CSIMCACHE_DIR.$aCacheName.$urlarg;
|
1315 |
-
$this->csimcachetimeout = $aTimeOut;
|
1316 |
-
|
1317 |
-
// First determine if we need to check for a cached version
|
1318 |
-
// This differs from the standard cache in the sense that the
|
1319 |
-
// image and CSIM map HTML file is written relative to the directory
|
1320 |
-
// the script executes in and not the specified cache directory.
|
1321 |
-
// The reason for this is that the cache directory is not necessarily
|
1322 |
-
// accessible from the HTTP server.
|
1323 |
-
if( $this->csimcachename != '' ) {
|
1324 |
-
$dir = dirname($this->csimcachename);
|
1325 |
-
$base = basename($this->csimcachename);
|
1326 |
-
$base = strtok($base,'.');
|
1327 |
-
$suffix = strtok('.');
|
1328 |
-
$basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html';
|
1329 |
-
$baseimg = $dir.'/'.$base.'?'.$urlarg.'.'.$this->img->img_format;
|
1330 |
-
|
1331 |
-
$timedout=false;
|
1332 |
-
// Does it exist at all ?
|
1333 |
-
|
1334 |
-
if( file_exists($basecsim) && file_exists($baseimg) ) {
|
1335 |
-
// Check that it hasn't timed out
|
1336 |
-
$diff=time()-filemtime($basecsim);
|
1337 |
-
if( $this->csimcachetimeout>0 && ($diff > $this->csimcachetimeout*60) ) {
|
1338 |
-
$timedout=true;
|
1339 |
-
@unlink($basecsim);
|
1340 |
-
@unlink($baseimg);
|
1341 |
-
}
|
1342 |
-
else {
|
1343 |
-
if ($fh = @fopen($basecsim, "r")) {
|
1344 |
-
fpassthru($fh);
|
1345 |
-
return true;
|
1346 |
-
}
|
1347 |
-
else {
|
1348 |
-
JpGraphError::RaiseL(25027,$basecsim);//(" Can't open cached CSIM \"$basecsim\" for reading.");
|
1349 |
-
}
|
1350 |
-
}
|
1351 |
-
}
|
1352 |
-
}
|
1353 |
-
return false;
|
1354 |
-
}
|
1355 |
-
|
1356 |
-
// Build the argument string to be used with the csim images
|
1357 |
-
static function GetURLArguments($aAddRecursiveBlocker=false) {
|
1358 |
-
|
1359 |
-
if( $aAddRecursiveBlocker ) {
|
1360 |
-
// This is a JPGRAPH internal defined that prevents
|
1361 |
-
// us from recursively coming here again
|
1362 |
-
$urlarg = _CSIM_DISPLAY.'=1';
|
1363 |
-
}
|
1364 |
-
|
1365 |
-
// Now reconstruct any user URL argument
|
1366 |
-
reset($_GET);
|
1367 |
-
while( list($key,$value) = each($_GET) ) {
|
1368 |
-
if( is_array($value) ) {
|
1369 |
-
foreach ( $value as $k => $v ) {
|
1370 |
-
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
1371 |
-
}
|
1372 |
-
}
|
1373 |
-
else {
|
1374 |
-
$urlarg .= '&'.$key.'='.urlencode($value);
|
1375 |
-
}
|
1376 |
-
}
|
1377 |
-
|
1378 |
-
// It's not ideal to convert POST argument to GET arguments
|
1379 |
-
// but there is little else we can do. One idea for the
|
1380 |
-
// future might be recreate the POST header in case.
|
1381 |
-
reset($_POST);
|
1382 |
-
while( list($key,$value) = each($_POST) ) {
|
1383 |
-
if( is_array($value) ) {
|
1384 |
-
foreach ( $value as $k => $v ) {
|
1385 |
-
$urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v);
|
1386 |
-
}
|
1387 |
-
}
|
1388 |
-
else {
|
1389 |
-
$urlarg .= '&'.$key.'='.urlencode($value);
|
1390 |
-
}
|
1391 |
-
}
|
1392 |
-
|
1393 |
-
return $urlarg;
|
1394 |
-
}
|
1395 |
-
|
1396 |
-
function SetCSIMImgAlt($aAlt) {
|
1397 |
-
$this->iCSIMImgAlt = $aAlt;
|
1398 |
-
}
|
1399 |
-
|
1400 |
-
function StrokeCSIM($aScriptName='auto',$aCSIMName='',$aBorder=0) {
|
1401 |
-
if( $aCSIMName=='' ) {
|
1402 |
-
// create a random map name
|
1403 |
-
srand ((double) microtime() * 1000000);
|
1404 |
-
$r = rand(0,100000);
|
1405 |
-
$aCSIMName='__mapname'.$r.'__';
|
1406 |
-
}
|
1407 |
-
|
1408 |
-
if( $aScriptName=='auto' ) {
|
1409 |
-
$aScriptName=basename($_SERVER['PHP_SELF']);
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
$urlarg = $this->GetURLArguments(true);
|
1413 |
-
|
1414 |
-
if( empty($_GET[_CSIM_DISPLAY]) ) {
|
1415 |
-
// First determine if we need to check for a cached version
|
1416 |
-
// This differs from the standard cache in the sense that the
|
1417 |
-
// image and CSIM map HTML file is written relative to the directory
|
1418 |
-
// the script executes in and not the specified cache directory.
|
1419 |
-
// The reason for this is that the cache directory is not necessarily
|
1420 |
-
// accessible from the HTTP server.
|
1421 |
-
if( $this->csimcachename != '' ) {
|
1422 |
-
$dir = dirname($this->csimcachename);
|
1423 |
-
$base = basename($this->csimcachename);
|
1424 |
-
$base = strtok($base,'.');
|
1425 |
-
$suffix = strtok('.');
|
1426 |
-
$basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html';
|
1427 |
-
$baseimg = $base.'?'.$urlarg.'.'.$this->img->img_format;
|
1428 |
-
|
1429 |
-
// Check that apache can write to directory specified
|
1430 |
-
|
1431 |
-
if( file_exists($dir) && !is_writeable($dir) ) {
|
1432 |
-
JpgraphError::RaiseL(25028,$dir);//('Apache/PHP does not have permission to write to the CSIM cache directory ('.$dir.'). Check permissions.');
|
1433 |
-
}
|
1434 |
-
|
1435 |
-
// Make sure directory exists
|
1436 |
-
$this->cache->MakeDirs($dir);
|
1437 |
-
|
1438 |
-
// Write the image file
|
1439 |
-
$this->Stroke(CSIMCACHE_DIR.$baseimg);
|
1440 |
-
|
1441 |
-
// Construct wrapper HTML and write to file and send it back to browser
|
1442 |
-
|
1443 |
-
// In the src URL we must replace the '?' with its encoding to prevent the arguments
|
1444 |
-
// to be converted to real arguments.
|
1445 |
-
$tmp = str_replace('?','%3f',$baseimg);
|
1446 |
-
$htmlwrap = $this->GetHTMLImageMap($aCSIMName)."\n".
|
1447 |
-
'<img src="'.CSIMCACHE_HTTP_DIR.$tmp.'" ismap="ismap" usemap="#'.$aCSIMName.' width="'.$this->img->width.'" height="'.$this->img->height."\" alt=\"".$this->iCSIMImgAlt."\" />\n";
|
1448 |
-
|
1449 |
-
if($fh = @fopen($basecsim,'w') ) {
|
1450 |
-
fwrite($fh,$htmlwrap);
|
1451 |
-
fclose($fh);
|
1452 |
-
echo $htmlwrap;
|
1453 |
-
}
|
1454 |
-
else {
|
1455 |
-
JpGraphError::RaiseL(25029,$basecsim);//(" Can't write CSIM \"$basecsim\" for writing. Check free space and permissions.");
|
1456 |
-
}
|
1457 |
-
}
|
1458 |
-
else {
|
1459 |
-
|
1460 |
-
if( $aScriptName=='' ) {
|
1461 |
-
JpGraphError::RaiseL(25030);//('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().');
|
1462 |
-
}
|
1463 |
-
echo $this->GetHTMLImageMap($aCSIMName) . $this->GetCSIMImgHTML($aCSIMName, $aScriptName, $aBorder);
|
1464 |
-
}
|
1465 |
-
}
|
1466 |
-
else {
|
1467 |
-
$this->Stroke();
|
1468 |
-
}
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
function StrokeCSIMImage() {
|
1472 |
-
if( @$_GET[_CSIM_DISPLAY] == 1 ) {
|
1473 |
-
$this->Stroke();
|
1474 |
-
}
|
1475 |
-
}
|
1476 |
-
|
1477 |
-
function GetCSIMImgHTML($aCSIMName, $aScriptName='auto', $aBorder=0 ) {
|
1478 |
-
if( $aScriptName=='auto' ) {
|
1479 |
-
$aScriptName=basename($_SERVER['PHP_SELF']);
|
1480 |
-
}
|
1481 |
-
$urlarg = $this->GetURLArguments(true);
|
1482 |
-
return "<img src=\"".$aScriptName.'?'.$urlarg."\" ismap=\"ismap\" usemap=\"#".$aCSIMName.'" height="'.$this->img->height."\" alt=\"".$this->iCSIMImgAlt."\" />\n";
|
1483 |
-
}
|
1484 |
-
|
1485 |
-
function GetTextsYMinMax($aY2=false) {
|
1486 |
-
if( $aY2 ) {
|
1487 |
-
$txts = $this->y2texts;
|
1488 |
-
}
|
1489 |
-
else {
|
1490 |
-
$txts = $this->texts;
|
1491 |
-
}
|
1492 |
-
$n = count($txts);
|
1493 |
-
$min=null;
|
1494 |
-
$max=null;
|
1495 |
-
for( $i=0; $i < $n; ++$i ) {
|
1496 |
-
if( $txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null ) {
|
1497 |
-
if( $min === null ) {
|
1498 |
-
$min = $max = $txts[$i]->iScalePosY ;
|
1499 |
-
}
|
1500 |
-
else {
|
1501 |
-
$min = min($min,$txts[$i]->iScalePosY);
|
1502 |
-
$max = max($max,$txts[$i]->iScalePosY);
|
1503 |
-
}
|
1504 |
-
}
|
1505 |
-
}
|
1506 |
-
if( $min !== null ) {
|
1507 |
-
return array($min,$max);
|
1508 |
-
}
|
1509 |
-
else {
|
1510 |
-
return null;
|
1511 |
-
}
|
1512 |
-
}
|
1513 |
-
|
1514 |
-
function GetTextsXMinMax($aY2=false) {
|
1515 |
-
if( $aY2 ) {
|
1516 |
-
$txts = $this->y2texts;
|
1517 |
-
}
|
1518 |
-
else {
|
1519 |
-
$txts = $this->texts;
|
1520 |
-
}
|
1521 |
-
$n = count($txts);
|
1522 |
-
$min=null;
|
1523 |
-
$max=null;
|
1524 |
-
for( $i=0; $i < $n; ++$i ) {
|
1525 |
-
if( $txts[$i]->iScalePosY !== null && $txts[$i]->iScalePosX !== null ) {
|
1526 |
-
if( $min === null ) {
|
1527 |
-
$min = $max = $txts[$i]->iScalePosX ;
|
1528 |
-
}
|
1529 |
-
else {
|
1530 |
-
$min = min($min,$txts[$i]->iScalePosX);
|
1531 |
-
$max = max($max,$txts[$i]->iScalePosX);
|
1532 |
-
}
|
1533 |
-
}
|
1534 |
-
}
|
1535 |
-
if( $min !== null ) {
|
1536 |
-
return array($min,$max);
|
1537 |
-
}
|
1538 |
-
else {
|
1539 |
-
return null;
|
1540 |
-
}
|
1541 |
-
}
|
1542 |
-
|
1543 |
-
function GetXMinMax() {
|
1544 |
-
|
1545 |
-
list($min,$ymin) = $this->plots[0]->Min();
|
1546 |
-
list($max,$ymax) = $this->plots[0]->Max();
|
1547 |
-
|
1548 |
-
$i=0;
|
1549 |
-
// Some plots, e.g. PlotLine should not affect the scale
|
1550 |
-
// and will return (null,null). We should ignore those
|
1551 |
-
// values.
|
1552 |
-
while( ($min===null || $max === null) && ($i < count($this->plots)-1) ) {
|
1553 |
-
++$i;
|
1554 |
-
list($min,$ymin) = $this->plots[$i]->Min();
|
1555 |
-
list($max,$ymax) = $this->plots[$i]->Max();
|
1556 |
-
}
|
1557 |
-
|
1558 |
-
foreach( $this->plots as $p ) {
|
1559 |
-
list($xmin,$ymin) = $p->Min();
|
1560 |
-
list($xmax,$ymax) = $p->Max();
|
1561 |
-
|
1562 |
-
if( $xmin !== null && $xmax !== null ) {
|
1563 |
-
$min = Min($xmin,$min);
|
1564 |
-
$max = Max($xmax,$max);
|
1565 |
-
}
|
1566 |
-
}
|
1567 |
-
|
1568 |
-
if( $this->y2axis != null ) {
|
1569 |
-
foreach( $this->y2plots as $p ) {
|
1570 |
-
list($xmin,$ymin) = $p->Min();
|
1571 |
-
list($xmax,$ymax) = $p->Max();
|
1572 |
-
$min = Min($xmin,$min);
|
1573 |
-
$max = Max($xmax,$max);
|
1574 |
-
}
|
1575 |
-
}
|
1576 |
-
|
1577 |
-
$n = count($this->ynaxis);
|
1578 |
-
for( $i=0; $i < $n; ++$i ) {
|
1579 |
-
if( $this->ynaxis[$i] != null) {
|
1580 |
-
foreach( $this->ynplots[$i] as $p ) {
|
1581 |
-
list($xmin,$ymin) = $p->Min();
|
1582 |
-
list($xmax,$ymax) = $p->Max();
|
1583 |
-
$min = Min($xmin,$min);
|
1584 |
-
$max = Max($xmax,$max);
|
1585 |
-
}
|
1586 |
-
}
|
1587 |
-
}
|
1588 |
-
return array($min,$max);
|
1589 |
-
}
|
1590 |
-
|
1591 |
-
function AdjustMarginsForTitles() {
|
1592 |
-
$totrequired =
|
1593 |
-
($this->title->t != ''
|
1594 |
-
? $this->title->GetTextHeight($this->img) + $this->title->margin + 5 * SUPERSAMPLING_SCALE
|
1595 |
-
: 0 ) +
|
1596 |
-
($this->subtitle->t != ''
|
1597 |
-
? $this->subtitle->GetTextHeight($this->img) + $this->subtitle->margin + 5 * SUPERSAMPLING_SCALE
|
1598 |
-
: 0 ) +
|
1599 |
-
($this->subsubtitle->t != ''
|
1600 |
-
? $this->subsubtitle->GetTextHeight($this->img) + $this->subsubtitle->margin + 5 * SUPERSAMPLING_SCALE
|
1601 |
-
: 0 ) ;
|
1602 |
-
|
1603 |
-
$btotrequired = 0;
|
1604 |
-
if($this->xaxis != null && !$this->xaxis->hide && !$this->xaxis->hide_labels ) {
|
1605 |
-
// Minimum bottom margin
|
1606 |
-
if( $this->xaxis->title->t != '' ) {
|
1607 |
-
if( $this->img->a == 90 ) {
|
1608 |
-
$btotrequired = $this->yaxis->title->GetTextHeight($this->img) + 7 ;
|
1609 |
-
}
|
1610 |
-
else {
|
1611 |
-
$btotrequired = $this->xaxis->title->GetTextHeight($this->img) + 7 ;
|
1612 |
-
}
|
1613 |
-
}
|
1614 |
-
else {
|
1615 |
-
$btotrequired = 0;
|
1616 |
-
}
|
1617 |
-
|
1618 |
-
if( $this->img->a == 90 ) {
|
1619 |
-
$this->img->SetFont($this->yaxis->font_family,$this->yaxis->font_style,
|
1620 |
-
$this->yaxis->font_size);
|
1621 |
-
$lh = $this->img->GetTextHeight('Mg',$this->yaxis->label_angle);
|
1622 |
-
}
|
1623 |
-
else {
|
1624 |
-
$this->img->SetFont($this->xaxis->font_family,$this->xaxis->font_style,
|
1625 |
-
$this->xaxis->font_size);
|
1626 |
-
$lh = $this->img->GetTextHeight('Mg',$this->xaxis->label_angle);
|
1627 |
-
}
|
1628 |
-
|
1629 |
-
$btotrequired += $lh + 6;
|
1630 |
-
}
|
1631 |
-
|
1632 |
-
if( $this->img->a == 90 ) {
|
1633 |
-
// DO Nothing. It gets too messy to do this properly for 90 deg...
|
1634 |
-
}
|
1635 |
-
else{
|
1636 |
-
// need more top margin
|
1637 |
-
if( $this->img->top_margin < $totrequired ) {
|
1638 |
-
$this->SetMargin(
|
1639 |
-
$this->img->raw_left_margin,
|
1640 |
-
$this->img->raw_right_margin,
|
1641 |
-
$totrequired / SUPERSAMPLING_SCALE,
|
1642 |
-
$this->img->raw_bottom_margin
|
1643 |
-
);
|
1644 |
-
}
|
1645 |
-
|
1646 |
-
// need more bottom margin
|
1647 |
-
if( $this->img->bottom_margin < $btotrequired ) {
|
1648 |
-
$this->SetMargin(
|
1649 |
-
$this->img->raw_left_margin,
|
1650 |
-
$this->img->raw_right_margin,
|
1651 |
-
$this->img->raw_top_margin,
|
1652 |
-
$btotrequired / SUPERSAMPLING_SCALE
|
1653 |
-
);
|
1654 |
-
}
|
1655 |
-
}
|
1656 |
-
}
|
1657 |
-
|
1658 |
-
function StrokeStore($aStrokeFileName) {
|
1659 |
-
// Get the handler to prevent the library from sending the
|
1660 |
-
// image to the browser
|
1661 |
-
$ih = $this->Stroke(_IMG_HANDLER);
|
1662 |
-
|
1663 |
-
// Stroke it to a file
|
1664 |
-
$this->img->Stream($aStrokeFileName);
|
1665 |
-
|
1666 |
-
// Send it back to browser
|
1667 |
-
$this->img->Headers();
|
1668 |
-
$this->img->Stream();
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
function doAutoscaleXAxis() {
|
1672 |
-
//Check if we should autoscale x-axis
|
1673 |
-
if( !$this->xscale->IsSpecified() ) {
|
1674 |
-
if( substr($this->axtype,0,4) == "text" ) {
|
1675 |
-
$max=0;
|
1676 |
-
$n = count($this->plots);
|
1677 |
-
for($i=0; $i < $n; ++$i ) {
|
1678 |
-
$p = $this->plots[$i];
|
1679 |
-
// We need some unfortunate sub class knowledge here in order
|
1680 |
-
// to increase number of data points in case it is a line plot
|
1681 |
-
// which has the barcenter set. If not it could mean that the
|
1682 |
-
// last point of the data is outside the scale since the barcenter
|
1683 |
-
// settings means that we will shift the entire plot half a tick step
|
1684 |
-
// to the right in oder to align with the center of the bars.
|
1685 |
-
if( class_exists('BarPlot',false) ) {
|
1686 |
-
$cl = strtolower(get_class($p));
|
1687 |
-
if( (class_exists('BarPlot',false) && ($p instanceof BarPlot)) || empty($p->barcenter) ) {
|
1688 |
-
$max=max($max,$p->numpoints-1);
|
1689 |
-
}
|
1690 |
-
else {
|
1691 |
-
$max=max($max,$p->numpoints);
|
1692 |
-
}
|
1693 |
-
}
|
1694 |
-
else {
|
1695 |
-
if( empty($p->barcenter) ) {
|
1696 |
-
$max=max($max,$p->numpoints-1);
|
1697 |
-
}
|
1698 |
-
else {
|
1699 |
-
$max=max($max,$p->numpoints);
|
1700 |
-
}
|
1701 |
-
}
|
1702 |
-
}
|
1703 |
-
$min=0;
|
1704 |
-
if( $this->y2axis != null ) {
|
1705 |
-
foreach( $this->y2plots as $p ) {
|
1706 |
-
$max=max($max,$p->numpoints-1);
|
1707 |
-
}
|
1708 |
-
}
|
1709 |
-
$n = count($this->ynaxis);
|
1710 |
-
for( $i=0; $i < $n; ++$i ) {
|
1711 |
-
if( $this->ynaxis[$i] != null) {
|
1712 |
-
foreach( $this->ynplots[$i] as $p ) {
|
1713 |
-
$max=max($max,$p->numpoints-1);
|
1714 |
-
}
|
1715 |
-
}
|
1716 |
-
}
|
1717 |
-
|
1718 |
-
$this->xscale->Update($this->img,$min,$max);
|
1719 |
-
$this->xscale->ticks->Set($this->xaxis->tick_step,1);
|
1720 |
-
$this->xscale->ticks->SupressMinorTickMarks();
|
1721 |
-
}
|
1722 |
-
else {
|
1723 |
-
list($min,$max) = $this->GetXMinMax();
|
1724 |
-
|
1725 |
-
$lres = $this->GetLinesXMinMax($this->lines);
|
1726 |
-
if( $lres ) {
|
1727 |
-
list($linmin,$linmax) = $lres ;
|
1728 |
-
$min = min($min,$linmin);
|
1729 |
-
$max = max($max,$linmax);
|
1730 |
-
}
|
1731 |
-
|
1732 |
-
$lres = $this->GetLinesXMinMax($this->y2lines);
|
1733 |
-
if( $lres ) {
|
1734 |
-
list($linmin,$linmax) = $lres ;
|
1735 |
-
$min = min($min,$linmin);
|
1736 |
-
$max = max($max,$linmax);
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
$tres = $this->GetTextsXMinMax();
|
1740 |
-
if( $tres ) {
|
1741 |
-
list($tmin,$tmax) = $tres ;
|
1742 |
-
$min = min($min,$tmin);
|
1743 |
-
$max = max($max,$tmax);
|
1744 |
-
}
|
1745 |
-
|
1746 |
-
$tres = $this->GetTextsXMinMax(true);
|
1747 |
-
if( $tres ) {
|
1748 |
-
list($tmin,$tmax) = $tres ;
|
1749 |
-
$min = min($min,$tmin);
|
1750 |
-
$max = max($max,$tmax);
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
$this->xscale->AutoScale($this->img,$min,$max,round($this->img->plotwidth/$this->xtick_factor));
|
1754 |
-
}
|
1755 |
-
|
1756 |
-
//Adjust position of y-axis and y2-axis to minimum/maximum of x-scale
|
1757 |
-
if( !is_numeric($this->yaxis->pos) && !is_string($this->yaxis->pos) ) {
|
1758 |
-
$this->yaxis->SetPos($this->xscale->GetMinVal());
|
1759 |
-
}
|
1760 |
-
}
|
1761 |
-
elseif( $this->xscale->IsSpecified() &&
|
1762 |
-
( $this->xscale->auto_ticks || !$this->xscale->ticks->IsSpecified()) ) {
|
1763 |
-
// The tick calculation will use the user suplied min/max values to determine
|
1764 |
-
// the ticks. If auto_ticks is false the exact user specifed min and max
|
1765 |
-
// values will be used for the scale.
|
1766 |
-
// If auto_ticks is true then the scale might be slightly adjusted
|
1767 |
-
// so that the min and max values falls on an even major step.
|
1768 |
-
$min = $this->xscale->scale[0];
|
1769 |
-
$max = $this->xscale->scale[1];
|
1770 |
-
$this->xscale->AutoScale($this->img,$min,$max,round($this->img->plotwidth/$this->xtick_factor),false);
|
1771 |
-
|
1772 |
-
// Now make sure we show enough precision to accurate display the
|
1773 |
-
// labels. If this is not done then the user might end up with
|
1774 |
-
// a scale that might actually start with, say 13.5, butdue to rounding
|
1775 |
-
// the scale label will ony show 14.
|
1776 |
-
if( abs(floor($min)-$min) > 0 ) {
|
1777 |
-
|
1778 |
-
// If the user has set a format then we bail out
|
1779 |
-
if( $this->xscale->ticks->label_formatstr == '' && $this->xscale->ticks->label_dateformatstr == '' ) {
|
1780 |
-
$this->xscale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1;
|
1781 |
-
}
|
1782 |
-
}
|
1783 |
-
}
|
1784 |
-
|
1785 |
-
// Position the optional Y2 and Yn axis to the rightmost position of the x-axis
|
1786 |
-
if( $this->y2axis != null ) {
|
1787 |
-
if( !is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos) ) {
|
1788 |
-
$this->y2axis->SetPos($this->xscale->GetMaxVal());
|
1789 |
-
}
|
1790 |
-
$this->y2axis->SetTitleSide(SIDE_RIGHT);
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
$n = count($this->ynaxis);
|
1794 |
-
$nY2adj = $this->y2axis != null ? $this->iYAxisDeltaPos : 0;
|
1795 |
-
for( $i=0; $i < $n; ++$i ) {
|
1796 |
-
if( $this->ynaxis[$i] != null ) {
|
1797 |
-
if( !is_numeric($this->ynaxis[$i]->pos) && !is_string($this->ynaxis[$i]->pos) ) {
|
1798 |
-
$this->ynaxis[$i]->SetPos($this->xscale->GetMaxVal());
|
1799 |
-
$this->ynaxis[$i]->SetPosAbsDelta($i*$this->iYAxisDeltaPos + $nY2adj);
|
1800 |
-
}
|
1801 |
-
$this->ynaxis[$i]->SetTitleSide(SIDE_RIGHT);
|
1802 |
-
}
|
1803 |
-
}
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
|
1807 |
-
function doAutoScaleYnAxis() {
|
1808 |
-
|
1809 |
-
if( $this->y2scale != null) {
|
1810 |
-
if( !$this->y2scale->IsSpecified() && count($this->y2plots)>0 ) {
|
1811 |
-
list($min,$max) = $this->GetPlotsYMinMax($this->y2plots);
|
1812 |
-
|
1813 |
-
$lres = $this->GetLinesYMinMax($this->y2lines);
|
1814 |
-
if( is_array($lres) ) {
|
1815 |
-
list($linmin,$linmax) = $lres ;
|
1816 |
-
$min = min($min,$linmin);
|
1817 |
-
$max = max($max,$linmax);
|
1818 |
-
}
|
1819 |
-
$tres = $this->GetTextsYMinMax(true);
|
1820 |
-
if( is_array($tres) ) {
|
1821 |
-
list($tmin,$tmax) = $tres ;
|
1822 |
-
$min = min($min,$tmin);
|
1823 |
-
$max = max($max,$tmax);
|
1824 |
-
}
|
1825 |
-
$this->y2scale->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor);
|
1826 |
-
}
|
1827 |
-
elseif( $this->y2scale->IsSpecified() && ( $this->y2scale->auto_ticks || !$this->y2scale->ticks->IsSpecified()) ) {
|
1828 |
-
// The tick calculation will use the user suplied min/max values to determine
|
1829 |
-
// the ticks. If auto_ticks is false the exact user specifed min and max
|
1830 |
-
// values will be used for the scale.
|
1831 |
-
// If auto_ticks is true then the scale might be slightly adjusted
|
1832 |
-
// so that the min and max values falls on an even major step.
|
1833 |
-
$min = $this->y2scale->scale[0];
|
1834 |
-
$max = $this->y2scale->scale[1];
|
1835 |
-
$this->y2scale->AutoScale($this->img,$min,$max,
|
1836 |
-
$this->img->plotheight/$this->ytick_factor,
|
1837 |
-
$this->y2scale->auto_ticks);
|
1838 |
-
|
1839 |
-
// Now make sure we show enough precision to accurate display the
|
1840 |
-
// labels. If this is not done then the user might end up with
|
1841 |
-
// a scale that might actually start with, say 13.5, butdue to rounding
|
1842 |
-
// the scale label will ony show 14.
|
1843 |
-
if( abs(floor($min)-$min) > 0 ) {
|
1844 |
-
// If the user has set a format then we bail out
|
1845 |
-
if( $this->y2scale->ticks->label_formatstr == '' && $this->y2scale->ticks->label_dateformatstr == '' ) {
|
1846 |
-
$this->y2scale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1;
|
1847 |
-
}
|
1848 |
-
}
|
1849 |
-
|
1850 |
-
}
|
1851 |
-
}
|
1852 |
-
|
1853 |
-
|
1854 |
-
//
|
1855 |
-
// Autoscale the extra Y-axises
|
1856 |
-
//
|
1857 |
-
$n = count($this->ynaxis);
|
1858 |
-
for( $i=0; $i < $n; ++$i ) {
|
1859 |
-
if( $this->ynscale[$i] != null) {
|
1860 |
-
if( !$this->ynscale[$i]->IsSpecified() && count($this->ynplots[$i])>0 ) {
|
1861 |
-
list($min,$max) = $this->GetPlotsYMinMax($this->ynplots[$i]);
|
1862 |
-
$this->ynscale[$i]->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor);
|
1863 |
-
}
|
1864 |
-
elseif( $this->ynscale[$i]->IsSpecified() && ( $this->ynscale[$i]->auto_ticks || !$this->ynscale[$i]->ticks->IsSpecified()) ) {
|
1865 |
-
// The tick calculation will use the user suplied min/max values to determine
|
1866 |
-
// the ticks. If auto_ticks is false the exact user specifed min and max
|
1867 |
-
// values will be used for the scale.
|
1868 |
-
// If auto_ticks is true then the scale might be slightly adjusted
|
1869 |
-
// so that the min and max values falls on an even major step.
|
1870 |
-
$min = $this->ynscale[$i]->scale[0];
|
1871 |
-
$max = $this->ynscale[$i]->scale[1];
|
1872 |
-
$this->ynscale[$i]->AutoScale($this->img,$min,$max,
|
1873 |
-
$this->img->plotheight/$this->ytick_factor,
|
1874 |
-
$this->ynscale[$i]->auto_ticks);
|
1875 |
-
|
1876 |
-
// Now make sure we show enough precision to accurate display the
|
1877 |
-
// labels. If this is not done then the user might end up with
|
1878 |
-
// a scale that might actually start with, say 13.5, butdue to rounding
|
1879 |
-
// the scale label will ony show 14.
|
1880 |
-
if( abs(floor($min)-$min) > 0 ) {
|
1881 |
-
// If the user has set a format then we bail out
|
1882 |
-
if( $this->ynscale[$i]->ticks->label_formatstr == '' && $this->ynscale[$i]->ticks->label_dateformatstr == '' ) {
|
1883 |
-
$this->ynscale[$i]->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1;
|
1884 |
-
}
|
1885 |
-
}
|
1886 |
-
}
|
1887 |
-
}
|
1888 |
-
}
|
1889 |
-
}
|
1890 |
-
|
1891 |
-
function doAutoScaleYAxis() {
|
1892 |
-
|
1893 |
-
//Check if we should autoscale y-axis
|
1894 |
-
if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) {
|
1895 |
-
list($min,$max) = $this->GetPlotsYMinMax($this->plots);
|
1896 |
-
$lres = $this->GetLinesYMinMax($this->lines);
|
1897 |
-
if( is_array($lres) ) {
|
1898 |
-
list($linmin,$linmax) = $lres ;
|
1899 |
-
$min = min($min,$linmin);
|
1900 |
-
$max = max($max,$linmax);
|
1901 |
-
}
|
1902 |
-
$tres = $this->GetTextsYMinMax();
|
1903 |
-
if( is_array($tres) ) {
|
1904 |
-
list($tmin,$tmax) = $tres ;
|
1905 |
-
$min = min($min,$tmin);
|
1906 |
-
$max = max($max,$tmax);
|
1907 |
-
}
|
1908 |
-
$this->yscale->AutoScale($this->img,$min,$max,
|
1909 |
-
$this->img->plotheight/$this->ytick_factor);
|
1910 |
-
}
|
1911 |
-
elseif( $this->yscale->IsSpecified() && ( $this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified()) ) {
|
1912 |
-
// The tick calculation will use the user suplied min/max values to determine
|
1913 |
-
// the ticks. If auto_ticks is false the exact user specifed min and max
|
1914 |
-
// values will be used for the scale.
|
1915 |
-
// If auto_ticks is true then the scale might be slightly adjusted
|
1916 |
-
// so that the min and max values falls on an even major step.
|
1917 |
-
$min = $this->yscale->scale[0];
|
1918 |
-
$max = $this->yscale->scale[1];
|
1919 |
-
$this->yscale->AutoScale($this->img,$min,$max,
|
1920 |
-
$this->img->plotheight/$this->ytick_factor,
|
1921 |
-
$this->yscale->auto_ticks);
|
1922 |
-
|
1923 |
-
// Now make sure we show enough precision to accurate display the
|
1924 |
-
// labels. If this is not done then the user might end up with
|
1925 |
-
// a scale that might actually start with, say 13.5, butdue to rounding
|
1926 |
-
// the scale label will ony show 14.
|
1927 |
-
if( abs(floor($min)-$min) > 0 ) {
|
1928 |
-
|
1929 |
-
// If the user has set a format then we bail out
|
1930 |
-
if( $this->yscale->ticks->label_formatstr == '' && $this->yscale->ticks->label_dateformatstr == '' ) {
|
1931 |
-
$this->yscale->ticks->precision = abs( floor(log10( abs(floor($min)-$min))) )+1;
|
1932 |
-
}
|
1933 |
-
}
|
1934 |
-
}
|
1935 |
-
|
1936 |
-
}
|
1937 |
-
|
1938 |
-
function InitScaleConstants() {
|
1939 |
-
// Setup scale constants
|
1940 |
-
if( $this->yscale ) $this->yscale->InitConstants($this->img);
|
1941 |
-
if( $this->xscale ) $this->xscale->InitConstants($this->img);
|
1942 |
-
if( $this->y2scale ) $this->y2scale->InitConstants($this->img);
|
1943 |
-
|
1944 |
-
$n=count($this->ynscale);
|
1945 |
-
for($i=0; $i < $n; ++$i) {
|
1946 |
-
if( $this->ynscale[$i] ) {
|
1947 |
-
$this->ynscale[$i]->InitConstants($this->img);
|
1948 |
-
}
|
1949 |
-
}
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
function doPrestrokeAdjustments() {
|
1953 |
-
|
1954 |
-
// Do any pre-stroke adjustment that is needed by the different plot types
|
1955 |
-
// (i.e bar plots want's to add an offset to the x-labels etc)
|
1956 |
-
for($i=0; $i < count($this->plots) ; ++$i ) {
|
1957 |
-
$this->plots[$i]->PreStrokeAdjust($this);
|
1958 |
-
$this->plots[$i]->DoLegend($this);
|
1959 |
-
}
|
1960 |
-
|
1961 |
-
// Any plots on the second Y scale?
|
1962 |
-
if( $this->y2scale != null ) {
|
1963 |
-
for($i=0; $i<count($this->y2plots) ; ++$i ) {
|
1964 |
-
$this->y2plots[$i]->PreStrokeAdjust($this);
|
1965 |
-
$this->y2plots[$i]->DoLegend($this);
|
1966 |
-
}
|
1967 |
-
}
|
1968 |
-
|
1969 |
-
// Any plots on the extra Y axises?
|
1970 |
-
$n = count($this->ynaxis);
|
1971 |
-
for($i=0; $i<$n ; ++$i ) {
|
1972 |
-
if( $this->ynplots == null || $this->ynplots[$i] == null) {
|
1973 |
-
JpGraphError::RaiseL(25032,$i);//("No plots for Y-axis nbr:$i");
|
1974 |
-
}
|
1975 |
-
$m = count($this->ynplots[$i]);
|
1976 |
-
for($j=0; $j < $m; ++$j ) {
|
1977 |
-
$this->ynplots[$i][$j]->PreStrokeAdjust($this);
|
1978 |
-
$this->ynplots[$i][$j]->DoLegend($this);
|
1979 |
-
}
|
1980 |
-
}
|
1981 |
-
}
|
1982 |
-
|
1983 |
-
function StrokeBands($aDepth,$aCSIM) {
|
1984 |
-
// Stroke bands
|
1985 |
-
if( $this->bands != null && !$aCSIM) {
|
1986 |
-
for($i=0; $i < count($this->bands); ++$i) {
|
1987 |
-
// Stroke all bands that asks to be in the background
|
1988 |
-
if( $this->bands[$i]->depth == $aDepth ) {
|
1989 |
-
$this->bands[$i]->Stroke($this->img,$this->xscale,$this->yscale);
|
1990 |
-
}
|
1991 |
-
}
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
if( $this->y2bands != null && $this->y2scale != null && !$aCSIM ) {
|
1995 |
-
for($i=0; $i < count($this->y2bands); ++$i) {
|
1996 |
-
// Stroke all bands that asks to be in the foreground
|
1997 |
-
if( $this->y2bands[$i]->depth == $aDepth ) {
|
1998 |
-
$this->y2bands[$i]->Stroke($this->img,$this->xscale,$this->y2scale);
|
1999 |
-
}
|
2000 |
-
}
|
2001 |
-
}
|
2002 |
-
}
|
2003 |
-
|
2004 |
-
|
2005 |
-
// Stroke the graph
|
2006 |
-
// $aStrokeFileName If != "" the image will be written to this file and NOT
|
2007 |
-
// streamed back to the browser
|
2008 |
-
function Stroke($aStrokeFileName='') {
|
2009 |
-
// Fist make a sanity check that user has specified a scale
|
2010 |
-
if( empty($this->yscale) ) {
|
2011 |
-
JpGraphError::RaiseL(25031);//('You must specify what scale to use with a call to Graph::SetScale().');
|
2012 |
-
}
|
2013 |
-
|
2014 |
-
// Start by adjusting the margin so that potential titles will fit.
|
2015 |
-
$this->AdjustMarginsForTitles();
|
2016 |
-
|
2017 |
-
// Give the plot a chance to do any scale adjuments the individual plots
|
2018 |
-
// wants to do. Right now this is only used by the contour plot to set scale
|
2019 |
-
// limits
|
2020 |
-
for($i=0; $i < count($this->plots) ; ++$i ) {
|
2021 |
-
$this->plots[$i]->PreScaleSetup($this);
|
2022 |
-
}
|
2023 |
-
|
2024 |
-
// Init scale constants that are used to calculate the transformation from
|
2025 |
-
// world to pixel coordinates
|
2026 |
-
$this->InitScaleConstants();
|
2027 |
-
|
2028 |
-
// If the filename is the predefined value = '_csim_special_'
|
2029 |
-
// we assume that the call to stroke only needs to do enough
|
2030 |
-
// to correctly generate the CSIM maps.
|
2031 |
-
// We use this variable to skip things we don't strictly need
|
2032 |
-
// to do to generate the image map to improve performance
|
2033 |
-
// a best we can. Therefor you will see a lot of tests !$_csim in the
|
2034 |
-
// code below.
|
2035 |
-
$_csim = ($aStrokeFileName===_CSIM_SPECIALFILE);
|
2036 |
-
|
2037 |
-
// If we are called the second time (perhaps the user has called GetHTMLImageMap()
|
2038 |
-
// himself then the legends have alsready been populated once in order to get the
|
2039 |
-
// CSIM coordinats. Since we do not want the legends to be populated a second time
|
2040 |
-
// we clear the legends
|
2041 |
-
$this->legend->Clear();
|
2042 |
-
|
2043 |
-
// We need to know if we have stroked the plot in the
|
2044 |
-
// GetCSIMareas. Otherwise the CSIM hasn't been generated
|
2045 |
-
// and in the case of GetCSIM called before stroke to generate
|
2046 |
-
// CSIM without storing an image to disk GetCSIM must call Stroke.
|
2047 |
-
$this->iHasStroked = true;
|
2048 |
-
|
2049 |
-
// Setup pre-stroked adjustments and Legends
|
2050 |
-
$this->doPrestrokeAdjustments();
|
2051 |
-
|
2052 |
-
if ($this->graph_theme) {
|
2053 |
-
$this->graph_theme->PreStrokeApply($this);
|
2054 |
-
}
|
2055 |
-
|
2056 |
-
// Bail out if any of the Y-axis not been specified and
|
2057 |
-
// has no plots. (This means it is impossible to do autoscaling and
|
2058 |
-
// no other scale was given so we can't possible draw anything). If you use manual
|
2059 |
-
// scaling you also have to supply the tick steps as well.
|
2060 |
-
if( (!$this->yscale->IsSpecified() && count($this->plots)==0) ||
|
2061 |
-
($this->y2scale!=null && !$this->y2scale->IsSpecified() && count($this->y2plots)==0) ) {
|
2062 |
-
//$e = "n=".count($this->y2plots)."\n";
|
2063 |
-
// $e = "Can't draw unspecified Y-scale.<br>\nYou have either:<br>\n";
|
2064 |
-
// $e .= "1. Specified an Y axis for autoscaling but have not supplied any plots<br>\n";
|
2065 |
-
// $e .= "2. Specified a scale manually but have forgot to specify the tick steps";
|
2066 |
-
JpGraphError::RaiseL(25026);
|
2067 |
-
}
|
2068 |
-
|
2069 |
-
// Bail out if no plots and no specified X-scale
|
2070 |
-
if( (!$this->xscale->IsSpecified() && count($this->plots)==0 && count($this->y2plots)==0) ) {
|
2071 |
-
JpGraphError::RaiseL(25034);//("<strong>JpGraph: Can't draw unspecified X-scale.</strong><br>No plots.<br>");
|
2072 |
-
}
|
2073 |
-
|
2074 |
-
// Autoscale the normal Y-axis
|
2075 |
-
$this->doAutoScaleYAxis();
|
2076 |
-
|
2077 |
-
// Autoscale all additiopnal y-axis
|
2078 |
-
$this->doAutoScaleYnAxis();
|
2079 |
-
|
2080 |
-
// Autoscale the regular x-axis and position the y-axis properly
|
2081 |
-
$this->doAutoScaleXAxis();
|
2082 |
-
|
2083 |
-
// If we have a negative values and x-axis position is at 0
|
2084 |
-
// we need to supress the first and possible the last tick since
|
2085 |
-
// they will be drawn on top of the y-axis (and possible y2 axis)
|
2086 |
-
// The test below might seem strange the reasone being that if
|
2087 |
-
// the user hasn't specified a value for position this will not
|
2088 |
-
// be set until we do the stroke for the axis so as of now it
|
2089 |
-
// is undefined.
|
2090 |
-
// For X-text scale we ignore all this since the tick are usually
|
2091 |
-
// much further in and not close to the Y-axis. Hence the test
|
2092 |
-
// for 'text'
|
2093 |
-
if( ($this->yaxis->pos==$this->xscale->GetMinVal() || (is_string($this->yaxis->pos) && $this->yaxis->pos=='min')) &&
|
2094 |
-
!is_numeric($this->xaxis->pos) && $this->yscale->GetMinVal() < 0 &&
|
2095 |
-
substr($this->axtype,0,4) != 'text' && $this->xaxis->pos != 'min' ) {
|
2096 |
-
|
2097 |
-
//$this->yscale->ticks->SupressZeroLabel(false);
|
2098 |
-
$this->xscale->ticks->SupressFirst();
|
2099 |
-
if( $this->y2axis != null ) {
|
2100 |
-
$this->xscale->ticks->SupressLast();
|
2101 |
-
}
|
2102 |
-
}
|
2103 |
-
elseif( !is_numeric($this->yaxis->pos) && $this->yaxis->pos=='max' ) {
|
2104 |
-
$this->xscale->ticks->SupressLast();
|
2105 |
-
}
|
2106 |
-
|
2107 |
-
if( !$_csim ) {
|
2108 |
-
$this->StrokePlotArea();
|
2109 |
-
if( $this->iIconDepth == DEPTH_BACK ) {
|
2110 |
-
$this->StrokeIcons();
|
2111 |
-
}
|
2112 |
-
}
|
2113 |
-
$this->StrokeAxis(false);
|
2114 |
-
|
2115 |
-
// Stroke colored bands
|
2116 |
-
$this->StrokeBands(DEPTH_BACK,$_csim);
|
2117 |
-
|
2118 |
-
if( $this->grid_depth == DEPTH_BACK && !$_csim) {
|
2119 |
-
$this->ygrid->Stroke();
|
2120 |
-
$this->xgrid->Stroke();
|
2121 |
-
}
|
2122 |
-
|
2123 |
-
// Stroke Y2-axis
|
2124 |
-
if( $this->y2axis != null && !$_csim) {
|
2125 |
-
$this->y2axis->Stroke($this->xscale);
|
2126 |
-
$this->y2grid->Stroke();
|
2127 |
-
}
|
2128 |
-
|
2129 |
-
// Stroke yn-axis
|
2130 |
-
$n = count($this->ynaxis);
|
2131 |
-
for( $i=0; $i < $n; ++$i ) {
|
2132 |
-
$this->ynaxis[$i]->Stroke($this->xscale);
|
2133 |
-
}
|
2134 |
-
|
2135 |
-
$oldoff=$this->xscale->off;
|
2136 |
-
if( substr($this->axtype,0,4) == 'text' ) {
|
2137 |
-
if( $this->text_scale_abscenteroff > -1 ) {
|
2138 |
-
// For a text scale the scale factor is the number of pixel per step.
|
2139 |
-
// Hence we can use the scale factor as a substitute for number of pixels
|
2140 |
-
// per major scale step and use that in order to adjust the offset so that
|
2141 |
-
// an object of width "abscenteroff" becomes centered.
|
2142 |
-
$this->xscale->off += round($this->xscale->scale_factor/2)-round($this->text_scale_abscenteroff/2);
|
2143 |
-
}
|
2144 |
-
else {
|
2145 |
-
$this->xscale->off += ceil($this->xscale->scale_factor*$this->text_scale_off*$this->xscale->ticks->minor_step);
|
2146 |
-
}
|
2147 |
-
}
|
2148 |
-
|
2149 |
-
if( $this->iDoClipping ) {
|
2150 |
-
$oldimage = $this->img->CloneCanvasH();
|
2151 |
-
}
|
2152 |
-
|
2153 |
-
if( ! $this->y2orderback ) {
|
2154 |
-
// Stroke all plots for Y1 axis
|
2155 |
-
for($i=0; $i < count($this->plots); ++$i) {
|
2156 |
-
$this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale);
|
2157 |
-
$this->plots[$i]->StrokeMargin($this->img);
|
2158 |
-
}
|
2159 |
-
}
|
2160 |
-
|
2161 |
-
// Stroke all plots for Y2 axis
|
2162 |
-
if( $this->y2scale != null ) {
|
2163 |
-
for($i=0; $i< count($this->y2plots); ++$i ) {
|
2164 |
-
$this->y2plots[$i]->Stroke($this->img,$this->xscale,$this->y2scale);
|
2165 |
-
}
|
2166 |
-
}
|
2167 |
-
|
2168 |
-
if( $this->y2orderback ) {
|
2169 |
-
// Stroke all plots for Y1 axis
|
2170 |
-
for($i=0; $i < count($this->plots); ++$i) {
|
2171 |
-
$this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale);
|
2172 |
-
$this->plots[$i]->StrokeMargin($this->img);
|
2173 |
-
}
|
2174 |
-
}
|
2175 |
-
|
2176 |
-
$n = count($this->ynaxis);
|
2177 |
-
for( $i=0; $i < $n; ++$i ) {
|
2178 |
-
$m = count($this->ynplots[$i]);
|
2179 |
-
for( $j=0; $j < $m; ++$j ) {
|
2180 |
-
$this->ynplots[$i][$j]->Stroke($this->img,$this->xscale,$this->ynscale[$i]);
|
2181 |
-
$this->ynplots[$i][$j]->StrokeMargin($this->img);
|
2182 |
-
}
|
2183 |
-
}
|
2184 |
-
|
2185 |
-
if( $this->iIconDepth == DEPTH_FRONT) {
|
2186 |
-
$this->StrokeIcons();
|
2187 |
-
}
|
2188 |
-
|
2189 |
-
if( $this->iDoClipping ) {
|
2190 |
-
// Clipping only supports graphs at 0 and 90 degrees
|
2191 |
-
if( $this->img->a == 0 ) {
|
2192 |
-
$this->img->CopyCanvasH($oldimage,$this->img->img,
|
2193 |
-
$this->img->left_margin,$this->img->top_margin,
|
2194 |
-
$this->img->left_margin,$this->img->top_margin,
|
2195 |
-
$this->img->plotwidth+1,$this->img->plotheight);
|
2196 |
-
}
|
2197 |
-
elseif( $this->img->a == 90 ) {
|
2198 |
-
$adj = ($this->img->height - $this->img->width)/2;
|
2199 |
-
$this->img->CopyCanvasH($oldimage,$this->img->img,
|
2200 |
-
$this->img->bottom_margin-$adj,$this->img->left_margin+$adj,
|
2201 |
-
$this->img->bottom_margin-$adj,$this->img->left_margin+$adj,
|
2202 |
-
$this->img->plotheight+1,$this->img->plotwidth);
|
2203 |
-
}
|
2204 |
-
else {
|
2205 |
-
JpGraphError::RaiseL(25035,$this->img->a);//('You have enabled clipping. Cliping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (='.$this->img->a.' degrees) or disable clipping.');
|
2206 |
-
}
|
2207 |
-
$this->img->Destroy();
|
2208 |
-
$this->img->SetCanvasH($oldimage);
|
2209 |
-
}
|
2210 |
-
|
2211 |
-
$this->xscale->off=$oldoff;
|
2212 |
-
|
2213 |
-
if( $this->grid_depth == DEPTH_FRONT && !$_csim ) {
|
2214 |
-
$this->ygrid->Stroke();
|
2215 |
-
$this->xgrid->Stroke();
|
2216 |
-
}
|
2217 |
-
|
2218 |
-
// Stroke colored bands
|
2219 |
-
$this->StrokeBands(DEPTH_FRONT,$_csim);
|
2220 |
-
|
2221 |
-
// Finally draw the axis again since some plots may have nagged
|
2222 |
-
// the axis in the edges.
|
2223 |
-
if( !$_csim ) {
|
2224 |
-
$this->StrokeAxis();
|
2225 |
-
}
|
2226 |
-
|
2227 |
-
if( $this->y2scale != null && !$_csim ) {
|
2228 |
-
$this->y2axis->Stroke($this->xscale,false);
|
2229 |
-
}
|
2230 |
-
|
2231 |
-
if( !$_csim ) {
|
2232 |
-
$this->StrokePlotBox();
|
2233 |
-
}
|
2234 |
-
|
2235 |
-
// The titles and legends never gets rotated so make sure
|
2236 |
-
// that the angle is 0 before stroking them
|
2237 |
-
$aa = $this->img->SetAngle(0);
|
2238 |
-
$this->StrokeTitles();
|
2239 |
-
$this->footer->Stroke($this->img);
|
2240 |
-
$this->legend->Stroke($this->img);
|
2241 |
-
$this->img->SetAngle($aa);
|
2242 |
-
$this->StrokeTexts();
|
2243 |
-
$this->StrokeTables();
|
2244 |
-
|
2245 |
-
if( !$_csim ) {
|
2246 |
-
|
2247 |
-
$this->img->SetAngle($aa);
|
2248 |
-
|
2249 |
-
// Draw an outline around the image map
|
2250 |
-
if(_JPG_DEBUG) {
|
2251 |
-
$this->DisplayClientSideaImageMapAreas();
|
2252 |
-
}
|
2253 |
-
|
2254 |
-
// Should we do any final image transformation
|
2255 |
-
if( $this->iImgTrans ) {
|
2256 |
-
if( !class_exists('ImgTrans',false) ) {
|
2257 |
-
require_once('jpgraph_imgtrans.php');
|
2258 |
-
//JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.');
|
2259 |
-
}
|
2260 |
-
|
2261 |
-
$tform = new ImgTrans($this->img->img);
|
2262 |
-
$this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
|
2263 |
-
$this->iImgTransDirection,$this->iImgTransHighQ,
|
2264 |
-
$this->iImgTransMinSize,$this->iImgTransFillColor,
|
2265 |
-
$this->iImgTransBorder);
|
2266 |
-
}
|
2267 |
-
|
2268 |
-
// If the filename is given as the special "__handle"
|
2269 |
-
// then the image handler is returned and the image is NOT
|
2270 |
-
// streamed back
|
2271 |
-
|
2272 |
-
|
2273 |
-
//if( $aStrokeFileName == _IMG_HANDLER ) {
|
2274 |
-
return $this->img->img;
|
2275 |
-
//}
|
2276 |
-
/* else {
|
2277 |
-
// Finally stream the generated picture
|
2278 |
-
$this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);
|
2279 |
-
} */
|
2280 |
-
}
|
2281 |
-
}
|
2282 |
-
|
2283 |
-
function SetAxisLabelBackground($aType,$aXFColor='lightgray',$aXColor='black',$aYFColor='lightgray',$aYColor='black') {
|
2284 |
-
$this->iAxisLblBgType = $aType;
|
2285 |
-
$this->iXAxisLblBgFillColor = $aXFColor;
|
2286 |
-
$this->iXAxisLblBgColor = $aXColor;
|
2287 |
-
$this->iYAxisLblBgFillColor = $aYFColor;
|
2288 |
-
$this->iYAxisLblBgColor = $aYColor;
|
2289 |
-
}
|
2290 |
-
|
2291 |
-
function StrokeAxisLabelBackground() {
|
2292 |
-
// Types
|
2293 |
-
// 0 = No background
|
2294 |
-
// 1 = Only X-labels, length of axis
|
2295 |
-
// 2 = Only Y-labels, length of axis
|
2296 |
-
// 3 = As 1 but extends to width of graph
|
2297 |
-
// 4 = As 2 but extends to height of graph
|
2298 |
-
// 5 = Combination of 3 & 4
|
2299 |
-
// 6 = Combination of 1 & 2
|
2300 |
-
|
2301 |
-
$t = $this->iAxisLblBgType ;
|
2302 |
-
if( $t < 1 ) return;
|
2303 |
-
|
2304 |
-
// Stroke optional X-axis label background color
|
2305 |
-
if( $t == 1 || $t == 3 || $t == 5 || $t == 6 ) {
|
2306 |
-
$this->img->PushColor($this->iXAxisLblBgFillColor);
|
2307 |
-
if( $t == 1 || $t == 6 ) {
|
2308 |
-
$xl = $this->img->left_margin;
|
2309 |
-
$yu = $this->img->height - $this->img->bottom_margin + 1;
|
2310 |
-
$xr = $this->img->width - $this->img->right_margin ;
|
2311 |
-
$yl = $this->img->height-1-$this->frame_weight;
|
2312 |
-
}
|
2313 |
-
else { // t==3 || t==5
|
2314 |
-
$xl = $this->frame_weight;
|
2315 |
-
$yu = $this->img->height - $this->img->bottom_margin + 1;
|
2316 |
-
$xr = $this->img->width - 1 - $this->frame_weight;
|
2317 |
-
$yl = $this->img->height-1-$this->frame_weight;
|
2318 |
-
}
|
2319 |
-
|
2320 |
-
$this->img->FilledRectangle($xl,$yu,$xr,$yl);
|
2321 |
-
$this->img->PopColor();
|
2322 |
-
|
2323 |
-
// Check if we should add the vertical lines at left and right edge
|
2324 |
-
if( $this->iXAxisLblBgColor !== '' ) {
|
2325 |
-
// Hardcode to one pixel wide
|
2326 |
-
$this->img->SetLineWeight(1);
|
2327 |
-
$this->img->PushColor($this->iXAxisLblBgColor);
|
2328 |
-
if( $t == 1 || $t == 6 ) {
|
2329 |
-
$this->img->Line($xl,$yu,$xl,$yl);
|
2330 |
-
$this->img->Line($xr,$yu,$xr,$yl);
|
2331 |
-
}
|
2332 |
-
else {
|
2333 |
-
$xl = $this->img->width - $this->img->right_margin ;
|
2334 |
-
$this->img->Line($xl,$yu-1,$xr,$yu-1);
|
2335 |
-
}
|
2336 |
-
$this->img->PopColor();
|
2337 |
-
}
|
2338 |
-
}
|
2339 |
-
|
2340 |
-
if( $t == 2 || $t == 4 || $t == 5 || $t == 6 ) {
|
2341 |
-
$this->img->PushColor($this->iYAxisLblBgFillColor);
|
2342 |
-
if( $t == 2 || $t == 6 ) {
|
2343 |
-
$xl = $this->frame_weight;
|
2344 |
-
$yu = $this->frame_weight+$this->img->top_margin;
|
2345 |
-
$xr = $this->img->left_margin - 1;
|
2346 |
-
$yl = $this->img->height - $this->img->bottom_margin + 1;
|
2347 |
-
}
|
2348 |
-
else {
|
2349 |
-
$xl = $this->frame_weight;
|
2350 |
-
$yu = $this->frame_weight;
|
2351 |
-
$xr = $this->img->left_margin - 1;
|
2352 |
-
$yl = $this->img->height-1-$this->frame_weight;
|
2353 |
-
}
|
2354 |
-
|
2355 |
-
$this->img->FilledRectangle($xl,$yu,$xr,$yl);
|
2356 |
-
$this->img->PopColor();
|
2357 |
-
|
2358 |
-
// Check if we should add the vertical lines at left and right edge
|
2359 |
-
if( $this->iXAxisLblBgColor !== '' ) {
|
2360 |
-
$this->img->PushColor($this->iXAxisLblBgColor);
|
2361 |
-
if( $t == 2 || $t == 6 ) {
|
2362 |
-
$this->img->Line($xl,$yu-1,$xr,$yu-1);
|
2363 |
-
$this->img->Line($xl,$yl-1,$xr,$yl-1);
|
2364 |
-
}
|
2365 |
-
else {
|
2366 |
-
$this->img->Line($xr+1,$yu,$xr+1,$this->img->top_margin);
|
2367 |
-
}
|
2368 |
-
$this->img->PopColor();
|
2369 |
-
}
|
2370 |
-
|
2371 |
-
}
|
2372 |
-
}
|
2373 |
-
|
2374 |
-
function StrokeAxis($aStrokeLabels=true) {
|
2375 |
-
|
2376 |
-
if( $aStrokeLabels ) {
|
2377 |
-
$this->StrokeAxisLabelBackground();
|
2378 |
-
}
|
2379 |
-
|
2380 |
-
// Stroke axis
|
2381 |
-
if( $this->iAxisStyle != AXSTYLE_SIMPLE ) {
|
2382 |
-
switch( $this->iAxisStyle ) {
|
2383 |
-
case AXSTYLE_BOXIN :
|
2384 |
-
$toppos = SIDE_DOWN;
|
2385 |
-
$bottompos = SIDE_UP;
|
2386 |
-
$leftpos = SIDE_RIGHT;
|
2387 |
-
$rightpos = SIDE_LEFT;
|
2388 |
-
break;
|
2389 |
-
case AXSTYLE_BOXOUT :
|
2390 |
-
$toppos = SIDE_UP;
|
2391 |
-
$bottompos = SIDE_DOWN;
|
2392 |
-
$leftpos = SIDE_LEFT;
|
2393 |
-
$rightpos = SIDE_RIGHT;
|
2394 |
-
break;
|
2395 |
-
case AXSTYLE_YBOXIN:
|
2396 |
-
$toppos = FALSE;
|
2397 |
-
$bottompos = SIDE_UP;
|
2398 |
-
$leftpos = SIDE_RIGHT;
|
2399 |
-
$rightpos = SIDE_LEFT;
|
2400 |
-
break;
|
2401 |
-
case AXSTYLE_YBOXOUT:
|
2402 |
-
$toppos = FALSE;
|
2403 |
-
$bottompos = SIDE_DOWN;
|
2404 |
-
$leftpos = SIDE_LEFT;
|
2405 |
-
$rightpos = SIDE_RIGHT;
|
2406 |
-
break;
|
2407 |
-
default:
|
2408 |
-
JpGRaphError::RaiseL(25036,$this->iAxisStyle); //('Unknown AxisStyle() : '.$this->iAxisStyle);
|
2409 |
-
break;
|
2410 |
-
}
|
2411 |
-
|
2412 |
-
// By default we hide the first label so it doesn't cross the
|
2413 |
-
// Y-axis in case the positon hasn't been set by the user.
|
2414 |
-
// However, if we use a box we always want the first value
|
2415 |
-
// displayed so we make sure it will be displayed.
|
2416 |
-
$this->xscale->ticks->SupressFirst(false);
|
2417 |
-
|
2418 |
-
// Now draw the bottom X-axis
|
2419 |
-
$this->xaxis->SetPos('min');
|
2420 |
-
$this->xaxis->SetLabelSide(SIDE_DOWN);
|
2421 |
-
$this->xaxis->scale->ticks->SetSide($bottompos);
|
2422 |
-
$this->xaxis->Stroke($this->yscale,$aStrokeLabels);
|
2423 |
-
|
2424 |
-
if( $toppos !== FALSE ) {
|
2425 |
-
// We also want a top X-axis
|
2426 |
-
$this->xaxis = $this->xaxis;
|
2427 |
-
$this->xaxis->SetPos('max');
|
2428 |
-
$this->xaxis->SetLabelSide(SIDE_UP);
|
2429 |
-
// No title for the top X-axis
|
2430 |
-
if( $aStrokeLabels ) {
|
2431 |
-
$this->xaxis->title->Set('');
|
2432 |
-
}
|
2433 |
-
$this->xaxis->scale->ticks->SetSide($toppos);
|
2434 |
-
$this->xaxis->Stroke($this->yscale,$aStrokeLabels);
|
2435 |
-
}
|
2436 |
-
|
2437 |
-
// Stroke the left Y-axis
|
2438 |
-
$this->yaxis->SetPos('min');
|
2439 |
-
$this->yaxis->SetLabelSide(SIDE_LEFT);
|
2440 |
-
$this->yaxis->scale->ticks->SetSide($leftpos);
|
2441 |
-
$this->yaxis->Stroke($this->xscale,$aStrokeLabels);
|
2442 |
-
|
2443 |
-
// Stroke the right Y-axis
|
2444 |
-
$this->yaxis->SetPos('max');
|
2445 |
-
// No title for the right side
|
2446 |
-
if( $aStrokeLabels ) {
|
2447 |
-
$this->yaxis->title->Set('');
|
2448 |
-
}
|
2449 |
-
$this->yaxis->SetLabelSide(SIDE_RIGHT);
|
2450 |
-
$this->yaxis->scale->ticks->SetSide($rightpos);
|
2451 |
-
$this->yaxis->Stroke($this->xscale,$aStrokeLabels);
|
2452 |
-
}
|
2453 |
-
else {
|
2454 |
-
$this->xaxis->Stroke($this->yscale,$aStrokeLabels);
|
2455 |
-
$this->yaxis->Stroke($this->xscale,$aStrokeLabels);
|
2456 |
-
}
|
2457 |
-
}
|
2458 |
-
|
2459 |
-
|
2460 |
-
// Private helper function for backgound image
|
2461 |
-
static function LoadBkgImage($aImgFormat='',$aFile='',$aImgStr='') {
|
2462 |
-
if( $aImgStr != '' ) {
|
2463 |
-
return Image::CreateFromString($aImgStr);
|
2464 |
-
}
|
2465 |
-
|
2466 |
-
// Remove case sensitivity and setup appropriate function to create image
|
2467 |
-
// Get file extension. This should be the LAST '.' separated part of the filename
|
2468 |
-
$e = explode('.',$aFile);
|
2469 |
-
$ext = strtolower($e[count($e)-1]);
|
2470 |
-
if ($ext == "jpeg") {
|
2471 |
-
$ext = "jpg";
|
2472 |
-
}
|
2473 |
-
|
2474 |
-
if( trim($ext) == '' ) {
|
2475 |
-
$ext = 'png'; // Assume PNG if no extension specified
|
2476 |
-
}
|
2477 |
-
|
2478 |
-
if( $aImgFormat == '' ) {
|
2479 |
-
$imgtag = $ext;
|
2480 |
-
}
|
2481 |
-
else {
|
2482 |
-
$imgtag = $aImgFormat;
|
2483 |
-
}
|
2484 |
-
|
2485 |
-
$supported = imagetypes();
|
2486 |
-
if( ( $ext == 'jpg' && !($supported & IMG_JPG) ) ||
|
2487 |
-
( $ext == 'gif' && !($supported & IMG_GIF) ) ||
|
2488 |
-
( $ext == 'png' && !($supported & IMG_PNG) ) ||
|
2489 |
-
( $ext == 'bmp' && !($supported & IMG_WBMP) ) ||
|
2490 |
-
( $ext == 'xpm' && !($supported & IMG_XPM) ) ) {
|
2491 |
-
|
2492 |
-
JpGraphError::RaiseL(25037,$aFile);//('The image format of your background image ('.$aFile.') is not supported in your system configuration. ');
|
2493 |
-
}
|
2494 |
-
|
2495 |
-
|
2496 |
-
if( $imgtag == "jpg" || $imgtag == "jpeg") {
|
2497 |
-
$f = "imagecreatefromjpeg";
|
2498 |
-
$imgtag = "jpg";
|
2499 |
-
}
|
2500 |
-
else {
|
2501 |
-
$f = "imagecreatefrom".$imgtag;
|
2502 |
-
}
|
2503 |
-
|
2504 |
-
// Compare specified image type and file extension
|
2505 |
-
if( $imgtag != $ext ) {
|
2506 |
-
//$t = "Background image seems to be of different type (has different file extension) than specified imagetype. Specified: '".$aImgFormat."'File: '".$aFile."'";
|
2507 |
-
JpGraphError::RaiseL(25038, $aImgFormat, $aFile);
|
2508 |
-
}
|
2509 |
-
|
2510 |
-
$img = @$f($aFile);
|
2511 |
-
if( !$img ) {
|
2512 |
-
JpGraphError::RaiseL(25039,$aFile);//(" Can't read background image: '".$aFile."'");
|
2513 |
-
}
|
2514 |
-
return $img;
|
2515 |
-
}
|
2516 |
-
|
2517 |
-
function StrokePlotGrad() {
|
2518 |
-
if( $this->plot_gradtype < 0 )
|
2519 |
-
return;
|
2520 |
-
|
2521 |
-
$grad = new Gradient($this->img);
|
2522 |
-
$xl = $this->img->left_margin;
|
2523 |
-
$yt = $this->img->top_margin;
|
2524 |
-
$xr = $xl + $this->img->plotwidth+1 ;
|
2525 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|