Version Description
- Fixed the missing create chart button
Download this release
Release Info
Developer | themeisle |
Plugin | WordPress Charts and Graphs Lite |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.2.3 to 1.5.3
- classes/Visualizer/Module.php +144 -144
- classes/Visualizer/Module/Admin.php +422 -358
- classes/Visualizer/Module/Chart.php +599 -513
- classes/Visualizer/Module/Frontend.php +155 -149
- classes/Visualizer/Module/Setup.php +76 -76
- classes/Visualizer/Module/Sources.php +119 -119
- classes/Visualizer/Plugin.php +169 -163
- classes/Visualizer/Render.php +154 -154
- classes/Visualizer/Render/Library.php +170 -170
- classes/Visualizer/Render/Page.php +100 -103
- classes/Visualizer/Render/Page/Data.php +151 -109
- classes/Visualizer/Render/Page/Send.php +57 -57
- classes/Visualizer/Render/Page/Settings.php +84 -84
- classes/Visualizer/Render/Page/Types.php +86 -86
- classes/Visualizer/Render/Page/Update.php +72 -64
- classes/Visualizer/Render/Sidebar.php +547 -547
- classes/Visualizer/Render/Sidebar/Columnar.php +80 -80
- classes/Visualizer/Render/Sidebar/Graph.php +472 -472
- classes/Visualizer/Render/Sidebar/Linear.php +279 -279
- classes/Visualizer/Render/Sidebar/Type/Area.php +152 -152
- classes/Visualizer/Render/Sidebar/Type/Bar.php +76 -76
- classes/Visualizer/Render/Sidebar/Type/Candlestick.php +179 -179
- classes/Visualizer/Render/Sidebar/Type/Column.php +76 -76
- classes/Visualizer/Render/Sidebar/Type/Gauge.php +255 -255
- classes/Visualizer/Render/Sidebar/Type/Geo.php +385 -385
- classes/Visualizer/Render/Sidebar/Type/Line.php +70 -70
- classes/Visualizer/Render/Sidebar/Type/Pie.php +205 -205
- classes/Visualizer/Render/Sidebar/Type/Scatter.php +64 -64
- classes/Visualizer/Render/Templates.php +112 -112
- classes/Visualizer/Source.php +204 -204
- classes/Visualizer/Source/Csv.php +158 -157
- classes/Visualizer/Source/Csv/Remote.php +160 -160
- css/frame.css +704 -426
- css/library.css +144 -144
- css/media.css +151 -151
- humans.txt +11 -11
- images/ajax-loader.gif +0 -0
- images/available_pro.png +0 -0
- images/computer.png +0 -0
- images/from_chart.png +0 -0
- images/star.png +0 -0
- images/view24(2).png +0 -0
- images/web.png +0 -0
- index.php +127 -102
- js/frame.js +124 -104
- js/library.js +94 -94
- js/media.js +58 -58
- js/media/collection.js +18 -18
- js/media/controller.js +18 -18
- js/media/model.js +20 -20
- js/media/toolbar.js +35 -35
- js/media/view.js +503 -503
- js/preview.js +87 -83
- js/render.js +157 -157
- js/visualizer-pointer.js +17 -0
- languages/visualizer-en_US.po +1417 -1417
- readme.txt +163 -139
- samples/area.csv +6 -6
- samples/bar.csv +7 -7
- samples/candlestick.csv +7 -7
- samples/column.csv +8 -8
- samples/gauge.csv +4 -4
- samples/geo.csv +7 -7
- samples/line.csv +15 -15
- samples/pie.csv +6 -6
- samples/scatter.csv +7 -7
classes/Visualizer/Module.php
CHANGED
@@ -1,145 +1,145 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Base class for all modules. Implements routine methods required by all modules.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module {
|
32 |
-
|
33 |
-
/**
|
34 |
-
* The instance of wpdb class.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
*
|
38 |
-
* @access protected
|
39 |
-
* @var wpdb
|
40 |
-
*/
|
41 |
-
protected $_wpdb = null;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* The plugin instance.
|
45 |
-
*
|
46 |
-
* @since 1.0.0
|
47 |
-
*
|
48 |
-
* @access protected
|
49 |
-
* @var Visualizer_Plugin
|
50 |
-
*/
|
51 |
-
protected $_plugin = null;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Constructor.
|
55 |
-
*
|
56 |
-
* @since 1.0.0
|
57 |
-
* @global wpdb $wpdb Current database connection.
|
58 |
-
*
|
59 |
-
* @access public
|
60 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
61 |
-
*/
|
62 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
63 |
-
global $wpdb;
|
64 |
-
|
65 |
-
$this->_wpdb = $wpdb;
|
66 |
-
$this->_plugin = $plugin;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Registers an action hook.
|
71 |
-
*
|
72 |
-
* @since 1.0.0
|
73 |
-
* @uses add_action() To register action hook.
|
74 |
-
*
|
75 |
-
* @access protected
|
76 |
-
* @param string $tag The name of the action to which the $method is hooked.
|
77 |
-
* @param string $method The name of the method to be called.
|
78 |
-
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
|
79 |
-
* @param int $accepted_args optional. The number of arguments the function accept (default 1).
|
80 |
-
* @return Visualizer_Module
|
81 |
-
*/
|
82 |
-
protected function _addAction( $tag, $method, $priority = 10, $accepted_args = 1 ) {
|
83 |
-
add_action( $tag, array( $this, $method ), $priority, $accepted_args );
|
84 |
-
return $this;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Registers AJAX action hook.
|
89 |
-
*
|
90 |
-
* @since 1.0.0
|
91 |
-
*
|
92 |
-
* @access public
|
93 |
-
* @param string $tag The name of the AJAX action to which the $method is hooked.
|
94 |
-
* @param string $method Optional. The name of the method to be called. If the name of the method is not provided, tag name will be used as method name.
|
95 |
-
* @param boolean $private Optional. Determines if we should register hook for logged in users.
|
96 |
-
* @param boolean $public Optional. Determines if we should register hook for not logged in users.
|
97 |
-
* @return Visualizer_Module
|
98 |
-
*/
|
99 |
-
protected function _addAjaxAction( $tag, $method = '', $private = true, $public = false ) {
|
100 |
-
if ( $private ) {
|
101 |
-
$this->_addAction( 'wp_ajax_' . $tag, $method );
|
102 |
-
}
|
103 |
-
|
104 |
-
if ( $public ) {
|
105 |
-
$this->_addAction( 'wp_ajax_nopriv_' . $tag, $method );
|
106 |
-
}
|
107 |
-
|
108 |
-
return $this;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Registers a filter hook.
|
113 |
-
*
|
114 |
-
* @since 1.0.0
|
115 |
-
* @uses add_filter() To register filter hook.
|
116 |
-
*
|
117 |
-
* @access protected
|
118 |
-
* @param string $tag The name of the filter to hook the $method to.
|
119 |
-
* @param type $method The name of the method to be called when the filter is applied.
|
120 |
-
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
|
121 |
-
* @param int $accepted_args optional. The number of arguments the function accept (default 1).
|
122 |
-
* @return Visualizer_Module
|
123 |
-
*/
|
124 |
-
protected function _addFilter( $tag, $method, $priority = 10, $accepted_args = 1 ) {
|
125 |
-
add_filter( $tag, array( $this, $method ), $priority, $accepted_args );
|
126 |
-
return $this;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Registers a hook for shortcode tag.
|
131 |
-
*
|
132 |
-
* @since 1.0.0
|
133 |
-
* @uses add_shortcode() To register shortcode hook.
|
134 |
-
*
|
135 |
-
* @access protected
|
136 |
-
* @param string $tag Shortcode tag to be searched in post content.
|
137 |
-
* @param string $method Hook to run when shortcode is found.
|
138 |
-
* @return Visualizer_Module
|
139 |
-
*/
|
140 |
-
protected function _addShortcode( $tag, $method ) {
|
141 |
-
add_shortcode( $tag, array( $this, $method ) );
|
142 |
-
return $this;
|
143 |
-
}
|
144 |
-
|
145 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Base class for all modules. Implements routine methods required by all modules.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The instance of wpdb class.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
*
|
38 |
+
* @access protected
|
39 |
+
* @var wpdb
|
40 |
+
*/
|
41 |
+
protected $_wpdb = null;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The plugin instance.
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
*
|
48 |
+
* @access protected
|
49 |
+
* @var Visualizer_Plugin
|
50 |
+
*/
|
51 |
+
protected $_plugin = null;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Constructor.
|
55 |
+
*
|
56 |
+
* @since 1.0.0
|
57 |
+
* @global wpdb $wpdb Current database connection.
|
58 |
+
*
|
59 |
+
* @access public
|
60 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
61 |
+
*/
|
62 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
63 |
+
global $wpdb;
|
64 |
+
|
65 |
+
$this->_wpdb = $wpdb;
|
66 |
+
$this->_plugin = $plugin;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Registers an action hook.
|
71 |
+
*
|
72 |
+
* @since 1.0.0
|
73 |
+
* @uses add_action() To register action hook.
|
74 |
+
*
|
75 |
+
* @access protected
|
76 |
+
* @param string $tag The name of the action to which the $method is hooked.
|
77 |
+
* @param string $method The name of the method to be called.
|
78 |
+
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
|
79 |
+
* @param int $accepted_args optional. The number of arguments the function accept (default 1).
|
80 |
+
* @return Visualizer_Module
|
81 |
+
*/
|
82 |
+
protected function _addAction( $tag, $method, $methodClass=NULL, $priority = 10, $accepted_args = 1 ) {
|
83 |
+
add_action( $tag, array( $methodClass ? $methodClass : $this, $method ), $priority, $accepted_args );
|
84 |
+
return $this;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Registers AJAX action hook.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
*
|
92 |
+
* @access public
|
93 |
+
* @param string $tag The name of the AJAX action to which the $method is hooked.
|
94 |
+
* @param string $method Optional. The name of the method to be called. If the name of the method is not provided, tag name will be used as method name.
|
95 |
+
* @param boolean $private Optional. Determines if we should register hook for logged in users.
|
96 |
+
* @param boolean $public Optional. Determines if we should register hook for not logged in users.
|
97 |
+
* @return Visualizer_Module
|
98 |
+
*/
|
99 |
+
protected function _addAjaxAction( $tag, $method = '', $methodClass=NULL, $private = true, $public = false ) {
|
100 |
+
if ( $private ) {
|
101 |
+
$this->_addAction( 'wp_ajax_' . $tag, $method, $methodClass );
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( $public ) {
|
105 |
+
$this->_addAction( 'wp_ajax_nopriv_' . $tag, $method, $methodClass );
|
106 |
+
}
|
107 |
+
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Registers a filter hook.
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
* @uses add_filter() To register filter hook.
|
116 |
+
*
|
117 |
+
* @access protected
|
118 |
+
* @param string $tag The name of the filter to hook the $method to.
|
119 |
+
* @param type $method The name of the method to be called when the filter is applied.
|
120 |
+
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
|
121 |
+
* @param int $accepted_args optional. The number of arguments the function accept (default 1).
|
122 |
+
* @return Visualizer_Module
|
123 |
+
*/
|
124 |
+
protected function _addFilter( $tag, $method, $priority = 10, $accepted_args = 1 ) {
|
125 |
+
add_filter( $tag, array( $this, $method ), $priority, $accepted_args );
|
126 |
+
return $this;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Registers a hook for shortcode tag.
|
131 |
+
*
|
132 |
+
* @since 1.0.0
|
133 |
+
* @uses add_shortcode() To register shortcode hook.
|
134 |
+
*
|
135 |
+
* @access protected
|
136 |
+
* @param string $tag Shortcode tag to be searched in post content.
|
137 |
+
* @param string $method Hook to run when shortcode is found.
|
138 |
+
* @return Visualizer_Module
|
139 |
+
*/
|
140 |
+
protected function _addShortcode( $tag, $method ) {
|
141 |
+
add_shortcode( $tag, array( $this, $method ) );
|
142 |
+
return $this;
|
143 |
+
}
|
144 |
+
|
145 |
}
|
classes/Visualizer/Module/Admin.php
CHANGED
@@ -1,359 +1,423 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* The module for all admin stuff.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module_Admin extends Visualizer_Module {
|
32 |
-
|
33 |
-
const NAME = __CLASS__;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Library page suffix.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access private
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
private $_libraryPage;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructor.
|
47 |
-
*
|
48 |
-
* @since 1.0.0
|
49 |
-
*
|
50 |
-
* @access public
|
51 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
-
*/
|
53 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
-
parent::__construct( $plugin );
|
55 |
-
|
56 |
-
$this->_addAction( 'load-post.php', 'enqueueMediaScripts' );
|
57 |
-
$this->_addAction( 'load-post-new.php', 'enqueueMediaScripts' );
|
58 |
-
$this->_addAction( 'admin_footer', 'renderTempaltes' );
|
59 |
-
$this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts' );
|
60 |
-
$this->_addAction( 'admin_menu', 'registerAdminMenu' );
|
61 |
-
|
62 |
-
$this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
|
63 |
-
$this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
|
64 |
-
$this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
*
|
70 |
-
*
|
71 |
-
*
|
72 |
-
*
|
73 |
-
* @
|
74 |
-
* @
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
'
|
80 |
-
'
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
*
|
93 |
-
*
|
94 |
-
* @since 1.0.0
|
95 |
-
*
|
96 |
-
* @
|
97 |
-
*
|
98 |
-
* @
|
99 |
-
*/
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
*
|
118 |
-
*
|
119 |
-
* @
|
120 |
-
*
|
121 |
-
*
|
122 |
-
* @
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
),
|
131 |
-
'
|
132 |
-
|
133 |
-
),
|
134 |
-
'
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
*
|
174 |
-
*
|
175 |
-
* @
|
176 |
-
* @
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
*
|
193 |
-
*
|
194 |
-
* @since 1.0.0
|
195 |
-
*
|
196 |
-
* @
|
197 |
-
* @
|
198 |
-
*
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
//
|
227 |
-
$
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
'
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
//
|
291 |
-
$
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
'
|
301 |
-
'
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
);
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The module for all admin stuff.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module_Admin extends Visualizer_Module {
|
32 |
+
|
33 |
+
const NAME = __CLASS__;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Library page suffix.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access private
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
private $_libraryPage;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor.
|
47 |
+
*
|
48 |
+
* @since 1.0.0
|
49 |
+
*
|
50 |
+
* @access public
|
51 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
+
*/
|
53 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
+
parent::__construct( $plugin );
|
55 |
+
|
56 |
+
$this->_addAction( 'load-post.php', 'enqueueMediaScripts' );
|
57 |
+
$this->_addAction( 'load-post-new.php', 'enqueueMediaScripts' );
|
58 |
+
$this->_addAction( 'admin_footer', 'renderTempaltes' );
|
59 |
+
$this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts' );
|
60 |
+
$this->_addAction( 'admin_menu', 'registerAdminMenu' );
|
61 |
+
|
62 |
+
$this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
|
63 |
+
$this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
|
64 |
+
$this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
|
65 |
+
$this->_addFilter( 'visualizer_admin_pointers', 'visualizerAdminPointers', 10, 2 );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Returns wp pointers for visualizer
|
70 |
+
*
|
71 |
+
* @since 1.5
|
72 |
+
*
|
73 |
+
* @static
|
74 |
+
* @access private
|
75 |
+
* @return array The associated array of pointer
|
76 |
+
*/
|
77 |
+
function visualizerAdminPointers( $p ) {
|
78 |
+
$p['visualizer'] = array(
|
79 |
+
'target' => '#menu-media',
|
80 |
+
'options' => array(
|
81 |
+
'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
|
82 |
+
__( 'Visualizer New Features ' , Visualizer_Plugin::NAME),
|
83 |
+
__( 'Right now the Visualizer Charts and Graphics plugin integrates a live editor and a new importing option for your charts. ',Visualizer_Plugin::NAME)
|
84 |
+
),
|
85 |
+
'position' => array( 'edge' => 'top', 'align' => 'middle' )
|
86 |
+
)
|
87 |
+
);
|
88 |
+
return $p;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Returns associated array of chart types and localized names.
|
93 |
+
*
|
94 |
+
* @since 1.0.0
|
95 |
+
*
|
96 |
+
* @static
|
97 |
+
* @access private
|
98 |
+
* @return array The associated array of chart types with localized names.
|
99 |
+
*/
|
100 |
+
private static function _getChartTypesLocalized() {
|
101 |
+
return array(
|
102 |
+
'all' => esc_html__( 'All', Visualizer_Plugin::NAME ),
|
103 |
+
'pie' => esc_html__( 'Pie', Visualizer_Plugin::NAME ),
|
104 |
+
'line' => esc_html__( 'Line', Visualizer_Plugin::NAME ),
|
105 |
+
'area' => esc_html__( 'Area', Visualizer_Plugin::NAME ),
|
106 |
+
'geo' => esc_html__( 'Geo', Visualizer_Plugin::NAME ),
|
107 |
+
'bar' => esc_html__( 'Bar', Visualizer_Plugin::NAME ),
|
108 |
+
'column' => esc_html__( 'Column', Visualizer_Plugin::NAME ),
|
109 |
+
'gauge' => esc_html__( 'Gauge', Visualizer_Plugin::NAME ),
|
110 |
+
'scatter' => esc_html__( 'Scatter', Visualizer_Plugin::NAME ),
|
111 |
+
'candlestick' => esc_html__( 'Candelstick', Visualizer_Plugin::NAME ),
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Enqueues media scripts and styles.
|
117 |
+
*
|
118 |
+
* @since 1.0.0
|
119 |
+
* @uses wp_enqueue_style To enqueue style file.
|
120 |
+
* @uses wp_enqueue_script To enqueue script file.
|
121 |
+
*
|
122 |
+
* @access public
|
123 |
+
*/
|
124 |
+
public function enqueueMediaScripts() {
|
125 |
+
global $typenow;
|
126 |
+
|
127 |
+
if ( post_type_supports( $typenow, 'editor' ) ) {
|
128 |
+
wp_enqueue_style( 'visualizer-media', VISUALIZER_ABSURL . 'css/media.css', array( 'media-views' ), Visualizer_Plugin::VERSION );
|
129 |
+
|
130 |
+
wp_enqueue_script( 'visualizer-google-jsapi', '//www.google.com/jsapi', array( 'media-editor' ), null, true );
|
131 |
+
wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', array( 'visualizer-google-jsapi' ), Visualizer_Plugin::VERSION, true );
|
132 |
+
wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true );
|
133 |
+
wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
|
134 |
+
wp_enqueue_script( 'visualizer-media-view', VISUALIZER_ABSURL . 'js/media/view.js', array( 'visualizer-media-controller' ), Visualizer_Plugin::VERSION, true );
|
135 |
+
wp_enqueue_script( 'visualizer-media-toolbar', VISUALIZER_ABSURL . 'js/media/toolbar.js', array( 'visualizer-media-view' ), Visualizer_Plugin::VERSION, true );
|
136 |
+
wp_enqueue_script( 'visualizer-media', VISUALIZER_ABSURL . 'js/media.js', array( 'visualizer-media-toolbar' ), Visualizer_Plugin::VERSION, true );
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Extends media view strings with visualizer strings.
|
142 |
+
*
|
143 |
+
* @since 1.0.0
|
144 |
+
*
|
145 |
+
* @access public
|
146 |
+
* @param array $strings The array of media view strings.
|
147 |
+
* @return array The extended array of media view strings.
|
148 |
+
*/
|
149 |
+
public function setupMediaViewStrings( $strings ) {
|
150 |
+
$strings['visualizer'] = array(
|
151 |
+
'actions' => array(
|
152 |
+
'get_charts' => Visualizer_Plugin::ACTION_GET_CHARTS,
|
153 |
+
'delete_chart' => Visualizer_Plugin::ACTION_DELETE_CHART,
|
154 |
+
),
|
155 |
+
'controller' => array(
|
156 |
+
'title' => esc_html__( 'Visualizations', Visualizer_Plugin::NAME ),
|
157 |
+
),
|
158 |
+
'routers' => array(
|
159 |
+
'library' => esc_html__( 'From Library', Visualizer_Plugin::NAME ),
|
160 |
+
'create' => esc_html__( 'Create New', Visualizer_Plugin::NAME ),
|
161 |
+
),
|
162 |
+
'library' => array(
|
163 |
+
'filters' => self::_getChartTypesLocalized(),
|
164 |
+
),
|
165 |
+
'nonce' => wp_create_nonce(),
|
166 |
+
'buildurl' => add_query_arg( 'action', Visualizer_Plugin::ACTION_CREATE_CHART, admin_url( 'admin-ajax.php' ) ),
|
167 |
+
);
|
168 |
+
|
169 |
+
return $strings;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Renders templates to use in media popup.
|
174 |
+
*
|
175 |
+
* @since 1.0.0
|
176 |
+
* @global string $pagenow The name of the current page.
|
177 |
+
*
|
178 |
+
* @access public
|
179 |
+
*/
|
180 |
+
public function renderTempaltes() {
|
181 |
+
global $pagenow;
|
182 |
+
|
183 |
+
if ( 'post.php' != $pagenow && 'post-new.php' != $pagenow ) {
|
184 |
+
return;
|
185 |
+
}
|
186 |
+
|
187 |
+
$render = new Visualizer_Render_Templates();
|
188 |
+
$render->render();
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Enqueues library scripts and styles.
|
193 |
+
*
|
194 |
+
* @since 1.0.0
|
195 |
+
* @uses wp_enqueue_style() To enqueue library stylesheet.
|
196 |
+
* @uses wp_enqueue_script() To enqueue javascript file.
|
197 |
+
* @uses wp_enqueue_media() To enqueue media stuff.
|
198 |
+
*
|
199 |
+
* @access public
|
200 |
+
* @param string $suffix The current page suffix.
|
201 |
+
*/
|
202 |
+
public function enqueueLibraryScripts( $suffix ) {
|
203 |
+
if ( $suffix == $this->_libraryPage ) {
|
204 |
+
wp_enqueue_style( 'visualizer-library', VISUALIZER_ABSURL . 'css/library.css', array(), Visualizer_Plugin::VERSION );
|
205 |
+
|
206 |
+
$this->_addFilter( 'media_upload_tabs', 'setupVisualizerTab' );
|
207 |
+
|
208 |
+
wp_enqueue_media();
|
209 |
+
wp_enqueue_script( 'visualizer-library', VISUALIZER_ABSURL . 'js/library.js', array( 'jquery', 'media-views' ), Visualizer_Plugin::VERSION, true );
|
210 |
+
wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array(), null, true );
|
211 |
+
wp_enqueue_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi', 'visualizer-library' ), Visualizer_Plugin::VERSION, true );
|
212 |
+
}
|
213 |
+
if ( get_bloginfo( 'version' ) < '3.3' )
|
214 |
+
return;
|
215 |
+
|
216 |
+
|
217 |
+
// Get pointers for this screen
|
218 |
+
$pointers = apply_filters( 'visualizer_admin_pointers', array() );
|
219 |
+
|
220 |
+
if ( ! $pointers || ! is_array( $pointers ) )
|
221 |
+
return;
|
222 |
+
|
223 |
+
// Get dismissed pointers
|
224 |
+
$dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
|
225 |
+
$valid_pointers =array();
|
226 |
+
// Check pointers and remove dismissed ones.
|
227 |
+
foreach ( $pointers as $pointer_id => $pointer ) {
|
228 |
+
|
229 |
+
// Sanity check
|
230 |
+
if ( in_array( $pointer_id, $dismissed ) || empty( $pointer ) || empty( $pointer_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) )
|
231 |
+
continue;
|
232 |
+
|
233 |
+
$pointer['pointer_id'] = $pointer_id;
|
234 |
+
|
235 |
+
// Add the pointer to $valid_pointers array
|
236 |
+
$valid_pointers['pointers'][] = $pointer;
|
237 |
+
}
|
238 |
+
|
239 |
+
// No valid pointers? Stop here.
|
240 |
+
if ( empty( $valid_pointers ) )
|
241 |
+
return;
|
242 |
+
|
243 |
+
// Add pointers style to queue.
|
244 |
+
wp_enqueue_style( 'wp-pointer' );
|
245 |
+
// Add pointers script to queue. Add custom script.
|
246 |
+
wp_enqueue_script( 'visualizer-pointer', VISUALIZER_ABSURL."js/visualizer-pointer.js", array( 'wp-pointer' ),Visualizer_Plugin::VERSION );
|
247 |
+
|
248 |
+
// Add pointer options to script.
|
249 |
+
wp_localize_script( 'visualizer-pointer', 'visualizer', $valid_pointers );
|
250 |
+
|
251 |
+
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Adds visualizer tab for media upload tabs array.
|
257 |
+
*
|
258 |
+
* @since 1.0.0
|
259 |
+
*
|
260 |
+
* @access public
|
261 |
+
* @param array $tabs The array of media upload tabs.
|
262 |
+
* @return array Extended array of media upload tabs.
|
263 |
+
*/
|
264 |
+
public function setupVisualizerTab( $tabs ) {
|
265 |
+
$tabs['visualizer'] = 'Visualizer';
|
266 |
+
return $tabs;
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Registers admin menu for visualizer library.
|
271 |
+
*
|
272 |
+
* @since 1.0.0
|
273 |
+
*
|
274 |
+
* @access public
|
275 |
+
*/
|
276 |
+
public function registerAdminMenu() {
|
277 |
+
$title = esc_html__( 'Visualizer Library', Visualizer_Plugin::NAME );
|
278 |
+
$callback = array( $this, 'renderLibraryPage' );
|
279 |
+
$this->_libraryPage = add_submenu_page( 'upload.php', $title, $title, 'edit_posts', Visualizer_Plugin::NAME, $callback );
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Renders visualizer library page.
|
284 |
+
*
|
285 |
+
* @since 1.0.0
|
286 |
+
*
|
287 |
+
* @access public
|
288 |
+
*/
|
289 |
+
public function renderLibraryPage() {
|
290 |
+
// get current page
|
291 |
+
$page = filter_input( INPUT_GET, 'vpage', FILTER_VALIDATE_INT, array(
|
292 |
+
'options' => array(
|
293 |
+
'min_range' => 1,
|
294 |
+
'default' => 1,
|
295 |
+
)
|
296 |
+
) );
|
297 |
+
|
298 |
+
// the initial query arguments to fetch charts
|
299 |
+
$query_args = array(
|
300 |
+
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
301 |
+
'posts_per_page' => 6,
|
302 |
+
'paged' => $page,
|
303 |
+
);
|
304 |
+
|
305 |
+
// add chart type filter to the query arguments
|
306 |
+
$filter = filter_input( INPUT_GET, 'type' );
|
307 |
+
if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
|
308 |
+
$query_args['meta_query'] = array(
|
309 |
+
array(
|
310 |
+
'key' => Visualizer_Plugin::CF_CHART_TYPE,
|
311 |
+
'value' => $filter,
|
312 |
+
'compare' => '=',
|
313 |
+
),
|
314 |
+
);
|
315 |
+
} else {
|
316 |
+
$filter = 'all';
|
317 |
+
}
|
318 |
+
|
319 |
+
// fetch charts
|
320 |
+
$charts = array();
|
321 |
+
$query = new WP_Query( $query_args );
|
322 |
+
while( $query->have_posts() ) {
|
323 |
+
$chart = $query->next_post();
|
324 |
+
|
325 |
+
// fetch and update settings
|
326 |
+
$settings = get_post_meta( $chart->ID, Visualizer_Plugin::CF_SETTINGS, true );
|
327 |
+
unset( $settings['height'], $settings['width'] );
|
328 |
+
|
329 |
+
$type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
|
330 |
+
$series = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_SERIES, get_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, true ), $chart->ID, $type );
|
331 |
+
$data = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, unserialize( $chart->post_content ), $chart->ID, $type );
|
332 |
+
|
333 |
+
// add chart to the array
|
334 |
+
$charts['visualizer-' . $chart->ID] = array(
|
335 |
+
'id' => $chart->ID,
|
336 |
+
'type' => $type,
|
337 |
+
'series' => $series,
|
338 |
+
'settings' => $settings,
|
339 |
+
'data' => $data,
|
340 |
+
);
|
341 |
+
}
|
342 |
+
|
343 |
+
// enqueue charts array
|
344 |
+
$ajaxurl = admin_url( 'admin-ajax.php' );
|
345 |
+
wp_localize_script( 'visualizer-library', 'visualizer', array(
|
346 |
+
'charts' => $charts,
|
347 |
+
'urls' => array(
|
348 |
+
'base' => add_query_arg( 'vpage', false ),
|
349 |
+
'create' => add_query_arg( array( 'action' => Visualizer_Plugin::ACTION_CREATE_CHART, 'library' => 'yes' ), $ajaxurl ),
|
350 |
+
'edit' => add_query_arg( array( 'action' => Visualizer_Plugin::ACTION_EDIT_CHART, 'library' => 'yes' ), $ajaxurl ),
|
351 |
+
),
|
352 |
+
) );
|
353 |
+
|
354 |
+
// render library page
|
355 |
+
$render = new Visualizer_Render_Library();
|
356 |
+
|
357 |
+
$render->charts = $charts;
|
358 |
+
$render->type = $filter;
|
359 |
+
$render->types = self::_getChartTypesLocalized();
|
360 |
+
$render->pagination = paginate_links( array(
|
361 |
+
'base' => add_query_arg( 'vpage', '%#%' ),
|
362 |
+
'format' => '',
|
363 |
+
'current' => $page,
|
364 |
+
'total' => $query->max_num_pages,
|
365 |
+
'type' => 'array',
|
366 |
+
) );
|
367 |
+
|
368 |
+
$render->render();
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Updates the plugin's action links, which will be rendered at the plugins table.
|
373 |
+
*
|
374 |
+
* @since 1.0.0
|
375 |
+
*
|
376 |
+
* @access public
|
377 |
+
* @param array $links The array of original action links.
|
378 |
+
* @param string $file The plugin basename.
|
379 |
+
* @return array Updated array of action links.
|
380 |
+
*/
|
381 |
+
public function getPluginActionLinks( $links, $file ) {
|
382 |
+
if ( $file == plugin_basename( VISUALIZER_BASEFILE ) ) {
|
383 |
+
array_unshift(
|
384 |
+
$links,
|
385 |
+
sprintf(
|
386 |
+
'<a href="%s">%s</a>',
|
387 |
+
admin_url( 'upload.php?page=' . Visualizer_Plugin::NAME ),
|
388 |
+
esc_html__( 'Library', Visualizer_Plugin::NAME )
|
389 |
+
)
|
390 |
+
);
|
391 |
+
}
|
392 |
+
|
393 |
+
return $links;
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Updates the plugin's meta links, which will be rendered at the plugins table.
|
398 |
+
*
|
399 |
+
* @since 1.0.0
|
400 |
+
*
|
401 |
+
* @access public
|
402 |
+
* @param array $plugin_meta The array of a plugin meta links.
|
403 |
+
* @param string $plugin_file The plugin's basename.
|
404 |
+
* @return array Updated array of plugin meta links.
|
405 |
+
*/
|
406 |
+
public function getPluginMetaLinks( $plugin_meta, $plugin_file ) {
|
407 |
+
if ( $plugin_file == plugin_basename( VISUALIZER_BASEFILE ) ) {
|
408 |
+
// knowledge base link
|
409 |
+
$plugin_meta[] = sprintf(
|
410 |
+
'<a href="https://github.com/codeinwp/visualizer/wiki" target="_blank">%s</a>',
|
411 |
+
esc_html__( 'Knowledge Base', Visualizer_Plugin::NAME )
|
412 |
+
);
|
413 |
+
// flattr link
|
414 |
+
$plugin_meta[] = sprintf(
|
415 |
+
'<a style="color:red" href="https://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/" target="_blank">%s</a>',
|
416 |
+
esc_html__( 'Pro Addon', Visualizer_Plugin::NAME )
|
417 |
+
);
|
418 |
+
}
|
419 |
+
|
420 |
+
return $plugin_meta;
|
421 |
+
}
|
422 |
+
|
423 |
}
|
classes/Visualizer/Module/Chart.php
CHANGED
@@ -1,514 +1,600 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* The module for all stuff related to getting, editing, creating and deleting charts.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module_Chart extends Visualizer_Module {
|
32 |
-
|
33 |
-
const NAME = __CLASS__;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The chart object.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access private
|
41 |
-
* @var WP_Post
|
42 |
-
*/
|
43 |
-
private $_chart;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructor.
|
47 |
-
*
|
48 |
-
* @since 1.0.0
|
49 |
-
*
|
50 |
-
* @access public
|
51 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
-
*/
|
53 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
-
parent::__construct( $plugin );
|
55 |
-
|
56 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_GET_CHARTS, 'getCharts' );
|
57 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_DELETE_CHART, 'deleteChart' );
|
58 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_CREATE_CHART, 'renderChartPages' );
|
59 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_EDIT_CHART, 'renderChartPages' );
|
60 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_UPLOAD_DATA, 'uploadData' );
|
61 |
-
$this->_addAjaxAction( Visualizer_Plugin::ACTION_CLONE_CHART, 'cloneChart' );
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
);
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
'
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
$
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
$render
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
$
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
'
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
$
|
379 |
-
if (
|
380 |
-
$
|
381 |
-
|
382 |
-
|
383 |
-
}
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
$
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
$render->
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
$
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The module for all stuff related to getting, editing, creating and deleting charts.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module_Chart extends Visualizer_Module {
|
32 |
+
|
33 |
+
const NAME = __CLASS__;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The chart object.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access private
|
41 |
+
* @var WP_Post
|
42 |
+
*/
|
43 |
+
private $_chart;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor.
|
47 |
+
*
|
48 |
+
* @since 1.0.0
|
49 |
+
*
|
50 |
+
* @access public
|
51 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
+
*/
|
53 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
+
parent::__construct( $plugin );
|
55 |
+
|
56 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_GET_CHARTS, 'getCharts' );
|
57 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_DELETE_CHART, 'deleteChart' );
|
58 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_CREATE_CHART, 'renderChartPages' );
|
59 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_EDIT_CHART, 'renderChartPages' );
|
60 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_UPLOAD_DATA, 'uploadData' );
|
61 |
+
$this->_addAjaxAction( Visualizer_Plugin::ACTION_CLONE_CHART, 'cloneChart' );
|
62 |
+
|
63 |
+
// Added by Ash/Upwork
|
64 |
+
if( defined( 'Visualizer_Pro' ) ){
|
65 |
+
global $Visualizer_Pro;
|
66 |
+
list($action, $name, $class) = $Visualizer_Pro->_getAjaxAction($this);
|
67 |
+
$this->_addAjaxAction($action, $name, $class);
|
68 |
+
}
|
69 |
+
// Added by Ash/Upwork
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Sends json response.
|
75 |
+
*
|
76 |
+
* @since 1.0.0
|
77 |
+
*
|
78 |
+
* @access private
|
79 |
+
* @param array $results The response array.
|
80 |
+
*/
|
81 |
+
public function _sendResponse( $results ) {
|
82 |
+
header( 'Content-type: application/json' );
|
83 |
+
nocache_headers();
|
84 |
+
|
85 |
+
echo json_encode( $results );
|
86 |
+
exit;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Returns chart data required for rendering.
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
*
|
94 |
+
* @access private
|
95 |
+
* @param WP_Post $chart The chart object.
|
96 |
+
* @return array The array of chart data.
|
97 |
+
*/
|
98 |
+
private function _getChartArray( WP_Post $chart = null ) {
|
99 |
+
if ( is_null( $chart ) ) {
|
100 |
+
$chart = $this->_chart;
|
101 |
+
}
|
102 |
+
|
103 |
+
$type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
|
104 |
+
$series = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_SERIES, get_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, true ), $chart->ID, $type );
|
105 |
+
$data = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, unserialize( $chart->post_content ), $chart->ID, $type );
|
106 |
+
|
107 |
+
return array(
|
108 |
+
'type' => $type,
|
109 |
+
'series' => $series,
|
110 |
+
'settings' => get_post_meta( $chart->ID, Visualizer_Plugin::CF_SETTINGS, true ),
|
111 |
+
'data' => $data,
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Fetches charts from database.
|
117 |
+
*
|
118 |
+
* @since 1.0.0
|
119 |
+
*
|
120 |
+
* @access public
|
121 |
+
*/
|
122 |
+
public function getCharts() {
|
123 |
+
$query_args = array(
|
124 |
+
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
125 |
+
'posts_per_page' => 9,
|
126 |
+
'paged' => filter_input( INPUT_GET, 'page', FILTER_VALIDATE_INT, array(
|
127 |
+
'options' => array(
|
128 |
+
'min_range' => 1,
|
129 |
+
'default' => 1,
|
130 |
+
)
|
131 |
+
) )
|
132 |
+
);
|
133 |
+
|
134 |
+
$filter = filter_input( INPUT_GET, 'filter' );
|
135 |
+
if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
|
136 |
+
$query_args['meta_query'] = array(
|
137 |
+
array(
|
138 |
+
'key' => Visualizer_Plugin::CF_CHART_TYPE,
|
139 |
+
'value' => $filter,
|
140 |
+
'compare' => '=',
|
141 |
+
),
|
142 |
+
);
|
143 |
+
}
|
144 |
+
|
145 |
+
$query = new WP_Query( $query_args );
|
146 |
+
|
147 |
+
$charts = array();
|
148 |
+
while( $query->have_posts() ) {
|
149 |
+
$chart = $query->next_post();
|
150 |
+
|
151 |
+
$chart_data = $this->_getChartArray( $chart );
|
152 |
+
$chart_data['id'] = $chart->ID;
|
153 |
+
|
154 |
+
$charts[] = $chart_data;
|
155 |
+
}
|
156 |
+
|
157 |
+
$this->_sendResponse( array(
|
158 |
+
'success' => true,
|
159 |
+
'data' => $charts,
|
160 |
+
'total' => $query->max_num_pages,
|
161 |
+
) );
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Deletes a chart from database.
|
166 |
+
*
|
167 |
+
* @since 1.0.0
|
168 |
+
* @uses wp_delete_post() To delete a chart.
|
169 |
+
*
|
170 |
+
* @access public
|
171 |
+
*/
|
172 |
+
public function deleteChart() {
|
173 |
+
$is_post = $_SERVER['REQUEST_METHOD'] == 'POST';
|
174 |
+
$input_method = $is_post ? INPUT_POST : INPUT_GET;
|
175 |
+
|
176 |
+
$chart_id = $success = false;
|
177 |
+
$nonce = wp_verify_nonce( filter_input( $input_method, 'nonce' ) );
|
178 |
+
$capable = current_user_can( 'delete_posts' );
|
179 |
+
if ( $nonce && $capable ) {
|
180 |
+
$chart_id = filter_input( $input_method, 'chart', FILTER_VALIDATE_INT, array( 'options' => array( 'min_range' => 1 ) ) );
|
181 |
+
if ( $chart_id ) {
|
182 |
+
$chart = get_post( $chart_id );
|
183 |
+
$success = $chart && $chart->post_type == Visualizer_Plugin::CPT_VISUALIZER;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( $success ) {
|
188 |
+
wp_delete_post( $chart_id, true );
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( $is_post ) {
|
192 |
+
$this->_sendResponse( array( 'success' => $success ) );
|
193 |
+
}
|
194 |
+
|
195 |
+
wp_redirect( wp_get_referer() );
|
196 |
+
exit;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Renders appropriate page for chart builder. Creates new auto draft chart
|
201 |
+
* if no chart has been specified.
|
202 |
+
*
|
203 |
+
* @since 1.0.0
|
204 |
+
*
|
205 |
+
* @access public
|
206 |
+
*/
|
207 |
+
public function renderChartPages() {
|
208 |
+
define ( 'IFRAME_REQUEST', 1 );
|
209 |
+
|
210 |
+
// check chart, if chart not exists, will create new one and redirects to the same page with proper chart id
|
211 |
+
$chart_id = filter_input( INPUT_GET, 'chart', FILTER_VALIDATE_INT );
|
212 |
+
if ( !$chart_id || !( $chart = get_post( $chart_id ) ) || $chart->post_type != Visualizer_Plugin::CPT_VISUALIZER ) {
|
213 |
+
$default_type = 'line';
|
214 |
+
|
215 |
+
$source = new Visualizer_Source_Csv( VISUALIZER_ABSPATH . DIRECTORY_SEPARATOR . 'samples' . DIRECTORY_SEPARATOR . $default_type . '.csv' );
|
216 |
+
$source->fetch();
|
217 |
+
|
218 |
+
$chart_id = wp_insert_post( array(
|
219 |
+
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
220 |
+
'post_title' => 'Visualization',
|
221 |
+
'post_author' => get_current_user_id(),
|
222 |
+
'post_status' => 'auto-draft',
|
223 |
+
'post_content' => $source->getData(),
|
224 |
+
) );
|
225 |
+
|
226 |
+
if ( $chart_id && !is_wp_error( $chart_id ) ) {
|
227 |
+
add_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, $default_type );
|
228 |
+
add_post_meta( $chart_id, Visualizer_Plugin::CF_DEFAULT_DATA, 1 );
|
229 |
+
add_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
230 |
+
add_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
231 |
+
add_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS, array() );
|
232 |
+
}
|
233 |
+
|
234 |
+
wp_redirect( add_query_arg( 'chart', (int)$chart_id ) );
|
235 |
+
exit;
|
236 |
+
}
|
237 |
+
|
238 |
+
// enqueue and register scripts and styles
|
239 |
+
wp_register_style( 'visualizer-frame', VISUALIZER_ABSURL . 'css/frame.css', array(), Visualizer_Plugin::VERSION );
|
240 |
+
|
241 |
+
wp_register_script( 'visualizer-frame', VISUALIZER_ABSURL . 'js/frame.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true );
|
242 |
+
wp_register_script( 'google-jsapi', '//www.google.com/jsapi', array(), null, true );
|
243 |
+
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi', 'visualizer-frame' ), Visualizer_Plugin::VERSION, true );
|
244 |
+
wp_register_script( 'visualizer-preview', VISUALIZER_ABSURL . 'js/preview.js', array( 'wp-color-picker', 'visualizer-render' ), Visualizer_Plugin::VERSION, true );
|
245 |
+
|
246 |
+
// added by Ash/Upwork
|
247 |
+
if( defined( 'Visualizer_Pro' ) ){
|
248 |
+
global $Visualizer_Pro;
|
249 |
+
$Visualizer_Pro->_addScriptsAndStyles();
|
250 |
+
}
|
251 |
+
|
252 |
+
// dispatch pages
|
253 |
+
$this->_chart = $chart;
|
254 |
+
switch ( filter_input( INPUT_GET, 'tab' ) ) {
|
255 |
+
case 'settings':
|
256 |
+
// changed by Ash/Upwork
|
257 |
+
$this->_handleDataAndSettingsPage();
|
258 |
+
break;
|
259 |
+
case 'type':
|
260 |
+
default:
|
261 |
+
$this->_handleTypesPage();
|
262 |
+
break;
|
263 |
+
}
|
264 |
+
|
265 |
+
exit;
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Handles chart type selection page.
|
270 |
+
*
|
271 |
+
* @since 1.0.0
|
272 |
+
*
|
273 |
+
* @access private
|
274 |
+
*/
|
275 |
+
private function _handleTypesPage() {
|
276 |
+
// process post request
|
277 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ) ) ) {
|
278 |
+
$type = filter_input( INPUT_POST, 'type' );
|
279 |
+
if ( in_array( $type, Visualizer_Plugin::getChartTypes() ) ) {
|
280 |
+
// save new chart type
|
281 |
+
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_CHART_TYPE, $type );
|
282 |
+
|
283 |
+
// if the chart has default data, update it with appropriate default data for new type
|
284 |
+
if ( filter_var( get_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_DEFAULT_DATA, true ), FILTER_VALIDATE_BOOLEAN ) ) {
|
285 |
+
$source = new Visualizer_Source_Csv( VISUALIZER_ABSPATH . DIRECTORY_SEPARATOR . 'samples' . DIRECTORY_SEPARATOR . $type . '.csv' );
|
286 |
+
$source->fetch();
|
287 |
+
|
288 |
+
$this->_chart->post_content = $source->getData();
|
289 |
+
wp_update_post( $this->_chart->to_array() );
|
290 |
+
|
291 |
+
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
292 |
+
}
|
293 |
+
|
294 |
+
// redirect to next tab
|
295 |
+
// changed by Ash/Upwork
|
296 |
+
wp_redirect( add_query_arg( 'tab', 'settings' ) );
|
297 |
+
return;
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
$render = new Visualizer_Render_Page_Types();
|
302 |
+
$render->type = get_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
|
303 |
+
$render->types = Visualizer_Plugin::getChartTypes();
|
304 |
+
$render->chart = $this->_chart;
|
305 |
+
|
306 |
+
wp_enqueue_style( 'visualizer-frame' );
|
307 |
+
wp_enqueue_script( 'visualizer-frame' );
|
308 |
+
|
309 |
+
wp_iframe( array( $render, 'render') );
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Handles chart data page.
|
314 |
+
*
|
315 |
+
* @since 1.0.0
|
316 |
+
*
|
317 |
+
* @access private
|
318 |
+
*/
|
319 |
+
private function _handleDataPage() {
|
320 |
+
$data = $this->_getChartArray();
|
321 |
+
|
322 |
+
$render = new Visualizer_Render_Page_Data();
|
323 |
+
$render->chart = $this->_chart;
|
324 |
+
$render->type = $data['type'];
|
325 |
+
|
326 |
+
unset( $data['settings']['width'], $data['settings']['height'] );
|
327 |
+
|
328 |
+
wp_enqueue_style( 'visualizer-frame' );
|
329 |
+
wp_enqueue_script( 'visualizer-render' );
|
330 |
+
wp_localize_script( 'visualizer-render', 'visualizer', array(
|
331 |
+
'l10n' => array(
|
332 |
+
'remotecsv_prompt' => esc_html__( 'Please, enter the URL of CSV file:', Visualizer_Plugin::NAME ),
|
333 |
+
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', Visualizer_Plugin::NAME ),
|
334 |
+
),
|
335 |
+
'charts' => array(
|
336 |
+
'canvas' => $data,
|
337 |
+
),
|
338 |
+
) );
|
339 |
+
|
340 |
+
// Added by Ash/Upwork
|
341 |
+
if( defined( 'Visualizer_Pro' ) ){
|
342 |
+
global $Visualizer_Pro;
|
343 |
+
$Visualizer_Pro->_enqueueScriptsAndStyles($data);
|
344 |
+
}
|
345 |
+
// Added by Ash/Upwork
|
346 |
+
|
347 |
+
$this->_addAction( 'admin_head', 'renderFlattrScript' );
|
348 |
+
|
349 |
+
wp_iframe( array( $render, 'render') );
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Handles chart settigns page.
|
354 |
+
*
|
355 |
+
* @since 1.0.0
|
356 |
+
*
|
357 |
+
* @access private
|
358 |
+
*/
|
359 |
+
private function _handleSettingsPage() {
|
360 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
361 |
+
if ( $this->_chart->post_status == 'auto-draft' ) {
|
362 |
+
$this->_chart->post_status = 'publish';
|
363 |
+
wp_update_post( $this->_chart->to_array() );
|
364 |
+
}
|
365 |
+
|
366 |
+
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $_POST );
|
367 |
+
|
368 |
+
$render = new Visualizer_Render_Page_Send();
|
369 |
+
$render->text = sprintf( '[visualizer id="%d"]', $this->_chart->ID );
|
370 |
+
|
371 |
+
wp_iframe( array( $render, 'render') );
|
372 |
+
return;
|
373 |
+
}
|
374 |
+
|
375 |
+
$data = $this->_getChartArray();
|
376 |
+
|
377 |
+
$sidebar = '';
|
378 |
+
$sidebar_class = 'Visualizer_Render_Sidebar_Type_' . ucfirst( $data['type'] );
|
379 |
+
if ( class_exists( $sidebar_class, true ) ) {
|
380 |
+
$sidebar = new $sidebar_class( $data['settings'] );
|
381 |
+
$sidebar->__series = $data['series'];
|
382 |
+
$sidebar->__data = $data['data'];
|
383 |
+
}
|
384 |
+
|
385 |
+
unset( $data['settings']['width'], $data['settings']['height'] );
|
386 |
+
|
387 |
+
wp_enqueue_style( 'wp-color-picker' );
|
388 |
+
wp_enqueue_style( 'visualizer-frame' );
|
389 |
+
|
390 |
+
wp_enqueue_script( 'visualizer-preview' );
|
391 |
+
wp_localize_script( 'visualizer-render', 'visualizer', array(
|
392 |
+
'charts' => array(
|
393 |
+
'canvas' => $data,
|
394 |
+
),
|
395 |
+
) );
|
396 |
+
|
397 |
+
$render = new Visualizer_Render_Page_Settings();
|
398 |
+
|
399 |
+
$render->sidebar = $sidebar;
|
400 |
+
if ( filter_input( INPUT_GET, 'library', FILTER_VALIDATE_BOOLEAN ) ) {
|
401 |
+
$render->button = filter_input( INPUT_GET, 'action' ) == Visualizer_Plugin::ACTION_EDIT_CHART
|
402 |
+
? esc_html__( 'Save Chart', Visualizer_Plugin::NAME )
|
403 |
+
: esc_html__( 'Create Chart', Visualizer_Plugin::NAME );
|
404 |
+
} else {
|
405 |
+
$render->button = esc_attr__( 'Insert Chart', Visualizer_Plugin::NAME );
|
406 |
+
}
|
407 |
+
|
408 |
+
$this->_addAction( 'admin_head', 'renderFlattrScript' );
|
409 |
+
|
410 |
+
wp_iframe( array( $render, 'render') );
|
411 |
+
}
|
412 |
+
|
413 |
+
|
414 |
+
// changed by Ash/Upwork
|
415 |
+
private function _handleDataAndSettingsPage(){
|
416 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
417 |
+
if ( $this->_chart->post_status == 'auto-draft' ) {
|
418 |
+
$this->_chart->post_status = 'publish';
|
419 |
+
wp_update_post( $this->_chart->to_array() );
|
420 |
+
}
|
421 |
+
|
422 |
+
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $_POST );
|
423 |
+
|
424 |
+
$render = new Visualizer_Render_Page_Send();
|
425 |
+
$render->text = sprintf( '[visualizer id="%d"]', $this->_chart->ID );
|
426 |
+
|
427 |
+
wp_iframe( array( $render, 'render') );
|
428 |
+
return;
|
429 |
+
}
|
430 |
+
|
431 |
+
$data = $this->_getChartArray();
|
432 |
+
|
433 |
+
$sidebar = '';
|
434 |
+
$sidebar_class = 'Visualizer_Render_Sidebar_Type_' . ucfirst( $data['type'] );
|
435 |
+
if ( class_exists( $sidebar_class, true ) ) {
|
436 |
+
$sidebar = new $sidebar_class( $data['settings'] );
|
437 |
+
$sidebar->__series = $data['series'];
|
438 |
+
$sidebar->__data = $data['data'];
|
439 |
+
}
|
440 |
+
|
441 |
+
unset( $data['settings']['width'], $data['settings']['height'] );
|
442 |
+
|
443 |
+
wp_enqueue_style( 'visualizer-frame' );
|
444 |
+
wp_enqueue_style( 'wp-color-picker' );
|
445 |
+
wp_enqueue_style( 'visualizer-frame' );
|
446 |
+
|
447 |
+
wp_enqueue_script( 'visualizer-preview' );
|
448 |
+
wp_enqueue_script( 'visualizer-render' );
|
449 |
+
wp_localize_script( 'visualizer-render', 'visualizer', array(
|
450 |
+
'l10n' => array(
|
451 |
+
'remotecsv_prompt' => esc_html__( 'Please, enter the URL of CSV file:', Visualizer_Plugin::NAME ),
|
452 |
+
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', Visualizer_Plugin::NAME ),
|
453 |
+
),
|
454 |
+
'charts' => array(
|
455 |
+
'canvas' => $data,
|
456 |
+
),
|
457 |
+
) );
|
458 |
+
|
459 |
+
$render = new Visualizer_Render_Page_Data();
|
460 |
+
$render->chart = $this->_chart;
|
461 |
+
$render->type = $data['type'];
|
462 |
+
|
463 |
+
$render->sidebar = $sidebar;
|
464 |
+
if ( filter_input( INPUT_GET, 'library', FILTER_VALIDATE_BOOLEAN ) ) {
|
465 |
+
$render->button = filter_input( INPUT_GET, 'action' ) == Visualizer_Plugin::ACTION_EDIT_CHART
|
466 |
+
? esc_html__( 'Save Chart', Visualizer_Plugin::NAME )
|
467 |
+
: esc_html__( 'Create Chart', Visualizer_Plugin::NAME );
|
468 |
+
} else {
|
469 |
+
$render->button = esc_attr__( 'Insert Chart', Visualizer_Plugin::NAME );
|
470 |
+
}
|
471 |
+
|
472 |
+
if( defined( 'Visualizer_Pro' ) ){
|
473 |
+
global $Visualizer_Pro;
|
474 |
+
$Visualizer_Pro->_enqueueScriptsAndStyles($data);
|
475 |
+
}
|
476 |
+
|
477 |
+
$this->_addAction( 'admin_head', 'renderFlattrScript' );
|
478 |
+
|
479 |
+
wp_iframe( array( $render, 'render') );
|
480 |
+
}
|
481 |
+
// changed by Ash/Upwork
|
482 |
+
|
483 |
+
/**
|
484 |
+
* Renders flattr script in the iframe <head>
|
485 |
+
*
|
486 |
+
* @since 1.4.2
|
487 |
+
* @action admin_head
|
488 |
+
*
|
489 |
+
* @access public
|
490 |
+
*/
|
491 |
+
public function renderFlattrScript() {
|
492 |
+
echo '';
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Parses uploaded CSV file and saves new data for the chart.
|
497 |
+
*
|
498 |
+
* @since 1.0.0
|
499 |
+
*
|
500 |
+
* @access public
|
501 |
+
*/
|
502 |
+
public function uploadData() {
|
503 |
+
// validate nonce
|
504 |
+
if ( !wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
505 |
+
status_header( 403 );
|
506 |
+
exit;
|
507 |
+
}
|
508 |
+
|
509 |
+
// check chart, if chart exists
|
510 |
+
$chart_id = filter_input( INPUT_GET, 'chart', FILTER_VALIDATE_INT );
|
511 |
+
if ( !$chart_id || !( $chart = get_post( $chart_id ) ) || $chart->post_type != Visualizer_Plugin::CPT_VISUALIZER ) {
|
512 |
+
status_header( 400 );
|
513 |
+
exit;
|
514 |
+
}
|
515 |
+
|
516 |
+
$source = null;
|
517 |
+
$render = new Visualizer_Render_Page_Update();
|
518 |
+
if ( filter_input( INPUT_POST, 'remote_data', FILTER_VALIDATE_URL ) ) {
|
519 |
+
$source = new Visualizer_Source_Csv_Remote( $_POST['remote_data'] );
|
520 |
+
} elseif ( isset( $_FILES['local_data'] ) && $_FILES['local_data']['error'] == 0 ) {
|
521 |
+
$source = new Visualizer_Source_Csv( $_FILES['local_data']['tmp_name'] );
|
522 |
+
|
523 |
+
// Added by Ash/Upwork
|
524 |
+
} elseif ( defined( 'Visualizer_Pro' ) && isset( $_POST['chart_data'] ) && strlen( $_POST['chart_data'] ) > 0){
|
525 |
+
global $Visualizer_Pro;
|
526 |
+
$source = $Visualizer_Pro->_handleChartData($_POST['chart_data']);
|
527 |
+
// Added by Ash/Upwork
|
528 |
+
|
529 |
+
} else {
|
530 |
+
$render->message = esc_html__( "CSV file with chart data was not uploaded. Please, try again.", Visualizer_Plugin::NAME );
|
531 |
+
}
|
532 |
+
|
533 |
+
if ( $source ) {
|
534 |
+
if ( $source->fetch() ) {
|
535 |
+
$chart->post_content = $source->getData();
|
536 |
+
wp_update_post( $chart->to_array() );
|
537 |
+
|
538 |
+
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
539 |
+
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
540 |
+
update_post_meta( $chart->ID, Visualizer_Plugin::CF_DEFAULT_DATA, 0 );
|
541 |
+
|
542 |
+
$render->data = json_encode( $source->getRawData() );
|
543 |
+
$render->series = json_encode( $source->getSeries() );
|
544 |
+
} else {
|
545 |
+
$render->message = esc_html__( "CSV file is broken or invalid. Please, try again.", Visualizer_Plugin::NAME );
|
546 |
+
}
|
547 |
+
}
|
548 |
+
|
549 |
+
$render->render();
|
550 |
+
exit;
|
551 |
+
}
|
552 |
+
|
553 |
+
/**
|
554 |
+
* Clones the chart.
|
555 |
+
*
|
556 |
+
* @since 1.0.0
|
557 |
+
*
|
558 |
+
* @access public
|
559 |
+
*/
|
560 |
+
public function cloneChart() {
|
561 |
+
$chart_id = $success = false;
|
562 |
+
$nonce = wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), Visualizer_Plugin::ACTION_CLONE_CHART );
|
563 |
+
$capable = current_user_can( 'edit_posts' );
|
564 |
+
if ( $nonce && $capable ) {
|
565 |
+
$chart_id = filter_input( INPUT_GET, 'chart', FILTER_VALIDATE_INT, array( 'options' => array( 'min_range' => 1 ) ) );
|
566 |
+
if ( $chart_id ) {
|
567 |
+
$chart = get_post( $chart_id );
|
568 |
+
$success = $chart && $chart->post_type == Visualizer_Plugin::CPT_VISUALIZER;
|
569 |
+
}
|
570 |
+
}
|
571 |
+
|
572 |
+
$redirect = wp_get_referer();
|
573 |
+
if ( $success ) {
|
574 |
+
$new_chart_id = wp_insert_post( array(
|
575 |
+
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
576 |
+
'post_title' => 'Visualization',
|
577 |
+
'post_author' => get_current_user_id(),
|
578 |
+
'post_status' => $chart->post_status,
|
579 |
+
'post_content' => $chart->post_content,
|
580 |
+
) );
|
581 |
+
|
582 |
+
if ( $new_chart_id && !is_wp_error( $new_chart_id ) ) {
|
583 |
+
add_post_meta( $new_chart_id, Visualizer_Plugin::CF_CHART_TYPE, get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true ) );
|
584 |
+
add_post_meta( $new_chart_id, Visualizer_Plugin::CF_DEFAULT_DATA, get_post_meta( $chart_id, Visualizer_Plugin::CF_DEFAULT_DATA, true ) );
|
585 |
+
add_post_meta( $new_chart_id, Visualizer_Plugin::CF_SOURCE, get_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, true ) );
|
586 |
+
add_post_meta( $new_chart_id, Visualizer_Plugin::CF_SERIES, get_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, true ) );
|
587 |
+
add_post_meta( $new_chart_id, Visualizer_Plugin::CF_SETTINGS, get_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS, true ) );
|
588 |
+
|
589 |
+
$redirect = add_query_arg( array(
|
590 |
+
'page' => 'visualizer',
|
591 |
+
'type' => filter_input( INPUT_GET, 'type' ),
|
592 |
+
), admin_url( 'upload.php' ) );
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
wp_redirect( $redirect );
|
597 |
+
exit;
|
598 |
+
}
|
599 |
+
|
600 |
}
|
classes/Visualizer/Module/Frontend.php
CHANGED
@@ -1,150 +1,156 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Frontend module class.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module_Frontend extends Visualizer_Module {
|
32 |
-
|
33 |
-
const NAME = __CLASS__;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The array of charts to render.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access private
|
41 |
-
* @var array
|
42 |
-
*/
|
43 |
-
private $_charts = array();
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructor.
|
47 |
-
*
|
48 |
-
* @since 1.0.0
|
49 |
-
* @uses add_filter() To add "do_shortcode" hook for "widget_text" and "term_description" filters.
|
50 |
-
*
|
51 |
-
* @access public
|
52 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
53 |
-
*/
|
54 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
55 |
-
parent::__construct( $plugin );
|
56 |
-
|
57 |
-
$this->_addAction( 'wp_enqueue_scripts', 'enqueueScripts' );
|
58 |
-
$this->_addShortcode( 'visualizer', 'renderChart' );
|
59 |
-
|
60 |
-
// add do_shortocde hook for widget_text filter
|
61 |
-
if ( !has_filter( 'widget_text', 'do_shortcode' ) ) {
|
62 |
-
add_filter( 'widget_text', 'do_shortcode' );
|
63 |
-
}
|
64 |
-
|
65 |
-
// add do_shortcode hook for term_description filter
|
66 |
-
if ( !has_filter( 'term_description', 'do_shortcode' ) ) {
|
67 |
-
add_filter( 'term_description', 'do_shortcode' );
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Registers scripts for charts rendering.
|
73 |
-
*
|
74 |
-
* @since 1.0.0
|
75 |
-
* @uses wp_register_script To register javascript file.
|
76 |
-
*
|
77 |
-
* @access public
|
78 |
-
*/
|
79 |
-
public function enqueueScripts() {
|
80 |
-
wp_register_script( 'visualizer-google-jsapi', '//www.google.com/jsapi', array(), null, true );
|
81 |
-
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'visualizer-google-jsapi', 'jquery' ), Visualizer_Plugin::VERSION, true );
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Returns placeholder for chart according to visualizer shortcode attributes.
|
86 |
-
*
|
87 |
-
* @since 1.0.0
|
88 |
-
* @uses shortcode_atts() To parse income shortocdes.
|
89 |
-
* @uses apply_filters() To filter chart's data and series arrays.
|
90 |
-
* @uses get_post_meta() To fetch chart's meta information.
|
91 |
-
* @uses wp_enqueue_script() To enqueue charts render script.
|
92 |
-
* @uses wp_localize_script() To add chart data to the page inline script.
|
93 |
-
*
|
94 |
-
* @access public
|
95 |
-
* @param array $atts The array of shortcode attributes.
|
96 |
-
*/
|
97 |
-
public function renderChart( $atts ) {
|
98 |
-
$atts = shortcode_atts( array(
|
99 |
-
'id' => false, // chart id
|
100 |
-
'class' => false, // chart class
|
101 |
-
'series' => false, // series filter hook
|
102 |
-
'data' => false, // data filter hook
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
if
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
$
|
112 |
-
$class =
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
// handle
|
129 |
-
$
|
130 |
-
if ( !empty( $atts['
|
131 |
-
$
|
132 |
-
}
|
133 |
-
|
134 |
-
//
|
135 |
-
$
|
136 |
-
|
137 |
-
'
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Frontend module class.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module_Frontend extends Visualizer_Module {
|
32 |
+
|
33 |
+
const NAME = __CLASS__;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The array of charts to render.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access private
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
private $_charts = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor.
|
47 |
+
*
|
48 |
+
* @since 1.0.0
|
49 |
+
* @uses add_filter() To add "do_shortcode" hook for "widget_text" and "term_description" filters.
|
50 |
+
*
|
51 |
+
* @access public
|
52 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
53 |
+
*/
|
54 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
55 |
+
parent::__construct( $plugin );
|
56 |
+
|
57 |
+
$this->_addAction( 'wp_enqueue_scripts', 'enqueueScripts' );
|
58 |
+
$this->_addShortcode( 'visualizer', 'renderChart' );
|
59 |
+
|
60 |
+
// add do_shortocde hook for widget_text filter
|
61 |
+
if ( !has_filter( 'widget_text', 'do_shortcode' ) ) {
|
62 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
63 |
+
}
|
64 |
+
|
65 |
+
// add do_shortcode hook for term_description filter
|
66 |
+
if ( !has_filter( 'term_description', 'do_shortcode' ) ) {
|
67 |
+
add_filter( 'term_description', 'do_shortcode' );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Registers scripts for charts rendering.
|
73 |
+
*
|
74 |
+
* @since 1.0.0
|
75 |
+
* @uses wp_register_script To register javascript file.
|
76 |
+
*
|
77 |
+
* @access public
|
78 |
+
*/
|
79 |
+
public function enqueueScripts() {
|
80 |
+
wp_register_script( 'visualizer-google-jsapi', '//www.google.com/jsapi', array(), null, true );
|
81 |
+
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'visualizer-google-jsapi', 'jquery' ), Visualizer_Plugin::VERSION, true );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Returns placeholder for chart according to visualizer shortcode attributes.
|
86 |
+
*
|
87 |
+
* @since 1.0.0
|
88 |
+
* @uses shortcode_atts() To parse income shortocdes.
|
89 |
+
* @uses apply_filters() To filter chart's data and series arrays.
|
90 |
+
* @uses get_post_meta() To fetch chart's meta information.
|
91 |
+
* @uses wp_enqueue_script() To enqueue charts render script.
|
92 |
+
* @uses wp_localize_script() To add chart data to the page inline script.
|
93 |
+
*
|
94 |
+
* @access public
|
95 |
+
* @param array $atts The array of shortcode attributes.
|
96 |
+
*/
|
97 |
+
public function renderChart( $atts ) {
|
98 |
+
$atts = shortcode_atts( array(
|
99 |
+
'id' => false, // chart id
|
100 |
+
'class' => false, // chart class
|
101 |
+
'series' => false, // series filter hook
|
102 |
+
'data' => false, // data filter hook
|
103 |
+
'settings' => false, // data filter hook
|
104 |
+
), $atts );
|
105 |
+
|
106 |
+
// if empty id or chart does not exists, then return empty string
|
107 |
+
if ( !$atts['id'] || !( $chart = get_post( $atts['id'] ) ) || $chart->post_type != Visualizer_Plugin::CPT_VISUALIZER ) {
|
108 |
+
return '';
|
109 |
+
}
|
110 |
+
|
111 |
+
$id = 'visualizer-' . $atts['id'];
|
112 |
+
$class = apply_filters( Visualizer_Plugin::FILTER_CHART_WRAPPER_CLASS, $atts['class'], $atts['id'] );
|
113 |
+
$class = !empty( $class ) ? ' class="' . $class . '"' : '';
|
114 |
+
|
115 |
+
$type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
|
116 |
+
|
117 |
+
// faetch and update settings
|
118 |
+
$settings = get_post_meta( $chart->ID, Visualizer_Plugin::CF_SETTINGS, true );
|
119 |
+
if ( empty( $settings['height'] ) ) {
|
120 |
+
$settings['height'] = '400';
|
121 |
+
}
|
122 |
+
|
123 |
+
// handle series filter hooks
|
124 |
+
$series = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_SERIES, get_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, true ), $chart->ID, $type );
|
125 |
+
if ( !empty( $atts['series'] ) ) {
|
126 |
+
$series = apply_filters( $atts['series'], $series, $chart->ID, $type );
|
127 |
+
}
|
128 |
+
// handle settings filter hooks
|
129 |
+
$settings = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_SETTINGS, $settings, $chart->ID, $type );
|
130 |
+
if ( !empty( $atts['settings'] ) ) {
|
131 |
+
$settings = apply_filters( $atts['settings'], $settings, $chart->ID, $type );
|
132 |
+
}
|
133 |
+
|
134 |
+
// handle data filter hooks
|
135 |
+
$data = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, unserialize( $chart->post_content ), $chart->ID, $type );
|
136 |
+
if ( !empty( $atts['data'] ) ) {
|
137 |
+
$data = apply_filters( $atts['data'], $data, $chart->ID, $type );
|
138 |
+
}
|
139 |
+
|
140 |
+
// add chart to the array
|
141 |
+
$this->_charts[$id] = array(
|
142 |
+
'type' => $type,
|
143 |
+
'series' => $series,
|
144 |
+
'settings' => $settings,
|
145 |
+
'data' => $data,
|
146 |
+
);
|
147 |
+
|
148 |
+
// enqueue visualizer render and update render localizations
|
149 |
+
wp_enqueue_script( 'visualizer-render' );
|
150 |
+
wp_localize_script( 'visualizer-render', 'visualizer', array( 'charts' => $this->_charts ) );
|
151 |
+
|
152 |
+
// return placeholder div
|
153 |
+
return '<div id="' . $id . '"' . $class . '></div>';
|
154 |
+
}
|
155 |
+
|
156 |
}
|
classes/Visualizer/Module/Setup.php
CHANGED
@@ -1,77 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* General module what setups all required environment.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module_Setup extends Visualizer_Module {
|
32 |
-
|
33 |
-
const NAME = __CLASS__;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access public
|
41 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
42 |
-
*/
|
43 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
44 |
-
parent::__construct( $plugin );
|
45 |
-
|
46 |
-
$this->_addAction( 'init', 'setupCustomPostTypes' );
|
47 |
-
$this->_addAction( 'plugins_loaded', 'loadTextDomain' );
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Registers custom post type for charts.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
* @uses register_post_type() To register custom post type for charts.
|
55 |
-
*
|
56 |
-
* @access public
|
57 |
-
*/
|
58 |
-
public function setupCustomPostTypes() {
|
59 |
-
register_post_type( Visualizer_Plugin::CPT_VISUALIZER, array(
|
60 |
-
'label' => 'Visualizer Charts',
|
61 |
-
'public' => false,
|
62 |
-
) );
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Loads plugin text domain translations.
|
67 |
-
*
|
68 |
-
* @since 1.0.0
|
69 |
-
* @uses load_plugin_textdomain() To load translations for the plugin.
|
70 |
-
*
|
71 |
-
* @access public
|
72 |
-
*/
|
73 |
-
public function loadTextDomain() {
|
74 |
-
load_plugin_textdomain( Visualizer_Plugin::NAME, false, dirname( plugin_basename( VISUALIZER_BASEFILE ) ) . '/languages/' );
|
75 |
-
}
|
76 |
-
|
77 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* General module what setups all required environment.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module_Setup extends Visualizer_Module {
|
32 |
+
|
33 |
+
const NAME = __CLASS__;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access public
|
41 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
42 |
+
*/
|
43 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
44 |
+
parent::__construct( $plugin );
|
45 |
+
|
46 |
+
$this->_addAction( 'init', 'setupCustomPostTypes' );
|
47 |
+
$this->_addAction( 'plugins_loaded', 'loadTextDomain' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Registers custom post type for charts.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
* @uses register_post_type() To register custom post type for charts.
|
55 |
+
*
|
56 |
+
* @access public
|
57 |
+
*/
|
58 |
+
public function setupCustomPostTypes() {
|
59 |
+
register_post_type( Visualizer_Plugin::CPT_VISUALIZER, array(
|
60 |
+
'label' => 'Visualizer Charts',
|
61 |
+
'public' => false,
|
62 |
+
) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Loads plugin text domain translations.
|
67 |
+
*
|
68 |
+
* @since 1.0.0
|
69 |
+
* @uses load_plugin_textdomain() To load translations for the plugin.
|
70 |
+
*
|
71 |
+
* @access public
|
72 |
+
*/
|
73 |
+
public function loadTextDomain() {
|
74 |
+
load_plugin_textdomain( Visualizer_Plugin::NAME, false, dirname( plugin_basename( VISUALIZER_BASEFILE ) ) . '/languages/' );
|
75 |
+
}
|
76 |
+
|
77 |
}
|
classes/Visualizer/Module/Sources.php
CHANGED
@@ -1,120 +1,120 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Sources module class.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Module
|
28 |
-
*
|
29 |
-
* @since 1.1.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Module_Sources extends Visualizer_Module {
|
32 |
-
|
33 |
-
const NAME = __CLASS__;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The array of fetched sources.
|
37 |
-
*
|
38 |
-
* @since 1.1.0
|
39 |
-
*
|
40 |
-
* @access private
|
41 |
-
* @var array
|
42 |
-
*/
|
43 |
-
private $_sources = array();
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructor.
|
47 |
-
*
|
48 |
-
* @since 1.1.0
|
49 |
-
*
|
50 |
-
* @access public
|
51 |
-
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
-
*/
|
53 |
-
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
-
parent::__construct( $plugin );
|
55 |
-
|
56 |
-
$this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_SERIES, 'filterChartSeries', 1, 2 );
|
57 |
-
$this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA, 'filterChartData', 1, 2 );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Returns appropriate source object for a chart.
|
62 |
-
*
|
63 |
-
* @since 1.1.0
|
64 |
-
*
|
65 |
-
* @access private
|
66 |
-
* @param int $chart_id The chart id.
|
67 |
-
* @return Visualizer_Source The source object if source exists, otherwise FALSE.
|
68 |
-
*/
|
69 |
-
private function _getSource( $chart_id ) {
|
70 |
-
if ( !isset( $this->_sources[$chart_id] ) ) {
|
71 |
-
$class = get_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, true );
|
72 |
-
if ( !class_exists( $class, true ) ) {
|
73 |
-
return false;
|
74 |
-
}
|
75 |
-
|
76 |
-
$this->_sources[$chart_id] = new $class();
|
77 |
-
}
|
78 |
-
|
79 |
-
return $this->_sources[$chart_id];
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Filters chart sereis.
|
84 |
-
*
|
85 |
-
* @since 1.1.0
|
86 |
-
*
|
87 |
-
* @access public
|
88 |
-
* @param array $series The array of chart series.
|
89 |
-
* @param int $chart_id The chart id.
|
90 |
-
* @return array The array of filtered series.
|
91 |
-
*/
|
92 |
-
public function filterChartSeries( $series, $chart_id ) {
|
93 |
-
$source = $this->_getSource( $chart_id );
|
94 |
-
if ( !$source ) {
|
95 |
-
return $series;
|
96 |
-
}
|
97 |
-
|
98 |
-
return $source->repopulateSeries( $series, $chart_id );
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Filters chart data.
|
103 |
-
*
|
104 |
-
* @since 1.1.0
|
105 |
-
*
|
106 |
-
* @access public
|
107 |
-
* @param array $data The array of chart data.
|
108 |
-
* @param int $chart_id The chart id.
|
109 |
-
* @return array The array of filtered data.
|
110 |
-
*/
|
111 |
-
public function filterChartData( $data, $chart_id ) {
|
112 |
-
$source = $this->_getSource( $chart_id );
|
113 |
-
if ( !$source ) {
|
114 |
-
return $data;
|
115 |
-
}
|
116 |
-
|
117 |
-
return $source->repopulateData( $data, $chart_id );
|
118 |
-
}
|
119 |
-
|
120 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sources module class.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Module
|
28 |
+
*
|
29 |
+
* @since 1.1.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Module_Sources extends Visualizer_Module {
|
32 |
+
|
33 |
+
const NAME = __CLASS__;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The array of fetched sources.
|
37 |
+
*
|
38 |
+
* @since 1.1.0
|
39 |
+
*
|
40 |
+
* @access private
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
private $_sources = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor.
|
47 |
+
*
|
48 |
+
* @since 1.1.0
|
49 |
+
*
|
50 |
+
* @access public
|
51 |
+
* @param Visualizer_Plugin $plugin The instance of the plugin.
|
52 |
+
*/
|
53 |
+
public function __construct( Visualizer_Plugin $plugin ) {
|
54 |
+
parent::__construct( $plugin );
|
55 |
+
|
56 |
+
$this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_SERIES, 'filterChartSeries', 1, 2 );
|
57 |
+
$this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA, 'filterChartData', 1, 2 );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Returns appropriate source object for a chart.
|
62 |
+
*
|
63 |
+
* @since 1.1.0
|
64 |
+
*
|
65 |
+
* @access private
|
66 |
+
* @param int $chart_id The chart id.
|
67 |
+
* @return Visualizer_Source The source object if source exists, otherwise FALSE.
|
68 |
+
*/
|
69 |
+
private function _getSource( $chart_id ) {
|
70 |
+
if ( !isset( $this->_sources[$chart_id] ) ) {
|
71 |
+
$class = get_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, true );
|
72 |
+
if ( !class_exists( $class, true ) ) {
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
+
$this->_sources[$chart_id] = new $class();
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this->_sources[$chart_id];
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Filters chart sereis.
|
84 |
+
*
|
85 |
+
* @since 1.1.0
|
86 |
+
*
|
87 |
+
* @access public
|
88 |
+
* @param array $series The array of chart series.
|
89 |
+
* @param int $chart_id The chart id.
|
90 |
+
* @return array The array of filtered series.
|
91 |
+
*/
|
92 |
+
public function filterChartSeries( $series, $chart_id ) {
|
93 |
+
$source = $this->_getSource( $chart_id );
|
94 |
+
if ( !$source ) {
|
95 |
+
return $series;
|
96 |
+
}
|
97 |
+
|
98 |
+
return $source->repopulateSeries( $series, $chart_id );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Filters chart data.
|
103 |
+
*
|
104 |
+
* @since 1.1.0
|
105 |
+
*
|
106 |
+
* @access public
|
107 |
+
* @param array $data The array of chart data.
|
108 |
+
* @param int $chart_id The chart id.
|
109 |
+
* @return array The array of filtered data.
|
110 |
+
*/
|
111 |
+
public function filterChartData( $data, $chart_id ) {
|
112 |
+
$source = $this->_getSource( $chart_id );
|
113 |
+
if ( !$source ) {
|
114 |
+
return $data;
|
115 |
+
}
|
116 |
+
|
117 |
+
return $source->repopulateData( $data, $chart_id );
|
118 |
+
}
|
119 |
+
|
120 |
}
|
classes/Visualizer/Plugin.php
CHANGED
@@ -1,164 +1,170 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* The core plugin class.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
*
|
28 |
-
* @since 1.0.0
|
29 |
-
*/
|
30 |
-
class Visualizer_Plugin {
|
31 |
-
|
32 |
-
const NAME = 'visualizer';
|
33 |
-
const VERSION = '1.
|
34 |
-
|
35 |
-
// custom post types
|
36 |
-
const CPT_VISUALIZER = 'visualizer';
|
37 |
-
|
38 |
-
// custom meta fields
|
39 |
-
const CF_CHART_TYPE = 'visualizer-chart-type';
|
40 |
-
const CF_SOURCE = 'visualizer-source';
|
41 |
-
const CF_SERIES = 'visualizer-series';
|
42 |
-
const CF_DEFAULT_DATA = 'visualizer-default-data';
|
43 |
-
const CF_SETTINGS = 'visualizer-settings';
|
44 |
-
|
45 |
-
// custom actions
|
46 |
-
const ACTION_GET_CHARTS = 'visualizer-get-charts';
|
47 |
-
const ACTION_CREATE_CHART = 'visualizer-create-chart';
|
48 |
-
const ACTION_EDIT_CHART = 'visualizer-edit-chart';
|
49 |
-
const ACTION_CLONE_CHART = 'visualizer-clone-chart';
|
50 |
-
const ACTION_DELETE_CHART = 'visualizer-delete-chart';
|
51 |
-
const ACTION_UPLOAD_DATA = 'visualizer-upload-data';
|
52 |
-
|
53 |
-
// custom filters
|
54 |
-
const FILTER_CHART_WRAPPER_CLASS = 'visualizer-chart-wrapper-class';
|
55 |
-
const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series';
|
56 |
-
const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data';
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
*
|
70 |
-
*
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
*
|
80 |
-
*
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
*
|
89 |
-
*
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
*
|
98 |
-
*
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
*
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
*
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
*
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
*
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The core plugin class.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
*
|
28 |
+
* @since 1.0.0
|
29 |
+
*/
|
30 |
+
class Visualizer_Plugin {
|
31 |
+
|
32 |
+
const NAME = 'visualizer';
|
33 |
+
const VERSION = '1.5.2';
|
34 |
+
|
35 |
+
// custom post types
|
36 |
+
const CPT_VISUALIZER = 'visualizer';
|
37 |
+
|
38 |
+
// custom meta fields
|
39 |
+
const CF_CHART_TYPE = 'visualizer-chart-type';
|
40 |
+
const CF_SOURCE = 'visualizer-source';
|
41 |
+
const CF_SERIES = 'visualizer-series';
|
42 |
+
const CF_DEFAULT_DATA = 'visualizer-default-data';
|
43 |
+
const CF_SETTINGS = 'visualizer-settings';
|
44 |
+
|
45 |
+
// custom actions
|
46 |
+
const ACTION_GET_CHARTS = 'visualizer-get-charts';
|
47 |
+
const ACTION_CREATE_CHART = 'visualizer-create-chart';
|
48 |
+
const ACTION_EDIT_CHART = 'visualizer-edit-chart';
|
49 |
+
const ACTION_CLONE_CHART = 'visualizer-clone-chart';
|
50 |
+
const ACTION_DELETE_CHART = 'visualizer-delete-chart';
|
51 |
+
const ACTION_UPLOAD_DATA = 'visualizer-upload-data';
|
52 |
+
|
53 |
+
// custom filters
|
54 |
+
const FILTER_CHART_WRAPPER_CLASS = 'visualizer-chart-wrapper-class';
|
55 |
+
const FILTER_GET_CHART_SERIES = 'visualizer-get-chart-series';
|
56 |
+
const FILTER_GET_CHART_DATA = 'visualizer-get-chart-data';
|
57 |
+
const FILTER_GET_CHART_SETTINGS = 'visualizer-get-chart-settings';
|
58 |
+
|
59 |
+
// Added by Ash/Upwork
|
60 |
+
const PRO_TEASER_URL = "http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/";
|
61 |
+
const PRO_TEASER_TITLE = "Check PRO version ";
|
62 |
+
// Added by Ash/Upwork
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Singletone instance of the plugin.
|
66 |
+
*
|
67 |
+
* @since 1.0.0
|
68 |
+
*
|
69 |
+
* @access private
|
70 |
+
* @var Visualizer_Plugin
|
71 |
+
*/
|
72 |
+
private static $_instance = null;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* The array of registered modules.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*
|
79 |
+
* @access private
|
80 |
+
* @var array
|
81 |
+
*/
|
82 |
+
private $_modules = array();
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Private constructor.
|
86 |
+
*
|
87 |
+
* @since 1.0.0
|
88 |
+
*
|
89 |
+
* @access private
|
90 |
+
*/
|
91 |
+
private function __construct() {}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Private clone method.
|
95 |
+
*
|
96 |
+
* @since 1.0.0
|
97 |
+
*
|
98 |
+
* @access private
|
99 |
+
*/
|
100 |
+
private function __clone() {}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Returns singletone instance of the plugin.
|
104 |
+
*
|
105 |
+
* @since 1.0.0
|
106 |
+
*
|
107 |
+
* @static
|
108 |
+
* @access public
|
109 |
+
* @return Visualizer_Plugin
|
110 |
+
*/
|
111 |
+
public static function instance() {
|
112 |
+
if ( is_null( self::$_instance ) ) {
|
113 |
+
self::$_instance = new Visualizer_Plugin();
|
114 |
+
}
|
115 |
+
|
116 |
+
return self::$_instance;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Returns a module if it was registered before. Otherwise NULL.
|
121 |
+
*
|
122 |
+
* @since 1.0.0
|
123 |
+
*
|
124 |
+
* @access public
|
125 |
+
* @param string $name The name of the module to return.
|
126 |
+
* @return Visualizer_Module|null Returns a module if it was registered or NULL.
|
127 |
+
*/
|
128 |
+
public function getModule( $name ) {
|
129 |
+
return isset( $this->_modules[$name] ) ? $this->_modules[$name] : null;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Determines whether the module has been registered or not.
|
134 |
+
*
|
135 |
+
* @since 1.0.0
|
136 |
+
*
|
137 |
+
* @access public
|
138 |
+
* @param string $name The name of a module to check.
|
139 |
+
* @return boolean TRUE if the module has been registered. Otherwise FALSE.
|
140 |
+
*/
|
141 |
+
public function hasModule( $name ) {
|
142 |
+
return isset( $this->_modules[$name] );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Register new module in the plugin.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
*
|
150 |
+
* @access public
|
151 |
+
* @param string $module The name of the module to use in the plugin.
|
152 |
+
*/
|
153 |
+
public function setModule( $class ) {
|
154 |
+
$this->_modules[$class] = new $class( $this );
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Returns chart types.
|
159 |
+
*
|
160 |
+
* @since 1.0.0
|
161 |
+
*
|
162 |
+
* @static
|
163 |
+
* @access public
|
164 |
+
* @return array
|
165 |
+
*/
|
166 |
+
public static function getChartTypes() {
|
167 |
+
return array( 'line', 'area', 'bar', 'column', 'pie', 'geo', 'scatter', 'candlestick', 'gauge' );
|
168 |
+
}
|
169 |
+
|
170 |
}
|
classes/Visualizer/Render.php
CHANGED
@@ -1,155 +1,155 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Abstract render class implements all routine stuff required for template
|
25 |
-
* rendering.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
* @abstract
|
32 |
-
*/
|
33 |
-
abstract class Visualizer_Render {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The storage of all data associated with this render.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
* @var array
|
42 |
-
*/
|
43 |
-
protected $_data;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructor.
|
47 |
-
*
|
48 |
-
* @since 1.0.0
|
49 |
-
*
|
50 |
-
* @access public
|
51 |
-
* @param array $data The data what has to be associated with this render.
|
52 |
-
*/
|
53 |
-
public function __construct( $data = array() ) {
|
54 |
-
$this->_data = $data;
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Returns property associated with the render.
|
59 |
-
*
|
60 |
-
* @since 1.0.0
|
61 |
-
*
|
62 |
-
* @access public
|
63 |
-
* @param string $name The name of a property.
|
64 |
-
* @return mixed Returns mixed value of a property or NULL if a property doesn't exist.
|
65 |
-
*/
|
66 |
-
public function __get( $name ) {
|
67 |
-
return array_key_exists( $name, $this->_data ) ? $this->_data[$name] : null;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Checks whether the render has specific property or not.
|
72 |
-
*
|
73 |
-
* @since 1.0.0
|
74 |
-
*
|
75 |
-
* @access public
|
76 |
-
* @param string $name
|
77 |
-
* @return boolean TRUE if the property exists, otherwise FALSE.
|
78 |
-
*/
|
79 |
-
public function __isset( $name ) {
|
80 |
-
return array_key_exists( $name, $this->_data );
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Associates the render with specific property.
|
85 |
-
*
|
86 |
-
* @since 1.0.0
|
87 |
-
*
|
88 |
-
* @access public
|
89 |
-
* @param string $name The name of a property to associate.
|
90 |
-
* @param mixed $value The value of a property.
|
91 |
-
*/
|
92 |
-
public function __set( $name, $value ) {
|
93 |
-
$this->_data[$name] = $value;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Unassociates specific property from the render.
|
98 |
-
*
|
99 |
-
* @since 1.0.0
|
100 |
-
*
|
101 |
-
* @access public
|
102 |
-
* @param string $name The name of the property to unassociate.
|
103 |
-
*/
|
104 |
-
public function __unset( $name ) {
|
105 |
-
unset( $this->_data[$name] );
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Renders template.
|
110 |
-
*
|
111 |
-
* @since 1.0.0
|
112 |
-
*
|
113 |
-
* @abstract
|
114 |
-
* @access protected
|
115 |
-
*/
|
116 |
-
protected abstract function _toHTML();
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Builds template and return it as string.
|
120 |
-
*
|
121 |
-
* @since 1.0.0
|
122 |
-
*
|
123 |
-
* @access public
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
public function toHtml() {
|
127 |
-
ob_start();
|
128 |
-
$this->_toHTML();
|
129 |
-
return ob_get_clean();
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Returns built template as string.
|
134 |
-
*
|
135 |
-
* @since 1.0.0
|
136 |
-
*
|
137 |
-
* @access public
|
138 |
-
* @return type
|
139 |
-
*/
|
140 |
-
public function __toString() {
|
141 |
-
return $this->toHtml();
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Renders the template.
|
146 |
-
*
|
147 |
-
* @since 1.0.0
|
148 |
-
*
|
149 |
-
* @access public
|
150 |
-
*/
|
151 |
-
public function render() {
|
152 |
-
$this->_toHTML();
|
153 |
-
}
|
154 |
-
|
155 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Abstract render class implements all routine stuff required for template
|
25 |
+
* rendering.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
* @abstract
|
32 |
+
*/
|
33 |
+
abstract class Visualizer_Render {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The storage of all data associated with this render.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
protected $_data;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor.
|
47 |
+
*
|
48 |
+
* @since 1.0.0
|
49 |
+
*
|
50 |
+
* @access public
|
51 |
+
* @param array $data The data what has to be associated with this render.
|
52 |
+
*/
|
53 |
+
public function __construct( $data = array() ) {
|
54 |
+
$this->_data = $data;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Returns property associated with the render.
|
59 |
+
*
|
60 |
+
* @since 1.0.0
|
61 |
+
*
|
62 |
+
* @access public
|
63 |
+
* @param string $name The name of a property.
|
64 |
+
* @return mixed Returns mixed value of a property or NULL if a property doesn't exist.
|
65 |
+
*/
|
66 |
+
public function __get( $name ) {
|
67 |
+
return array_key_exists( $name, $this->_data ) ? $this->_data[$name] : null;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Checks whether the render has specific property or not.
|
72 |
+
*
|
73 |
+
* @since 1.0.0
|
74 |
+
*
|
75 |
+
* @access public
|
76 |
+
* @param string $name
|
77 |
+
* @return boolean TRUE if the property exists, otherwise FALSE.
|
78 |
+
*/
|
79 |
+
public function __isset( $name ) {
|
80 |
+
return array_key_exists( $name, $this->_data );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Associates the render with specific property.
|
85 |
+
*
|
86 |
+
* @since 1.0.0
|
87 |
+
*
|
88 |
+
* @access public
|
89 |
+
* @param string $name The name of a property to associate.
|
90 |
+
* @param mixed $value The value of a property.
|
91 |
+
*/
|
92 |
+
public function __set( $name, $value ) {
|
93 |
+
$this->_data[$name] = $value;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Unassociates specific property from the render.
|
98 |
+
*
|
99 |
+
* @since 1.0.0
|
100 |
+
*
|
101 |
+
* @access public
|
102 |
+
* @param string $name The name of the property to unassociate.
|
103 |
+
*/
|
104 |
+
public function __unset( $name ) {
|
105 |
+
unset( $this->_data[$name] );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Renders template.
|
110 |
+
*
|
111 |
+
* @since 1.0.0
|
112 |
+
*
|
113 |
+
* @abstract
|
114 |
+
* @access protected
|
115 |
+
*/
|
116 |
+
protected abstract function _toHTML();
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Builds template and return it as string.
|
120 |
+
*
|
121 |
+
* @since 1.0.0
|
122 |
+
*
|
123 |
+
* @access public
|
124 |
+
* @return string
|
125 |
+
*/
|
126 |
+
public function toHtml() {
|
127 |
+
ob_start();
|
128 |
+
$this->_toHTML();
|
129 |
+
return ob_get_clean();
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Returns built template as string.
|
134 |
+
*
|
135 |
+
* @since 1.0.0
|
136 |
+
*
|
137 |
+
* @access public
|
138 |
+
* @return type
|
139 |
+
*/
|
140 |
+
public function __toString() {
|
141 |
+
return $this->toHtml();
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Renders the template.
|
146 |
+
*
|
147 |
+
* @since 1.0.0
|
148 |
+
*
|
149 |
+
* @access public
|
150 |
+
*/
|
151 |
+
public function render() {
|
152 |
+
$this->_toHTML();
|
153 |
+
}
|
154 |
+
|
155 |
}
|
classes/Visualizer/Render/Library.php
CHANGED
@@ -1,171 +1,171 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Renders visualizer library page.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Render_Library extends Visualizer_Render {
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Renders chart's box block.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
*
|
38 |
-
* @access private
|
39 |
-
* @param string $placeholder_id The placeholder's id for the chart.
|
40 |
-
* @param int $chart_id The id of the chart.
|
41 |
-
*/
|
42 |
-
private function _renderChartBox( $placeholder_id, $chart_id ) {
|
43 |
-
$ajax_url = admin_url( 'admin-ajax.php' );
|
44 |
-
|
45 |
-
$delete_url = add_query_arg( array(
|
46 |
-
'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
|
47 |
-
'nonce' => wp_create_nonce(),
|
48 |
-
'chart' => $chart_id,
|
49 |
-
), $ajax_url );
|
50 |
-
|
51 |
-
$clone_url = add_query_arg( array(
|
52 |
-
'action' => Visualizer_Plugin::ACTION_CLONE_CHART,
|
53 |
-
'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
|
54 |
-
'chart' => $chart_id,
|
55 |
-
'type' => $this->type,
|
56 |
-
), $ajax_url );
|
57 |
-
|
58 |
-
echo '<div class="visualizer-chart">';
|
59 |
-
echo '<div id="', $placeholder_id, '" class="visualizer-chart-canvas">';
|
60 |
-
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
|
61 |
-
echo '</div>';
|
62 |
-
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
|
63 |
-
echo '<a class="visualizer-chart-action visualizer-chart-delete" href="', $delete_url, '" title="', esc_attr__( 'Delete', Visualizer_Plugin::NAME ), '" onclick="return showNotice.warn();"></a>';
|
64 |
-
echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '" title="', esc_attr__( 'Clone', Visualizer_Plugin::NAME ), '"></a>';
|
65 |
-
echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', Visualizer_Plugin::NAME ), '" data-chart="', $chart_id, '"></a>';
|
66 |
-
|
67 |
-
echo '<span class="visualizer-chart-shortcode" title="', esc_attr__( 'Click to select', Visualizer_Plugin::NAME ), '">';
|
68 |
-
echo ' [visualizer id="', $chart_id, '"] ';
|
69 |
-
echo '</span>';
|
70 |
-
echo '</div>';
|
71 |
-
echo '</div>';
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Renders library content.
|
76 |
-
*
|
77 |
-
* @since 1.0.0
|
78 |
-
*
|
79 |
-
* @access private
|
80 |
-
*/
|
81 |
-
private function _renderLibrary() {
|
82 |
-
echo '<div id="visualizer-types" class="visualizer-clearfix">';
|
83 |
-
echo '<ul>';
|
84 |
-
foreach ( $this->types as $type => $label ) {
|
85 |
-
echo '<li class="visualizer-list-item">';
|
86 |
-
if ( $type == $this->type ) {
|
87 |
-
echo '<a class="page-numbers current" href="', add_query_arg( 'vpage', false ), '">';
|
88 |
-
echo $label;
|
89 |
-
echo '</a>';
|
90 |
-
} else {
|
91 |
-
echo '<a class="page-numbers" href="', add_query_arg( array( 'type' => $type, 'vpage' => false ) ), '">';
|
92 |
-
echo $label;
|
93 |
-
echo '</a>';
|
94 |
-
}
|
95 |
-
echo '</li>';
|
96 |
-
}
|
97 |
-
echo '</ul>';
|
98 |
-
echo '</div>';
|
99 |
-
|
100 |
-
if ( !empty( $this->charts ) ) {
|
101 |
-
echo '<div id="visualizer-library" class="visualizer-clearfix">';
|
102 |
-
foreach ( $this->charts as $placeholder_id => $chart ) {
|
103 |
-
$this->_renderChartBox( $placeholder_id, $chart['id'] );
|
104 |
-
}
|
105 |
-
echo '</div>';
|
106 |
-
|
107 |
-
if ( is_array( $this->pagination ) ) {
|
108 |
-
echo '<ul class="visualizer-library-pagination">';
|
109 |
-
foreach ( $this->pagination as $page ) {
|
110 |
-
echo '<li class="visualizer-list-item">', $page, '</li>';
|
111 |
-
}
|
112 |
-
echo '</ul>';
|
113 |
-
}
|
114 |
-
} else {
|
115 |
-
echo '<div id="visualizer-library" class="visualizer-clearfix">';
|
116 |
-
echo '<div class="visualizer-chart">';
|
117 |
-
echo '<div class="visualizer-chart-canvas visualizer-nochart-canvas">';
|
118 |
-
echo '<div class="visualizer-notfound">', esc_html__( 'No charts found', Visualizer_Plugin::NAME ), '</div>';
|
119 |
-
echo '</div>';
|
120 |
-
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
|
121 |
-
echo '<span class="visualizer-chart-action visualizer-nochart-delete"></span>';
|
122 |
-
echo '<span class="visualizer-chart-action visualizer-nochart-clone"></span>';
|
123 |
-
echo '<span class="visualizer-chart-action visualizer-nochart-edit"></span>';
|
124 |
-
|
125 |
-
echo '<span class="visualizer-chart-shortcode">';
|
126 |
-
echo ' [visualizer] ';
|
127 |
-
echo '</span>';
|
128 |
-
echo '</div>';
|
129 |
-
echo '</div>';
|
130 |
-
echo '</div>';
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Renders library page.
|
136 |
-
*
|
137 |
-
* @since 1.0.0
|
138 |
-
*
|
139 |
-
* @access protected
|
140 |
-
*/
|
141 |
-
protected function _toHTML() {
|
142 |
-
echo '<div class="wrap">';
|
143 |
-
echo '<div id="visualizer-icon" class="icon32"><br></div>';
|
144 |
-
echo '<h2>';
|
145 |
-
esc_html_e( 'Visualizer Library', Visualizer_Plugin::NAME );
|
146 |
-
echo ' <a href="javascript:;" class="add-new-h2">', esc_html__( 'Add New', Visualizer_Plugin::NAME ), '</a>';
|
147 |
-
echo '</h2>';
|
148 |
-
|
149 |
-
$this->_renderMessages();
|
150 |
-
$this->_renderLibrary();
|
151 |
-
echo '</div>';
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Renders notification messages if need be.
|
156 |
-
*
|
157 |
-
* @since 1.4.2
|
158 |
-
*
|
159 |
-
* @access private
|
160 |
-
*/
|
161 |
-
private function _renderMessages() {
|
162 |
-
if ( !filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN ) ) {
|
163 |
-
echo '<div class="updated error">';
|
164 |
-
echo '<p>';
|
165 |
-
printf( esc_html__( '%s option is disabled in your php.ini config. Please, enable it by change its value to 1. This option increases the speed of remote CSV uploading.', Visualizer_Plugin::NAME ), '<b>allow_url_fopen</b>' );
|
166 |
-
echo '</p>';
|
167 |
-
echo '</div>';
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Renders visualizer library page.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Render_Library extends Visualizer_Render {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Renders chart's box block.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
*
|
38 |
+
* @access private
|
39 |
+
* @param string $placeholder_id The placeholder's id for the chart.
|
40 |
+
* @param int $chart_id The id of the chart.
|
41 |
+
*/
|
42 |
+
private function _renderChartBox( $placeholder_id, $chart_id ) {
|
43 |
+
$ajax_url = admin_url( 'admin-ajax.php' );
|
44 |
+
|
45 |
+
$delete_url = add_query_arg( array(
|
46 |
+
'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
|
47 |
+
'nonce' => wp_create_nonce(),
|
48 |
+
'chart' => $chart_id,
|
49 |
+
), $ajax_url );
|
50 |
+
|
51 |
+
$clone_url = add_query_arg( array(
|
52 |
+
'action' => Visualizer_Plugin::ACTION_CLONE_CHART,
|
53 |
+
'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
|
54 |
+
'chart' => $chart_id,
|
55 |
+
'type' => $this->type,
|
56 |
+
), $ajax_url );
|
57 |
+
|
58 |
+
echo '<div class="visualizer-chart">';
|
59 |
+
echo '<div id="', $placeholder_id, '" class="visualizer-chart-canvas">';
|
60 |
+
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
|
61 |
+
echo '</div>';
|
62 |
+
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
|
63 |
+
echo '<a class="visualizer-chart-action visualizer-chart-delete" href="', $delete_url, '" title="', esc_attr__( 'Delete', Visualizer_Plugin::NAME ), '" onclick="return showNotice.warn();"></a>';
|
64 |
+
echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '" title="', esc_attr__( 'Clone', Visualizer_Plugin::NAME ), '"></a>';
|
65 |
+
echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', Visualizer_Plugin::NAME ), '" data-chart="', $chart_id, '"></a>';
|
66 |
+
|
67 |
+
echo '<span class="visualizer-chart-shortcode" title="', esc_attr__( 'Click to select', Visualizer_Plugin::NAME ), '">';
|
68 |
+
echo ' [visualizer id="', $chart_id, '"] ';
|
69 |
+
echo '</span>';
|
70 |
+
echo '</div>';
|
71 |
+
echo '</div>';
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Renders library content.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*
|
79 |
+
* @access private
|
80 |
+
*/
|
81 |
+
private function _renderLibrary() {
|
82 |
+
echo '<div id="visualizer-types" class="visualizer-clearfix">';
|
83 |
+
echo '<ul>';
|
84 |
+
foreach ( $this->types as $type => $label ) {
|
85 |
+
echo '<li class="visualizer-list-item">';
|
86 |
+
if ( $type == $this->type ) {
|
87 |
+
echo '<a class="page-numbers current" href="', add_query_arg( 'vpage', false ), '">';
|
88 |
+
echo $label;
|
89 |
+
echo '</a>';
|
90 |
+
} else {
|
91 |
+
echo '<a class="page-numbers" href="', add_query_arg( array( 'type' => $type, 'vpage' => false ) ), '">';
|
92 |
+
echo $label;
|
93 |
+
echo '</a>';
|
94 |
+
}
|
95 |
+
echo '</li>';
|
96 |
+
}
|
97 |
+
echo '</ul>';
|
98 |
+
echo '</div>';
|
99 |
+
|
100 |
+
if ( !empty( $this->charts ) ) {
|
101 |
+
echo '<div id="visualizer-library" class="visualizer-clearfix">';
|
102 |
+
foreach ( $this->charts as $placeholder_id => $chart ) {
|
103 |
+
$this->_renderChartBox( $placeholder_id, $chart['id'] );
|
104 |
+
}
|
105 |
+
echo '</div>';
|
106 |
+
|
107 |
+
if ( is_array( $this->pagination ) ) {
|
108 |
+
echo '<ul class="visualizer-library-pagination">';
|
109 |
+
foreach ( $this->pagination as $page ) {
|
110 |
+
echo '<li class="visualizer-list-item">', $page, '</li>';
|
111 |
+
}
|
112 |
+
echo '</ul>';
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
echo '<div id="visualizer-library" class="visualizer-clearfix">';
|
116 |
+
echo '<div class="visualizer-chart">';
|
117 |
+
echo '<div class="visualizer-chart-canvas visualizer-nochart-canvas">';
|
118 |
+
echo '<div class="visualizer-notfound">', esc_html__( 'No charts found', Visualizer_Plugin::NAME ), '</div>';
|
119 |
+
echo '</div>';
|
120 |
+
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
|
121 |
+
echo '<span class="visualizer-chart-action visualizer-nochart-delete"></span>';
|
122 |
+
echo '<span class="visualizer-chart-action visualizer-nochart-clone"></span>';
|
123 |
+
echo '<span class="visualizer-chart-action visualizer-nochart-edit"></span>';
|
124 |
+
|
125 |
+
echo '<span class="visualizer-chart-shortcode">';
|
126 |
+
echo ' [visualizer] ';
|
127 |
+
echo '</span>';
|
128 |
+
echo '</div>';
|
129 |
+
echo '</div>';
|
130 |
+
echo '</div>';
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Renders library page.
|
136 |
+
*
|
137 |
+
* @since 1.0.0
|
138 |
+
*
|
139 |
+
* @access protected
|
140 |
+
*/
|
141 |
+
protected function _toHTML() {
|
142 |
+
echo '<div class="wrap">';
|
143 |
+
echo '<div id="visualizer-icon" class="icon32"><br></div>';
|
144 |
+
echo '<h2>';
|
145 |
+
esc_html_e( 'Visualizer Library', Visualizer_Plugin::NAME );
|
146 |
+
echo ' <a href="javascript:;" class="add-new-h2">', esc_html__( 'Add New', Visualizer_Plugin::NAME ), '</a>';
|
147 |
+
echo '</h2>';
|
148 |
+
|
149 |
+
$this->_renderMessages();
|
150 |
+
$this->_renderLibrary();
|
151 |
+
echo '</div>';
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Renders notification messages if need be.
|
156 |
+
*
|
157 |
+
* @since 1.4.2
|
158 |
+
*
|
159 |
+
* @access private
|
160 |
+
*/
|
161 |
+
private function _renderMessages() {
|
162 |
+
if ( !filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN ) ) {
|
163 |
+
echo '<div class="updated error">';
|
164 |
+
echo '<p>';
|
165 |
+
printf( esc_html__( '%s option is disabled in your php.ini config. Please, enable it by change its value to 1. This option increases the speed of remote CSV uploading.', Visualizer_Plugin::NAME ), '<b>allow_url_fopen</b>' );
|
166 |
+
echo '</p>';
|
167 |
+
echo '</div>';
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
}
|
classes/Visualizer/Render/Page.php
CHANGED
@@ -1,104 +1,101 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Base class for all chart builder pages.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Visualizer_Render_Page extends Visualizer_Render {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Renders the page.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
*/
|
41 |
-
protected function _toHTML() {
|
42 |
-
echo '<div id="content">';
|
43 |
-
$this->_renderContent();
|
44 |
-
echo '</div>';
|
45 |
-
$this->_renderSidebar();
|
46 |
-
echo '<div id="toolbar">';
|
47 |
-
$this->_renderToolbar();
|
48 |
-
echo '</div>';
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Renders page content.
|
53 |
-
*
|
54 |
-
* @since 1.0.0
|
55 |
-
*
|
56 |
-
* @access protected
|
57 |
-
*/
|
58 |
-
protected function _renderContent() {}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Renders page sidebar.
|
62 |
-
*
|
63 |
-
* @since 1.0.0
|
64 |
-
*
|
65 |
-
* @access protected
|
66 |
-
*/
|
67 |
-
protected function _renderSidebar() {
|
68 |
-
echo '<div id="sidebar">';
|
69 |
-
echo '<ul class="group-wrapper">';
|
70 |
-
$this->_renderSidebarContent();
|
71 |
-
echo '</ul>';
|
72 |
-
|
73 |
-
echo '<div id="rate-the-plugin">';
|
74 |
-
echo '<div><b>', esc_html__( 'Like the plugin? Show us your love!', Visualizer_Plugin::NAME ), '</b></div>';
|
75 |
-
echo '<div id="rate-stars"> </div>';
|
76 |
-
echo '<a id="rate-link" href="http://wordpress.org/support/view/plugin-reviews/visualizer" target="_blank">';
|
77 |
-
esc_html_e( 'Rate it on WordPress.org', Visualizer_Plugin::NAME );
|
78 |
-
echo '</a>';
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
*
|
88 |
-
*
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
*
|
97 |
-
*
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
*/
|
102 |
-
protected function _renderToolbar() {}
|
103 |
-
|
104 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Base class for all chart builder pages.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
*/
|
32 |
+
class Visualizer_Render_Page extends Visualizer_Render {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders the page.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
*/
|
41 |
+
protected function _toHTML() {
|
42 |
+
echo '<div id="content">';
|
43 |
+
$this->_renderContent();
|
44 |
+
echo '</div>';
|
45 |
+
$this->_renderSidebar();
|
46 |
+
echo '<div id="toolbar">';
|
47 |
+
$this->_renderToolbar();
|
48 |
+
echo '</div>';
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Renders page content.
|
53 |
+
*
|
54 |
+
* @since 1.0.0
|
55 |
+
*
|
56 |
+
* @access protected
|
57 |
+
*/
|
58 |
+
protected function _renderContent() {}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Renders page sidebar.
|
62 |
+
*
|
63 |
+
* @since 1.0.0
|
64 |
+
*
|
65 |
+
* @access protected
|
66 |
+
*/
|
67 |
+
protected function _renderSidebar() {
|
68 |
+
echo '<div id="sidebar">';
|
69 |
+
echo '<ul class="group-wrapper">';
|
70 |
+
$this->_renderSidebarContent();
|
71 |
+
echo '</ul>';
|
72 |
+
|
73 |
+
echo '<div id="rate-the-plugin">';
|
74 |
+
echo '<div><b>', esc_html__( 'Like the plugin? Show us your love!', Visualizer_Plugin::NAME ), '</b></div>';
|
75 |
+
echo '<div id="rate-stars"> </div>';
|
76 |
+
echo '<a id="rate-link" href="http://wordpress.org/support/view/plugin-reviews/visualizer" target="_blank">';
|
77 |
+
esc_html_e( 'Rate it on WordPress.org', Visualizer_Plugin::NAME );
|
78 |
+
echo '</a>';
|
79 |
+
echo '</div>';
|
80 |
+
echo '</div>';
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Renders sidebar content.
|
85 |
+
*
|
86 |
+
* @since 1.0.0
|
87 |
+
*
|
88 |
+
* @access protected
|
89 |
+
*/
|
90 |
+
protected function _renderSidebarContent() {}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Renders toolbar content.
|
94 |
+
*
|
95 |
+
* @since 1.0.0
|
96 |
+
*
|
97 |
+
* @access protected
|
98 |
+
*/
|
99 |
+
protected function _renderToolbar() {}
|
100 |
+
|
|
|
|
|
|
|
101 |
}
|
classes/Visualizer/Render/Page/Data.php
CHANGED
@@ -1,109 +1,151 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Renders chart data setup page.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
* @subpackage Page
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Renders page content.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
*/
|
41 |
-
protected function _renderContent() {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
echo '
|
69 |
-
|
70 |
-
echo '<
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
echo '<
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
echo '<div>';
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Renders chart data setup page.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
* @subpackage Page
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
*/
|
32 |
+
class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders page content.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
*/
|
41 |
+
protected function _renderContent() {
|
42 |
+
// Added by Ash/Upwork
|
43 |
+
if( defined( 'Visualizer_Pro' ) ){
|
44 |
+
global $Visualizer_Pro;
|
45 |
+
$Visualizer_Pro->_addEditor();
|
46 |
+
}
|
47 |
+
// Added by Ash/Upwork
|
48 |
+
|
49 |
+
echo '<div id="canvas">';
|
50 |
+
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
|
51 |
+
echo '</div>';
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Renders sidebar content.
|
56 |
+
*
|
57 |
+
* @since 1.0.0
|
58 |
+
*
|
59 |
+
* @access protected
|
60 |
+
*/
|
61 |
+
protected function _renderSidebarContent() {
|
62 |
+
$upload_link = add_query_arg( array(
|
63 |
+
'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
|
64 |
+
'nonce' => wp_create_nonce(),
|
65 |
+
'chart' => $this->chart->ID,
|
66 |
+
), admin_url( 'admin-ajax.php' ) );
|
67 |
+
|
68 |
+
echo '<input type="button" name="back_button" class="return-settings-btn preview-btn hidden-setting" value="« Back">';
|
69 |
+
echo '<div class="initial-screen">';
|
70 |
+
echo '<iframe id="thehole" name="thehole"></iframe>';
|
71 |
+
echo '<p class="group-description">';
|
72 |
+
esc_html_e( "Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).", Visualizer_Plugin::NAME );
|
73 |
+
echo '</p>';
|
74 |
+
|
75 |
+
echo '<p class="group-description">';
|
76 |
+
esc_html_e( 'If you are unsure about how to format your data CSV then please take a look at this sample:', Visualizer_Plugin::NAME );
|
77 |
+
echo ' <a href="', VISUALIZER_ABSURL, 'samples/', $this->type, '.csv" target="_blank">', $this->type, '.csv</a> ';
|
78 |
+
printf( esc_html__( 'or read how you can add Google spreadsheet in following %sarticle%s.', Visualizer_Plugin::NAME ), '<a href="https://github.com/madpixelslabs/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank">', '</a>' );
|
79 |
+
echo '</p>';
|
80 |
+
|
81 |
+
echo '<div>';
|
82 |
+
echo '<form id="csv-form" action="', $upload_link, '" method="post" target="thehole" enctype="multipart/form-data">';
|
83 |
+
echo '<input type="hidden" id="remote-data" name="remote_data">';
|
84 |
+
echo '<div class="form-inline">';
|
85 |
+
echo '<div class="button button-primary file-wrapper computer-btn">';
|
86 |
+
echo '<input type="file" id="csv-file" class="file" name="local_data">';
|
87 |
+
esc_attr_e( 'From Computer', Visualizer_Plugin::NAME );
|
88 |
+
echo '</div>';
|
89 |
+
|
90 |
+
echo '<a id="remote-file" class="button from-web from-web-btn" href="javascript:;">', esc_html__( 'From Web', Visualizer_Plugin::NAME ), '</a>';
|
91 |
+
// Added by Ash/Upwork
|
92 |
+
if( defined( 'Visualizer_Pro' ) ){
|
93 |
+
global $Visualizer_Pro;
|
94 |
+
$Visualizer_Pro->_addFormElements();
|
95 |
+
}else{
|
96 |
+
// Added by Ash/Upwork
|
97 |
+
echo '<div class="just-on-pro"> </div>';
|
98 |
+
}
|
99 |
+
echo '</div>';
|
100 |
+
echo '</form>';
|
101 |
+
|
102 |
+
// added by Ash/Upwork
|
103 |
+
if( defined( 'Visualizer_Pro' ) ){
|
104 |
+
global $Visualizer_Pro;
|
105 |
+
$Visualizer_Pro->_addEditorElements();
|
106 |
+
}else{
|
107 |
+
?>
|
108 |
+
<a href="<?php echo Visualizer_Plugin::PRO_TEASER_URL;?>" title="<?php echo Visualizer_Plugin::PRO_TEASER_TITLE;?>" class="check-pro-btn" target="_new">
|
109 |
+
<input type="button" class="button preview preview-btn" id="existing-chart-free" value="<?php esc_attr_e( 'Check PRO Version ', Visualizer_Plugin::NAME );?>">
|
110 |
+
</a>
|
111 |
+
|
112 |
+
|
113 |
+
<?php
|
114 |
+
}
|
115 |
+
|
116 |
+
echo'<input type="button" name="advanced_button" class="advanced-settings-btn preview-btn" value="'. __( 'Advanced', Visualizer_Plugin::NAME ).' »">';
|
117 |
+
// Added by Ash/Upwork
|
118 |
+
|
119 |
+
echo '</div>';
|
120 |
+
echo '</div>';
|
121 |
+
|
122 |
+
// changed by Ash/Upwork
|
123 |
+
echo '<div class= "second-screen hidden-setting">';
|
124 |
+
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
|
125 |
+
echo $this->sidebar;
|
126 |
+
echo '</form>';
|
127 |
+
echo '</div>';
|
128 |
+
// changed by Ash/Upwork
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Renders toolbar content.
|
133 |
+
*
|
134 |
+
* @since 1.0.0
|
135 |
+
*
|
136 |
+
* @access protected
|
137 |
+
*/
|
138 |
+
protected function _renderToolbar() {
|
139 |
+
// changed by Ash/Upwork
|
140 |
+
echo '<div class="toolbar-div">';
|
141 |
+
echo '<a class="button button-large" href="', add_query_arg( 'tab', 'types' ), '">';
|
142 |
+
esc_html_e( 'Back', Visualizer_Plugin::NAME );
|
143 |
+
echo '</a>';
|
144 |
+
echo '</div>';
|
145 |
+
echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
|
146 |
+
echo '</div>';
|
147 |
+
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
}
|
classes/Visualizer/Render/Page/Send.php
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Renders page which sends a text to editor.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
* @subpackage Page
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Visualizer_Render_Page_Send extends Visualizer_Render_Page {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Renders page template.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
*/
|
41 |
-
protected function _toHTML() {
|
42 |
-
echo '<!DOCTYPE html>';
|
43 |
-
echo '<html>';
|
44 |
-
echo '<head>';
|
45 |
-
echo '<script type="text/javascript">';
|
46 |
-
echo '(function() {';
|
47 |
-
echo 'var win = window.dialogArguments || opener || parent || top;';
|
48 |
-
echo 'if (win.send_to_editor) {';
|
49 |
-
echo "win.send_to_editor('", $this->text, "');";
|
50 |
-
echo '}';
|
51 |
-
echo '})();';
|
52 |
-
echo '</script>';
|
53 |
-
echo '</head>';
|
54 |
-
echo '<body></body>';
|
55 |
-
echo '</html>';
|
56 |
-
}
|
57 |
-
|
58 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Renders page which sends a text to editor.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
* @subpackage Page
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
*/
|
32 |
+
class Visualizer_Render_Page_Send extends Visualizer_Render_Page {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders page template.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
*/
|
41 |
+
protected function _toHTML() {
|
42 |
+
echo '<!DOCTYPE html>';
|
43 |
+
echo '<html>';
|
44 |
+
echo '<head>';
|
45 |
+
echo '<script type="text/javascript">';
|
46 |
+
echo '(function() {';
|
47 |
+
echo 'var win = window.dialogArguments || opener || parent || top;';
|
48 |
+
echo 'if (win.send_to_editor) {';
|
49 |
+
echo "win.send_to_editor('", $this->text, "');";
|
50 |
+
echo '}';
|
51 |
+
echo '})();';
|
52 |
+
echo '</script>';
|
53 |
+
echo '</head>';
|
54 |
+
echo '<body></body>';
|
55 |
+
echo '</html>';
|
56 |
+
}
|
57 |
+
|
58 |
}
|
classes/Visualizer/Render/Page/Settings.php
CHANGED
@@ -1,85 +1,85 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Renders chart settings page.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
* @subpackage Page
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Visualizer_Render_Page_Settings extends Visualizer_Render_Page {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Renders page content.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
*/
|
41 |
-
protected function _renderContent() {
|
42 |
-
echo '<div id="canvas">';
|
43 |
-
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
|
44 |
-
echo '</div>';
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Renders toolbar content.
|
49 |
-
*
|
50 |
-
* @since 1.0.0
|
51 |
-
*
|
52 |
-
* @access protected
|
53 |
-
*/
|
54 |
-
protected function _renderToolbar() {
|
55 |
-
echo '<a class="button button-large" href="', add_query_arg( 'tab', 'data' ), '">';
|
56 |
-
esc_html_e( 'Back', Visualizer_Plugin::NAME );
|
57 |
-
echo '</a>';
|
58 |
-
echo '<input type="submit" class="button button-primary button-large push-right" value="', $this->button, '">';
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Renders page template.
|
63 |
-
*
|
64 |
-
* @since 1.0.0
|
65 |
-
*
|
66 |
-
* @access protected
|
67 |
-
*/
|
68 |
-
protected function _toHTML() {
|
69 |
-
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
|
70 |
-
parent::_toHTML();
|
71 |
-
echo '</form>';
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Renders sidebar content.
|
76 |
-
*
|
77 |
-
* @since 1.0.0
|
78 |
-
*
|
79 |
-
* @access protected
|
80 |
-
*/
|
81 |
-
protected function _renderSidebarContent() {
|
82 |
-
echo $this->sidebar;
|
83 |
-
}
|
84 |
-
|
85 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Renders chart settings page.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
* @subpackage Page
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
*/
|
32 |
+
class Visualizer_Render_Page_Settings extends Visualizer_Render_Page {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders page content.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
*/
|
41 |
+
protected function _renderContent() {
|
42 |
+
echo '<div id="canvas">';
|
43 |
+
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">';
|
44 |
+
echo '</div>';
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Renders toolbar content.
|
49 |
+
*
|
50 |
+
* @since 1.0.0
|
51 |
+
*
|
52 |
+
* @access protected
|
53 |
+
*/
|
54 |
+
protected function _renderToolbar() {
|
55 |
+
echo '<a class="button button-large" href="', add_query_arg( 'tab', 'data' ), '">';
|
56 |
+
esc_html_e( 'Back', Visualizer_Plugin::NAME );
|
57 |
+
echo '</a>';
|
58 |
+
echo '<input type="submit" class="button button-primary button-large push-right" value="', $this->button, '">';
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Renders page template.
|
63 |
+
*
|
64 |
+
* @since 1.0.0
|
65 |
+
*
|
66 |
+
* @access protected
|
67 |
+
*/
|
68 |
+
protected function _toHTML() {
|
69 |
+
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
|
70 |
+
parent::_toHTML();
|
71 |
+
echo '</form>';
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Renders sidebar content.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*
|
79 |
+
* @access protected
|
80 |
+
*/
|
81 |
+
protected function _renderSidebarContent() {
|
82 |
+
echo $this->sidebar;
|
83 |
+
}
|
84 |
+
|
85 |
}
|
classes/Visualizer/Render/Page/Types.php
CHANGED
@@ -1,87 +1,87 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Renders chart type picker page.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
* @subpackage Page
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Visualizer_Render_Page_Types extends Visualizer_Render_Page {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Renders page template.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
*/
|
41 |
-
protected function _toHTML() {
|
42 |
-
echo '<form method="post">';
|
43 |
-
echo '<input type="hidden" name="nonce" value="', wp_create_nonce(), '">';
|
44 |
-
parent::_toHTML();
|
45 |
-
echo '</form>';
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Renders page content.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
*
|
53 |
-
* @access protected
|
54 |
-
*/
|
55 |
-
protected function _renderContent() {
|
56 |
-
echo '<div id="type-picker">';
|
57 |
-
foreach ( $this->types as $type ) {
|
58 |
-
echo '<div class="type-box type-box-', $type, '">';
|
59 |
-
echo '<label class="type-label', $type == $this->type ? ' type-label-selected' : '', '">';
|
60 |
-
echo '<input type="radio" class="type-radio" name="type" value="', $type, '"', checked( $type, $this->type, false ), '>';
|
61 |
-
echo '</label>';
|
62 |
-
echo '</div>';
|
63 |
-
}
|
64 |
-
echo '</div>';
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Renders page sidebar.
|
69 |
-
*
|
70 |
-
* @since 1.0.0
|
71 |
-
*
|
72 |
-
* @access protected
|
73 |
-
*/
|
74 |
-
protected function _renderSidebar() {}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Renders toolbar content.
|
78 |
-
*
|
79 |
-
* @since 1.0.0
|
80 |
-
*
|
81 |
-
* @access protected
|
82 |
-
*/
|
83 |
-
protected function _renderToolbar() {
|
84 |
-
echo '<input type="submit" class="button button-primary button-large push-right" value="', esc_attr__( 'Next', Visualizer_Plugin::NAME ), '">';
|
85 |
-
}
|
86 |
-
|
87 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Renders chart type picker page.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
* @subpackage Page
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
*/
|
32 |
+
class Visualizer_Render_Page_Types extends Visualizer_Render_Page {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Renders page template.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
*/
|
41 |
+
protected function _toHTML() {
|
42 |
+
echo '<form method="post">';
|
43 |
+
echo '<input type="hidden" name="nonce" value="', wp_create_nonce(), '">';
|
44 |
+
parent::_toHTML();
|
45 |
+
echo '</form>';
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Renders page content.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
*
|
53 |
+
* @access protected
|
54 |
+
*/
|
55 |
+
protected function _renderContent() {
|
56 |
+
echo '<div id="type-picker">';
|
57 |
+
foreach ( $this->types as $type ) {
|
58 |
+
echo '<div class="type-box type-box-', $type, '">';
|
59 |
+
echo '<label class="type-label', $type == $this->type ? ' type-label-selected' : '', '">';
|
60 |
+
echo '<input type="radio" class="type-radio" name="type" value="', $type, '"', checked( $type, $this->type, false ), '>';
|
61 |
+
echo '</label>';
|
62 |
+
echo '</div>';
|
63 |
+
}
|
64 |
+
echo '</div>';
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Renders page sidebar.
|
69 |
+
*
|
70 |
+
* @since 1.0.0
|
71 |
+
*
|
72 |
+
* @access protected
|
73 |
+
*/
|
74 |
+
protected function _renderSidebar() {}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Renders toolbar content.
|
78 |
+
*
|
79 |
+
* @since 1.0.0
|
80 |
+
*
|
81 |
+
* @access protected
|
82 |
+
*/
|
83 |
+
protected function _renderToolbar() {
|
84 |
+
echo '<input type="submit" class="button button-primary button-large push-right" value="', esc_attr__( 'Next', Visualizer_Plugin::NAME ), '">';
|
85 |
+
}
|
86 |
+
|
87 |
}
|
classes/Visualizer/Render/Page/Update.php
CHANGED
@@ -1,65 +1,73 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Renders data uploading respond.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Page
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Page_Update extends Visualizer_Render_Page {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders page template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
echo '<!DOCTYPE html>';
|
44 |
-
echo '<html>';
|
45 |
-
echo '<head>';
|
46 |
-
echo '<script type="text/javascript">';
|
47 |
-
echo '(function() {';
|
48 |
-
if ( empty( $this->message ) ) {
|
49 |
-
echo 'var win = window.dialogArguments || opener || parent || top;';
|
50 |
-
echo 'if (win.visualizer) {';
|
51 |
-
echo 'win.visualizer.charts.canvas.series = ', $this->series, ';';
|
52 |
-
echo 'win.visualizer.charts.canvas.data = ', $this->data, ';';
|
53 |
-
echo 'win.visualizer.render();';
|
54 |
-
echo '}';
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Renders data uploading respond.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Page
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Page_Update extends Visualizer_Render_Page {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders page template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
echo '<!DOCTYPE html>';
|
44 |
+
echo '<html>';
|
45 |
+
echo '<head>';
|
46 |
+
echo '<script type="text/javascript">';
|
47 |
+
echo '(function() {';
|
48 |
+
if ( empty( $this->message ) ) {
|
49 |
+
echo 'var win = window.dialogArguments || opener || parent || top;';
|
50 |
+
echo 'if (win.visualizer) {';
|
51 |
+
echo 'win.visualizer.charts.canvas.series = ', $this->series, ';';
|
52 |
+
echo 'win.visualizer.charts.canvas.data = ', $this->data, ';';
|
53 |
+
echo 'win.visualizer.render();';
|
54 |
+
echo '}';
|
55 |
+
|
56 |
+
// added by Ash/Upwork
|
57 |
+
if( defined( 'Visualizer_Pro' ) ){
|
58 |
+
global $Visualizer_Pro;
|
59 |
+
$Visualizer_Pro->_addUpdateHook($this->series, $this->data);
|
60 |
+
}
|
61 |
+
// Added by Ash/Upwork
|
62 |
+
|
63 |
+
} else {
|
64 |
+
echo 'alert("', $this->message, '");';
|
65 |
+
}
|
66 |
+
echo '})();';
|
67 |
+
echo '</script>';
|
68 |
+
echo '</head>';
|
69 |
+
echo '<body></body>';
|
70 |
+
echo '</html>';
|
71 |
+
}
|
72 |
+
|
73 |
}
|
classes/Visualizer/Render/Sidebar.php
CHANGED
@@ -1,548 +1,548 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Base class for all chart sidebar groups.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
* @abstract
|
32 |
-
*/
|
33 |
-
abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* The array of font families accepted by visualization API.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @static
|
41 |
-
* @access protected
|
42 |
-
* @var array
|
43 |
-
*/
|
44 |
-
protected static $_fontFamilies = array(
|
45 |
-
'Arial' => 'Arial',
|
46 |
-
'Sans Serif' => 'Sans Serif',
|
47 |
-
'serif' => 'Serif',
|
48 |
-
'Arial black' => 'Wide',
|
49 |
-
'Arial Narrow' => 'Narrow',
|
50 |
-
'Comic Sans MS' => 'Comic Sans MS',
|
51 |
-
'Courier New' => 'Courier New',
|
52 |
-
'Garamond' => 'Garamond',
|
53 |
-
'Georgia' => 'Georgia',
|
54 |
-
'Tahoma' => 'Tahoma',
|
55 |
-
'Verdana' => 'Verdana',
|
56 |
-
);
|
57 |
-
|
58 |
-
/**
|
59 |
-
* The Yes/No array.
|
60 |
-
*
|
61 |
-
* @since 1.0.0
|
62 |
-
*
|
63 |
-
* @access protected
|
64 |
-
* @var array
|
65 |
-
*/
|
66 |
-
protected $_yesno;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* The array of available legend positions.
|
70 |
-
*
|
71 |
-
* @since 1.0.0
|
72 |
-
*
|
73 |
-
* @access protected
|
74 |
-
* @var array
|
75 |
-
*/
|
76 |
-
protected $_legendPositions;
|
77 |
-
|
78 |
-
/**
|
79 |
-
* The array of available alignments.
|
80 |
-
*
|
81 |
-
* @since 1.0.0
|
82 |
-
*
|
83 |
-
* @access protected
|
84 |
-
* @var array
|
85 |
-
*/
|
86 |
-
protected $_alignments;
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Constructor.
|
90 |
-
*
|
91 |
-
* @since 1.0.0
|
92 |
-
*
|
93 |
-
* @access public
|
94 |
-
* @param array $data The data what has to be associated with this render.
|
95 |
-
*/
|
96 |
-
public function __construct( $data = array() ) {
|
97 |
-
parent::__construct( $data );
|
98 |
-
|
99 |
-
$this->_legendPositions = array(
|
100 |
-
'' => '',
|
101 |
-
'right' => esc_html__( 'Right of the chart', Visualizer_Plugin::NAME ),
|
102 |
-
'top' => esc_html__( 'Above the chart', Visualizer_Plugin::NAME ),
|
103 |
-
'bottom' => esc_html__( 'Below the chart', Visualizer_Plugin::NAME ),
|
104 |
-
'in' => esc_html__( 'Inside the chart', Visualizer_Plugin::NAME ),
|
105 |
-
'none' => esc_html__( 'Omit the legend', Visualizer_Plugin::NAME ),
|
106 |
-
);
|
107 |
-
|
108 |
-
$this->_alignments = array(
|
109 |
-
'' => '',
|
110 |
-
'start' => esc_html__( 'Aligned to the start of the allocated area', Visualizer_Plugin::NAME ),
|
111 |
-
'center' => esc_html__( 'Centered in the allocated area', Visualizer_Plugin::NAME ),
|
112 |
-
'end' => esc_html__( 'Aligned to the end of the allocated area', Visualizer_Plugin::NAME ),
|
113 |
-
);
|
114 |
-
|
115 |
-
$this->_yesno = array(
|
116 |
-
'' => '',
|
117 |
-
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
118 |
-
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
119 |
-
);
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Renders chart title settings.
|
124 |
-
*
|
125 |
-
* @since 1.0.0
|
126 |
-
*
|
127 |
-
* @access protected
|
128 |
-
*/
|
129 |
-
protected function _renderChartTitleSettings() {
|
130 |
-
self::_renderTextItem(
|
131 |
-
esc_html__( 'Chart Title', Visualizer_Plugin::NAME ),
|
132 |
-
'title',
|
133 |
-
$this->title,
|
134 |
-
esc_html__( 'Text to display above the chart.', Visualizer_Plugin::NAME )
|
135 |
-
);
|
136 |
-
|
137 |
-
self::_renderColorPickerItem(
|
138 |
-
esc_html__( 'Chart Title Color', Visualizer_Plugin::NAME ),
|
139 |
-
'titleTextStyle[color]',
|
140 |
-
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
|
141 |
-
'#000'
|
142 |
-
);
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Renders chart general settings group.
|
147 |
-
*
|
148 |
-
* @since 1.0.0
|
149 |
-
*
|
150 |
-
* @access protected
|
151 |
-
*/
|
152 |
-
protected function _renderGeneralSettings() {
|
153 |
-
self::_renderGroupStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ) );
|
154 |
-
self::_renderSectionStart();
|
155 |
-
self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', Visualizer_Plugin::NAME ) );
|
156 |
-
self::_renderSectionEnd();
|
157 |
-
|
158 |
-
self::_renderSectionStart( esc_html__( 'Title', Visualizer_Plugin::NAME ), false );
|
159 |
-
$this->_renderChartTitleSettings();
|
160 |
-
self::_renderSectionEnd();
|
161 |
-
|
162 |
-
self::_renderSectionStart( esc_html__( 'Font Styles' ), false );
|
163 |
-
echo '<div class="section-item">';
|
164 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
165 |
-
echo '<b>', esc_html__( 'Family And Size', Visualizer_Plugin::NAME ), '</b>';
|
166 |
-
|
167 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
168 |
-
echo '<tr>';
|
169 |
-
echo '<td class="section-table-column">';
|
170 |
-
echo '<select name="fontName" class="control-select">';
|
171 |
-
echo '<option></option>';
|
172 |
-
foreach ( self::$_fontFamilies as $font => $label ) {
|
173 |
-
echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
|
174 |
-
echo $label;
|
175 |
-
echo '</option>';
|
176 |
-
}
|
177 |
-
echo '</select>';
|
178 |
-
echo '</td>';
|
179 |
-
echo '<td class="section-table-column">';
|
180 |
-
echo '<select name="fontSize" class="control-select">';
|
181 |
-
echo '<option></option>';
|
182 |
-
for ( $i = 7; $i <= 20; $i++ ) {
|
183 |
-
echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
|
184 |
-
}
|
185 |
-
echo '</select>';
|
186 |
-
echo '</td>';
|
187 |
-
echo '</tr>';
|
188 |
-
echo '</table>';
|
189 |
-
|
190 |
-
echo '<p class="section-description">';
|
191 |
-
esc_html_e( 'The default font family and size for all text in the chart.', Visualizer_Plugin::NAME );
|
192 |
-
echo '</p>';
|
193 |
-
echo '</div>';
|
194 |
-
self::_renderSectionEnd();
|
195 |
-
|
196 |
-
self::_renderSectionStart( esc_html__( 'Legend', Visualizer_Plugin::NAME ), false );
|
197 |
-
self::_renderSelectItem(
|
198 |
-
esc_html__( 'Position', Visualizer_Plugin::NAME ),
|
199 |
-
'legend[position]',
|
200 |
-
$this->legend['position'],
|
201 |
-
$this->_legendPositions,
|
202 |
-
esc_html__( 'Determines where to place the legend, compared to the chart area.', Visualizer_Plugin::NAME )
|
203 |
-
);
|
204 |
-
|
205 |
-
self::_renderSelectItem(
|
206 |
-
esc_html__( 'Alignment', Visualizer_Plugin::NAME ),
|
207 |
-
'legend[alignment]',
|
208 |
-
$this->legend['alignment'],
|
209 |
-
$this->_alignments,
|
210 |
-
esc_html__( 'Determines the alignment of the legend.', Visualizer_Plugin::NAME )
|
211 |
-
);
|
212 |
-
|
213 |
-
self::_renderColorPickerItem(
|
214 |
-
esc_html__( 'Font Color', Visualizer_Plugin::NAME ),
|
215 |
-
'legend[textStyle][color]',
|
216 |
-
isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
|
217 |
-
'#000'
|
218 |
-
);
|
219 |
-
self::_renderSectionEnd();
|
220 |
-
|
221 |
-
self::_renderSectionStart( esc_html__( 'Tooltip', Visualizer_Plugin::NAME ), false );
|
222 |
-
$this->_renderTooltipSettigns();
|
223 |
-
self::_renderSectionEnd();
|
224 |
-
self::_renderGroupEnd();
|
225 |
-
}
|
226 |
-
|
227 |
-
/**
|
228 |
-
* Renders tooltip settings section.
|
229 |
-
*
|
230 |
-
* @since 1.4.0
|
231 |
-
*
|
232 |
-
* @access protected
|
233 |
-
*/
|
234 |
-
protected function _renderTooltipSettigns() {
|
235 |
-
self::_renderSelectItem(
|
236 |
-
esc_html__( 'Trigger', Visualizer_Plugin::NAME ),
|
237 |
-
'tooltip[trigger]',
|
238 |
-
isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
|
239 |
-
array(
|
240 |
-
'' => '',
|
241 |
-
'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', Visualizer_Plugin::NAME ),
|
242 |
-
'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', Visualizer_Plugin::NAME ),
|
243 |
-
'none' => esc_html__( 'The tooltip will not be displayed', Visualizer_Plugin::NAME ),
|
244 |
-
),
|
245 |
-
esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', Visualizer_Plugin::NAME )
|
246 |
-
);
|
247 |
-
|
248 |
-
self::_renderSelectItem(
|
249 |
-
esc_html__( 'Show Color Code', Visualizer_Plugin::NAME ),
|
250 |
-
'tooltip[showColorCode]',
|
251 |
-
isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
|
252 |
-
$this->_yesno,
|
253 |
-
esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', Visualizer_Plugin::NAME )
|
254 |
-
);
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Renders chart view settings group.
|
259 |
-
*
|
260 |
-
* @since 1.0.0
|
261 |
-
*
|
262 |
-
* @access protected
|
263 |
-
*/
|
264 |
-
protected function _renderViewSettings() {
|
265 |
-
self::_renderGroupStart( esc_html__( 'Layout & Chart Area', Visualizer_Plugin::NAME ) );
|
266 |
-
self::_renderSectionStart( esc_html__( 'Layout', Visualizer_Plugin::NAME ), false );
|
267 |
-
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
268 |
-
|
269 |
-
echo '<div class="section-item">';
|
270 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
271 |
-
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
272 |
-
|
273 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
274 |
-
echo '<tr>';
|
275 |
-
echo '<td class="section-table-column">';
|
276 |
-
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
277 |
-
echo '</td>';
|
278 |
-
echo '<td class="section-table-column">';
|
279 |
-
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
280 |
-
echo '</td>';
|
281 |
-
echo '</tr>';
|
282 |
-
echo '</table>';
|
283 |
-
|
284 |
-
echo '<p class="section-description">';
|
285 |
-
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
286 |
-
echo '</p>';
|
287 |
-
echo '</div>';
|
288 |
-
|
289 |
-
echo '<div class="section-delimiter"></div>';
|
290 |
-
|
291 |
-
self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', Visualizer_Plugin::NAME ) );
|
292 |
-
|
293 |
-
self::_renderTextItem(
|
294 |
-
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
295 |
-
'backgroundColor[strokeWidth]',
|
296 |
-
isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
|
297 |
-
esc_html__( 'The chart border width in pixels.', Visualizer_Plugin::NAME ),
|
298 |
-
'0'
|
299 |
-
);
|
300 |
-
|
301 |
-
self::_renderColorPickerItem(
|
302 |
-
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
303 |
-
'backgroundColor[stroke]',
|
304 |
-
!empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
|
305 |
-
'#666'
|
306 |
-
);
|
307 |
-
|
308 |
-
$background_color = !empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
|
309 |
-
self::_renderColorPickerItem(
|
310 |
-
esc_html__( 'Background Color', Visualizer_Plugin::NAME ),
|
311 |
-
'backgroundColor[fill]',
|
312 |
-
$background_color,
|
313 |
-
'#fff'
|
314 |
-
);
|
315 |
-
|
316 |
-
echo '<div class="section-item">';
|
317 |
-
echo '<label>';
|
318 |
-
echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
|
319 |
-
esc_html_e( 'Transparent background' );
|
320 |
-
echo '</label>';
|
321 |
-
echo '</div>';
|
322 |
-
self::_renderSectionEnd();
|
323 |
-
|
324 |
-
self::_renderSectionStart( esc_html__( 'Chart Area', Visualizer_Plugin::NAME ), false );
|
325 |
-
self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
326 |
-
|
327 |
-
echo '<div class="section-item">';
|
328 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
329 |
-
echo '<b>', esc_html__( 'Left And Top Margins', Visualizer_Plugin::NAME ), '</b>';
|
330 |
-
|
331 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
332 |
-
echo '<tr>';
|
333 |
-
echo '<td class="section-table-column">';
|
334 |
-
echo '<input type="text" name="chartArea[left]" class="control-text" value="', !empty( $this->chartArea['left'] ) ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
|
335 |
-
echo '</td>';
|
336 |
-
echo '<td class="section-table-column">';
|
337 |
-
echo '<input type="text" name="chartArea[top]" class="control-text" value="', !empty( $this->chartArea['top'] ) ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
|
338 |
-
echo '</td>';
|
339 |
-
echo '</tr>';
|
340 |
-
echo '</table>';
|
341 |
-
|
342 |
-
echo '<p class="section-description">';
|
343 |
-
esc_html_e( 'Determines how far to draw the chart from the left and top borders.', Visualizer_Plugin::NAME );
|
344 |
-
echo '</p>';
|
345 |
-
echo '</div>';
|
346 |
-
|
347 |
-
echo '<div class="section-item">';
|
348 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
349 |
-
echo '<b>', esc_html__( 'Width And Height Of Chart Area', Visualizer_Plugin::NAME ), '</b>';
|
350 |
-
|
351 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
352 |
-
echo '<tr>';
|
353 |
-
echo '<td class="section-table-column">';
|
354 |
-
echo '<input type="text" name="chartArea[width]" class="control-text" value="', !empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
|
355 |
-
echo '</td>';
|
356 |
-
echo '<td class="section-table-column">';
|
357 |
-
echo '<input type="text" name="chartArea[height]" class="control-text" value="', !empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
|
358 |
-
echo '</td>';
|
359 |
-
echo '</tr>';
|
360 |
-
echo '</table>';
|
361 |
-
|
362 |
-
echo '<p class="section-description">';
|
363 |
-
esc_html_e( 'Determines the width and hight of the chart area.', Visualizer_Plugin::NAME );
|
364 |
-
echo '</p>';
|
365 |
-
echo '</div>';
|
366 |
-
self::_renderSectionEnd();
|
367 |
-
self::_renderGroupEnd();
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Renders select item.
|
372 |
-
*
|
373 |
-
* @since 1.0.0
|
374 |
-
*
|
375 |
-
* @static
|
376 |
-
* @access protected
|
377 |
-
* @param string $title The title of the select item.
|
378 |
-
* @param string $name The name of the select item.
|
379 |
-
* @param string $value The actual value of the select item.
|
380 |
-
* @param array $options The array of select options.
|
381 |
-
* @param string $desc The description of the select item.
|
382 |
-
*/
|
383 |
-
protected static function _renderSelectItem( $title, $name, $value, array $options, $desc ) {
|
384 |
-
echo '<div class="section-item">';
|
385 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
386 |
-
echo '<b>', $title, '</b>';
|
387 |
-
echo '<select class="control-select" name="', $name, '">';
|
388 |
-
foreach ( $options as $key => $label ) {
|
389 |
-
echo '<option value="', $key, '"', selected( $key, $value, false ), '>';
|
390 |
-
echo $label;
|
391 |
-
echo '</option>';
|
392 |
-
}
|
393 |
-
echo '</select>';
|
394 |
-
echo '<p class="section-description">', $desc, '</p>';
|
395 |
-
echo '</div>';
|
396 |
-
}
|
397 |
-
|
398 |
-
/**
|
399 |
-
* Renders color picker item.
|
400 |
-
*
|
401 |
-
* @since 1.0.0
|
402 |
-
*
|
403 |
-
* @static
|
404 |
-
* @access protected
|
405 |
-
* @param string $title The title of the select item.
|
406 |
-
* @param string $name The name of the select item.
|
407 |
-
* @param string $value The actual value of the select item.
|
408 |
-
* @param string $default The default value of the color picker.
|
409 |
-
*/
|
410 |
-
protected static function _renderColorPickerItem( $title, $name, $value, $default ) {
|
411 |
-
echo '<div class="section-item">';
|
412 |
-
echo '<b>', $title, '</b>';
|
413 |
-
echo '<div>';
|
414 |
-
echo '<input type="text" class="color-picker-hex" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Value', Visualizer_Plugin::NAME ), '" value="', is_null( $value ) ? $default : esc_attr( $value ), '" data-default-color="', $default, '">';
|
415 |
-
echo '</div>';
|
416 |
-
echo '</div>';
|
417 |
-
}
|
418 |
-
|
419 |
-
/**
|
420 |
-
* Renders text item.
|
421 |
-
*
|
422 |
-
* @since 1.0.0
|
423 |
-
*
|
424 |
-
* @static
|
425 |
-
* @access protected
|
426 |
-
* @param string $title The title of the select item.
|
427 |
-
* @param string $name The name of the select item.
|
428 |
-
* @param string $value The actual value of the select item.
|
429 |
-
* @param string $desc The description of the select item.
|
430 |
-
* @param string $placeholder The placeholder for the input.
|
431 |
-
*/
|
432 |
-
protected static function _renderTextItem( $title, $name, $value, $desc, $placeholder = '' ) {
|
433 |
-
echo '<div class="section-item">';
|
434 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
435 |
-
echo '<b>', $title, '</b>';
|
436 |
-
echo '<input type="text" class="control-text" name="', $name, '" value="', esc_attr( $value ), '" placeholder="', $placeholder, '">';
|
437 |
-
echo '<p class="section-description">', $desc, '</p>';
|
438 |
-
echo '</div>';
|
439 |
-
}
|
440 |
-
|
441 |
-
/**
|
442 |
-
* Renders the beginning of a group.
|
443 |
-
*
|
444 |
-
* @since 1.0.0
|
445 |
-
*
|
446 |
-
* @static
|
447 |
-
* @access protected
|
448 |
-
* @param string $title The title of this group.
|
449 |
-
*/
|
450 |
-
protected static function _renderGroupStart( $title ) {
|
451 |
-
echo '<li class="group">';
|
452 |
-
echo '<h3 class="group-title">', $title, '</h3>';
|
453 |
-
echo '<ul class="group-content">';
|
454 |
-
}
|
455 |
-
|
456 |
-
/**
|
457 |
-
* Renders the ending of a group.
|
458 |
-
*
|
459 |
-
* @since 1.0.0
|
460 |
-
*
|
461 |
-
* @static
|
462 |
-
* @access protected
|
463 |
-
*/
|
464 |
-
protected static function _renderGroupEnd() {
|
465 |
-
echo '</ul>';
|
466 |
-
echo '</li>';
|
467 |
-
}
|
468 |
-
|
469 |
-
/**
|
470 |
-
* Renders the beginning of a section.
|
471 |
-
*
|
472 |
-
* @since 1.0.0
|
473 |
-
*
|
474 |
-
* @static
|
475 |
-
* @access protected
|
476 |
-
* @param string $title The title of this section. If the title is empty, no title will be displayed.
|
477 |
-
* @param boolean $open Determines whether the section items block has to be expanded or collapsed.
|
478 |
-
*/
|
479 |
-
protected static function _renderSectionStart( $title = false, $open = true ) {
|
480 |
-
echo '<li>';
|
481 |
-
if ( !empty( $title ) ) {
|
482 |
-
echo '<span class="section-title">', $title, '</span>';
|
483 |
-
}
|
484 |
-
echo '<div class="section-items', $open ? ' open' : '', '">';
|
485 |
-
}
|
486 |
-
|
487 |
-
/**
|
488 |
-
* Renders the ending of a section.
|
489 |
-
*
|
490 |
-
* @since 1.0.0
|
491 |
-
*
|
492 |
-
* @static
|
493 |
-
* @access protected
|
494 |
-
*/
|
495 |
-
protected static function _renderSectionEnd() {
|
496 |
-
echo '</div>';
|
497 |
-
echo '</li>';
|
498 |
-
}
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Renders section description block.
|
502 |
-
*
|
503 |
-
* @since 1.0.0
|
504 |
-
*
|
505 |
-
* @static
|
506 |
-
* @access protected
|
507 |
-
* @param string $description The description text.
|
508 |
-
*/
|
509 |
-
protected static function _renderSectionDescription( $description ) {
|
510 |
-
echo '<div class="section-item">';
|
511 |
-
echo '<div class="section-description">', $description, '</div>';
|
512 |
-
echo '</div>';
|
513 |
-
}
|
514 |
-
|
515 |
-
/**
|
516 |
-
* Renders format field according to series type.
|
517 |
-
*
|
518 |
-
* @since 1.3.0
|
519 |
-
*
|
520 |
-
* @access protected
|
521 |
-
* @param int $index The index of the series.
|
522 |
-
*/
|
523 |
-
protected function _renderFormatField( $index = 0 ) {
|
524 |
-
switch ( $this->__series[$index + 1]['type'] ) {
|
525 |
-
case 'number':
|
526 |
-
self::_renderTextItem(
|
527 |
-
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
528 |
-
'series[' . $index . '][format]',
|
529 |
-
isset( $this->series[$index]['format'] ) ? $this->series[$index]['format'] : '',
|
530 |
-
sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ), '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', '</a>' ),
|
531 |
-
'#,###.##'
|
532 |
-
);
|
533 |
-
break;
|
534 |
-
case 'date':
|
535 |
-
case 'datetime':
|
536 |
-
case 'timeofday':
|
537 |
-
self::_renderTextItem(
|
538 |
-
esc_html__( 'Date Format', Visualizer_Plugin::NAME ),
|
539 |
-
'series[' . $index . '][format]',
|
540 |
-
isset( $this->series[$index]['format'] ) ? $this->series[$index]['format'] : '',
|
541 |
-
sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %sICU date and time format%s.', Visualizer_Plugin::NAME ), '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', '</a>' ),
|
542 |
-
'eeee, dd LLLL yyyy'
|
543 |
-
);
|
544 |
-
break;
|
545 |
-
}
|
546 |
-
}
|
547 |
-
|
548 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Base class for all chart sidebar groups.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
*
|
30 |
+
* @since 1.0.0
|
31 |
+
* @abstract
|
32 |
+
*/
|
33 |
+
abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The array of font families accepted by visualization API.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @static
|
41 |
+
* @access protected
|
42 |
+
* @var array
|
43 |
+
*/
|
44 |
+
protected static $_fontFamilies = array(
|
45 |
+
'Arial' => 'Arial',
|
46 |
+
'Sans Serif' => 'Sans Serif',
|
47 |
+
'serif' => 'Serif',
|
48 |
+
'Arial black' => 'Wide',
|
49 |
+
'Arial Narrow' => 'Narrow',
|
50 |
+
'Comic Sans MS' => 'Comic Sans MS',
|
51 |
+
'Courier New' => 'Courier New',
|
52 |
+
'Garamond' => 'Garamond',
|
53 |
+
'Georgia' => 'Georgia',
|
54 |
+
'Tahoma' => 'Tahoma',
|
55 |
+
'Verdana' => 'Verdana',
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* The Yes/No array.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
*
|
63 |
+
* @access protected
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
protected $_yesno;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* The array of available legend positions.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*
|
73 |
+
* @access protected
|
74 |
+
* @var array
|
75 |
+
*/
|
76 |
+
protected $_legendPositions;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* The array of available alignments.
|
80 |
+
*
|
81 |
+
* @since 1.0.0
|
82 |
+
*
|
83 |
+
* @access protected
|
84 |
+
* @var array
|
85 |
+
*/
|
86 |
+
protected $_alignments;
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Constructor.
|
90 |
+
*
|
91 |
+
* @since 1.0.0
|
92 |
+
*
|
93 |
+
* @access public
|
94 |
+
* @param array $data The data what has to be associated with this render.
|
95 |
+
*/
|
96 |
+
public function __construct( $data = array() ) {
|
97 |
+
parent::__construct( $data );
|
98 |
+
|
99 |
+
$this->_legendPositions = array(
|
100 |
+
'' => '',
|
101 |
+
'right' => esc_html__( 'Right of the chart', Visualizer_Plugin::NAME ),
|
102 |
+
'top' => esc_html__( 'Above the chart', Visualizer_Plugin::NAME ),
|
103 |
+
'bottom' => esc_html__( 'Below the chart', Visualizer_Plugin::NAME ),
|
104 |
+
'in' => esc_html__( 'Inside the chart', Visualizer_Plugin::NAME ),
|
105 |
+
'none' => esc_html__( 'Omit the legend', Visualizer_Plugin::NAME ),
|
106 |
+
);
|
107 |
+
|
108 |
+
$this->_alignments = array(
|
109 |
+
'' => '',
|
110 |
+
'start' => esc_html__( 'Aligned to the start of the allocated area', Visualizer_Plugin::NAME ),
|
111 |
+
'center' => esc_html__( 'Centered in the allocated area', Visualizer_Plugin::NAME ),
|
112 |
+
'end' => esc_html__( 'Aligned to the end of the allocated area', Visualizer_Plugin::NAME ),
|
113 |
+
);
|
114 |
+
|
115 |
+
$this->_yesno = array(
|
116 |
+
'' => '',
|
117 |
+
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
118 |
+
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Renders chart title settings.
|
124 |
+
*
|
125 |
+
* @since 1.0.0
|
126 |
+
*
|
127 |
+
* @access protected
|
128 |
+
*/
|
129 |
+
protected function _renderChartTitleSettings() {
|
130 |
+
self::_renderTextItem(
|
131 |
+
esc_html__( 'Chart Title', Visualizer_Plugin::NAME ),
|
132 |
+
'title',
|
133 |
+
$this->title,
|
134 |
+
esc_html__( 'Text to display above the chart.', Visualizer_Plugin::NAME )
|
135 |
+
);
|
136 |
+
|
137 |
+
self::_renderColorPickerItem(
|
138 |
+
esc_html__( 'Chart Title Color', Visualizer_Plugin::NAME ),
|
139 |
+
'titleTextStyle[color]',
|
140 |
+
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
|
141 |
+
'#000'
|
142 |
+
);
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Renders chart general settings group.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
*
|
150 |
+
* @access protected
|
151 |
+
*/
|
152 |
+
protected function _renderGeneralSettings() {
|
153 |
+
self::_renderGroupStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ) );
|
154 |
+
self::_renderSectionStart();
|
155 |
+
self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', Visualizer_Plugin::NAME ) );
|
156 |
+
self::_renderSectionEnd();
|
157 |
+
|
158 |
+
self::_renderSectionStart( esc_html__( 'Title', Visualizer_Plugin::NAME ), false );
|
159 |
+
$this->_renderChartTitleSettings();
|
160 |
+
self::_renderSectionEnd();
|
161 |
+
|
162 |
+
self::_renderSectionStart( esc_html__( 'Font Styles' ), false );
|
163 |
+
echo '<div class="section-item">';
|
164 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
165 |
+
echo '<b>', esc_html__( 'Family And Size', Visualizer_Plugin::NAME ), '</b>';
|
166 |
+
|
167 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
168 |
+
echo '<tr>';
|
169 |
+
echo '<td class="section-table-column">';
|
170 |
+
echo '<select name="fontName" class="control-select">';
|
171 |
+
echo '<option></option>';
|
172 |
+
foreach ( self::$_fontFamilies as $font => $label ) {
|
173 |
+
echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
|
174 |
+
echo $label;
|
175 |
+
echo '</option>';
|
176 |
+
}
|
177 |
+
echo '</select>';
|
178 |
+
echo '</td>';
|
179 |
+
echo '<td class="section-table-column">';
|
180 |
+
echo '<select name="fontSize" class="control-select">';
|
181 |
+
echo '<option></option>';
|
182 |
+
for ( $i = 7; $i <= 20; $i++ ) {
|
183 |
+
echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
|
184 |
+
}
|
185 |
+
echo '</select>';
|
186 |
+
echo '</td>';
|
187 |
+
echo '</tr>';
|
188 |
+
echo '</table>';
|
189 |
+
|
190 |
+
echo '<p class="section-description">';
|
191 |
+
esc_html_e( 'The default font family and size for all text in the chart.', Visualizer_Plugin::NAME );
|
192 |
+
echo '</p>';
|
193 |
+
echo '</div>';
|
194 |
+
self::_renderSectionEnd();
|
195 |
+
|
196 |
+
self::_renderSectionStart( esc_html__( 'Legend', Visualizer_Plugin::NAME ), false );
|
197 |
+
self::_renderSelectItem(
|
198 |
+
esc_html__( 'Position', Visualizer_Plugin::NAME ),
|
199 |
+
'legend[position]',
|
200 |
+
$this->legend['position'],
|
201 |
+
$this->_legendPositions,
|
202 |
+
esc_html__( 'Determines where to place the legend, compared to the chart area.', Visualizer_Plugin::NAME )
|
203 |
+
);
|
204 |
+
|
205 |
+
self::_renderSelectItem(
|
206 |
+
esc_html__( 'Alignment', Visualizer_Plugin::NAME ),
|
207 |
+
'legend[alignment]',
|
208 |
+
$this->legend['alignment'],
|
209 |
+
$this->_alignments,
|
210 |
+
esc_html__( 'Determines the alignment of the legend.', Visualizer_Plugin::NAME )
|
211 |
+
);
|
212 |
+
|
213 |
+
self::_renderColorPickerItem(
|
214 |
+
esc_html__( 'Font Color', Visualizer_Plugin::NAME ),
|
215 |
+
'legend[textStyle][color]',
|
216 |
+
isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
|
217 |
+
'#000'
|
218 |
+
);
|
219 |
+
self::_renderSectionEnd();
|
220 |
+
|
221 |
+
self::_renderSectionStart( esc_html__( 'Tooltip', Visualizer_Plugin::NAME ), false );
|
222 |
+
$this->_renderTooltipSettigns();
|
223 |
+
self::_renderSectionEnd();
|
224 |
+
self::_renderGroupEnd();
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Renders tooltip settings section.
|
229 |
+
*
|
230 |
+
* @since 1.4.0
|
231 |
+
*
|
232 |
+
* @access protected
|
233 |
+
*/
|
234 |
+
protected function _renderTooltipSettigns() {
|
235 |
+
self::_renderSelectItem(
|
236 |
+
esc_html__( 'Trigger', Visualizer_Plugin::NAME ),
|
237 |
+
'tooltip[trigger]',
|
238 |
+
isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
|
239 |
+
array(
|
240 |
+
'' => '',
|
241 |
+
'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', Visualizer_Plugin::NAME ),
|
242 |
+
'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', Visualizer_Plugin::NAME ),
|
243 |
+
'none' => esc_html__( 'The tooltip will not be displayed', Visualizer_Plugin::NAME ),
|
244 |
+
),
|
245 |
+
esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', Visualizer_Plugin::NAME )
|
246 |
+
);
|
247 |
+
|
248 |
+
self::_renderSelectItem(
|
249 |
+
esc_html__( 'Show Color Code', Visualizer_Plugin::NAME ),
|
250 |
+
'tooltip[showColorCode]',
|
251 |
+
isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
|
252 |
+
$this->_yesno,
|
253 |
+
esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', Visualizer_Plugin::NAME )
|
254 |
+
);
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Renders chart view settings group.
|
259 |
+
*
|
260 |
+
* @since 1.0.0
|
261 |
+
*
|
262 |
+
* @access protected
|
263 |
+
*/
|
264 |
+
protected function _renderViewSettings() {
|
265 |
+
self::_renderGroupStart( esc_html__( 'Layout & Chart Area', Visualizer_Plugin::NAME ) );
|
266 |
+
self::_renderSectionStart( esc_html__( 'Layout', Visualizer_Plugin::NAME ), false );
|
267 |
+
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
268 |
+
|
269 |
+
echo '<div class="section-item">';
|
270 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
271 |
+
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
272 |
+
|
273 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
274 |
+
echo '<tr>';
|
275 |
+
echo '<td class="section-table-column">';
|
276 |
+
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
277 |
+
echo '</td>';
|
278 |
+
echo '<td class="section-table-column">';
|
279 |
+
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
280 |
+
echo '</td>';
|
281 |
+
echo '</tr>';
|
282 |
+
echo '</table>';
|
283 |
+
|
284 |
+
echo '<p class="section-description">';
|
285 |
+
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
286 |
+
echo '</p>';
|
287 |
+
echo '</div>';
|
288 |
+
|
289 |
+
echo '<div class="section-delimiter"></div>';
|
290 |
+
|
291 |
+
self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', Visualizer_Plugin::NAME ) );
|
292 |
+
|
293 |
+
self::_renderTextItem(
|
294 |
+
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
295 |
+
'backgroundColor[strokeWidth]',
|
296 |
+
isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
|
297 |
+
esc_html__( 'The chart border width in pixels.', Visualizer_Plugin::NAME ),
|
298 |
+
'0'
|
299 |
+
);
|
300 |
+
|
301 |
+
self::_renderColorPickerItem(
|
302 |
+
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
303 |
+
'backgroundColor[stroke]',
|
304 |
+
!empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
|
305 |
+
'#666'
|
306 |
+
);
|
307 |
+
|
308 |
+
$background_color = !empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
|
309 |
+
self::_renderColorPickerItem(
|
310 |
+
esc_html__( 'Background Color', Visualizer_Plugin::NAME ),
|
311 |
+
'backgroundColor[fill]',
|
312 |
+
$background_color,
|
313 |
+
'#fff'
|
314 |
+
);
|
315 |
+
|
316 |
+
echo '<div class="section-item">';
|
317 |
+
echo '<label>';
|
318 |
+
echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
|
319 |
+
esc_html_e( 'Transparent background' );
|
320 |
+
echo '</label>';
|
321 |
+
echo '</div>';
|
322 |
+
self::_renderSectionEnd();
|
323 |
+
|
324 |
+
self::_renderSectionStart( esc_html__( 'Chart Area', Visualizer_Plugin::NAME ), false );
|
325 |
+
self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
326 |
+
|
327 |
+
echo '<div class="section-item">';
|
328 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
329 |
+
echo '<b>', esc_html__( 'Left And Top Margins', Visualizer_Plugin::NAME ), '</b>';
|
330 |
+
|
331 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
332 |
+
echo '<tr>';
|
333 |
+
echo '<td class="section-table-column">';
|
334 |
+
echo '<input type="text" name="chartArea[left]" class="control-text" value="', !empty( $this->chartArea['left'] ) ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
|
335 |
+
echo '</td>';
|
336 |
+
echo '<td class="section-table-column">';
|
337 |
+
echo '<input type="text" name="chartArea[top]" class="control-text" value="', !empty( $this->chartArea['top'] ) ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
|
338 |
+
echo '</td>';
|
339 |
+
echo '</tr>';
|
340 |
+
echo '</table>';
|
341 |
+
|
342 |
+
echo '<p class="section-description">';
|
343 |
+
esc_html_e( 'Determines how far to draw the chart from the left and top borders.', Visualizer_Plugin::NAME );
|
344 |
+
echo '</p>';
|
345 |
+
echo '</div>';
|
346 |
+
|
347 |
+
echo '<div class="section-item">';
|
348 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
349 |
+
echo '<b>', esc_html__( 'Width And Height Of Chart Area', Visualizer_Plugin::NAME ), '</b>';
|
350 |
+
|
351 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
352 |
+
echo '<tr>';
|
353 |
+
echo '<td class="section-table-column">';
|
354 |
+
echo '<input type="text" name="chartArea[width]" class="control-text" value="', !empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
|
355 |
+
echo '</td>';
|
356 |
+
echo '<td class="section-table-column">';
|
357 |
+
echo '<input type="text" name="chartArea[height]" class="control-text" value="', !empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
|
358 |
+
echo '</td>';
|
359 |
+
echo '</tr>';
|
360 |
+
echo '</table>';
|
361 |
+
|
362 |
+
echo '<p class="section-description">';
|
363 |
+
esc_html_e( 'Determines the width and hight of the chart area.', Visualizer_Plugin::NAME );
|
364 |
+
echo '</p>';
|
365 |
+
echo '</div>';
|
366 |
+
self::_renderSectionEnd();
|
367 |
+
self::_renderGroupEnd();
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Renders select item.
|
372 |
+
*
|
373 |
+
* @since 1.0.0
|
374 |
+
*
|
375 |
+
* @static
|
376 |
+
* @access protected
|
377 |
+
* @param string $title The title of the select item.
|
378 |
+
* @param string $name The name of the select item.
|
379 |
+
* @param string $value The actual value of the select item.
|
380 |
+
* @param array $options The array of select options.
|
381 |
+
* @param string $desc The description of the select item.
|
382 |
+
*/
|
383 |
+
protected static function _renderSelectItem( $title, $name, $value, array $options, $desc ) {
|
384 |
+
echo '<div class="section-item">';
|
385 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
386 |
+
echo '<b>', $title, '</b>';
|
387 |
+
echo '<select class="control-select" name="', $name, '">';
|
388 |
+
foreach ( $options as $key => $label ) {
|
389 |
+
echo '<option value="', $key, '"', selected( $key, $value, false ), '>';
|
390 |
+
echo $label;
|
391 |
+
echo '</option>';
|
392 |
+
}
|
393 |
+
echo '</select>';
|
394 |
+
echo '<p class="section-description">', $desc, '</p>';
|
395 |
+
echo '</div>';
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Renders color picker item.
|
400 |
+
*
|
401 |
+
* @since 1.0.0
|
402 |
+
*
|
403 |
+
* @static
|
404 |
+
* @access protected
|
405 |
+
* @param string $title The title of the select item.
|
406 |
+
* @param string $name The name of the select item.
|
407 |
+
* @param string $value The actual value of the select item.
|
408 |
+
* @param string $default The default value of the color picker.
|
409 |
+
*/
|
410 |
+
protected static function _renderColorPickerItem( $title, $name, $value, $default ) {
|
411 |
+
echo '<div class="section-item">';
|
412 |
+
echo '<b>', $title, '</b>';
|
413 |
+
echo '<div>';
|
414 |
+
echo '<input type="text" class="color-picker-hex" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Value', Visualizer_Plugin::NAME ), '" value="', is_null( $value ) ? $default : esc_attr( $value ), '" data-default-color="', $default, '">';
|
415 |
+
echo '</div>';
|
416 |
+
echo '</div>';
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Renders text item.
|
421 |
+
*
|
422 |
+
* @since 1.0.0
|
423 |
+
*
|
424 |
+
* @static
|
425 |
+
* @access protected
|
426 |
+
* @param string $title The title of the select item.
|
427 |
+
* @param string $name The name of the select item.
|
428 |
+
* @param string $value The actual value of the select item.
|
429 |
+
* @param string $desc The description of the select item.
|
430 |
+
* @param string $placeholder The placeholder for the input.
|
431 |
+
*/
|
432 |
+
protected static function _renderTextItem( $title, $name, $value, $desc, $placeholder = '' ) {
|
433 |
+
echo '<div class="section-item">';
|
434 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
435 |
+
echo '<b>', $title, '</b>';
|
436 |
+
echo '<input type="text" class="control-text" name="', $name, '" value="', esc_attr( $value ), '" placeholder="', $placeholder, '">';
|
437 |
+
echo '<p class="section-description">', $desc, '</p>';
|
438 |
+
echo '</div>';
|
439 |
+
}
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Renders the beginning of a group.
|
443 |
+
*
|
444 |
+
* @since 1.0.0
|
445 |
+
*
|
446 |
+
* @static
|
447 |
+
* @access protected
|
448 |
+
* @param string $title The title of this group.
|
449 |
+
*/
|
450 |
+
protected static function _renderGroupStart( $title ) {
|
451 |
+
echo '<li class="group">';
|
452 |
+
echo '<h3 class="group-title">', $title, '</h3>';
|
453 |
+
echo '<ul class="group-content">';
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Renders the ending of a group.
|
458 |
+
*
|
459 |
+
* @since 1.0.0
|
460 |
+
*
|
461 |
+
* @static
|
462 |
+
* @access protected
|
463 |
+
*/
|
464 |
+
protected static function _renderGroupEnd() {
|
465 |
+
echo '</ul>';
|
466 |
+
echo '</li>';
|
467 |
+
}
|
468 |
+
|
469 |
+
/**
|
470 |
+
* Renders the beginning of a section.
|
471 |
+
*
|
472 |
+
* @since 1.0.0
|
473 |
+
*
|
474 |
+
* @static
|
475 |
+
* @access protected
|
476 |
+
* @param string $title The title of this section. If the title is empty, no title will be displayed.
|
477 |
+
* @param boolean $open Determines whether the section items block has to be expanded or collapsed.
|
478 |
+
*/
|
479 |
+
protected static function _renderSectionStart( $title = false, $open = true ) {
|
480 |
+
echo '<li>';
|
481 |
+
if ( !empty( $title ) ) {
|
482 |
+
echo '<span class="section-title">', $title, '</span>';
|
483 |
+
}
|
484 |
+
echo '<div class="section-items', $open ? ' open' : '', '">';
|
485 |
+
}
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Renders the ending of a section.
|
489 |
+
*
|
490 |
+
* @since 1.0.0
|
491 |
+
*
|
492 |
+
* @static
|
493 |
+
* @access protected
|
494 |
+
*/
|
495 |
+
protected static function _renderSectionEnd() {
|
496 |
+
echo '</div>';
|
497 |
+
echo '</li>';
|
498 |
+
}
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Renders section description block.
|
502 |
+
*
|
503 |
+
* @since 1.0.0
|
504 |
+
*
|
505 |
+
* @static
|
506 |
+
* @access protected
|
507 |
+
* @param string $description The description text.
|
508 |
+
*/
|
509 |
+
protected static function _renderSectionDescription( $description ) {
|
510 |
+
echo '<div class="section-item">';
|
511 |
+
echo '<div class="section-description">', $description, '</div>';
|
512 |
+
echo '</div>';
|
513 |
+
}
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Renders format field according to series type.
|
517 |
+
*
|
518 |
+
* @since 1.3.0
|
519 |
+
*
|
520 |
+
* @access protected
|
521 |
+
* @param int $index The index of the series.
|
522 |
+
*/
|
523 |
+
protected function _renderFormatField( $index = 0 ) {
|
524 |
+
switch ( $this->__series[$index + 1]['type'] ) {
|
525 |
+
case 'number':
|
526 |
+
self::_renderTextItem(
|
527 |
+
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
528 |
+
'series[' . $index . '][format]',
|
529 |
+
isset( $this->series[$index]['format'] ) ? $this->series[$index]['format'] : '',
|
530 |
+
sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# to add dollar sign before digits. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ), '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">', '</a>' ),
|
531 |
+
'#,###.##'
|
532 |
+
);
|
533 |
+
break;
|
534 |
+
case 'date':
|
535 |
+
case 'datetime':
|
536 |
+
case 'timeofday':
|
537 |
+
self::_renderTextItem(
|
538 |
+
esc_html__( 'Date Format', Visualizer_Plugin::NAME ),
|
539 |
+
'series[' . $index . '][format]',
|
540 |
+
isset( $this->series[$index]['format'] ) ? $this->series[$index]['format'] : '',
|
541 |
+
sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %sICU date and time format%s.', Visualizer_Plugin::NAME ), '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">', '</a>' ),
|
542 |
+
'eeee, dd LLLL yyyy'
|
543 |
+
);
|
544 |
+
break;
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
}
|
classes/Visualizer/Render/Sidebar/Columnar.php
CHANGED
@@ -1,81 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Base class for sidebar settings of columnar based charts.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @abstract
|
33 |
-
*/
|
34 |
-
abstract class Visualizer_Render_Sidebar_Columnar extends Visualizer_Render_Sidebar_Graph {
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Renders columnar settings group.
|
38 |
-
*
|
39 |
-
* @since 1.0.0
|
40 |
-
*
|
41 |
-
* @access protected
|
42 |
-
*/
|
43 |
-
protected function _renderColumnarSettings() {
|
44 |
-
self::_renderGroupStart( esc_html__( 'Bars Settings', Visualizer_Plugin::NAME ) );
|
45 |
-
self::_renderSectionStart();
|
46 |
-
self::_renderSelectItem(
|
47 |
-
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
48 |
-
'focusTarget',
|
49 |
-
$this->focusTarget,
|
50 |
-
array(
|
51 |
-
'' => '',
|
52 |
-
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
53 |
-
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
54 |
-
),
|
55 |
-
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
56 |
-
);
|
57 |
-
|
58 |
-
echo '<div class="section-delimiter"></div>';
|
59 |
-
|
60 |
-
self::_renderSelectItem(
|
61 |
-
esc_html__( 'Is Stacked', Visualizer_Plugin::NAME ),
|
62 |
-
'isStacked',
|
63 |
-
$this->isStacked,
|
64 |
-
$this->_yesno,
|
65 |
-
esc_html__( 'If set to yes, series elements are stacked.', Visualizer_Plugin::NAME )
|
66 |
-
);
|
67 |
-
|
68 |
-
echo '<div class="section-delimiter"></div>';
|
69 |
-
|
70 |
-
self::_renderTextItem(
|
71 |
-
esc_html__( 'Bars Opacity', Visualizer_Plugin::NAME ),
|
72 |
-
'dataOpacity',
|
73 |
-
$this->dataOpacity,
|
74 |
-
esc_html__( 'Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent.', Visualizer_Plugin::NAME ),
|
75 |
-
'1.0'
|
76 |
-
);
|
77 |
-
self::_renderSectionEnd();
|
78 |
-
self::_renderGroupEnd();
|
79 |
-
}
|
80 |
-
|
81 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Base class for sidebar settings of columnar based charts.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
* @abstract
|
33 |
+
*/
|
34 |
+
abstract class Visualizer_Render_Sidebar_Columnar extends Visualizer_Render_Sidebar_Graph {
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Renders columnar settings group.
|
38 |
+
*
|
39 |
+
* @since 1.0.0
|
40 |
+
*
|
41 |
+
* @access protected
|
42 |
+
*/
|
43 |
+
protected function _renderColumnarSettings() {
|
44 |
+
self::_renderGroupStart( esc_html__( 'Bars Settings', Visualizer_Plugin::NAME ) );
|
45 |
+
self::_renderSectionStart();
|
46 |
+
self::_renderSelectItem(
|
47 |
+
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
48 |
+
'focusTarget',
|
49 |
+
$this->focusTarget,
|
50 |
+
array(
|
51 |
+
'' => '',
|
52 |
+
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
53 |
+
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
54 |
+
),
|
55 |
+
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
56 |
+
);
|
57 |
+
|
58 |
+
echo '<div class="section-delimiter"></div>';
|
59 |
+
|
60 |
+
self::_renderSelectItem(
|
61 |
+
esc_html__( 'Is Stacked', Visualizer_Plugin::NAME ),
|
62 |
+
'isStacked',
|
63 |
+
$this->isStacked,
|
64 |
+
$this->_yesno,
|
65 |
+
esc_html__( 'If set to yes, series elements are stacked.', Visualizer_Plugin::NAME )
|
66 |
+
);
|
67 |
+
|
68 |
+
echo '<div class="section-delimiter"></div>';
|
69 |
+
|
70 |
+
self::_renderTextItem(
|
71 |
+
esc_html__( 'Bars Opacity', Visualizer_Plugin::NAME ),
|
72 |
+
'dataOpacity',
|
73 |
+
$this->dataOpacity,
|
74 |
+
esc_html__( 'Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent.', Visualizer_Plugin::NAME ),
|
75 |
+
'1.0'
|
76 |
+
);
|
77 |
+
self::_renderSectionEnd();
|
78 |
+
self::_renderGroupEnd();
|
79 |
+
}
|
80 |
+
|
81 |
}
|
classes/Visualizer/Render/Sidebar/Graph.php
CHANGED
@@ -1,473 +1,473 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Base class for sidebar settigns of graph based charts.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @abstract
|
33 |
-
*/
|
34 |
-
abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar {
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Determines whether we need to render vertical gridlines options or not.
|
38 |
-
*
|
39 |
-
* @since 1.0.0
|
40 |
-
*
|
41 |
-
* @access protected
|
42 |
-
* @var boolean
|
43 |
-
*/
|
44 |
-
protected $_verticalGridLines;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Determines whether we need to render horizontal gridlines options or not.
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
*
|
51 |
-
* @access protected
|
52 |
-
* @var boolean
|
53 |
-
*/
|
54 |
-
protected $_horizontalGridLines;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* The array of available axis positions.
|
58 |
-
*
|
59 |
-
* @since 1.0.0
|
60 |
-
*
|
61 |
-
* @access protected
|
62 |
-
* @var array
|
63 |
-
*/
|
64 |
-
protected $_positions;
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Constructor.
|
68 |
-
*
|
69 |
-
* @since 1.0.0
|
70 |
-
*
|
71 |
-
* @access public
|
72 |
-
* @param array $data The data what has to be associated with this render.
|
73 |
-
*/
|
74 |
-
public function __construct( $data = array() ) {
|
75 |
-
parent::__construct( $data );
|
76 |
-
|
77 |
-
$this->_verticalGridLines = true;
|
78 |
-
$this->_horizontalGridLines = true;
|
79 |
-
|
80 |
-
$this->_positions = array(
|
81 |
-
'' => '',
|
82 |
-
'in' => esc_html__( 'Inside the chart', Visualizer_Plugin::NAME ),
|
83 |
-
'out' => esc_html__( 'Outside the chart', Visualizer_Plugin::NAME ),
|
84 |
-
'none' => esc_html__( 'None', Visualizer_Plugin::NAME ),
|
85 |
-
);
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Renders chart title settings.
|
90 |
-
*
|
91 |
-
* @since 1.0.0
|
92 |
-
*
|
93 |
-
* @access protected
|
94 |
-
*/
|
95 |
-
protected function _renderChartTitleSettings() {
|
96 |
-
self::_renderTextItem(
|
97 |
-
esc_html__( 'Chart Title', Visualizer_Plugin::NAME ),
|
98 |
-
'title',
|
99 |
-
$this->title,
|
100 |
-
esc_html__( 'Text to display above the chart.', Visualizer_Plugin::NAME )
|
101 |
-
);
|
102 |
-
|
103 |
-
self::_renderSelectItem(
|
104 |
-
esc_html__( 'Chart Title Position', Visualizer_Plugin::NAME ),
|
105 |
-
'titlePosition',
|
106 |
-
$this->titlePosition,
|
107 |
-
$this->_positions,
|
108 |
-
esc_html__( 'Where to place the chart title, compared to the chart area.', Visualizer_Plugin::NAME )
|
109 |
-
);
|
110 |
-
|
111 |
-
self::_renderColorPickerItem(
|
112 |
-
esc_html__( 'Chart Title Color', Visualizer_Plugin::NAME ),
|
113 |
-
'titleTextStyle[color]',
|
114 |
-
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
|
115 |
-
'#000'
|
116 |
-
);
|
117 |
-
|
118 |
-
echo '<div class="section-delimiter"></div>';
|
119 |
-
|
120 |
-
self::_renderSelectItem(
|
121 |
-
esc_html__( 'Axes Titles Position', Visualizer_Plugin::NAME ),
|
122 |
-
'axisTitlesPosition',
|
123 |
-
$this->axisTitlesPosition,
|
124 |
-
$this->_positions,
|
125 |
-
esc_html__( 'Determines where to place the axis titles, compared to the chart area.', Visualizer_Plugin::NAME )
|
126 |
-
);
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Renders general settings block for horizontal axis settings.
|
131 |
-
*
|
132 |
-
* @since 1.4.0
|
133 |
-
*
|
134 |
-
* @access protected
|
135 |
-
*/
|
136 |
-
protected function _renderHorizontalAxisGeneratSettings() {
|
137 |
-
self::_renderTextItem(
|
138 |
-
esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
|
139 |
-
'hAxis[title]',
|
140 |
-
isset( $this->hAxis['title'] ) ? $this->hAxis['title'] : '',
|
141 |
-
esc_html__( 'The title of the horizontal axis.', Visualizer_Plugin::NAME )
|
142 |
-
);
|
143 |
-
|
144 |
-
self::_renderSelectItem(
|
145 |
-
esc_html__( 'Text Position', Visualizer_Plugin::NAME ),
|
146 |
-
'vAxis[textPosition]',
|
147 |
-
isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
|
148 |
-
$this->_positions,
|
149 |
-
esc_html__( 'Position of the horizontal axis text, relative to the chart area.', Visualizer_Plugin::NAME )
|
150 |
-
);
|
151 |
-
|
152 |
-
self::_renderSelectItem(
|
153 |
-
esc_html__( 'Direction', Visualizer_Plugin::NAME ),
|
154 |
-
'hAxis[direction]',
|
155 |
-
isset( $this->hAxis['direction'] ) ? $this->hAxis['direction'] : '',
|
156 |
-
array(
|
157 |
-
'' => '',
|
158 |
-
'1' => esc_html__( 'Identical Direction', Visualizer_Plugin::NAME ),
|
159 |
-
'-1' => esc_html__( 'Reverse Direction', Visualizer_Plugin::NAME ),
|
160 |
-
),
|
161 |
-
esc_html__( 'The direction in which the values along the horizontal axis grow.', Visualizer_Plugin::NAME )
|
162 |
-
);
|
163 |
-
|
164 |
-
self::_renderColorPickerItem(
|
165 |
-
esc_html__( 'Base Line Color', Visualizer_Plugin::NAME ),
|
166 |
-
'vAxis[baselineColor]',
|
167 |
-
isset( $this->vAxis['baselineColor'] ) ? $this->vAxis['baselineColor'] : null,
|
168 |
-
'#000'
|
169 |
-
);
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Renders horizontal axis settings.
|
174 |
-
*
|
175 |
-
* @since 1.2.0
|
176 |
-
*
|
177 |
-
* @access protected
|
178 |
-
*/
|
179 |
-
protected function _renderHorizontalAxisSettings() {
|
180 |
-
self::_renderGroupStart( esc_html__( 'Horizontal Axis Settings', Visualizer_Plugin::NAME ) );
|
181 |
-
self::_renderSectionStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ), false );
|
182 |
-
$this->_renderHorizontalAxisGeneratSettings();
|
183 |
-
self::_renderSectionEnd();
|
184 |
-
|
185 |
-
if ( $this->_horizontalGridLines ) {
|
186 |
-
self::_renderSectionStart( esc_html__( 'Grid Lines', Visualizer_Plugin::NAME ), false );
|
187 |
-
self::_renderTextItem(
|
188 |
-
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
189 |
-
'vAxis[gridlines][count]',
|
190 |
-
isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '',
|
191 |
-
esc_html__( 'The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', Visualizer_Plugin::NAME ),
|
192 |
-
5
|
193 |
-
);
|
194 |
-
|
195 |
-
self::_renderColorPickerItem(
|
196 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
197 |
-
'vAxis[gridlines][color]',
|
198 |
-
isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
|
199 |
-
'#ccc'
|
200 |
-
);
|
201 |
-
self::_renderSectionEnd();
|
202 |
-
|
203 |
-
self::_renderSectionStart( esc_html__( 'Minor Grid Lines', Visualizer_Plugin::NAME ), false );
|
204 |
-
self::_renderTextItem(
|
205 |
-
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
206 |
-
'vAxis[minorGridlines][count]',
|
207 |
-
isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '',
|
208 |
-
esc_html__( 'The number of horizontal minor gridlines between two regular gridlines.', Visualizer_Plugin::NAME ),
|
209 |
-
0
|
210 |
-
);
|
211 |
-
|
212 |
-
self::_renderColorPickerItem(
|
213 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
214 |
-
'vAxis[minorGridlines][color]',
|
215 |
-
isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null,
|
216 |
-
null
|
217 |
-
);
|
218 |
-
self::_renderSectionEnd();
|
219 |
-
}
|
220 |
-
|
221 |
-
if ( $this->_verticalGridLines ) {
|
222 |
-
self::_renderSectionStart( esc_html__( 'View Window', Visualizer_Plugin::NAME ), false );
|
223 |
-
self::_renderTextItem(
|
224 |
-
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
225 |
-
'hAxis[viewWindow][max]',
|
226 |
-
isset( $this->hAxis['viewWindow']['max'] ) ? $this->hAxis['viewWindow']['max'] : '',
|
227 |
-
'The maximum vertical data value to render.'
|
228 |
-
);
|
229 |
-
|
230 |
-
self::_renderTextItem(
|
231 |
-
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
232 |
-
'hAxis[viewWindow][min]',
|
233 |
-
isset( $this->hAxis['viewWindow']['min'] ) ? $this->hAxis['viewWindow']['min'] : '',
|
234 |
-
'The minimum vertical data value to render.'
|
235 |
-
);
|
236 |
-
self::_renderSectionEnd();
|
237 |
-
}
|
238 |
-
self::_renderGroupEnd();
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Renders general settings block for vertical axis settings.
|
243 |
-
*
|
244 |
-
* @since 1.4.0
|
245 |
-
*
|
246 |
-
* @access protected
|
247 |
-
*/
|
248 |
-
protected function _renderVerticalAxisGeneralSettings() {
|
249 |
-
self::_renderTextItem(
|
250 |
-
esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
|
251 |
-
'vAxis[title]',
|
252 |
-
isset( $this->vAxis['title'] ) ? $this->vAxis['title'] : '',
|
253 |
-
esc_html__( 'The title of the vertical axis.', Visualizer_Plugin::NAME )
|
254 |
-
);
|
255 |
-
|
256 |
-
self::_renderSelectItem(
|
257 |
-
esc_html__( 'Text Position', Visualizer_Plugin::NAME ),
|
258 |
-
'hAxis[textPosition]',
|
259 |
-
isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
|
260 |
-
$this->_positions,
|
261 |
-
esc_html__( 'Position of the vertical axis text, relative to the chart area.', Visualizer_Plugin::NAME )
|
262 |
-
);
|
263 |
-
|
264 |
-
self::_renderSelectItem(
|
265 |
-
esc_html__( 'Direction', Visualizer_Plugin::NAME ),
|
266 |
-
'vAxis[direction]',
|
267 |
-
isset( $this->vAxis['direction'] ) ? $this->vAxis['direction'] : '',
|
268 |
-
array(
|
269 |
-
'' => '',
|
270 |
-
'1' => esc_html__( 'Identical Direction', Visualizer_Plugin::NAME ),
|
271 |
-
'-1' => esc_html__( 'Reverse Direction', Visualizer_Plugin::NAME ),
|
272 |
-
),
|
273 |
-
esc_html__( 'The direction in which the values along the vertical axis grow.', Visualizer_Plugin::NAME )
|
274 |
-
);
|
275 |
-
|
276 |
-
self::_renderColorPickerItem(
|
277 |
-
esc_html__( 'Base Line Color', Visualizer_Plugin::NAME ),
|
278 |
-
'hAxis[baselineColor]',
|
279 |
-
isset( $this->hAxis['baselineColor'] ) ? $this->hAxis['baselineColor'] : null,
|
280 |
-
'#000'
|
281 |
-
);
|
282 |
-
}
|
283 |
-
|
284 |
-
/**
|
285 |
-
* Renders vertical axis settings.
|
286 |
-
*
|
287 |
-
* @since 1.2.0
|
288 |
-
*
|
289 |
-
* @access protected
|
290 |
-
*/
|
291 |
-
protected function _renderVerticalAxisSettings() {
|
292 |
-
self::_renderGroupStart( esc_html__( 'Vertical Axis Settings', Visualizer_Plugin::NAME ) );
|
293 |
-
self::_renderSectionStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ), false );
|
294 |
-
$this->_renderVerticalAxisGeneralSettings();
|
295 |
-
self::_renderSectionEnd();
|
296 |
-
|
297 |
-
if ( $this->_verticalGridLines ) {
|
298 |
-
self::_renderSectionStart( esc_html__( 'Grid Lines', Visualizer_Plugin::NAME ), false );
|
299 |
-
self::_renderTextItem(
|
300 |
-
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
301 |
-
'hAxis[gridlines][count]',
|
302 |
-
isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '',
|
303 |
-
esc_html__( 'The number of vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', Visualizer_Plugin::NAME ),
|
304 |
-
5
|
305 |
-
);
|
306 |
-
|
307 |
-
self::_renderColorPickerItem(
|
308 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
309 |
-
'hAxis[gridlines][color]',
|
310 |
-
isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
|
311 |
-
'#ccc'
|
312 |
-
);
|
313 |
-
self::_renderSectionEnd();
|
314 |
-
|
315 |
-
self::_renderSectionStart( esc_html__( 'Minor Grid Lines', Visualizer_Plugin::NAME ), false );
|
316 |
-
self::_renderTextItem(
|
317 |
-
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
318 |
-
'hAxis[minorGridlines][count]',
|
319 |
-
isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '',
|
320 |
-
esc_html__( 'The number of vertical minor gridlines between two regular gridlines.', Visualizer_Plugin::NAME ),
|
321 |
-
0
|
322 |
-
);
|
323 |
-
|
324 |
-
self::_renderColorPickerItem(
|
325 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
326 |
-
'hAxis[minorGridlines][color]',
|
327 |
-
isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null,
|
328 |
-
null
|
329 |
-
);
|
330 |
-
self::_renderSectionEnd();
|
331 |
-
}
|
332 |
-
|
333 |
-
if ( $this->_horizontalGridLines ) {
|
334 |
-
self::_renderSectionStart( esc_html__( 'View Window', Visualizer_Plugin::NAME ), false );
|
335 |
-
self::_renderTextItem(
|
336 |
-
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
337 |
-
'vAxis[viewWindow][max]',
|
338 |
-
isset( $this->vAxis['viewWindow']['max'] ) ? $this->vAxis['viewWindow']['max'] : '',
|
339 |
-
'The maximum vertical data value to render.'
|
340 |
-
);
|
341 |
-
|
342 |
-
self::_renderTextItem(
|
343 |
-
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
344 |
-
'vAxis[viewWindow][min]',
|
345 |
-
isset( $this->vAxis['viewWindow']['min'] ) ? $this->vAxis['viewWindow']['min'] : '',
|
346 |
-
'The minimum vertical data value to render.'
|
347 |
-
);
|
348 |
-
self::_renderSectionEnd();
|
349 |
-
}
|
350 |
-
self::_renderGroupEnd();
|
351 |
-
}
|
352 |
-
|
353 |
-
/**
|
354 |
-
* Renders chart axes settings.
|
355 |
-
*
|
356 |
-
* @since 1.0.0
|
357 |
-
*
|
358 |
-
* @access protected
|
359 |
-
*/
|
360 |
-
protected function _renderAxesSettings() {
|
361 |
-
$this->_renderHorizontalAxisSettings();
|
362 |
-
$this->_renderVerticalAxisSettings();
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Renders series settings group.
|
367 |
-
*
|
368 |
-
* @since 1.0.0
|
369 |
-
*
|
370 |
-
* @access protected
|
371 |
-
*/
|
372 |
-
protected function _renderSeriesSettings() {
|
373 |
-
self::_renderGroupStart( esc_html__( 'Series Settings', Visualizer_Plugin::NAME ) );
|
374 |
-
for ( $i = 1, $cnt = count( $this->__series ); $i < $cnt; $i++ ) {
|
375 |
-
if ( !empty( $this->__series[$i]['label'] ) ) {
|
376 |
-
self::_renderSectionStart( esc_html( $this->__series[$i]['label'] ), false );
|
377 |
-
$this->_renderSeries( $i - 1 );
|
378 |
-
self::_renderSectionEnd();
|
379 |
-
}
|
380 |
-
}
|
381 |
-
self::_renderGroupEnd();
|
382 |
-
}
|
383 |
-
|
384 |
-
/**
|
385 |
-
* Renders concreate series settings.
|
386 |
-
*
|
387 |
-
* @since 1.0.0
|
388 |
-
*
|
389 |
-
* @access protected
|
390 |
-
* @param int $index The series index.
|
391 |
-
*/
|
392 |
-
protected function _renderSeries( $index ) {
|
393 |
-
self::_renderSelectItem(
|
394 |
-
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
395 |
-
'series[' . $index . '][visibleInLegend]',
|
396 |
-
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
397 |
-
array(
|
398 |
-
'' => '',
|
399 |
-
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
400 |
-
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
401 |
-
),
|
402 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
403 |
-
);
|
404 |
-
|
405 |
-
$this->_renderFormatField( $index );
|
406 |
-
|
407 |
-
self::_renderColorPickerItem(
|
408 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
409 |
-
'series[' . $index . '][color]',
|
410 |
-
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
411 |
-
null
|
412 |
-
);
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Renders format field for horizontal axis.
|
417 |
-
*
|
418 |
-
* @since 1.4.3
|
419 |
-
*
|
420 |
-
* @access protected
|
421 |
-
*/
|
422 |
-
protected function _renderHorizontalAxisFormatField() {
|
423 |
-
self::_renderTextItem(
|
424 |
-
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
425 |
-
'hAxis[format]',
|
426 |
-
isset( $this->hAxis['format'] ) ? $this->hAxis['format'] : '',
|
427 |
-
sprintf(
|
428 |
-
'%s<br><br>%s<br><br>%s',
|
429 |
-
esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', Visualizer_Plugin::NAME ),
|
430 |
-
sprintf(
|
431 |
-
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %sICU pattern set%s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ),
|
432 |
-
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
|
433 |
-
'</a>'
|
434 |
-
),
|
435 |
-
sprintf(
|
436 |
-
esc_html__( 'For date axis labels, this is a subset of the date formatting %sICU date and time format%s.', Visualizer_Plugin::NAME ),
|
437 |
-
'<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
|
438 |
-
'</a>'
|
439 |
-
)
|
440 |
-
)
|
441 |
-
);
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Renders format field for vertical axis settings.
|
446 |
-
*
|
447 |
-
* @since 1.4.3
|
448 |
-
*
|
449 |
-
* @access protected
|
450 |
-
*/
|
451 |
-
protected function _renderVerticalAxisFormatField() {
|
452 |
-
self::_renderTextItem(
|
453 |
-
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
454 |
-
'vAxis[format]',
|
455 |
-
isset( $this->vAxis['format'] ) ? $this->vAxis['format'] : '',
|
456 |
-
sprintf(
|
457 |
-
'%s<br><br>%s<br><br>%s',
|
458 |
-
esc_html__( 'Enter custom format pattern to apply to vertical axis labels.', Visualizer_Plugin::NAME ),
|
459 |
-
sprintf(
|
460 |
-
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %sICU pattern set%s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ),
|
461 |
-
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
|
462 |
-
'</a>'
|
463 |
-
),
|
464 |
-
sprintf(
|
465 |
-
esc_html__( 'For date axis labels, this is a subset of the date formatting %sICU date and time format%s.', Visualizer_Plugin::NAME ),
|
466 |
-
'<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
|
467 |
-
'</a>'
|
468 |
-
)
|
469 |
-
)
|
470 |
-
);
|
471 |
-
}
|
472 |
-
|
473 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Base class for sidebar settigns of graph based charts.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
* @abstract
|
33 |
+
*/
|
34 |
+
abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar {
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Determines whether we need to render vertical gridlines options or not.
|
38 |
+
*
|
39 |
+
* @since 1.0.0
|
40 |
+
*
|
41 |
+
* @access protected
|
42 |
+
* @var boolean
|
43 |
+
*/
|
44 |
+
protected $_verticalGridLines;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Determines whether we need to render horizontal gridlines options or not.
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*
|
51 |
+
* @access protected
|
52 |
+
* @var boolean
|
53 |
+
*/
|
54 |
+
protected $_horizontalGridLines;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The array of available axis positions.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
*
|
61 |
+
* @access protected
|
62 |
+
* @var array
|
63 |
+
*/
|
64 |
+
protected $_positions;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Constructor.
|
68 |
+
*
|
69 |
+
* @since 1.0.0
|
70 |
+
*
|
71 |
+
* @access public
|
72 |
+
* @param array $data The data what has to be associated with this render.
|
73 |
+
*/
|
74 |
+
public function __construct( $data = array() ) {
|
75 |
+
parent::__construct( $data );
|
76 |
+
|
77 |
+
$this->_verticalGridLines = true;
|
78 |
+
$this->_horizontalGridLines = true;
|
79 |
+
|
80 |
+
$this->_positions = array(
|
81 |
+
'' => '',
|
82 |
+
'in' => esc_html__( 'Inside the chart', Visualizer_Plugin::NAME ),
|
83 |
+
'out' => esc_html__( 'Outside the chart', Visualizer_Plugin::NAME ),
|
84 |
+
'none' => esc_html__( 'None', Visualizer_Plugin::NAME ),
|
85 |
+
);
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Renders chart title settings.
|
90 |
+
*
|
91 |
+
* @since 1.0.0
|
92 |
+
*
|
93 |
+
* @access protected
|
94 |
+
*/
|
95 |
+
protected function _renderChartTitleSettings() {
|
96 |
+
self::_renderTextItem(
|
97 |
+
esc_html__( 'Chart Title', Visualizer_Plugin::NAME ),
|
98 |
+
'title',
|
99 |
+
$this->title,
|
100 |
+
esc_html__( 'Text to display above the chart.', Visualizer_Plugin::NAME )
|
101 |
+
);
|
102 |
+
|
103 |
+
self::_renderSelectItem(
|
104 |
+
esc_html__( 'Chart Title Position', Visualizer_Plugin::NAME ),
|
105 |
+
'titlePosition',
|
106 |
+
$this->titlePosition,
|
107 |
+
$this->_positions,
|
108 |
+
esc_html__( 'Where to place the chart title, compared to the chart area.', Visualizer_Plugin::NAME )
|
109 |
+
);
|
110 |
+
|
111 |
+
self::_renderColorPickerItem(
|
112 |
+
esc_html__( 'Chart Title Color', Visualizer_Plugin::NAME ),
|
113 |
+
'titleTextStyle[color]',
|
114 |
+
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
|
115 |
+
'#000'
|
116 |
+
);
|
117 |
+
|
118 |
+
echo '<div class="section-delimiter"></div>';
|
119 |
+
|
120 |
+
self::_renderSelectItem(
|
121 |
+
esc_html__( 'Axes Titles Position', Visualizer_Plugin::NAME ),
|
122 |
+
'axisTitlesPosition',
|
123 |
+
$this->axisTitlesPosition,
|
124 |
+
$this->_positions,
|
125 |
+
esc_html__( 'Determines where to place the axis titles, compared to the chart area.', Visualizer_Plugin::NAME )
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Renders general settings block for horizontal axis settings.
|
131 |
+
*
|
132 |
+
* @since 1.4.0
|
133 |
+
*
|
134 |
+
* @access protected
|
135 |
+
*/
|
136 |
+
protected function _renderHorizontalAxisGeneratSettings() {
|
137 |
+
self::_renderTextItem(
|
138 |
+
esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
|
139 |
+
'hAxis[title]',
|
140 |
+
isset( $this->hAxis['title'] ) ? $this->hAxis['title'] : '',
|
141 |
+
esc_html__( 'The title of the horizontal axis.', Visualizer_Plugin::NAME )
|
142 |
+
);
|
143 |
+
|
144 |
+
self::_renderSelectItem(
|
145 |
+
esc_html__( 'Text Position', Visualizer_Plugin::NAME ),
|
146 |
+
'vAxis[textPosition]',
|
147 |
+
isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
|
148 |
+
$this->_positions,
|
149 |
+
esc_html__( 'Position of the horizontal axis text, relative to the chart area.', Visualizer_Plugin::NAME )
|
150 |
+
);
|
151 |
+
|
152 |
+
self::_renderSelectItem(
|
153 |
+
esc_html__( 'Direction', Visualizer_Plugin::NAME ),
|
154 |
+
'hAxis[direction]',
|
155 |
+
isset( $this->hAxis['direction'] ) ? $this->hAxis['direction'] : '',
|
156 |
+
array(
|
157 |
+
'' => '',
|
158 |
+
'1' => esc_html__( 'Identical Direction', Visualizer_Plugin::NAME ),
|
159 |
+
'-1' => esc_html__( 'Reverse Direction', Visualizer_Plugin::NAME ),
|
160 |
+
),
|
161 |
+
esc_html__( 'The direction in which the values along the horizontal axis grow.', Visualizer_Plugin::NAME )
|
162 |
+
);
|
163 |
+
|
164 |
+
self::_renderColorPickerItem(
|
165 |
+
esc_html__( 'Base Line Color', Visualizer_Plugin::NAME ),
|
166 |
+
'vAxis[baselineColor]',
|
167 |
+
isset( $this->vAxis['baselineColor'] ) ? $this->vAxis['baselineColor'] : null,
|
168 |
+
'#000'
|
169 |
+
);
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Renders horizontal axis settings.
|
174 |
+
*
|
175 |
+
* @since 1.2.0
|
176 |
+
*
|
177 |
+
* @access protected
|
178 |
+
*/
|
179 |
+
protected function _renderHorizontalAxisSettings() {
|
180 |
+
self::_renderGroupStart( esc_html__( 'Horizontal Axis Settings', Visualizer_Plugin::NAME ) );
|
181 |
+
self::_renderSectionStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ), false );
|
182 |
+
$this->_renderHorizontalAxisGeneratSettings();
|
183 |
+
self::_renderSectionEnd();
|
184 |
+
|
185 |
+
if ( $this->_horizontalGridLines ) {
|
186 |
+
self::_renderSectionStart( esc_html__( 'Grid Lines', Visualizer_Plugin::NAME ), false );
|
187 |
+
self::_renderTextItem(
|
188 |
+
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
189 |
+
'vAxis[gridlines][count]',
|
190 |
+
isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '',
|
191 |
+
esc_html__( 'The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', Visualizer_Plugin::NAME ),
|
192 |
+
5
|
193 |
+
);
|
194 |
+
|
195 |
+
self::_renderColorPickerItem(
|
196 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
197 |
+
'vAxis[gridlines][color]',
|
198 |
+
isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
|
199 |
+
'#ccc'
|
200 |
+
);
|
201 |
+
self::_renderSectionEnd();
|
202 |
+
|
203 |
+
self::_renderSectionStart( esc_html__( 'Minor Grid Lines', Visualizer_Plugin::NAME ), false );
|
204 |
+
self::_renderTextItem(
|
205 |
+
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
206 |
+
'vAxis[minorGridlines][count]',
|
207 |
+
isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '',
|
208 |
+
esc_html__( 'The number of horizontal minor gridlines between two regular gridlines.', Visualizer_Plugin::NAME ),
|
209 |
+
0
|
210 |
+
);
|
211 |
+
|
212 |
+
self::_renderColorPickerItem(
|
213 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
214 |
+
'vAxis[minorGridlines][color]',
|
215 |
+
isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null,
|
216 |
+
null
|
217 |
+
);
|
218 |
+
self::_renderSectionEnd();
|
219 |
+
}
|
220 |
+
|
221 |
+
if ( $this->_verticalGridLines ) {
|
222 |
+
self::_renderSectionStart( esc_html__( 'View Window', Visualizer_Plugin::NAME ), false );
|
223 |
+
self::_renderTextItem(
|
224 |
+
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
225 |
+
'hAxis[viewWindow][max]',
|
226 |
+
isset( $this->hAxis['viewWindow']['max'] ) ? $this->hAxis['viewWindow']['max'] : '',
|
227 |
+
'The maximum vertical data value to render.'
|
228 |
+
);
|
229 |
+
|
230 |
+
self::_renderTextItem(
|
231 |
+
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
232 |
+
'hAxis[viewWindow][min]',
|
233 |
+
isset( $this->hAxis['viewWindow']['min'] ) ? $this->hAxis['viewWindow']['min'] : '',
|
234 |
+
'The minimum vertical data value to render.'
|
235 |
+
);
|
236 |
+
self::_renderSectionEnd();
|
237 |
+
}
|
238 |
+
self::_renderGroupEnd();
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Renders general settings block for vertical axis settings.
|
243 |
+
*
|
244 |
+
* @since 1.4.0
|
245 |
+
*
|
246 |
+
* @access protected
|
247 |
+
*/
|
248 |
+
protected function _renderVerticalAxisGeneralSettings() {
|
249 |
+
self::_renderTextItem(
|
250 |
+
esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
|
251 |
+
'vAxis[title]',
|
252 |
+
isset( $this->vAxis['title'] ) ? $this->vAxis['title'] : '',
|
253 |
+
esc_html__( 'The title of the vertical axis.', Visualizer_Plugin::NAME )
|
254 |
+
);
|
255 |
+
|
256 |
+
self::_renderSelectItem(
|
257 |
+
esc_html__( 'Text Position', Visualizer_Plugin::NAME ),
|
258 |
+
'hAxis[textPosition]',
|
259 |
+
isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
|
260 |
+
$this->_positions,
|
261 |
+
esc_html__( 'Position of the vertical axis text, relative to the chart area.', Visualizer_Plugin::NAME )
|
262 |
+
);
|
263 |
+
|
264 |
+
self::_renderSelectItem(
|
265 |
+
esc_html__( 'Direction', Visualizer_Plugin::NAME ),
|
266 |
+
'vAxis[direction]',
|
267 |
+
isset( $this->vAxis['direction'] ) ? $this->vAxis['direction'] : '',
|
268 |
+
array(
|
269 |
+
'' => '',
|
270 |
+
'1' => esc_html__( 'Identical Direction', Visualizer_Plugin::NAME ),
|
271 |
+
'-1' => esc_html__( 'Reverse Direction', Visualizer_Plugin::NAME ),
|
272 |
+
),
|
273 |
+
esc_html__( 'The direction in which the values along the vertical axis grow.', Visualizer_Plugin::NAME )
|
274 |
+
);
|
275 |
+
|
276 |
+
self::_renderColorPickerItem(
|
277 |
+
esc_html__( 'Base Line Color', Visualizer_Plugin::NAME ),
|
278 |
+
'hAxis[baselineColor]',
|
279 |
+
isset( $this->hAxis['baselineColor'] ) ? $this->hAxis['baselineColor'] : null,
|
280 |
+
'#000'
|
281 |
+
);
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Renders vertical axis settings.
|
286 |
+
*
|
287 |
+
* @since 1.2.0
|
288 |
+
*
|
289 |
+
* @access protected
|
290 |
+
*/
|
291 |
+
protected function _renderVerticalAxisSettings() {
|
292 |
+
self::_renderGroupStart( esc_html__( 'Vertical Axis Settings', Visualizer_Plugin::NAME ) );
|
293 |
+
self::_renderSectionStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ), false );
|
294 |
+
$this->_renderVerticalAxisGeneralSettings();
|
295 |
+
self::_renderSectionEnd();
|
296 |
+
|
297 |
+
if ( $this->_verticalGridLines ) {
|
298 |
+
self::_renderSectionStart( esc_html__( 'Grid Lines', Visualizer_Plugin::NAME ), false );
|
299 |
+
self::_renderTextItem(
|
300 |
+
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
301 |
+
'hAxis[gridlines][count]',
|
302 |
+
isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '',
|
303 |
+
esc_html__( 'The number of vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', Visualizer_Plugin::NAME ),
|
304 |
+
5
|
305 |
+
);
|
306 |
+
|
307 |
+
self::_renderColorPickerItem(
|
308 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
309 |
+
'hAxis[gridlines][color]',
|
310 |
+
isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
|
311 |
+
'#ccc'
|
312 |
+
);
|
313 |
+
self::_renderSectionEnd();
|
314 |
+
|
315 |
+
self::_renderSectionStart( esc_html__( 'Minor Grid Lines', Visualizer_Plugin::NAME ), false );
|
316 |
+
self::_renderTextItem(
|
317 |
+
esc_html__( 'Count', Visualizer_Plugin::NAME ),
|
318 |
+
'hAxis[minorGridlines][count]',
|
319 |
+
isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '',
|
320 |
+
esc_html__( 'The number of vertical minor gridlines between two regular gridlines.', Visualizer_Plugin::NAME ),
|
321 |
+
0
|
322 |
+
);
|
323 |
+
|
324 |
+
self::_renderColorPickerItem(
|
325 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
326 |
+
'hAxis[minorGridlines][color]',
|
327 |
+
isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null,
|
328 |
+
null
|
329 |
+
);
|
330 |
+
self::_renderSectionEnd();
|
331 |
+
}
|
332 |
+
|
333 |
+
if ( $this->_horizontalGridLines ) {
|
334 |
+
self::_renderSectionStart( esc_html__( 'View Window', Visualizer_Plugin::NAME ), false );
|
335 |
+
self::_renderTextItem(
|
336 |
+
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
337 |
+
'vAxis[viewWindow][max]',
|
338 |
+
isset( $this->vAxis['viewWindow']['max'] ) ? $this->vAxis['viewWindow']['max'] : '',
|
339 |
+
'The maximum vertical data value to render.'
|
340 |
+
);
|
341 |
+
|
342 |
+
self::_renderTextItem(
|
343 |
+
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
344 |
+
'vAxis[viewWindow][min]',
|
345 |
+
isset( $this->vAxis['viewWindow']['min'] ) ? $this->vAxis['viewWindow']['min'] : '',
|
346 |
+
'The minimum vertical data value to render.'
|
347 |
+
);
|
348 |
+
self::_renderSectionEnd();
|
349 |
+
}
|
350 |
+
self::_renderGroupEnd();
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Renders chart axes settings.
|
355 |
+
*
|
356 |
+
* @since 1.0.0
|
357 |
+
*
|
358 |
+
* @access protected
|
359 |
+
*/
|
360 |
+
protected function _renderAxesSettings() {
|
361 |
+
$this->_renderHorizontalAxisSettings();
|
362 |
+
$this->_renderVerticalAxisSettings();
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Renders series settings group.
|
367 |
+
*
|
368 |
+
* @since 1.0.0
|
369 |
+
*
|
370 |
+
* @access protected
|
371 |
+
*/
|
372 |
+
protected function _renderSeriesSettings() {
|
373 |
+
self::_renderGroupStart( esc_html__( 'Series Settings', Visualizer_Plugin::NAME ) );
|
374 |
+
for ( $i = 1, $cnt = count( $this->__series ); $i < $cnt; $i++ ) {
|
375 |
+
if ( !empty( $this->__series[$i]['label'] ) ) {
|
376 |
+
self::_renderSectionStart( esc_html( $this->__series[$i]['label'] ), false );
|
377 |
+
$this->_renderSeries( $i - 1 );
|
378 |
+
self::_renderSectionEnd();
|
379 |
+
}
|
380 |
+
}
|
381 |
+
self::_renderGroupEnd();
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Renders concreate series settings.
|
386 |
+
*
|
387 |
+
* @since 1.0.0
|
388 |
+
*
|
389 |
+
* @access protected
|
390 |
+
* @param int $index The series index.
|
391 |
+
*/
|
392 |
+
protected function _renderSeries( $index ) {
|
393 |
+
self::_renderSelectItem(
|
394 |
+
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
395 |
+
'series[' . $index . '][visibleInLegend]',
|
396 |
+
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
397 |
+
array(
|
398 |
+
'' => '',
|
399 |
+
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
400 |
+
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
401 |
+
),
|
402 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
403 |
+
);
|
404 |
+
|
405 |
+
$this->_renderFormatField( $index );
|
406 |
+
|
407 |
+
self::_renderColorPickerItem(
|
408 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
409 |
+
'series[' . $index . '][color]',
|
410 |
+
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
411 |
+
null
|
412 |
+
);
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Renders format field for horizontal axis.
|
417 |
+
*
|
418 |
+
* @since 1.4.3
|
419 |
+
*
|
420 |
+
* @access protected
|
421 |
+
*/
|
422 |
+
protected function _renderHorizontalAxisFormatField() {
|
423 |
+
self::_renderTextItem(
|
424 |
+
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
425 |
+
'hAxis[format]',
|
426 |
+
isset( $this->hAxis['format'] ) ? $this->hAxis['format'] : '',
|
427 |
+
sprintf(
|
428 |
+
'%s<br><br>%s<br><br>%s',
|
429 |
+
esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', Visualizer_Plugin::NAME ),
|
430 |
+
sprintf(
|
431 |
+
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %sICU pattern set%s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ),
|
432 |
+
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
|
433 |
+
'</a>'
|
434 |
+
),
|
435 |
+
sprintf(
|
436 |
+
esc_html__( 'For date axis labels, this is a subset of the date formatting %sICU date and time format%s.', Visualizer_Plugin::NAME ),
|
437 |
+
'<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
|
438 |
+
'</a>'
|
439 |
+
)
|
440 |
+
)
|
441 |
+
);
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Renders format field for vertical axis settings.
|
446 |
+
*
|
447 |
+
* @since 1.4.3
|
448 |
+
*
|
449 |
+
* @access protected
|
450 |
+
*/
|
451 |
+
protected function _renderVerticalAxisFormatField() {
|
452 |
+
self::_renderTextItem(
|
453 |
+
esc_html__( 'Number Format', Visualizer_Plugin::NAME ),
|
454 |
+
'vAxis[format]',
|
455 |
+
isset( $this->vAxis['format'] ) ? $this->vAxis['format'] : '',
|
456 |
+
sprintf(
|
457 |
+
'%s<br><br>%s<br><br>%s',
|
458 |
+
esc_html__( 'Enter custom format pattern to apply to vertical axis labels.', Visualizer_Plugin::NAME ),
|
459 |
+
sprintf(
|
460 |
+
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %sICU pattern set%s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.', Visualizer_Plugin::NAME ),
|
461 |
+
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
|
462 |
+
'</a>'
|
463 |
+
),
|
464 |
+
sprintf(
|
465 |
+
esc_html__( 'For date axis labels, this is a subset of the date formatting %sICU date and time format%s.', Visualizer_Plugin::NAME ),
|
466 |
+
'<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
|
467 |
+
'</a>'
|
468 |
+
)
|
469 |
+
)
|
470 |
+
);
|
471 |
+
}
|
472 |
+
|
473 |
}
|
classes/Visualizer/Render/Sidebar/Linear.php
CHANGED
@@ -1,280 +1,280 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Base class for sidebar settings of linear based charts.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
* @abstract
|
33 |
-
*/
|
34 |
-
abstract class Visualizer_Render_Sidebar_Linear extends Visualizer_Render_Sidebar_Graph {
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Determines whether we need to render curve type option or not.
|
38 |
-
*
|
39 |
-
* @since 1.0.0
|
40 |
-
*
|
41 |
-
* @access protected
|
42 |
-
* @var boolean
|
43 |
-
*/
|
44 |
-
protected $_includeCurveTypes;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The array of available curve types.
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
*
|
51 |
-
* @access protected
|
52 |
-
* @var array
|
53 |
-
*/
|
54 |
-
protected $_curveTypes;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Determines whether we need to render focus target option or not.
|
58 |
-
*
|
59 |
-
* @since 1.0.0
|
60 |
-
*
|
61 |
-
* @access protected
|
62 |
-
* @var boolean
|
63 |
-
*/
|
64 |
-
protected $_includeFocusTarget;
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Constructor.
|
68 |
-
*
|
69 |
-
* @since 1.0.0
|
70 |
-
*
|
71 |
-
* @access public
|
72 |
-
* @param array $data The data what has to be associated with this render.
|
73 |
-
*/
|
74 |
-
public function __construct( $data = array() ) {
|
75 |
-
parent::__construct( $data );
|
76 |
-
|
77 |
-
$this->_includeCurveTypes = true;
|
78 |
-
$this->_includeFocusTarget = true;
|
79 |
-
|
80 |
-
$this->_curveTypes = array(
|
81 |
-
'' => '',
|
82 |
-
'none' => esc_html__( 'Straight line without curve', Visualizer_Plugin::NAME ),
|
83 |
-
'function' => esc_html__( 'The angles of the line will be smoothed', Visualizer_Plugin::NAME ),
|
84 |
-
);
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Renders general settings block for horizontal axis settings.
|
89 |
-
*
|
90 |
-
* @since 1.4.0
|
91 |
-
*
|
92 |
-
* @access protected
|
93 |
-
*/
|
94 |
-
protected function _renderHorizontalAxisGeneratSettings() {
|
95 |
-
parent::_renderHorizontalAxisGeneratSettings();
|
96 |
-
$this->_renderHorizontalAxisFormatField();
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Renders general settings block for vertical axis settings.
|
101 |
-
*
|
102 |
-
* @since 1.4.0
|
103 |
-
*
|
104 |
-
* @access protected
|
105 |
-
*/
|
106 |
-
protected function _renderVerticalAxisGeneralSettings() {
|
107 |
-
parent::_renderVerticalAxisGeneralSettings();
|
108 |
-
$this->_renderVerticalAxisFormatField();
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Renders line settings items.
|
113 |
-
*
|
114 |
-
* @since 1.0.0
|
115 |
-
*
|
116 |
-
* @access protected
|
117 |
-
*/
|
118 |
-
protected function _renderLineSettingsItems() {
|
119 |
-
echo '<div class="section-item">';
|
120 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
121 |
-
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
122 |
-
|
123 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
124 |
-
echo '<tr>';
|
125 |
-
echo '<td class="section-table-column">';
|
126 |
-
echo '<input type="text" name="lineWidth" class="control-text" value="', esc_attr( $this->lineWidth ), '" placeholder="2">';
|
127 |
-
echo '</td>';
|
128 |
-
echo '<td class="section-table-column">';
|
129 |
-
echo '<input type="text" name="pointSize" class="control-text" value="', esc_attr( $this->pointSize ), '" placeholder="0">';
|
130 |
-
echo '</td>';
|
131 |
-
echo '</tr>';
|
132 |
-
echo '</table>';
|
133 |
-
|
134 |
-
echo '<p class="section-description">';
|
135 |
-
esc_html_e( 'Data line width and diameter of displayed points in pixels. Use zero to hide all lines or points.', Visualizer_Plugin::NAME );
|
136 |
-
echo '</p>';
|
137 |
-
echo '</div>';
|
138 |
-
|
139 |
-
if ( $this->_includeCurveTypes ) {
|
140 |
-
self::_renderSelectItem(
|
141 |
-
esc_html__( 'Curve Type', Visualizer_Plugin::NAME ),
|
142 |
-
'curveType',
|
143 |
-
$this->curveType,
|
144 |
-
$this->_curveTypes,
|
145 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
146 |
-
);
|
147 |
-
}
|
148 |
-
|
149 |
-
echo '<div class="section-delimiter"></div>';
|
150 |
-
|
151 |
-
if ( $this->_includeFocusTarget ) {
|
152 |
-
self::_renderSelectItem(
|
153 |
-
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
154 |
-
'focusTarget',
|
155 |
-
$this->focusTarget,
|
156 |
-
array(
|
157 |
-
'' => '',
|
158 |
-
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
159 |
-
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
160 |
-
),
|
161 |
-
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
162 |
-
);
|
163 |
-
}
|
164 |
-
|
165 |
-
self::_renderSelectItem(
|
166 |
-
esc_html__( 'Selection Mode', Visualizer_Plugin::NAME ),
|
167 |
-
'selectionMode',
|
168 |
-
$this->selectionMode,
|
169 |
-
array(
|
170 |
-
'' => '',
|
171 |
-
'single' => esc_html__( 'Single data point', Visualizer_Plugin::NAME ),
|
172 |
-
'multiple' => esc_html__( 'Multiple data points', Visualizer_Plugin::NAME ),
|
173 |
-
),
|
174 |
-
esc_html__( 'Determines how many data points an user can select on a chart.', Visualizer_Plugin::NAME )
|
175 |
-
);
|
176 |
-
|
177 |
-
self::_renderSelectItem(
|
178 |
-
esc_html__( 'Aggregation Target', Visualizer_Plugin::NAME ),
|
179 |
-
'aggregationTarget',
|
180 |
-
$this->aggregationTarget,
|
181 |
-
array(
|
182 |
-
'' => '',
|
183 |
-
'category' => esc_html__( 'Group selected data by x-value', Visualizer_Plugin::NAME ),
|
184 |
-
'series' => esc_html__( 'Group selected data by series', Visualizer_Plugin::NAME ),
|
185 |
-
'auto' => esc_html__( 'Group selected data by x-value if all selections have the same x-value, and by series otherwise', Visualizer_Plugin::NAME ),
|
186 |
-
'none' => esc_html__( 'Show only one tooltip per selection', Visualizer_Plugin::NAME ),
|
187 |
-
),
|
188 |
-
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element.', Visualizer_Plugin::NAME )
|
189 |
-
);
|
190 |
-
|
191 |
-
echo '<div class="section-delimiter"></div>';
|
192 |
-
|
193 |
-
self::_renderTextItem(
|
194 |
-
esc_html__( 'Point Opacity', Visualizer_Plugin::NAME ),
|
195 |
-
'dataOpacity',
|
196 |
-
$this->dataOpacity,
|
197 |
-
esc_html__( 'The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent.', Visualizer_Plugin::NAME ),
|
198 |
-
'1.0'
|
199 |
-
);
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Renders lines settings.
|
204 |
-
*
|
205 |
-
* @since 1.0.0
|
206 |
-
*
|
207 |
-
* @access protected
|
208 |
-
*/
|
209 |
-
protected function _renderLineSettings() {
|
210 |
-
self::_renderGroupStart( esc_html__( 'Lines Settings', Visualizer_Plugin::NAME ) );
|
211 |
-
self::_renderSectionStart();
|
212 |
-
$this->_renderLineSettingsItems();
|
213 |
-
self::_renderSectionEnd();
|
214 |
-
self::_renderGroupEnd();
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Renders concreate series settings.
|
219 |
-
*
|
220 |
-
* @since 1.0.0
|
221 |
-
*
|
222 |
-
* @access protected
|
223 |
-
* @param int $index The series index.
|
224 |
-
*/
|
225 |
-
protected function _renderSeries( $index ) {
|
226 |
-
self::_renderSelectItem(
|
227 |
-
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
228 |
-
'series[' . $index . '][visibleInLegend]',
|
229 |
-
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
230 |
-
array(
|
231 |
-
'' => '',
|
232 |
-
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
233 |
-
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
234 |
-
),
|
235 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
236 |
-
);
|
237 |
-
|
238 |
-
echo '<div class="section-item">';
|
239 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
240 |
-
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
241 |
-
|
242 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
243 |
-
echo '<tr>';
|
244 |
-
echo '<td class="section-table-column">';
|
245 |
-
$line_width = isset( $this->series[$index]['lineWidth'] ) ? $this->series[$index]['lineWidth'] : '';
|
246 |
-
echo '<input type="text" name="series[', $index, '][lineWidth]" class="control-text" value="', esc_attr( $line_width ), '" placeholder="2">';
|
247 |
-
echo '</td>';
|
248 |
-
echo '<td class="section-table-column">';
|
249 |
-
$point_size = isset( $this->series[$index]['pointSize'] ) ? $this->series[$index]['pointSize'] : '';
|
250 |
-
echo '<input type="text" name="series[', $index, '][pointSize]" class="control-text" value="', esc_attr( $point_size ), '" placeholder="0">';
|
251 |
-
echo '</td>';
|
252 |
-
echo '</tr>';
|
253 |
-
echo '</table>';
|
254 |
-
|
255 |
-
echo '<p class="section-description">';
|
256 |
-
esc_html_e( 'Overrides the global line width and point size values for this series.', Visualizer_Plugin::NAME );
|
257 |
-
echo '</p>';
|
258 |
-
echo '</div>';
|
259 |
-
|
260 |
-
$this->_renderFormatField( $index );
|
261 |
-
|
262 |
-
if ( $this->_includeCurveTypes ) {
|
263 |
-
self::_renderSelectItem(
|
264 |
-
esc_html__( 'Curve Type', Visualizer_Plugin::NAME ),
|
265 |
-
'series[' . $index . '][curveType]',
|
266 |
-
isset( $this->series[$index]['curveType'] ) ? $this->series[$index]['curveType'] : '',
|
267 |
-
$this->_curveTypes,
|
268 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
269 |
-
);
|
270 |
-
}
|
271 |
-
|
272 |
-
self::_renderColorPickerItem(
|
273 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
274 |
-
'series[' . $index . '][color]',
|
275 |
-
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
276 |
-
null
|
277 |
-
);
|
278 |
-
}
|
279 |
-
|
280 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Base class for sidebar settings of linear based charts.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
* @abstract
|
33 |
+
*/
|
34 |
+
abstract class Visualizer_Render_Sidebar_Linear extends Visualizer_Render_Sidebar_Graph {
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Determines whether we need to render curve type option or not.
|
38 |
+
*
|
39 |
+
* @since 1.0.0
|
40 |
+
*
|
41 |
+
* @access protected
|
42 |
+
* @var boolean
|
43 |
+
*/
|
44 |
+
protected $_includeCurveTypes;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* The array of available curve types.
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*
|
51 |
+
* @access protected
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected $_curveTypes;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Determines whether we need to render focus target option or not.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
*
|
61 |
+
* @access protected
|
62 |
+
* @var boolean
|
63 |
+
*/
|
64 |
+
protected $_includeFocusTarget;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Constructor.
|
68 |
+
*
|
69 |
+
* @since 1.0.0
|
70 |
+
*
|
71 |
+
* @access public
|
72 |
+
* @param array $data The data what has to be associated with this render.
|
73 |
+
*/
|
74 |
+
public function __construct( $data = array() ) {
|
75 |
+
parent::__construct( $data );
|
76 |
+
|
77 |
+
$this->_includeCurveTypes = true;
|
78 |
+
$this->_includeFocusTarget = true;
|
79 |
+
|
80 |
+
$this->_curveTypes = array(
|
81 |
+
'' => '',
|
82 |
+
'none' => esc_html__( 'Straight line without curve', Visualizer_Plugin::NAME ),
|
83 |
+
'function' => esc_html__( 'The angles of the line will be smoothed', Visualizer_Plugin::NAME ),
|
84 |
+
);
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Renders general settings block for horizontal axis settings.
|
89 |
+
*
|
90 |
+
* @since 1.4.0
|
91 |
+
*
|
92 |
+
* @access protected
|
93 |
+
*/
|
94 |
+
protected function _renderHorizontalAxisGeneratSettings() {
|
95 |
+
parent::_renderHorizontalAxisGeneratSettings();
|
96 |
+
$this->_renderHorizontalAxisFormatField();
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Renders general settings block for vertical axis settings.
|
101 |
+
*
|
102 |
+
* @since 1.4.0
|
103 |
+
*
|
104 |
+
* @access protected
|
105 |
+
*/
|
106 |
+
protected function _renderVerticalAxisGeneralSettings() {
|
107 |
+
parent::_renderVerticalAxisGeneralSettings();
|
108 |
+
$this->_renderVerticalAxisFormatField();
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Renders line settings items.
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
*
|
116 |
+
* @access protected
|
117 |
+
*/
|
118 |
+
protected function _renderLineSettingsItems() {
|
119 |
+
echo '<div class="section-item">';
|
120 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
121 |
+
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
122 |
+
|
123 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
124 |
+
echo '<tr>';
|
125 |
+
echo '<td class="section-table-column">';
|
126 |
+
echo '<input type="text" name="lineWidth" class="control-text" value="', esc_attr( $this->lineWidth ), '" placeholder="2">';
|
127 |
+
echo '</td>';
|
128 |
+
echo '<td class="section-table-column">';
|
129 |
+
echo '<input type="text" name="pointSize" class="control-text" value="', esc_attr( $this->pointSize ), '" placeholder="0">';
|
130 |
+
echo '</td>';
|
131 |
+
echo '</tr>';
|
132 |
+
echo '</table>';
|
133 |
+
|
134 |
+
echo '<p class="section-description">';
|
135 |
+
esc_html_e( 'Data line width and diameter of displayed points in pixels. Use zero to hide all lines or points.', Visualizer_Plugin::NAME );
|
136 |
+
echo '</p>';
|
137 |
+
echo '</div>';
|
138 |
+
|
139 |
+
if ( $this->_includeCurveTypes ) {
|
140 |
+
self::_renderSelectItem(
|
141 |
+
esc_html__( 'Curve Type', Visualizer_Plugin::NAME ),
|
142 |
+
'curveType',
|
143 |
+
$this->curveType,
|
144 |
+
$this->_curveTypes,
|
145 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
echo '<div class="section-delimiter"></div>';
|
150 |
+
|
151 |
+
if ( $this->_includeFocusTarget ) {
|
152 |
+
self::_renderSelectItem(
|
153 |
+
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
154 |
+
'focusTarget',
|
155 |
+
$this->focusTarget,
|
156 |
+
array(
|
157 |
+
'' => '',
|
158 |
+
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
159 |
+
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
160 |
+
),
|
161 |
+
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
162 |
+
);
|
163 |
+
}
|
164 |
+
|
165 |
+
self::_renderSelectItem(
|
166 |
+
esc_html__( 'Selection Mode', Visualizer_Plugin::NAME ),
|
167 |
+
'selectionMode',
|
168 |
+
$this->selectionMode,
|
169 |
+
array(
|
170 |
+
'' => '',
|
171 |
+
'single' => esc_html__( 'Single data point', Visualizer_Plugin::NAME ),
|
172 |
+
'multiple' => esc_html__( 'Multiple data points', Visualizer_Plugin::NAME ),
|
173 |
+
),
|
174 |
+
esc_html__( 'Determines how many data points an user can select on a chart.', Visualizer_Plugin::NAME )
|
175 |
+
);
|
176 |
+
|
177 |
+
self::_renderSelectItem(
|
178 |
+
esc_html__( 'Aggregation Target', Visualizer_Plugin::NAME ),
|
179 |
+
'aggregationTarget',
|
180 |
+
$this->aggregationTarget,
|
181 |
+
array(
|
182 |
+
'' => '',
|
183 |
+
'category' => esc_html__( 'Group selected data by x-value', Visualizer_Plugin::NAME ),
|
184 |
+
'series' => esc_html__( 'Group selected data by series', Visualizer_Plugin::NAME ),
|
185 |
+
'auto' => esc_html__( 'Group selected data by x-value if all selections have the same x-value, and by series otherwise', Visualizer_Plugin::NAME ),
|
186 |
+
'none' => esc_html__( 'Show only one tooltip per selection', Visualizer_Plugin::NAME ),
|
187 |
+
),
|
188 |
+
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element.', Visualizer_Plugin::NAME )
|
189 |
+
);
|
190 |
+
|
191 |
+
echo '<div class="section-delimiter"></div>';
|
192 |
+
|
193 |
+
self::_renderTextItem(
|
194 |
+
esc_html__( 'Point Opacity', Visualizer_Plugin::NAME ),
|
195 |
+
'dataOpacity',
|
196 |
+
$this->dataOpacity,
|
197 |
+
esc_html__( 'The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent.', Visualizer_Plugin::NAME ),
|
198 |
+
'1.0'
|
199 |
+
);
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Renders lines settings.
|
204 |
+
*
|
205 |
+
* @since 1.0.0
|
206 |
+
*
|
207 |
+
* @access protected
|
208 |
+
*/
|
209 |
+
protected function _renderLineSettings() {
|
210 |
+
self::_renderGroupStart( esc_html__( 'Lines Settings', Visualizer_Plugin::NAME ) );
|
211 |
+
self::_renderSectionStart();
|
212 |
+
$this->_renderLineSettingsItems();
|
213 |
+
self::_renderSectionEnd();
|
214 |
+
self::_renderGroupEnd();
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Renders concreate series settings.
|
219 |
+
*
|
220 |
+
* @since 1.0.0
|
221 |
+
*
|
222 |
+
* @access protected
|
223 |
+
* @param int $index The series index.
|
224 |
+
*/
|
225 |
+
protected function _renderSeries( $index ) {
|
226 |
+
self::_renderSelectItem(
|
227 |
+
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
228 |
+
'series[' . $index . '][visibleInLegend]',
|
229 |
+
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
230 |
+
array(
|
231 |
+
'' => '',
|
232 |
+
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
233 |
+
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
234 |
+
),
|
235 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
236 |
+
);
|
237 |
+
|
238 |
+
echo '<div class="section-item">';
|
239 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
240 |
+
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
241 |
+
|
242 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
243 |
+
echo '<tr>';
|
244 |
+
echo '<td class="section-table-column">';
|
245 |
+
$line_width = isset( $this->series[$index]['lineWidth'] ) ? $this->series[$index]['lineWidth'] : '';
|
246 |
+
echo '<input type="text" name="series[', $index, '][lineWidth]" class="control-text" value="', esc_attr( $line_width ), '" placeholder="2">';
|
247 |
+
echo '</td>';
|
248 |
+
echo '<td class="section-table-column">';
|
249 |
+
$point_size = isset( $this->series[$index]['pointSize'] ) ? $this->series[$index]['pointSize'] : '';
|
250 |
+
echo '<input type="text" name="series[', $index, '][pointSize]" class="control-text" value="', esc_attr( $point_size ), '" placeholder="0">';
|
251 |
+
echo '</td>';
|
252 |
+
echo '</tr>';
|
253 |
+
echo '</table>';
|
254 |
+
|
255 |
+
echo '<p class="section-description">';
|
256 |
+
esc_html_e( 'Overrides the global line width and point size values for this series.', Visualizer_Plugin::NAME );
|
257 |
+
echo '</p>';
|
258 |
+
echo '</div>';
|
259 |
+
|
260 |
+
$this->_renderFormatField( $index );
|
261 |
+
|
262 |
+
if ( $this->_includeCurveTypes ) {
|
263 |
+
self::_renderSelectItem(
|
264 |
+
esc_html__( 'Curve Type', Visualizer_Plugin::NAME ),
|
265 |
+
'series[' . $index . '][curveType]',
|
266 |
+
isset( $this->series[$index]['curveType'] ) ? $this->series[$index]['curveType'] : '',
|
267 |
+
$this->_curveTypes,
|
268 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
269 |
+
);
|
270 |
+
}
|
271 |
+
|
272 |
+
self::_renderColorPickerItem(
|
273 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
274 |
+
'series[' . $index . '][color]',
|
275 |
+
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
276 |
+
null
|
277 |
+
);
|
278 |
+
}
|
279 |
+
|
280 |
}
|
classes/Visualizer/Render/Sidebar/Type/Area.php
CHANGED
@@ -1,153 +1,153 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for area chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Area extends Visualizer_Render_Sidebar_Linear {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access public
|
41 |
-
* @param array $data The data what has to be associated with this render.
|
42 |
-
*/
|
43 |
-
public function __construct( $data = array( ) ) {
|
44 |
-
parent::__construct( $data );
|
45 |
-
$this->_includeCurveTypes = false;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Renders template.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
*
|
53 |
-
* @access protected
|
54 |
-
*/
|
55 |
-
protected function _toHTML() {
|
56 |
-
$this->_renderGeneralSettings();
|
57 |
-
$this->_renderAxesSettings();
|
58 |
-
$this->_renderLineSettings();
|
59 |
-
$this->_renderSeriesSettings();
|
60 |
-
$this->_renderViewSettings();
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Renders line settings items.
|
65 |
-
*
|
66 |
-
* @since 1.0.0
|
67 |
-
*
|
68 |
-
* @access protected
|
69 |
-
*/
|
70 |
-
protected function _renderLineSettingsItems() {
|
71 |
-
parent::_renderLineSettingsItems();
|
72 |
-
|
73 |
-
self::_renderTextItem(
|
74 |
-
esc_html__( 'Area Opacity', Visualizer_Plugin::NAME ),
|
75 |
-
'areaOpacity',
|
76 |
-
$this->areaOpacity,
|
77 |
-
esc_html__( 'The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property.', Visualizer_Plugin::NAME ),
|
78 |
-
'0.3'
|
79 |
-
);
|
80 |
-
|
81 |
-
echo '<div class="section-delimiter"></div>';
|
82 |
-
|
83 |
-
self::_renderSelectItem(
|
84 |
-
esc_html__( 'Is Stacked', Visualizer_Plugin::NAME ),
|
85 |
-
'isStacked',
|
86 |
-
$this->isStacked,
|
87 |
-
$this->_yesno,
|
88 |
-
esc_html__( 'If set to yes, series elements are stacked.', Visualizer_Plugin::NAME )
|
89 |
-
);
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Renders concreate series settings.
|
94 |
-
*
|
95 |
-
* @since 1.4.0
|
96 |
-
*
|
97 |
-
* @access protected
|
98 |
-
* @param int $index The series index.
|
99 |
-
*/
|
100 |
-
protected function _renderSeries( $index ) {
|
101 |
-
self::_renderSelectItem(
|
102 |
-
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
103 |
-
'series[' . $index . '][visibleInLegend]',
|
104 |
-
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
105 |
-
array(
|
106 |
-
'' => '',
|
107 |
-
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
108 |
-
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
109 |
-
),
|
110 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
111 |
-
);
|
112 |
-
|
113 |
-
echo '<div class="section-item">';
|
114 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
115 |
-
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
116 |
-
|
117 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
118 |
-
echo '<tr>';
|
119 |
-
echo '<td class="section-table-column">';
|
120 |
-
$line_width = isset( $this->series[$index]['lineWidth'] ) ? $this->series[$index]['lineWidth'] : '';
|
121 |
-
echo '<input type="text" name="series[', $index, '][lineWidth]" class="control-text" value="', esc_attr( $line_width ), '" placeholder="2">';
|
122 |
-
echo '</td>';
|
123 |
-
echo '<td class="section-table-column">';
|
124 |
-
$point_size = isset( $this->series[$index]['pointSize'] ) ? $this->series[$index]['pointSize'] : '';
|
125 |
-
echo '<input type="text" name="series[', $index, '][pointSize]" class="control-text" value="', esc_attr( $point_size ), '" placeholder="0">';
|
126 |
-
echo '</td>';
|
127 |
-
echo '</tr>';
|
128 |
-
echo '</table>';
|
129 |
-
|
130 |
-
echo '<p class="section-description">';
|
131 |
-
esc_html_e( 'Overrides the global line width and point size values for this series.', Visualizer_Plugin::NAME );
|
132 |
-
echo '</p>';
|
133 |
-
echo '</div>';
|
134 |
-
|
135 |
-
$this->_renderFormatField( $index );
|
136 |
-
|
137 |
-
self::_renderTextItem(
|
138 |
-
esc_html__( 'Area Opacity', Visualizer_Plugin::NAME ),
|
139 |
-
'series[' . $index . '][areaOpacity]',
|
140 |
-
isset( $this->series[$index]['areaOpacity'] ) ? $this->series[$index]['areaOpacity'] : null,
|
141 |
-
esc_html__( 'The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque.', Visualizer_Plugin::NAME ),
|
142 |
-
'0.3'
|
143 |
-
);
|
144 |
-
|
145 |
-
self::_renderColorPickerItem(
|
146 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
147 |
-
'series[' . $index . '][color]',
|
148 |
-
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
149 |
-
null
|
150 |
-
);
|
151 |
-
}
|
152 |
-
|
153 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for area chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Area extends Visualizer_Render_Sidebar_Linear {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access public
|
41 |
+
* @param array $data The data what has to be associated with this render.
|
42 |
+
*/
|
43 |
+
public function __construct( $data = array( ) ) {
|
44 |
+
parent::__construct( $data );
|
45 |
+
$this->_includeCurveTypes = false;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Renders template.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
*
|
53 |
+
* @access protected
|
54 |
+
*/
|
55 |
+
protected function _toHTML() {
|
56 |
+
$this->_renderGeneralSettings();
|
57 |
+
$this->_renderAxesSettings();
|
58 |
+
$this->_renderLineSettings();
|
59 |
+
$this->_renderSeriesSettings();
|
60 |
+
$this->_renderViewSettings();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Renders line settings items.
|
65 |
+
*
|
66 |
+
* @since 1.0.0
|
67 |
+
*
|
68 |
+
* @access protected
|
69 |
+
*/
|
70 |
+
protected function _renderLineSettingsItems() {
|
71 |
+
parent::_renderLineSettingsItems();
|
72 |
+
|
73 |
+
self::_renderTextItem(
|
74 |
+
esc_html__( 'Area Opacity', Visualizer_Plugin::NAME ),
|
75 |
+
'areaOpacity',
|
76 |
+
$this->areaOpacity,
|
77 |
+
esc_html__( 'The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property.', Visualizer_Plugin::NAME ),
|
78 |
+
'0.3'
|
79 |
+
);
|
80 |
+
|
81 |
+
echo '<div class="section-delimiter"></div>';
|
82 |
+
|
83 |
+
self::_renderSelectItem(
|
84 |
+
esc_html__( 'Is Stacked', Visualizer_Plugin::NAME ),
|
85 |
+
'isStacked',
|
86 |
+
$this->isStacked,
|
87 |
+
$this->_yesno,
|
88 |
+
esc_html__( 'If set to yes, series elements are stacked.', Visualizer_Plugin::NAME )
|
89 |
+
);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Renders concreate series settings.
|
94 |
+
*
|
95 |
+
* @since 1.4.0
|
96 |
+
*
|
97 |
+
* @access protected
|
98 |
+
* @param int $index The series index.
|
99 |
+
*/
|
100 |
+
protected function _renderSeries( $index ) {
|
101 |
+
self::_renderSelectItem(
|
102 |
+
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
103 |
+
'series[' . $index . '][visibleInLegend]',
|
104 |
+
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
105 |
+
array(
|
106 |
+
'' => '',
|
107 |
+
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
108 |
+
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
109 |
+
),
|
110 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
111 |
+
);
|
112 |
+
|
113 |
+
echo '<div class="section-item">';
|
114 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
115 |
+
echo '<b>', esc_html__( 'Line Width And Point Size', Visualizer_Plugin::NAME ), '</b>';
|
116 |
+
|
117 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
118 |
+
echo '<tr>';
|
119 |
+
echo '<td class="section-table-column">';
|
120 |
+
$line_width = isset( $this->series[$index]['lineWidth'] ) ? $this->series[$index]['lineWidth'] : '';
|
121 |
+
echo '<input type="text" name="series[', $index, '][lineWidth]" class="control-text" value="', esc_attr( $line_width ), '" placeholder="2">';
|
122 |
+
echo '</td>';
|
123 |
+
echo '<td class="section-table-column">';
|
124 |
+
$point_size = isset( $this->series[$index]['pointSize'] ) ? $this->series[$index]['pointSize'] : '';
|
125 |
+
echo '<input type="text" name="series[', $index, '][pointSize]" class="control-text" value="', esc_attr( $point_size ), '" placeholder="0">';
|
126 |
+
echo '</td>';
|
127 |
+
echo '</tr>';
|
128 |
+
echo '</table>';
|
129 |
+
|
130 |
+
echo '<p class="section-description">';
|
131 |
+
esc_html_e( 'Overrides the global line width and point size values for this series.', Visualizer_Plugin::NAME );
|
132 |
+
echo '</p>';
|
133 |
+
echo '</div>';
|
134 |
+
|
135 |
+
$this->_renderFormatField( $index );
|
136 |
+
|
137 |
+
self::_renderTextItem(
|
138 |
+
esc_html__( 'Area Opacity', Visualizer_Plugin::NAME ),
|
139 |
+
'series[' . $index . '][areaOpacity]',
|
140 |
+
isset( $this->series[$index]['areaOpacity'] ) ? $this->series[$index]['areaOpacity'] : null,
|
141 |
+
esc_html__( 'The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque.', Visualizer_Plugin::NAME ),
|
142 |
+
'0.3'
|
143 |
+
);
|
144 |
+
|
145 |
+
self::_renderColorPickerItem(
|
146 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
147 |
+
'series[' . $index . '][color]',
|
148 |
+
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
149 |
+
null
|
150 |
+
);
|
151 |
+
}
|
152 |
+
|
153 |
}
|
classes/Visualizer/Render/Sidebar/Type/Bar.php
CHANGED
@@ -1,77 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for bar chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Bar extends Visualizer_Render_Sidebar_Columnar {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access public
|
41 |
-
* @param array $data The data what has to be associated with this render.
|
42 |
-
*/
|
43 |
-
public function __construct( $data = array( ) ) {
|
44 |
-
parent::__construct( $data );
|
45 |
-
|
46 |
-
// disable horizontal gridlines settings
|
47 |
-
$this->_horizontalGridLines = false;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders general settings block for horizontal axis settings.
|
52 |
-
*
|
53 |
-
* @since 1.4.3
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderHorizontalAxisGeneratSettings() {
|
58 |
-
parent::_renderHorizontalAxisGeneratSettings();
|
59 |
-
$this->_renderHorizontalAxisFormatField();
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Renders template.
|
64 |
-
*
|
65 |
-
* @since 1.0.0
|
66 |
-
*
|
67 |
-
* @access protected
|
68 |
-
*/
|
69 |
-
protected function _toHTML() {
|
70 |
-
$this->_renderGeneralSettings();
|
71 |
-
$this->_renderAxesSettings();
|
72 |
-
$this->_renderColumnarSettings();
|
73 |
-
$this->_renderSeriesSettings();
|
74 |
-
$this->_renderViewSettings();
|
75 |
-
}
|
76 |
-
|
77 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for bar chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Bar extends Visualizer_Render_Sidebar_Columnar {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access public
|
41 |
+
* @param array $data The data what has to be associated with this render.
|
42 |
+
*/
|
43 |
+
public function __construct( $data = array( ) ) {
|
44 |
+
parent::__construct( $data );
|
45 |
+
|
46 |
+
// disable horizontal gridlines settings
|
47 |
+
$this->_horizontalGridLines = false;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders general settings block for horizontal axis settings.
|
52 |
+
*
|
53 |
+
* @since 1.4.3
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderHorizontalAxisGeneratSettings() {
|
58 |
+
parent::_renderHorizontalAxisGeneratSettings();
|
59 |
+
$this->_renderHorizontalAxisFormatField();
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Renders template.
|
64 |
+
*
|
65 |
+
* @since 1.0.0
|
66 |
+
*
|
67 |
+
* @access protected
|
68 |
+
*/
|
69 |
+
protected function _toHTML() {
|
70 |
+
$this->_renderGeneralSettings();
|
71 |
+
$this->_renderAxesSettings();
|
72 |
+
$this->_renderColumnarSettings();
|
73 |
+
$this->_renderSeriesSettings();
|
74 |
+
$this->_renderViewSettings();
|
75 |
+
}
|
76 |
+
|
77 |
}
|
classes/Visualizer/Render/Sidebar/Type/Candlestick.php
CHANGED
@@ -1,180 +1,180 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for candlestick chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Candlestick extends Visualizer_Render_Sidebar_Linear {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
$this->_renderGeneralSettings();
|
44 |
-
$this->_renderAxesSettings();
|
45 |
-
$this->_renderLineSettings();
|
46 |
-
$this->_renderSeriesSettings();
|
47 |
-
$this->_renderViewSettings();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders lines settings.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderLineSettings() {
|
58 |
-
self::_renderGroupStart( esc_html__( 'Candles Settings', Visualizer_Plugin::NAME ) );
|
59 |
-
self::_renderSectionStart();
|
60 |
-
self::_renderSelectItem(
|
61 |
-
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
62 |
-
'focusTarget',
|
63 |
-
$this->focusTarget,
|
64 |
-
array(
|
65 |
-
'' => '',
|
66 |
-
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
67 |
-
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
68 |
-
),
|
69 |
-
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
70 |
-
);
|
71 |
-
|
72 |
-
echo '<div class="section-delimiter"></div>';
|
73 |
-
|
74 |
-
self::_renderSelectItem(
|
75 |
-
esc_html__( 'Selection Mode', Visualizer_Plugin::NAME ),
|
76 |
-
'selectionMode',
|
77 |
-
$this->selectionMode,
|
78 |
-
array(
|
79 |
-
'' => '',
|
80 |
-
'single' => esc_html__( 'Single data point', Visualizer_Plugin::NAME ),
|
81 |
-
'multiple' => esc_html__( 'Multiple data points', Visualizer_Plugin::NAME ),
|
82 |
-
),
|
83 |
-
esc_html__( 'Determines how many data points an user can select on a chart.', Visualizer_Plugin::NAME )
|
84 |
-
);
|
85 |
-
|
86 |
-
self::_renderSelectItem(
|
87 |
-
esc_html__( 'Aggregation Target', Visualizer_Plugin::NAME ),
|
88 |
-
'aggregationTarget',
|
89 |
-
$this->aggregationTarget,
|
90 |
-
array(
|
91 |
-
'' => '',
|
92 |
-
'category' => esc_html__( 'Group selected data by x-value', Visualizer_Plugin::NAME ),
|
93 |
-
'series' => esc_html__( 'Group selected data by series', Visualizer_Plugin::NAME ),
|
94 |
-
'auto' => esc_html__( 'Group selected data by x-value if all selections have the same x-value, and by series otherwise', Visualizer_Plugin::NAME ),
|
95 |
-
'none' => esc_html__( 'Show only one tooltip per selection', Visualizer_Plugin::NAME ),
|
96 |
-
),
|
97 |
-
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element.', Visualizer_Plugin::NAME )
|
98 |
-
);
|
99 |
-
self::_renderSectionEnd();
|
100 |
-
|
101 |
-
self::_renderSectionStart( esc_html__( 'Failing Candles', Visualizer_Plugin::NAME ), false );
|
102 |
-
self::_renderTextItem(
|
103 |
-
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
104 |
-
'candlestick[fallingColor][strokeWidth]',
|
105 |
-
isset( $this->candlestick['fallingColor']['strokeWidth'] ) ? $this->candlestick['fallingColor']['strokeWidth'] : null,
|
106 |
-
esc_html__( 'The stroke width of falling candles.', Visualizer_Plugin::NAME ),
|
107 |
-
'2'
|
108 |
-
);
|
109 |
-
|
110 |
-
self::_renderColorPickerItem(
|
111 |
-
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
112 |
-
'candlestick[fallingColor][stroke]',
|
113 |
-
!empty( $this->candlestick['fallingColor']['stroke'] ) ? $this->candlestick['fallingColor']['stroke'] : null,
|
114 |
-
null
|
115 |
-
);
|
116 |
-
|
117 |
-
self::_renderColorPickerItem(
|
118 |
-
esc_html__( 'Fill Color', Visualizer_Plugin::NAME ),
|
119 |
-
'candlestick[fallingColor][fill]',
|
120 |
-
!empty( $this->candlestick['fallingColor']['fill'] ) ? $this->candlestick['fallingColor']['fill'] : null,
|
121 |
-
null
|
122 |
-
);
|
123 |
-
self::_renderSectionEnd();
|
124 |
-
|
125 |
-
self::_renderSectionStart( esc_html__( 'Rising Candles', Visualizer_Plugin::NAME ), false );
|
126 |
-
self::_renderTextItem(
|
127 |
-
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
128 |
-
'candlestick[risingColor][strokeWidth]',
|
129 |
-
isset( $this->candlestick['risingColor']['strokeWidth'] ) ? $this->candlestick['risingColor']['strokeWidth'] : null,
|
130 |
-
esc_html__( 'The stroke width of rising candles.', Visualizer_Plugin::NAME ),
|
131 |
-
'2'
|
132 |
-
);
|
133 |
-
|
134 |
-
self::_renderColorPickerItem(
|
135 |
-
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
136 |
-
'candlestick[risingColor][stroke]',
|
137 |
-
!empty( $this->candlestick['risingColor']['stroke'] ) ? $this->candlestick['risingColor']['stroke'] : null,
|
138 |
-
null
|
139 |
-
);
|
140 |
-
|
141 |
-
self::_renderColorPickerItem(
|
142 |
-
esc_html__( 'Fill Color', Visualizer_Plugin::NAME ),
|
143 |
-
'candlestick[risingColor][fill]',
|
144 |
-
!empty( $this->candlestick['risingColor']['fill'] ) ? $this->candlestick['risingColor']['fill'] : null,
|
145 |
-
null
|
146 |
-
);
|
147 |
-
self::_renderSectionEnd();
|
148 |
-
self::_renderGroupEnd();
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Renders concreate series settings.
|
153 |
-
*
|
154 |
-
* @since 1.0.0
|
155 |
-
*
|
156 |
-
* @access protected
|
157 |
-
* @param int $index The series index.
|
158 |
-
*/
|
159 |
-
protected function _renderSeries( $index ) {
|
160 |
-
self::_renderSelectItem(
|
161 |
-
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
162 |
-
'series[' . $index . '][visibleInLegend]',
|
163 |
-
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
164 |
-
array(
|
165 |
-
'' => '',
|
166 |
-
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
167 |
-
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
168 |
-
),
|
169 |
-
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
170 |
-
);
|
171 |
-
|
172 |
-
self::_renderColorPickerItem(
|
173 |
-
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
174 |
-
'series[' . $index . '][color]',
|
175 |
-
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
176 |
-
null
|
177 |
-
);
|
178 |
-
}
|
179 |
-
|
180 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for candlestick chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Candlestick extends Visualizer_Render_Sidebar_Linear {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
$this->_renderGeneralSettings();
|
44 |
+
$this->_renderAxesSettings();
|
45 |
+
$this->_renderLineSettings();
|
46 |
+
$this->_renderSeriesSettings();
|
47 |
+
$this->_renderViewSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders lines settings.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderLineSettings() {
|
58 |
+
self::_renderGroupStart( esc_html__( 'Candles Settings', Visualizer_Plugin::NAME ) );
|
59 |
+
self::_renderSectionStart();
|
60 |
+
self::_renderSelectItem(
|
61 |
+
esc_html__( 'Focus Target', Visualizer_Plugin::NAME ),
|
62 |
+
'focusTarget',
|
63 |
+
$this->focusTarget,
|
64 |
+
array(
|
65 |
+
'' => '',
|
66 |
+
'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ),
|
67 |
+
'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ),
|
68 |
+
),
|
69 |
+
esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME )
|
70 |
+
);
|
71 |
+
|
72 |
+
echo '<div class="section-delimiter"></div>';
|
73 |
+
|
74 |
+
self::_renderSelectItem(
|
75 |
+
esc_html__( 'Selection Mode', Visualizer_Plugin::NAME ),
|
76 |
+
'selectionMode',
|
77 |
+
$this->selectionMode,
|
78 |
+
array(
|
79 |
+
'' => '',
|
80 |
+
'single' => esc_html__( 'Single data point', Visualizer_Plugin::NAME ),
|
81 |
+
'multiple' => esc_html__( 'Multiple data points', Visualizer_Plugin::NAME ),
|
82 |
+
),
|
83 |
+
esc_html__( 'Determines how many data points an user can select on a chart.', Visualizer_Plugin::NAME )
|
84 |
+
);
|
85 |
+
|
86 |
+
self::_renderSelectItem(
|
87 |
+
esc_html__( 'Aggregation Target', Visualizer_Plugin::NAME ),
|
88 |
+
'aggregationTarget',
|
89 |
+
$this->aggregationTarget,
|
90 |
+
array(
|
91 |
+
'' => '',
|
92 |
+
'category' => esc_html__( 'Group selected data by x-value', Visualizer_Plugin::NAME ),
|
93 |
+
'series' => esc_html__( 'Group selected data by series', Visualizer_Plugin::NAME ),
|
94 |
+
'auto' => esc_html__( 'Group selected data by x-value if all selections have the same x-value, and by series otherwise', Visualizer_Plugin::NAME ),
|
95 |
+
'none' => esc_html__( 'Show only one tooltip per selection', Visualizer_Plugin::NAME ),
|
96 |
+
),
|
97 |
+
esc_html__( 'Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element.', Visualizer_Plugin::NAME )
|
98 |
+
);
|
99 |
+
self::_renderSectionEnd();
|
100 |
+
|
101 |
+
self::_renderSectionStart( esc_html__( 'Failing Candles', Visualizer_Plugin::NAME ), false );
|
102 |
+
self::_renderTextItem(
|
103 |
+
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
104 |
+
'candlestick[fallingColor][strokeWidth]',
|
105 |
+
isset( $this->candlestick['fallingColor']['strokeWidth'] ) ? $this->candlestick['fallingColor']['strokeWidth'] : null,
|
106 |
+
esc_html__( 'The stroke width of falling candles.', Visualizer_Plugin::NAME ),
|
107 |
+
'2'
|
108 |
+
);
|
109 |
+
|
110 |
+
self::_renderColorPickerItem(
|
111 |
+
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
112 |
+
'candlestick[fallingColor][stroke]',
|
113 |
+
!empty( $this->candlestick['fallingColor']['stroke'] ) ? $this->candlestick['fallingColor']['stroke'] : null,
|
114 |
+
null
|
115 |
+
);
|
116 |
+
|
117 |
+
self::_renderColorPickerItem(
|
118 |
+
esc_html__( 'Fill Color', Visualizer_Plugin::NAME ),
|
119 |
+
'candlestick[fallingColor][fill]',
|
120 |
+
!empty( $this->candlestick['fallingColor']['fill'] ) ? $this->candlestick['fallingColor']['fill'] : null,
|
121 |
+
null
|
122 |
+
);
|
123 |
+
self::_renderSectionEnd();
|
124 |
+
|
125 |
+
self::_renderSectionStart( esc_html__( 'Rising Candles', Visualizer_Plugin::NAME ), false );
|
126 |
+
self::_renderTextItem(
|
127 |
+
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
128 |
+
'candlestick[risingColor][strokeWidth]',
|
129 |
+
isset( $this->candlestick['risingColor']['strokeWidth'] ) ? $this->candlestick['risingColor']['strokeWidth'] : null,
|
130 |
+
esc_html__( 'The stroke width of rising candles.', Visualizer_Plugin::NAME ),
|
131 |
+
'2'
|
132 |
+
);
|
133 |
+
|
134 |
+
self::_renderColorPickerItem(
|
135 |
+
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
136 |
+
'candlestick[risingColor][stroke]',
|
137 |
+
!empty( $this->candlestick['risingColor']['stroke'] ) ? $this->candlestick['risingColor']['stroke'] : null,
|
138 |
+
null
|
139 |
+
);
|
140 |
+
|
141 |
+
self::_renderColorPickerItem(
|
142 |
+
esc_html__( 'Fill Color', Visualizer_Plugin::NAME ),
|
143 |
+
'candlestick[risingColor][fill]',
|
144 |
+
!empty( $this->candlestick['risingColor']['fill'] ) ? $this->candlestick['risingColor']['fill'] : null,
|
145 |
+
null
|
146 |
+
);
|
147 |
+
self::_renderSectionEnd();
|
148 |
+
self::_renderGroupEnd();
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Renders concreate series settings.
|
153 |
+
*
|
154 |
+
* @since 1.0.0
|
155 |
+
*
|
156 |
+
* @access protected
|
157 |
+
* @param int $index The series index.
|
158 |
+
*/
|
159 |
+
protected function _renderSeries( $index ) {
|
160 |
+
self::_renderSelectItem(
|
161 |
+
esc_html__( 'Visible In Legend', Visualizer_Plugin::NAME ),
|
162 |
+
'series[' . $index . '][visibleInLegend]',
|
163 |
+
isset( $this->series[$index]['visibleInLegend'] ) ? $this->series[$index]['visibleInLegend'] : '',
|
164 |
+
array(
|
165 |
+
'' => '',
|
166 |
+
'0' => esc_html__( 'No', Visualizer_Plugin::NAME ),
|
167 |
+
'1' => esc_html__( 'Yes', Visualizer_Plugin::NAME ),
|
168 |
+
),
|
169 |
+
esc_html__( 'Determines whether the series has to be presented in the legend or not.', Visualizer_Plugin::NAME )
|
170 |
+
);
|
171 |
+
|
172 |
+
self::_renderColorPickerItem(
|
173 |
+
esc_html__( 'Color', Visualizer_Plugin::NAME ),
|
174 |
+
'series[' . $index . '][color]',
|
175 |
+
isset( $this->series[$index]['color'] ) ? $this->series[$index]['color'] : null,
|
176 |
+
null
|
177 |
+
);
|
178 |
+
}
|
179 |
+
|
180 |
}
|
classes/Visualizer/Render/Sidebar/Type/Column.php
CHANGED
@@ -1,77 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for column chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Column extends Visualizer_Render_Sidebar_Columnar {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access public
|
41 |
-
* @param array $data The data what has to be associated with this render.
|
42 |
-
*/
|
43 |
-
public function __construct( $data = array( ) ) {
|
44 |
-
parent::__construct( $data );
|
45 |
-
|
46 |
-
// disable vertical gridlines settings
|
47 |
-
$this->_verticalGridLines = false;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders general settings block for vertical axis settings.
|
52 |
-
*
|
53 |
-
* @since 1.4.3
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderVerticalAxisGeneralSettings() {
|
58 |
-
parent::_renderVerticalAxisGeneralSettings();
|
59 |
-
$this->_renderVerticalAxisFormatField();
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Renders template.
|
64 |
-
*
|
65 |
-
* @since 1.0.0
|
66 |
-
*
|
67 |
-
* @access protected
|
68 |
-
*/
|
69 |
-
protected function _toHTML() {
|
70 |
-
$this->_renderGeneralSettings();
|
71 |
-
$this->_renderAxesSettings();
|
72 |
-
$this->_renderColumnarSettings();
|
73 |
-
$this->_renderSeriesSettings();
|
74 |
-
$this->_renderViewSettings();
|
75 |
-
}
|
76 |
-
|
77 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for column chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Column extends Visualizer_Render_Sidebar_Columnar {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access public
|
41 |
+
* @param array $data The data what has to be associated with this render.
|
42 |
+
*/
|
43 |
+
public function __construct( $data = array( ) ) {
|
44 |
+
parent::__construct( $data );
|
45 |
+
|
46 |
+
// disable vertical gridlines settings
|
47 |
+
$this->_verticalGridLines = false;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders general settings block for vertical axis settings.
|
52 |
+
*
|
53 |
+
* @since 1.4.3
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderVerticalAxisGeneralSettings() {
|
58 |
+
parent::_renderVerticalAxisGeneralSettings();
|
59 |
+
$this->_renderVerticalAxisFormatField();
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Renders template.
|
64 |
+
*
|
65 |
+
* @since 1.0.0
|
66 |
+
*
|
67 |
+
* @access protected
|
68 |
+
*/
|
69 |
+
protected function _toHTML() {
|
70 |
+
$this->_renderGeneralSettings();
|
71 |
+
$this->_renderAxesSettings();
|
72 |
+
$this->_renderColumnarSettings();
|
73 |
+
$this->_renderSeriesSettings();
|
74 |
+
$this->_renderViewSettings();
|
75 |
+
}
|
76 |
+
|
77 |
}
|
classes/Visualizer/Render/Sidebar/Type/Gauge.php
CHANGED
@@ -1,256 +1,256 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for gauge chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Gauge extends Visualizer_Render_Sidebar {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
$this->_renderGeneralSettings();
|
44 |
-
$this->_renderGreenColorSettings();
|
45 |
-
$this->_renderYellowColorSettings();
|
46 |
-
$this->_renderRedColorSettings();
|
47 |
-
$this->_renderViewSettings();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders chart general settings group.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderGeneralSettings() {
|
58 |
-
self::_renderGroupStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ) );
|
59 |
-
self::_renderSectionStart();
|
60 |
-
|
61 |
-
echo '<div class="section-item">';
|
62 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
63 |
-
echo '<b>', esc_html__( 'Min And Max Values', Visualizer_Plugin::NAME ), '</b>';
|
64 |
-
|
65 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
66 |
-
echo '<tr>';
|
67 |
-
echo '<td class="section-table-column">';
|
68 |
-
echo '<input type="text" name="min" class="control-text" value="', esc_attr( $this->min ), '" placeholder="0">';
|
69 |
-
echo '</td>';
|
70 |
-
echo '<td class="section-table-column">';
|
71 |
-
echo '<input type="text" name="max" class="control-text" value="', esc_attr( $this->max ), '" placeholder="100">';
|
72 |
-
echo '</td>';
|
73 |
-
echo '</tr>';
|
74 |
-
echo '</table>';
|
75 |
-
|
76 |
-
echo '<p class="section-description">';
|
77 |
-
esc_html_e( 'The maximal and minimal values of the gauge.', Visualizer_Plugin::NAME );
|
78 |
-
echo '</p>';
|
79 |
-
echo '</div>';
|
80 |
-
|
81 |
-
self::_renderTextItem(
|
82 |
-
esc_html__( 'Minor Ticks', Visualizer_Plugin::NAME ),
|
83 |
-
'minorTicks',
|
84 |
-
$this->minorTicks,
|
85 |
-
esc_html__( 'The number of minor tick section in each major tick section.', Visualizer_Plugin::NAME ),
|
86 |
-
2
|
87 |
-
);
|
88 |
-
|
89 |
-
$this->_renderFormatField();
|
90 |
-
|
91 |
-
self::_renderSectionEnd();
|
92 |
-
self::_renderGroupEnd();
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Renders green color settings group.
|
97 |
-
*
|
98 |
-
* @since 1.0.0
|
99 |
-
*
|
100 |
-
* @access protected
|
101 |
-
*/
|
102 |
-
protected function _renderGreenColorSettings() {
|
103 |
-
self::_renderGroupStart( esc_html__( 'Green Color', Visualizer_Plugin::NAME ) );
|
104 |
-
self::_renderSectionStart();
|
105 |
-
self::_renderSectionDescription( esc_html__( 'Configure the green section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
106 |
-
|
107 |
-
echo '<div class="section-item">';
|
108 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
109 |
-
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
110 |
-
|
111 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
112 |
-
echo '<tr>';
|
113 |
-
echo '<td class="section-table-column">';
|
114 |
-
echo '<input type="text" name="greenFrom" class="control-text" value="', esc_attr( $this->greenFrom ), '">';
|
115 |
-
echo '</td>';
|
116 |
-
echo '<td class="section-table-column">';
|
117 |
-
echo '<input type="text" name="greenTo" class="control-text" value="', esc_attr( $this->greenTo ), '">';
|
118 |
-
echo '</td>';
|
119 |
-
echo '</tr>';
|
120 |
-
echo '</table>';
|
121 |
-
|
122 |
-
echo '<p class="section-description">';
|
123 |
-
esc_html_e( 'The lowest and highest values for a range marked by a green color.', Visualizer_Plugin::NAME );
|
124 |
-
echo '</p>';
|
125 |
-
echo '</div>';
|
126 |
-
|
127 |
-
self::_renderColorPickerItem(
|
128 |
-
esc_html__( 'Green Color', Visualizer_Plugin::NAME ),
|
129 |
-
'greenColor',
|
130 |
-
$this->greenColor,
|
131 |
-
'#109618'
|
132 |
-
);
|
133 |
-
self::_renderSectionEnd();
|
134 |
-
self::_renderGroupEnd();
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Renders yellow color settings group.
|
139 |
-
*
|
140 |
-
* @since 1.0.0
|
141 |
-
*
|
142 |
-
* @access protected
|
143 |
-
*/
|
144 |
-
protected function _renderYellowColorSettings() {
|
145 |
-
self::_renderGroupStart( esc_html__( 'Yellow Color', Visualizer_Plugin::NAME ) );
|
146 |
-
self::_renderSectionStart();
|
147 |
-
self::_renderSectionDescription( esc_html__( 'Configure the yellow section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
148 |
-
|
149 |
-
echo '<div class="section-item">';
|
150 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
151 |
-
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
152 |
-
|
153 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
154 |
-
echo '<tr>';
|
155 |
-
echo '<td class="section-table-column">';
|
156 |
-
echo '<input type="text" name="yellowFrom" class="control-text" value="', esc_attr( $this->yellowFrom ), '">';
|
157 |
-
echo '</td>';
|
158 |
-
echo '<td class="section-table-column">';
|
159 |
-
echo '<input type="text" name="yellowTo" class="control-text" value="', esc_attr( $this->yellowTo ), '">';
|
160 |
-
echo '</td>';
|
161 |
-
echo '</tr>';
|
162 |
-
echo '</table>';
|
163 |
-
|
164 |
-
echo '<p class="section-description">';
|
165 |
-
esc_html_e( 'The lowest and highest values for a range marked by a yellow color.', Visualizer_Plugin::NAME );
|
166 |
-
echo '</p>';
|
167 |
-
echo '</div>';
|
168 |
-
|
169 |
-
self::_renderColorPickerItem(
|
170 |
-
esc_html__( 'Yellow Color', Visualizer_Plugin::NAME ),
|
171 |
-
'yellowColor',
|
172 |
-
$this->yellowColor,
|
173 |
-
'#FF9900'
|
174 |
-
);
|
175 |
-
self::_renderSectionEnd();
|
176 |
-
self::_renderGroupEnd();
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Renders red color settings group.
|
181 |
-
*
|
182 |
-
* @since 1.0.0
|
183 |
-
*
|
184 |
-
* @access protected
|
185 |
-
*/
|
186 |
-
protected function _renderRedColorSettings() {
|
187 |
-
self::_renderGroupStart( esc_html__( 'Red Color', Visualizer_Plugin::NAME ) );
|
188 |
-
self::_renderSectionStart();
|
189 |
-
self::_renderSectionDescription( esc_html__( 'Configure the red section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
190 |
-
|
191 |
-
echo '<div class="section-item">';
|
192 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
193 |
-
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
194 |
-
|
195 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
196 |
-
echo '<tr>';
|
197 |
-
echo '<td class="section-table-column">';
|
198 |
-
echo '<input type="text" name="redFrom" class="control-text" value="', esc_attr( $this->redFrom ), '">';
|
199 |
-
echo '</td>';
|
200 |
-
echo '<td class="section-table-column">';
|
201 |
-
echo '<input type="text" name="redTo" class="control-text" value="', esc_attr( $this->redTo ), '">';
|
202 |
-
echo '</td>';
|
203 |
-
echo '</tr>';
|
204 |
-
echo '</table>';
|
205 |
-
|
206 |
-
echo '<p class="section-description">';
|
207 |
-
esc_html_e( 'The lowest and highest values for a range marked by a red color.', Visualizer_Plugin::NAME );
|
208 |
-
echo '</p>';
|
209 |
-
echo '</div>';
|
210 |
-
|
211 |
-
self::_renderColorPickerItem(
|
212 |
-
esc_html__( 'Red Color', Visualizer_Plugin::NAME ),
|
213 |
-
'redColor',
|
214 |
-
$this->redColor,
|
215 |
-
'#DC3912'
|
216 |
-
);
|
217 |
-
self::_renderSectionEnd();
|
218 |
-
self::_renderGroupEnd();
|
219 |
-
}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Renders chart view settings group.
|
223 |
-
*
|
224 |
-
* @since 1.0.0
|
225 |
-
*
|
226 |
-
* @access protected
|
227 |
-
*/
|
228 |
-
protected function _renderViewSettings() {
|
229 |
-
self::_renderGroupStart( esc_html__( 'Layout & Chart Area', Visualizer_Plugin::NAME ) );
|
230 |
-
self::_renderSectionStart();
|
231 |
-
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
232 |
-
|
233 |
-
echo '<div class="section-item">';
|
234 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
235 |
-
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
236 |
-
|
237 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
238 |
-
echo '<tr>';
|
239 |
-
echo '<td class="section-table-column">';
|
240 |
-
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
241 |
-
echo '</td>';
|
242 |
-
echo '<td class="section-table-column">';
|
243 |
-
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
244 |
-
echo '</td>';
|
245 |
-
echo '</tr>';
|
246 |
-
echo '</table>';
|
247 |
-
|
248 |
-
echo '<p class="section-description">';
|
249 |
-
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
250 |
-
echo '</p>';
|
251 |
-
echo '</div>';
|
252 |
-
self::_renderSectionEnd();
|
253 |
-
self::_renderGroupEnd();
|
254 |
-
}
|
255 |
-
|
256 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for gauge chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Gauge extends Visualizer_Render_Sidebar {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
$this->_renderGeneralSettings();
|
44 |
+
$this->_renderGreenColorSettings();
|
45 |
+
$this->_renderYellowColorSettings();
|
46 |
+
$this->_renderRedColorSettings();
|
47 |
+
$this->_renderViewSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders chart general settings group.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderGeneralSettings() {
|
58 |
+
self::_renderGroupStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ) );
|
59 |
+
self::_renderSectionStart();
|
60 |
+
|
61 |
+
echo '<div class="section-item">';
|
62 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
63 |
+
echo '<b>', esc_html__( 'Min And Max Values', Visualizer_Plugin::NAME ), '</b>';
|
64 |
+
|
65 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
66 |
+
echo '<tr>';
|
67 |
+
echo '<td class="section-table-column">';
|
68 |
+
echo '<input type="text" name="min" class="control-text" value="', esc_attr( $this->min ), '" placeholder="0">';
|
69 |
+
echo '</td>';
|
70 |
+
echo '<td class="section-table-column">';
|
71 |
+
echo '<input type="text" name="max" class="control-text" value="', esc_attr( $this->max ), '" placeholder="100">';
|
72 |
+
echo '</td>';
|
73 |
+
echo '</tr>';
|
74 |
+
echo '</table>';
|
75 |
+
|
76 |
+
echo '<p class="section-description">';
|
77 |
+
esc_html_e( 'The maximal and minimal values of the gauge.', Visualizer_Plugin::NAME );
|
78 |
+
echo '</p>';
|
79 |
+
echo '</div>';
|
80 |
+
|
81 |
+
self::_renderTextItem(
|
82 |
+
esc_html__( 'Minor Ticks', Visualizer_Plugin::NAME ),
|
83 |
+
'minorTicks',
|
84 |
+
$this->minorTicks,
|
85 |
+
esc_html__( 'The number of minor tick section in each major tick section.', Visualizer_Plugin::NAME ),
|
86 |
+
2
|
87 |
+
);
|
88 |
+
|
89 |
+
$this->_renderFormatField();
|
90 |
+
|
91 |
+
self::_renderSectionEnd();
|
92 |
+
self::_renderGroupEnd();
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Renders green color settings group.
|
97 |
+
*
|
98 |
+
* @since 1.0.0
|
99 |
+
*
|
100 |
+
* @access protected
|
101 |
+
*/
|
102 |
+
protected function _renderGreenColorSettings() {
|
103 |
+
self::_renderGroupStart( esc_html__( 'Green Color', Visualizer_Plugin::NAME ) );
|
104 |
+
self::_renderSectionStart();
|
105 |
+
self::_renderSectionDescription( esc_html__( 'Configure the green section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
106 |
+
|
107 |
+
echo '<div class="section-item">';
|
108 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
109 |
+
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
110 |
+
|
111 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
112 |
+
echo '<tr>';
|
113 |
+
echo '<td class="section-table-column">';
|
114 |
+
echo '<input type="text" name="greenFrom" class="control-text" value="', esc_attr( $this->greenFrom ), '">';
|
115 |
+
echo '</td>';
|
116 |
+
echo '<td class="section-table-column">';
|
117 |
+
echo '<input type="text" name="greenTo" class="control-text" value="', esc_attr( $this->greenTo ), '">';
|
118 |
+
echo '</td>';
|
119 |
+
echo '</tr>';
|
120 |
+
echo '</table>';
|
121 |
+
|
122 |
+
echo '<p class="section-description">';
|
123 |
+
esc_html_e( 'The lowest and highest values for a range marked by a green color.', Visualizer_Plugin::NAME );
|
124 |
+
echo '</p>';
|
125 |
+
echo '</div>';
|
126 |
+
|
127 |
+
self::_renderColorPickerItem(
|
128 |
+
esc_html__( 'Green Color', Visualizer_Plugin::NAME ),
|
129 |
+
'greenColor',
|
130 |
+
$this->greenColor,
|
131 |
+
'#109618'
|
132 |
+
);
|
133 |
+
self::_renderSectionEnd();
|
134 |
+
self::_renderGroupEnd();
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Renders yellow color settings group.
|
139 |
+
*
|
140 |
+
* @since 1.0.0
|
141 |
+
*
|
142 |
+
* @access protected
|
143 |
+
*/
|
144 |
+
protected function _renderYellowColorSettings() {
|
145 |
+
self::_renderGroupStart( esc_html__( 'Yellow Color', Visualizer_Plugin::NAME ) );
|
146 |
+
self::_renderSectionStart();
|
147 |
+
self::_renderSectionDescription( esc_html__( 'Configure the yellow section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
148 |
+
|
149 |
+
echo '<div class="section-item">';
|
150 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
151 |
+
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
152 |
+
|
153 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
154 |
+
echo '<tr>';
|
155 |
+
echo '<td class="section-table-column">';
|
156 |
+
echo '<input type="text" name="yellowFrom" class="control-text" value="', esc_attr( $this->yellowFrom ), '">';
|
157 |
+
echo '</td>';
|
158 |
+
echo '<td class="section-table-column">';
|
159 |
+
echo '<input type="text" name="yellowTo" class="control-text" value="', esc_attr( $this->yellowTo ), '">';
|
160 |
+
echo '</td>';
|
161 |
+
echo '</tr>';
|
162 |
+
echo '</table>';
|
163 |
+
|
164 |
+
echo '<p class="section-description">';
|
165 |
+
esc_html_e( 'The lowest and highest values for a range marked by a yellow color.', Visualizer_Plugin::NAME );
|
166 |
+
echo '</p>';
|
167 |
+
echo '</div>';
|
168 |
+
|
169 |
+
self::_renderColorPickerItem(
|
170 |
+
esc_html__( 'Yellow Color', Visualizer_Plugin::NAME ),
|
171 |
+
'yellowColor',
|
172 |
+
$this->yellowColor,
|
173 |
+
'#FF9900'
|
174 |
+
);
|
175 |
+
self::_renderSectionEnd();
|
176 |
+
self::_renderGroupEnd();
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Renders red color settings group.
|
181 |
+
*
|
182 |
+
* @since 1.0.0
|
183 |
+
*
|
184 |
+
* @access protected
|
185 |
+
*/
|
186 |
+
protected function _renderRedColorSettings() {
|
187 |
+
self::_renderGroupStart( esc_html__( 'Red Color', Visualizer_Plugin::NAME ) );
|
188 |
+
self::_renderSectionStart();
|
189 |
+
self::_renderSectionDescription( esc_html__( 'Configure the red section of the gauge chart.', Visualizer_Plugin::NAME ) );
|
190 |
+
|
191 |
+
echo '<div class="section-item">';
|
192 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
193 |
+
echo '<b>', esc_html__( 'From And To Range', Visualizer_Plugin::NAME ), '</b>';
|
194 |
+
|
195 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
196 |
+
echo '<tr>';
|
197 |
+
echo '<td class="section-table-column">';
|
198 |
+
echo '<input type="text" name="redFrom" class="control-text" value="', esc_attr( $this->redFrom ), '">';
|
199 |
+
echo '</td>';
|
200 |
+
echo '<td class="section-table-column">';
|
201 |
+
echo '<input type="text" name="redTo" class="control-text" value="', esc_attr( $this->redTo ), '">';
|
202 |
+
echo '</td>';
|
203 |
+
echo '</tr>';
|
204 |
+
echo '</table>';
|
205 |
+
|
206 |
+
echo '<p class="section-description">';
|
207 |
+
esc_html_e( 'The lowest and highest values for a range marked by a red color.', Visualizer_Plugin::NAME );
|
208 |
+
echo '</p>';
|
209 |
+
echo '</div>';
|
210 |
+
|
211 |
+
self::_renderColorPickerItem(
|
212 |
+
esc_html__( 'Red Color', Visualizer_Plugin::NAME ),
|
213 |
+
'redColor',
|
214 |
+
$this->redColor,
|
215 |
+
'#DC3912'
|
216 |
+
);
|
217 |
+
self::_renderSectionEnd();
|
218 |
+
self::_renderGroupEnd();
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Renders chart view settings group.
|
223 |
+
*
|
224 |
+
* @since 1.0.0
|
225 |
+
*
|
226 |
+
* @access protected
|
227 |
+
*/
|
228 |
+
protected function _renderViewSettings() {
|
229 |
+
self::_renderGroupStart( esc_html__( 'Layout & Chart Area', Visualizer_Plugin::NAME ) );
|
230 |
+
self::_renderSectionStart();
|
231 |
+
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
232 |
+
|
233 |
+
echo '<div class="section-item">';
|
234 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
235 |
+
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
236 |
+
|
237 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
238 |
+
echo '<tr>';
|
239 |
+
echo '<td class="section-table-column">';
|
240 |
+
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
241 |
+
echo '</td>';
|
242 |
+
echo '<td class="section-table-column">';
|
243 |
+
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
244 |
+
echo '</td>';
|
245 |
+
echo '</tr>';
|
246 |
+
echo '</table>';
|
247 |
+
|
248 |
+
echo '<p class="section-description">';
|
249 |
+
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
250 |
+
echo '</p>';
|
251 |
+
echo '</div>';
|
252 |
+
self::_renderSectionEnd();
|
253 |
+
self::_renderGroupEnd();
|
254 |
+
}
|
255 |
+
|
256 |
}
|
classes/Visualizer/Render/Sidebar/Type/Geo.php
CHANGED
@@ -1,386 +1,386 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for geo chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Geo extends Visualizer_Render_Sidebar {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
$this->_renderMapSettings();
|
44 |
-
$this->_renderColorAxisSettings();
|
45 |
-
$this->_renderSizeAxisSettings();
|
46 |
-
$this->_renderMagnifyingGlassSettings();
|
47 |
-
$this->_renderViewSettings();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders map settings group.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderMapSettings() {
|
58 |
-
self::_renderGroupStart( esc_html__( 'Map Settings', Visualizer_Plugin::NAME ) );
|
59 |
-
self::_renderSectionStart( esc_html__( 'Region', Visualizer_Plugin::NAME ), false );
|
60 |
-
self::_renderSectionDescription(
|
61 |
-
esc_html__( 'Configure the region area to display on the map. (Surrounding areas will be displayed as well.) Can be one of the following:' ) .
|
62 |
-
'<ul>' .
|
63 |
-
'<li>' . esc_html__( "'world' - A map of the entire world.", Visualizer_Plugin::NAME ) . '</li>' .
|
64 |
-
'<li>' . sprintf( esc_html__( "A continent or a sub-continent, specified by its %s code, e.g., '011' for Western Africa.", Visualizer_Plugin::NAME ), '<a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy" target="_blank">3-digit</a>' ) . '</li>' .
|
65 |
-
'<li>' . sprintf( esc_html__( "A country, specified by its %s code, e.g., 'AU' for Australia.", Visualizer_Plugin::NAME ), '<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" target="_blank">ISO 3166-1 alpha-2</a>' ) . '</li>' .
|
66 |
-
'<li>' . sprintf( esc_html__( "A state in the United States, specified by its %s code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'.", Visualizer_Plugin::NAME ), '<a href="http://en.wikipedia.org/wiki/ISO_3166-2:US" target="_blank">ISO 3166-2:US</a>' ) . '</li>' .
|
67 |
-
'</ul>'
|
68 |
-
);
|
69 |
-
|
70 |
-
self::_renderTextItem(
|
71 |
-
esc_html__( 'Region', Visualizer_Plugin::NAME ),
|
72 |
-
'region',
|
73 |
-
$this->region,
|
74 |
-
'',
|
75 |
-
'world'
|
76 |
-
);
|
77 |
-
|
78 |
-
self::_renderSectionEnd();
|
79 |
-
self::_renderSectionStart( esc_html__( 'Resolution', Visualizer_Plugin::NAME ), false );
|
80 |
-
|
81 |
-
self::_renderSectionDescription(
|
82 |
-
esc_html__( 'The resolution of the map borders. Choose one of the following values:' ) .
|
83 |
-
'<ul>' .
|
84 |
-
'<li>' . esc_html__( "'countries' - Supported for all regions, except for US state regions.", Visualizer_Plugin::NAME ) . '</li>' .
|
85 |
-
'<li>' . esc_html__( "'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.", Visualizer_Plugin::NAME ) . '</li>' .
|
86 |
-
'<li>' . esc_html__( "'metros' - Supported for the US country region and US state regions only.", Visualizer_Plugin::NAME ) . '</li>' .
|
87 |
-
'</ul>'
|
88 |
-
);
|
89 |
-
|
90 |
-
self::_renderSelectItem(
|
91 |
-
esc_html__( 'Resolution', Visualizer_Plugin::NAME ),
|
92 |
-
'resolution',
|
93 |
-
$this->resolution,
|
94 |
-
array(
|
95 |
-
'' => '',
|
96 |
-
'countries' => esc_html__( 'Countries', Visualizer_Plugin::NAME ),
|
97 |
-
'provinces' => esc_html__( 'Provinces', Visualizer_Plugin::NAME ),
|
98 |
-
'metros' => esc_html__( 'Metros', Visualizer_Plugin::NAME ),
|
99 |
-
),
|
100 |
-
''
|
101 |
-
);
|
102 |
-
|
103 |
-
self::_renderSectionEnd();
|
104 |
-
self::_renderSectionStart( esc_html__( 'Display Mode', Visualizer_Plugin::NAME ), false );
|
105 |
-
|
106 |
-
self::_renderSectionDescription(
|
107 |
-
esc_html__( 'Determines which type of map this is. The following values are supported:' ) .
|
108 |
-
'<ul>' .
|
109 |
-
'<li>' . esc_html__( "'auto' - Choose based on the format of the data.", Visualizer_Plugin::NAME ) . '</li>' .
|
110 |
-
'<li>' . esc_html__( "'regions' - This is a region map.", Visualizer_Plugin::NAME ) . '</li>' .
|
111 |
-
'<li>' . esc_html__( "'markers' - This is a marker map.", Visualizer_Plugin::NAME ) . '</li>' .
|
112 |
-
'</ul>'
|
113 |
-
);
|
114 |
-
|
115 |
-
self::_renderSelectItem(
|
116 |
-
esc_html__( 'Display Mode', Visualizer_Plugin::NAME ),
|
117 |
-
'displayMode',
|
118 |
-
$this->displayMode,
|
119 |
-
array(
|
120 |
-
'' => '',
|
121 |
-
'auto' => esc_html__( 'Auto', Visualizer_Plugin::NAME ),
|
122 |
-
'regions' => esc_html__( 'Regions', Visualizer_Plugin::NAME ),
|
123 |
-
'markers' => esc_html__( 'Markers', Visualizer_Plugin::NAME ),
|
124 |
-
),
|
125 |
-
''
|
126 |
-
);
|
127 |
-
self::_renderSectionEnd();
|
128 |
-
self::_renderSectionStart( esc_html__( 'Tooltip', Visualizer_Plugin::NAME ), false );
|
129 |
-
$this->_renderTooltipSettigns();
|
130 |
-
self::_renderSectionEnd();
|
131 |
-
self::_renderGroupEnd();
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Renders tooltip settings section.
|
136 |
-
*
|
137 |
-
* @since 1.4.0
|
138 |
-
*
|
139 |
-
* @access protected
|
140 |
-
*/
|
141 |
-
protected function _renderTooltipSettigns() {
|
142 |
-
self::_renderSelectItem(
|
143 |
-
esc_html__( 'Trigger', Visualizer_Plugin::NAME ),
|
144 |
-
'tooltip[trigger]',
|
145 |
-
isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
|
146 |
-
array(
|
147 |
-
'' => '',
|
148 |
-
'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', Visualizer_Plugin::NAME ),
|
149 |
-
'none' => esc_html__( 'The tooltip will not be displayed', Visualizer_Plugin::NAME ),
|
150 |
-
),
|
151 |
-
esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', Visualizer_Plugin::NAME )
|
152 |
-
);
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Renders color axis settings group.
|
157 |
-
*
|
158 |
-
* @since 1.0.0
|
159 |
-
*
|
160 |
-
* @access protected
|
161 |
-
*/
|
162 |
-
protected function _renderColorAxisSettings() {
|
163 |
-
self::_renderGroupStart( esc_html__( 'Color Axis', Visualizer_Plugin::NAME ) );
|
164 |
-
self::_renderSectionStart();
|
165 |
-
self::_renderSectionDescription( esc_html__( 'Configure color axis gradient scale, minimum and maximun values and a color of the dateless regions.', Visualizer_Plugin::NAME ) );
|
166 |
-
|
167 |
-
echo '<div class="section-item">';
|
168 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
169 |
-
echo '<b>', esc_html__( 'Minimum And Maximum Values', Visualizer_Plugin::NAME ), '</b>';
|
170 |
-
|
171 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
172 |
-
echo '<tr>';
|
173 |
-
echo '<td class="section-table-column">';
|
174 |
-
echo '<input type="text" name="colorAxis[minValue]" class="control-text" value="', isset( $this->colorAxis['minValue'] ) ? esc_attr( $this->colorAxis['minValue'] ) : '', '">';
|
175 |
-
echo '</td>';
|
176 |
-
echo '<td class="section-table-column">';
|
177 |
-
echo '<input type="text" name="colorAxis[maxValue]" class="control-text" value="', isset( $this->colorAxis['maxValue'] ) ? esc_attr( $this->colorAxis['maxValue'] ) : '', '">';
|
178 |
-
echo '</td>';
|
179 |
-
echo '</tr>';
|
180 |
-
echo '</table>';
|
181 |
-
|
182 |
-
echo '<p class="section-description">';
|
183 |
-
esc_html_e( 'Determines the minimum and maximum values of color axis.', Visualizer_Plugin::NAME );
|
184 |
-
echo '</p>';
|
185 |
-
echo '</div>';
|
186 |
-
|
187 |
-
self::_renderColorPickerItem(
|
188 |
-
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
189 |
-
'colorAxis[colors][]',
|
190 |
-
!empty( $this->colorAxis['color'][0] ) ? $this->colorAxis['color'][0] : null,
|
191 |
-
'#efe6dc'
|
192 |
-
);
|
193 |
-
|
194 |
-
self::_renderColorPickerItem(
|
195 |
-
esc_html__( 'Intermediate Value', Visualizer_Plugin::NAME ),
|
196 |
-
'colorAxis[colors][]',
|
197 |
-
!empty( $this->colorAxis['color'][1] ) ? $this->colorAxis['color'][1] : null,
|
198 |
-
'#82bf7c'
|
199 |
-
);
|
200 |
-
|
201 |
-
self::_renderColorPickerItem(
|
202 |
-
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
203 |
-
'colorAxis[colors][]',
|
204 |
-
!empty( $this->colorAxis['color'][2] ) ? $this->colorAxis['color'][2] : null,
|
205 |
-
'#109618'
|
206 |
-
);
|
207 |
-
|
208 |
-
self::_renderColorPickerItem(
|
209 |
-
esc_html__( 'Dateless Region', Visualizer_Plugin::NAME ),
|
210 |
-
'datalessRegionColor',
|
211 |
-
!empty( $this->datalessRegionColor ) ? $this->datalessRegionColor : null,
|
212 |
-
null
|
213 |
-
);
|
214 |
-
|
215 |
-
self::_renderSectionEnd();
|
216 |
-
self::_renderGroupEnd();
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Renders size axis settings group.
|
221 |
-
*
|
222 |
-
* @since 1.0.0
|
223 |
-
*
|
224 |
-
* @access protected
|
225 |
-
*/
|
226 |
-
protected function _renderSizeAxisSettings() {
|
227 |
-
self::_renderGroupStart( esc_html__( 'Size Axis', Visualizer_Plugin::NAME ) );
|
228 |
-
self::_renderSectionStart();
|
229 |
-
self::_renderSectionDescription( esc_html__( 'Configure how values are associated with bubble size, minimum and maximun values and marker opacity setting.', Visualizer_Plugin::NAME ) );
|
230 |
-
|
231 |
-
echo '<div class="section-item">';
|
232 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
233 |
-
echo '<b>', esc_html__( 'Minimum And Maximum Values', Visualizer_Plugin::NAME ), '</b>';
|
234 |
-
|
235 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
236 |
-
echo '<tr>';
|
237 |
-
echo '<td class="section-table-column">';
|
238 |
-
echo '<input type="text" name="sizeAxis[minValue]" class="control-text" value="', isset( $this->sizeAxis['minValue'] ) ? esc_attr( $this->sizeAxis['minValue'] ) : '', '">';
|
239 |
-
echo '</td>';
|
240 |
-
echo '<td class="section-table-column">';
|
241 |
-
echo '<input type="text" name="sizeAxis[maxValue]" class="control-text" value="', isset( $this->sizeAxis['maxValue'] ) ? esc_attr( $this->sizeAxis['maxValue'] ) : '', '">';
|
242 |
-
echo '</td>';
|
243 |
-
echo '</tr>';
|
244 |
-
echo '</table>';
|
245 |
-
|
246 |
-
echo '<p class="section-description">';
|
247 |
-
esc_html_e( 'Determines the minimum and maximum values of size axis.', Visualizer_Plugin::NAME );
|
248 |
-
echo '</p>';
|
249 |
-
echo '</div>';
|
250 |
-
|
251 |
-
echo '<div class="section-item">';
|
252 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
253 |
-
echo '<b>', esc_html__( 'Minimum And Maximum Marker Radius', Visualizer_Plugin::NAME ), '</b>';
|
254 |
-
|
255 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
256 |
-
echo '<tr>';
|
257 |
-
echo '<td class="section-table-column">';
|
258 |
-
echo '<input type="text" name="sizeAxis[minSize]" class="control-text" value="', isset( $this->sizeAxis['minSize'] ) ? esc_attr( $this->sizeAxis['minSize'] ) : '', '" placeholder="3">';
|
259 |
-
echo '</td>';
|
260 |
-
echo '<td class="section-table-column">';
|
261 |
-
echo '<input type="text" name="sizeAxis[maxSize]" class="control-text" value="', isset( $this->sizeAxis['maxSize'] ) ? esc_attr( $this->sizeAxis['maxSize'] ) : '', '" placeholder="12">';
|
262 |
-
echo '</td>';
|
263 |
-
echo '</tr>';
|
264 |
-
echo '</table>';
|
265 |
-
|
266 |
-
echo '<p class="section-description">';
|
267 |
-
esc_html_e( 'Determines the radius of the smallest and largest possible bubbles, in pixels.', Visualizer_Plugin::NAME );
|
268 |
-
echo '</p>';
|
269 |
-
echo '</div>';
|
270 |
-
|
271 |
-
self::_renderTextItem(
|
272 |
-
esc_html__( 'Marker Opacity', Visualizer_Plugin::NAME ),
|
273 |
-
'markerOpacity',
|
274 |
-
$this->markerOpacity,
|
275 |
-
esc_html__( 'The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque.', Visualizer_Plugin::NAME ),
|
276 |
-
'1.0'
|
277 |
-
);
|
278 |
-
|
279 |
-
$this->_renderFormatField();
|
280 |
-
|
281 |
-
self::_renderSectionEnd();
|
282 |
-
self::_renderGroupEnd();
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Renders magnifying glass settings.
|
287 |
-
*
|
288 |
-
* @since 1.0.0
|
289 |
-
*
|
290 |
-
* @access protected
|
291 |
-
*/
|
292 |
-
protected function _renderMagnifyingGlassSettings() {
|
293 |
-
self::_renderGroupStart( esc_html__( 'Magnifying Glass', Visualizer_Plugin::NAME ) );
|
294 |
-
self::_renderSectionStart();
|
295 |
-
self::_renderSectionDescription( esc_html__( 'Configure magnifying glass settings, which appears, when the user lingers over a cluttered marker. Note: this feature is not supported in browsers that do not support SVG, i.e. Internet Explorer version 8 or earlier.', Visualizer_Plugin::NAME ) );
|
296 |
-
|
297 |
-
self::_renderSelectItem(
|
298 |
-
esc_html__( 'Enabled', Visualizer_Plugin::NAME ),
|
299 |
-
'magnifyingGlass[enable]',
|
300 |
-
isset( $this->magnifyingGlass['enable'] ) ? $this->magnifyingGlass['enable'] : '',
|
301 |
-
$this->_yesno,
|
302 |
-
esc_html__( 'If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened.', Visualizer_Plugin::NAME )
|
303 |
-
);
|
304 |
-
|
305 |
-
self::_renderTextItem(
|
306 |
-
esc_html__( 'Zoom Factor', Visualizer_Plugin::NAME ),
|
307 |
-
'magnifyingGlass[zoomFactor]',
|
308 |
-
isset( $this->magnifyingGlass['zoomFactor'] ) ? $this->magnifyingGlass['zoomFactor'] : '',
|
309 |
-
esc_html__( 'The zoom factor of the magnifying glass. Can be any number greater than 0.', Visualizer_Plugin::NAME ),
|
310 |
-
'5.0'
|
311 |
-
);
|
312 |
-
self::_renderSectionEnd();
|
313 |
-
self::_renderGroupEnd();
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Renders chart view settings group.
|
318 |
-
*
|
319 |
-
* @since 1.0.0
|
320 |
-
*
|
321 |
-
* @access protected
|
322 |
-
*/
|
323 |
-
protected function _renderViewSettings() {
|
324 |
-
self::_renderGroupStart( esc_html__( 'Layout Settings', Visualizer_Plugin::NAME ) );
|
325 |
-
self::_renderSectionStart();
|
326 |
-
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
327 |
-
|
328 |
-
echo '<div class="section-item">';
|
329 |
-
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
330 |
-
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
331 |
-
|
332 |
-
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
333 |
-
echo '<tr>';
|
334 |
-
echo '<td class="section-table-column">';
|
335 |
-
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
336 |
-
echo '</td>';
|
337 |
-
echo '<td class="section-table-column">';
|
338 |
-
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
339 |
-
echo '</td>';
|
340 |
-
echo '</tr>';
|
341 |
-
echo '</table>';
|
342 |
-
|
343 |
-
echo '<p class="section-description">';
|
344 |
-
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
345 |
-
echo '</p>';
|
346 |
-
echo '</div>';
|
347 |
-
|
348 |
-
self::_renderSelectItem(
|
349 |
-
esc_html__( 'Keep Aspect Ratio', Visualizer_Plugin::NAME ),
|
350 |
-
'keepAspectRatio',
|
351 |
-
$this->keepAspectRatio,
|
352 |
-
$this->_yesno,
|
353 |
-
esc_html__( 'If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio.', Visualizer_Plugin::NAME ) . '<br><br>' .
|
354 |
-
esc_html__( 'If no, the map will be stretched to the exact size of the chart as specified by the width and height options.', Visualizer_Plugin::NAME )
|
355 |
-
);
|
356 |
-
|
357 |
-
echo '<div class="section-delimiter"></div>';
|
358 |
-
|
359 |
-
self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', Visualizer_Plugin::NAME ) );
|
360 |
-
|
361 |
-
self::_renderTextItem(
|
362 |
-
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
363 |
-
'backgroundColor[strokeWidth]',
|
364 |
-
isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
|
365 |
-
esc_html__( 'The chart border width in pixels.', Visualizer_Plugin::NAME ),
|
366 |
-
'0'
|
367 |
-
);
|
368 |
-
|
369 |
-
self::_renderColorPickerItem(
|
370 |
-
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
371 |
-
'backgroundColor[stroke]',
|
372 |
-
!empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
|
373 |
-
'#666'
|
374 |
-
);
|
375 |
-
|
376 |
-
self::_renderColorPickerItem(
|
377 |
-
esc_html__( 'Background Color', Visualizer_Plugin::NAME ),
|
378 |
-
'backgroundColor[fill]',
|
379 |
-
!empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null,
|
380 |
-
'#fff'
|
381 |
-
);
|
382 |
-
self::_renderSectionEnd();
|
383 |
-
self::_renderGroupEnd();
|
384 |
-
}
|
385 |
-
|
386 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for geo chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Geo extends Visualizer_Render_Sidebar {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
$this->_renderMapSettings();
|
44 |
+
$this->_renderColorAxisSettings();
|
45 |
+
$this->_renderSizeAxisSettings();
|
46 |
+
$this->_renderMagnifyingGlassSettings();
|
47 |
+
$this->_renderViewSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders map settings group.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderMapSettings() {
|
58 |
+
self::_renderGroupStart( esc_html__( 'Map Settings', Visualizer_Plugin::NAME ) );
|
59 |
+
self::_renderSectionStart( esc_html__( 'Region', Visualizer_Plugin::NAME ), false );
|
60 |
+
self::_renderSectionDescription(
|
61 |
+
esc_html__( 'Configure the region area to display on the map. (Surrounding areas will be displayed as well.) Can be one of the following:' ) .
|
62 |
+
'<ul>' .
|
63 |
+
'<li>' . esc_html__( "'world' - A map of the entire world.", Visualizer_Plugin::NAME ) . '</li>' .
|
64 |
+
'<li>' . sprintf( esc_html__( "A continent or a sub-continent, specified by its %s code, e.g., '011' for Western Africa.", Visualizer_Plugin::NAME ), '<a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy" target="_blank">3-digit</a>' ) . '</li>' .
|
65 |
+
'<li>' . sprintf( esc_html__( "A country, specified by its %s code, e.g., 'AU' for Australia.", Visualizer_Plugin::NAME ), '<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" target="_blank">ISO 3166-1 alpha-2</a>' ) . '</li>' .
|
66 |
+
'<li>' . sprintf( esc_html__( "A state in the United States, specified by its %s code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'.", Visualizer_Plugin::NAME ), '<a href="http://en.wikipedia.org/wiki/ISO_3166-2:US" target="_blank">ISO 3166-2:US</a>' ) . '</li>' .
|
67 |
+
'</ul>'
|
68 |
+
);
|
69 |
+
|
70 |
+
self::_renderTextItem(
|
71 |
+
esc_html__( 'Region', Visualizer_Plugin::NAME ),
|
72 |
+
'region',
|
73 |
+
$this->region,
|
74 |
+
'',
|
75 |
+
'world'
|
76 |
+
);
|
77 |
+
|
78 |
+
self::_renderSectionEnd();
|
79 |
+
self::_renderSectionStart( esc_html__( 'Resolution', Visualizer_Plugin::NAME ), false );
|
80 |
+
|
81 |
+
self::_renderSectionDescription(
|
82 |
+
esc_html__( 'The resolution of the map borders. Choose one of the following values:' ) .
|
83 |
+
'<ul>' .
|
84 |
+
'<li>' . esc_html__( "'countries' - Supported for all regions, except for US state regions.", Visualizer_Plugin::NAME ) . '</li>' .
|
85 |
+
'<li>' . esc_html__( "'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.", Visualizer_Plugin::NAME ) . '</li>' .
|
86 |
+
'<li>' . esc_html__( "'metros' - Supported for the US country region and US state regions only.", Visualizer_Plugin::NAME ) . '</li>' .
|
87 |
+
'</ul>'
|
88 |
+
);
|
89 |
+
|
90 |
+
self::_renderSelectItem(
|
91 |
+
esc_html__( 'Resolution', Visualizer_Plugin::NAME ),
|
92 |
+
'resolution',
|
93 |
+
$this->resolution,
|
94 |
+
array(
|
95 |
+
'' => '',
|
96 |
+
'countries' => esc_html__( 'Countries', Visualizer_Plugin::NAME ),
|
97 |
+
'provinces' => esc_html__( 'Provinces', Visualizer_Plugin::NAME ),
|
98 |
+
'metros' => esc_html__( 'Metros', Visualizer_Plugin::NAME ),
|
99 |
+
),
|
100 |
+
''
|
101 |
+
);
|
102 |
+
|
103 |
+
self::_renderSectionEnd();
|
104 |
+
self::_renderSectionStart( esc_html__( 'Display Mode', Visualizer_Plugin::NAME ), false );
|
105 |
+
|
106 |
+
self::_renderSectionDescription(
|
107 |
+
esc_html__( 'Determines which type of map this is. The following values are supported:' ) .
|
108 |
+
'<ul>' .
|
109 |
+
'<li>' . esc_html__( "'auto' - Choose based on the format of the data.", Visualizer_Plugin::NAME ) . '</li>' .
|
110 |
+
'<li>' . esc_html__( "'regions' - This is a region map.", Visualizer_Plugin::NAME ) . '</li>' .
|
111 |
+
'<li>' . esc_html__( "'markers' - This is a marker map.", Visualizer_Plugin::NAME ) . '</li>' .
|
112 |
+
'</ul>'
|
113 |
+
);
|
114 |
+
|
115 |
+
self::_renderSelectItem(
|
116 |
+
esc_html__( 'Display Mode', Visualizer_Plugin::NAME ),
|
117 |
+
'displayMode',
|
118 |
+
$this->displayMode,
|
119 |
+
array(
|
120 |
+
'' => '',
|
121 |
+
'auto' => esc_html__( 'Auto', Visualizer_Plugin::NAME ),
|
122 |
+
'regions' => esc_html__( 'Regions', Visualizer_Plugin::NAME ),
|
123 |
+
'markers' => esc_html__( 'Markers', Visualizer_Plugin::NAME ),
|
124 |
+
),
|
125 |
+
''
|
126 |
+
);
|
127 |
+
self::_renderSectionEnd();
|
128 |
+
self::_renderSectionStart( esc_html__( 'Tooltip', Visualizer_Plugin::NAME ), false );
|
129 |
+
$this->_renderTooltipSettigns();
|
130 |
+
self::_renderSectionEnd();
|
131 |
+
self::_renderGroupEnd();
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Renders tooltip settings section.
|
136 |
+
*
|
137 |
+
* @since 1.4.0
|
138 |
+
*
|
139 |
+
* @access protected
|
140 |
+
*/
|
141 |
+
protected function _renderTooltipSettigns() {
|
142 |
+
self::_renderSelectItem(
|
143 |
+
esc_html__( 'Trigger', Visualizer_Plugin::NAME ),
|
144 |
+
'tooltip[trigger]',
|
145 |
+
isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
|
146 |
+
array(
|
147 |
+
'' => '',
|
148 |
+
'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', Visualizer_Plugin::NAME ),
|
149 |
+
'none' => esc_html__( 'The tooltip will not be displayed', Visualizer_Plugin::NAME ),
|
150 |
+
),
|
151 |
+
esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', Visualizer_Plugin::NAME )
|
152 |
+
);
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Renders color axis settings group.
|
157 |
+
*
|
158 |
+
* @since 1.0.0
|
159 |
+
*
|
160 |
+
* @access protected
|
161 |
+
*/
|
162 |
+
protected function _renderColorAxisSettings() {
|
163 |
+
self::_renderGroupStart( esc_html__( 'Color Axis', Visualizer_Plugin::NAME ) );
|
164 |
+
self::_renderSectionStart();
|
165 |
+
self::_renderSectionDescription( esc_html__( 'Configure color axis gradient scale, minimum and maximun values and a color of the dateless regions.', Visualizer_Plugin::NAME ) );
|
166 |
+
|
167 |
+
echo '<div class="section-item">';
|
168 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
169 |
+
echo '<b>', esc_html__( 'Minimum And Maximum Values', Visualizer_Plugin::NAME ), '</b>';
|
170 |
+
|
171 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
172 |
+
echo '<tr>';
|
173 |
+
echo '<td class="section-table-column">';
|
174 |
+
echo '<input type="text" name="colorAxis[minValue]" class="control-text" value="', isset( $this->colorAxis['minValue'] ) ? esc_attr( $this->colorAxis['minValue'] ) : '', '">';
|
175 |
+
echo '</td>';
|
176 |
+
echo '<td class="section-table-column">';
|
177 |
+
echo '<input type="text" name="colorAxis[maxValue]" class="control-text" value="', isset( $this->colorAxis['maxValue'] ) ? esc_attr( $this->colorAxis['maxValue'] ) : '', '">';
|
178 |
+
echo '</td>';
|
179 |
+
echo '</tr>';
|
180 |
+
echo '</table>';
|
181 |
+
|
182 |
+
echo '<p class="section-description">';
|
183 |
+
esc_html_e( 'Determines the minimum and maximum values of color axis.', Visualizer_Plugin::NAME );
|
184 |
+
echo '</p>';
|
185 |
+
echo '</div>';
|
186 |
+
|
187 |
+
self::_renderColorPickerItem(
|
188 |
+
esc_html__( 'Minimum Value', Visualizer_Plugin::NAME ),
|
189 |
+
'colorAxis[colors][]',
|
190 |
+
!empty( $this->colorAxis['color'][0] ) ? $this->colorAxis['color'][0] : null,
|
191 |
+
'#efe6dc'
|
192 |
+
);
|
193 |
+
|
194 |
+
self::_renderColorPickerItem(
|
195 |
+
esc_html__( 'Intermediate Value', Visualizer_Plugin::NAME ),
|
196 |
+
'colorAxis[colors][]',
|
197 |
+
!empty( $this->colorAxis['color'][1] ) ? $this->colorAxis['color'][1] : null,
|
198 |
+
'#82bf7c'
|
199 |
+
);
|
200 |
+
|
201 |
+
self::_renderColorPickerItem(
|
202 |
+
esc_html__( 'Maximum Value', Visualizer_Plugin::NAME ),
|
203 |
+
'colorAxis[colors][]',
|
204 |
+
!empty( $this->colorAxis['color'][2] ) ? $this->colorAxis['color'][2] : null,
|
205 |
+
'#109618'
|
206 |
+
);
|
207 |
+
|
208 |
+
self::_renderColorPickerItem(
|
209 |
+
esc_html__( 'Dateless Region', Visualizer_Plugin::NAME ),
|
210 |
+
'datalessRegionColor',
|
211 |
+
!empty( $this->datalessRegionColor ) ? $this->datalessRegionColor : null,
|
212 |
+
null
|
213 |
+
);
|
214 |
+
|
215 |
+
self::_renderSectionEnd();
|
216 |
+
self::_renderGroupEnd();
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Renders size axis settings group.
|
221 |
+
*
|
222 |
+
* @since 1.0.0
|
223 |
+
*
|
224 |
+
* @access protected
|
225 |
+
*/
|
226 |
+
protected function _renderSizeAxisSettings() {
|
227 |
+
self::_renderGroupStart( esc_html__( 'Size Axis', Visualizer_Plugin::NAME ) );
|
228 |
+
self::_renderSectionStart();
|
229 |
+
self::_renderSectionDescription( esc_html__( 'Configure how values are associated with bubble size, minimum and maximun values and marker opacity setting.', Visualizer_Plugin::NAME ) );
|
230 |
+
|
231 |
+
echo '<div class="section-item">';
|
232 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
233 |
+
echo '<b>', esc_html__( 'Minimum And Maximum Values', Visualizer_Plugin::NAME ), '</b>';
|
234 |
+
|
235 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
236 |
+
echo '<tr>';
|
237 |
+
echo '<td class="section-table-column">';
|
238 |
+
echo '<input type="text" name="sizeAxis[minValue]" class="control-text" value="', isset( $this->sizeAxis['minValue'] ) ? esc_attr( $this->sizeAxis['minValue'] ) : '', '">';
|
239 |
+
echo '</td>';
|
240 |
+
echo '<td class="section-table-column">';
|
241 |
+
echo '<input type="text" name="sizeAxis[maxValue]" class="control-text" value="', isset( $this->sizeAxis['maxValue'] ) ? esc_attr( $this->sizeAxis['maxValue'] ) : '', '">';
|
242 |
+
echo '</td>';
|
243 |
+
echo '</tr>';
|
244 |
+
echo '</table>';
|
245 |
+
|
246 |
+
echo '<p class="section-description">';
|
247 |
+
esc_html_e( 'Determines the minimum and maximum values of size axis.', Visualizer_Plugin::NAME );
|
248 |
+
echo '</p>';
|
249 |
+
echo '</div>';
|
250 |
+
|
251 |
+
echo '<div class="section-item">';
|
252 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
253 |
+
echo '<b>', esc_html__( 'Minimum And Maximum Marker Radius', Visualizer_Plugin::NAME ), '</b>';
|
254 |
+
|
255 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
256 |
+
echo '<tr>';
|
257 |
+
echo '<td class="section-table-column">';
|
258 |
+
echo '<input type="text" name="sizeAxis[minSize]" class="control-text" value="', isset( $this->sizeAxis['minSize'] ) ? esc_attr( $this->sizeAxis['minSize'] ) : '', '" placeholder="3">';
|
259 |
+
echo '</td>';
|
260 |
+
echo '<td class="section-table-column">';
|
261 |
+
echo '<input type="text" name="sizeAxis[maxSize]" class="control-text" value="', isset( $this->sizeAxis['maxSize'] ) ? esc_attr( $this->sizeAxis['maxSize'] ) : '', '" placeholder="12">';
|
262 |
+
echo '</td>';
|
263 |
+
echo '</tr>';
|
264 |
+
echo '</table>';
|
265 |
+
|
266 |
+
echo '<p class="section-description">';
|
267 |
+
esc_html_e( 'Determines the radius of the smallest and largest possible bubbles, in pixels.', Visualizer_Plugin::NAME );
|
268 |
+
echo '</p>';
|
269 |
+
echo '</div>';
|
270 |
+
|
271 |
+
self::_renderTextItem(
|
272 |
+
esc_html__( 'Marker Opacity', Visualizer_Plugin::NAME ),
|
273 |
+
'markerOpacity',
|
274 |
+
$this->markerOpacity,
|
275 |
+
esc_html__( 'The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque.', Visualizer_Plugin::NAME ),
|
276 |
+
'1.0'
|
277 |
+
);
|
278 |
+
|
279 |
+
$this->_renderFormatField();
|
280 |
+
|
281 |
+
self::_renderSectionEnd();
|
282 |
+
self::_renderGroupEnd();
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Renders magnifying glass settings.
|
287 |
+
*
|
288 |
+
* @since 1.0.0
|
289 |
+
*
|
290 |
+
* @access protected
|
291 |
+
*/
|
292 |
+
protected function _renderMagnifyingGlassSettings() {
|
293 |
+
self::_renderGroupStart( esc_html__( 'Magnifying Glass', Visualizer_Plugin::NAME ) );
|
294 |
+
self::_renderSectionStart();
|
295 |
+
self::_renderSectionDescription( esc_html__( 'Configure magnifying glass settings, which appears, when the user lingers over a cluttered marker. Note: this feature is not supported in browsers that do not support SVG, i.e. Internet Explorer version 8 or earlier.', Visualizer_Plugin::NAME ) );
|
296 |
+
|
297 |
+
self::_renderSelectItem(
|
298 |
+
esc_html__( 'Enabled', Visualizer_Plugin::NAME ),
|
299 |
+
'magnifyingGlass[enable]',
|
300 |
+
isset( $this->magnifyingGlass['enable'] ) ? $this->magnifyingGlass['enable'] : '',
|
301 |
+
$this->_yesno,
|
302 |
+
esc_html__( 'If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened.', Visualizer_Plugin::NAME )
|
303 |
+
);
|
304 |
+
|
305 |
+
self::_renderTextItem(
|
306 |
+
esc_html__( 'Zoom Factor', Visualizer_Plugin::NAME ),
|
307 |
+
'magnifyingGlass[zoomFactor]',
|
308 |
+
isset( $this->magnifyingGlass['zoomFactor'] ) ? $this->magnifyingGlass['zoomFactor'] : '',
|
309 |
+
esc_html__( 'The zoom factor of the magnifying glass. Can be any number greater than 0.', Visualizer_Plugin::NAME ),
|
310 |
+
'5.0'
|
311 |
+
);
|
312 |
+
self::_renderSectionEnd();
|
313 |
+
self::_renderGroupEnd();
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Renders chart view settings group.
|
318 |
+
*
|
319 |
+
* @since 1.0.0
|
320 |
+
*
|
321 |
+
* @access protected
|
322 |
+
*/
|
323 |
+
protected function _renderViewSettings() {
|
324 |
+
self::_renderGroupStart( esc_html__( 'Layout Settings', Visualizer_Plugin::NAME ) );
|
325 |
+
self::_renderSectionStart();
|
326 |
+
self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', Visualizer_Plugin::NAME ) );
|
327 |
+
|
328 |
+
echo '<div class="section-item">';
|
329 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
330 |
+
echo '<b>', esc_html__( 'Width And Height Of Chart', Visualizer_Plugin::NAME ), '</b>';
|
331 |
+
|
332 |
+
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
|
333 |
+
echo '<tr>';
|
334 |
+
echo '<td class="section-table-column">';
|
335 |
+
echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
|
336 |
+
echo '</td>';
|
337 |
+
echo '<td class="section-table-column">';
|
338 |
+
echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
|
339 |
+
echo '</td>';
|
340 |
+
echo '</tr>';
|
341 |
+
echo '</table>';
|
342 |
+
|
343 |
+
echo '<p class="section-description">';
|
344 |
+
esc_html_e( 'Determines the total width and height of the chart.', Visualizer_Plugin::NAME );
|
345 |
+
echo '</p>';
|
346 |
+
echo '</div>';
|
347 |
+
|
348 |
+
self::_renderSelectItem(
|
349 |
+
esc_html__( 'Keep Aspect Ratio', Visualizer_Plugin::NAME ),
|
350 |
+
'keepAspectRatio',
|
351 |
+
$this->keepAspectRatio,
|
352 |
+
$this->_yesno,
|
353 |
+
esc_html__( 'If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio.', Visualizer_Plugin::NAME ) . '<br><br>' .
|
354 |
+
esc_html__( 'If no, the map will be stretched to the exact size of the chart as specified by the width and height options.', Visualizer_Plugin::NAME )
|
355 |
+
);
|
356 |
+
|
357 |
+
echo '<div class="section-delimiter"></div>';
|
358 |
+
|
359 |
+
self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', Visualizer_Plugin::NAME ) );
|
360 |
+
|
361 |
+
self::_renderTextItem(
|
362 |
+
esc_html__( 'Stroke Width', Visualizer_Plugin::NAME ),
|
363 |
+
'backgroundColor[strokeWidth]',
|
364 |
+
isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
|
365 |
+
esc_html__( 'The chart border width in pixels.', Visualizer_Plugin::NAME ),
|
366 |
+
'0'
|
367 |
+
);
|
368 |
+
|
369 |
+
self::_renderColorPickerItem(
|
370 |
+
esc_html__( 'Stroke Color', Visualizer_Plugin::NAME ),
|
371 |
+
'backgroundColor[stroke]',
|
372 |
+
!empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
|
373 |
+
'#666'
|
374 |
+
);
|
375 |
+
|
376 |
+
self::_renderColorPickerItem(
|
377 |
+
esc_html__( 'Background Color', Visualizer_Plugin::NAME ),
|
378 |
+
'backgroundColor[fill]',
|
379 |
+
!empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null,
|
380 |
+
'#fff'
|
381 |
+
);
|
382 |
+
self::_renderSectionEnd();
|
383 |
+
self::_renderGroupEnd();
|
384 |
+
}
|
385 |
+
|
386 |
}
|
classes/Visualizer/Render/Sidebar/Type/Line.php
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for line chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Line extends Visualizer_Render_Sidebar_Linear {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
$this->_renderGeneralSettings();
|
44 |
-
$this->_renderAxesSettings();
|
45 |
-
$this->_renderLineSettings();
|
46 |
-
$this->_renderSeriesSettings();
|
47 |
-
$this->_renderViewSettings();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders line settings items.
|
52 |
-
*
|
53 |
-
* @since 1.4.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderLineSettingsItems() {
|
58 |
-
parent::_renderLineSettingsItems();
|
59 |
-
|
60 |
-
echo '<div class="section-delimiter"></div>';
|
61 |
-
|
62 |
-
self::_renderSelectItem(
|
63 |
-
esc_html__( 'Interpolate Nulls', Visualizer_Plugin::NAME ),
|
64 |
-
'interpolateNulls',
|
65 |
-
$this->interpolateNulls,
|
66 |
-
$this->_yesno,
|
67 |
-
esc_html__( 'Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point.', Visualizer_Plugin::NAME )
|
68 |
-
);
|
69 |
-
}
|
70 |
-
|
71 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for line chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Line extends Visualizer_Render_Sidebar_Linear {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
$this->_renderGeneralSettings();
|
44 |
+
$this->_renderAxesSettings();
|
45 |
+
$this->_renderLineSettings();
|
46 |
+
$this->_renderSeriesSettings();
|
47 |
+
$this->_renderViewSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders line settings items.
|
52 |
+
*
|
53 |
+
* @since 1.4.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderLineSettingsItems() {
|
58 |
+
parent::_renderLineSettingsItems();
|
59 |
+
|
60 |
+
echo '<div class="section-delimiter"></div>';
|
61 |
+
|
62 |
+
self::_renderSelectItem(
|
63 |
+
esc_html__( 'Interpolate Nulls', Visualizer_Plugin::NAME ),
|
64 |
+
'interpolateNulls',
|
65 |
+
$this->interpolateNulls,
|
66 |
+
$this->_yesno,
|
67 |
+
esc_html__( 'Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point.', Visualizer_Plugin::NAME )
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
}
|
classes/Visualizer/Render/Sidebar/Type/Pie.php
CHANGED
@@ -1,206 +1,206 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for pie chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Pie extends Visualizer_Render_Sidebar {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Renders template.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access protected
|
41 |
-
*/
|
42 |
-
protected function _toHTML() {
|
43 |
-
$this->_renderGeneralSettings();
|
44 |
-
$this->_renderPieSettings();
|
45 |
-
$this->_renderResidueSettings();
|
46 |
-
$this->_renderSlicesSettings();
|
47 |
-
$this->_renderViewSettings();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders pie settings group.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _renderPieSettings() {
|
58 |
-
self::_renderGroupStart( esc_html__( 'Pie Settings', Visualizer_Plugin::NAME ) );
|
59 |
-
self::_renderSectionStart();
|
60 |
-
self::_renderSelectItem(
|
61 |
-
esc_html__( 'Is 3D', Visualizer_Plugin::NAME ),
|
62 |
-
'is3D',
|
63 |
-
$this->is3D,
|
64 |
-
$this->_yesno,
|
65 |
-
esc_html__( 'If set to yes, displays a three-dimensional chart.', Visualizer_Plugin::NAME )
|
66 |
-
);
|
67 |
-
|
68 |
-
self::_renderSelectItem(
|
69 |
-
esc_html__( 'Reverse Categories', Visualizer_Plugin::NAME ),
|
70 |
-
'reverseCategories',
|
71 |
-
$this->reverseCategories,
|
72 |
-
$this->_yesno,
|
73 |
-
esc_html__( 'If set to yes, will draw slices counterclockwise.', Visualizer_Plugin::NAME )
|
74 |
-
);
|
75 |
-
|
76 |
-
self::_renderSelectItem(
|
77 |
-
esc_html__( 'Slice Text', Visualizer_Plugin::NAME ),
|
78 |
-
'pieSliceText',
|
79 |
-
$this->pieSliceText,
|
80 |
-
array(
|
81 |
-
'' => '',
|
82 |
-
'percentage' => esc_html__( 'The percentage of the slice size out of the total', Visualizer_Plugin::NAME ),
|
83 |
-
'value' => esc_html__( 'The quantitative value of the slice', Visualizer_Plugin::NAME ),
|
84 |
-
'label' => esc_html__( 'The name of the slice', Visualizer_Plugin::NAME ),
|
85 |
-
'none' => esc_html__( 'No text is displayed', Visualizer_Plugin::NAME ),
|
86 |
-
),
|
87 |
-
esc_html__( 'The content of the text displayed on the slice.', Visualizer_Plugin::NAME )
|
88 |
-
);
|
89 |
-
|
90 |
-
self::_renderTextItem(
|
91 |
-
esc_html__( 'Pie Hole', Visualizer_Plugin::NAME ),
|
92 |
-
'pieHole',
|
93 |
-
$this->pieHole,
|
94 |
-
esc_html__( 'If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional.', Visualizer_Plugin::NAME ),
|
95 |
-
'0.0'
|
96 |
-
);
|
97 |
-
|
98 |
-
self::_renderTextItem(
|
99 |
-
esc_html__( 'Start Angle', Visualizer_Plugin::NAME ),
|
100 |
-
'pieStartAngle',
|
101 |
-
$this->pieStartAngle,
|
102 |
-
esc_html__( 'The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up.', Visualizer_Plugin::NAME ),
|
103 |
-
0
|
104 |
-
);
|
105 |
-
|
106 |
-
self::_renderColorPickerItem(
|
107 |
-
esc_html__( 'Slice Border Color', Visualizer_Plugin::NAME ),
|
108 |
-
'pieSliceBorderColor',
|
109 |
-
$this->pieSliceBorderColor,
|
110 |
-
'#fff'
|
111 |
-
);
|
112 |
-
self::_renderSectionEnd();
|
113 |
-
self::_renderGroupEnd();
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Renders residue settings group.
|
118 |
-
*
|
119 |
-
* @since 1.0.0
|
120 |
-
*
|
121 |
-
* @access protected
|
122 |
-
*/
|
123 |
-
protected function _renderResidueSettings() {
|
124 |
-
self::_renderGroupStart( esc_html__( 'Residue Settings', Visualizer_Plugin::NAME ) );
|
125 |
-
self::_renderSectionStart();
|
126 |
-
self::_renderTextItem(
|
127 |
-
esc_html__( 'Visibility Threshold', Visualizer_Plugin::NAME ),
|
128 |
-
'sliceVisibilityThreshold',
|
129 |
-
$this->sliceVisibilityThreshold,
|
130 |
-
esc_html__( 'The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree.', Visualizer_Plugin::NAME ),
|
131 |
-
'0.001388889'
|
132 |
-
);
|
133 |
-
|
134 |
-
self::_renderTextItem(
|
135 |
-
esc_html__( 'Residue Slice Label', Visualizer_Plugin::NAME ),
|
136 |
-
'pieResidueSliceLabel',
|
137 |
-
$this->pieResidueSliceLabel,
|
138 |
-
esc_html__( 'A label for the combination slice that holds all slices below slice visibility threshold.' ),
|
139 |
-
esc_html__( 'Other', Visualizer_Plugin::NAME )
|
140 |
-
);
|
141 |
-
|
142 |
-
self::_renderColorPickerItem(
|
143 |
-
esc_html__( 'Residue Slice Color', Visualizer_Plugin::NAME ),
|
144 |
-
'pieResidueSliceColor',
|
145 |
-
$this->pieResidueSliceColor,
|
146 |
-
'#ccc'
|
147 |
-
);
|
148 |
-
self::_renderSectionEnd();
|
149 |
-
self::_renderGroupEnd();
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Renders slices settings.
|
154 |
-
*
|
155 |
-
* @since 1.0.0
|
156 |
-
*
|
157 |
-
* @access protected
|
158 |
-
*/
|
159 |
-
protected function _renderSlicesSettings() {
|
160 |
-
self::_renderGroupStart( esc_html__( 'Slices Settings', Visualizer_Plugin::NAME ) );
|
161 |
-
for ( $i = 0, $cnt = count( $this->__data ); $i < $cnt; $i++ ) {
|
162 |
-
self::_renderSectionStart( esc_html( $this->__data[$i][0] ), false );
|
163 |
-
self::_renderTextItem(
|
164 |
-
esc_html__( 'Slice Offset', Visualizer_Plugin::NAME ),
|
165 |
-
'slices[' . $i . '][offset]',
|
166 |
-
isset( $this->slices[$i]['color'] ) ? $this->slices[$i]['color'] : null,
|
167 |
-
esc_html__( "How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius).", Visualizer_Plugin::NAME ),
|
168 |
-
'0.0'
|
169 |
-
);
|
170 |
-
|
171 |
-
self::_renderColorPickerItem(
|
172 |
-
esc_html__( 'Slice Color', Visualizer_Plugin::NAME ),
|
173 |
-
'slices[' . $i . '][color]',
|
174 |
-
isset( $this->slices[$i]['color'] ) ? $this->slices[$i]['color'] : null,
|
175 |
-
null
|
176 |
-
);
|
177 |
-
self::_renderSectionEnd();
|
178 |
-
}
|
179 |
-
self::_renderGroupEnd();
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Renders tooltip settings section.
|
184 |
-
*
|
185 |
-
* @since 1.4.0
|
186 |
-
*
|
187 |
-
* @access protected
|
188 |
-
*/
|
189 |
-
protected function _renderTooltipSettigns() {
|
190 |
-
parent::_renderTooltipSettigns();
|
191 |
-
|
192 |
-
self::_renderSelectItem(
|
193 |
-
esc_html__( 'Text', Visualizer_Plugin::NAME ),
|
194 |
-
'tooltip[text]',
|
195 |
-
isset( $this->tooltip['text'] ) ? $this->tooltip['text'] : null,
|
196 |
-
array(
|
197 |
-
'' => '',
|
198 |
-
'both' => esc_html__( 'Display both the absolute value of the slice and the percentage of the whole', Visualizer_Plugin::NAME ),
|
199 |
-
'value' => esc_html__( 'Display only the absolute value of the slice', Visualizer_Plugin::NAME ),
|
200 |
-
'percentage' => esc_html__( 'Display only the percentage of the whole represented by the slice', Visualizer_Plugin::NAME ),
|
201 |
-
),
|
202 |
-
esc_html__( 'Determines what information to display when the user hovers over a pie slice.', Visualizer_Plugin::NAME )
|
203 |
-
);
|
204 |
-
}
|
205 |
-
|
206 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for pie chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Pie extends Visualizer_Render_Sidebar {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Renders template.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access protected
|
41 |
+
*/
|
42 |
+
protected function _toHTML() {
|
43 |
+
$this->_renderGeneralSettings();
|
44 |
+
$this->_renderPieSettings();
|
45 |
+
$this->_renderResidueSettings();
|
46 |
+
$this->_renderSlicesSettings();
|
47 |
+
$this->_renderViewSettings();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders pie settings group.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _renderPieSettings() {
|
58 |
+
self::_renderGroupStart( esc_html__( 'Pie Settings', Visualizer_Plugin::NAME ) );
|
59 |
+
self::_renderSectionStart();
|
60 |
+
self::_renderSelectItem(
|
61 |
+
esc_html__( 'Is 3D', Visualizer_Plugin::NAME ),
|
62 |
+
'is3D',
|
63 |
+
$this->is3D,
|
64 |
+
$this->_yesno,
|
65 |
+
esc_html__( 'If set to yes, displays a three-dimensional chart.', Visualizer_Plugin::NAME )
|
66 |
+
);
|
67 |
+
|
68 |
+
self::_renderSelectItem(
|
69 |
+
esc_html__( 'Reverse Categories', Visualizer_Plugin::NAME ),
|
70 |
+
'reverseCategories',
|
71 |
+
$this->reverseCategories,
|
72 |
+
$this->_yesno,
|
73 |
+
esc_html__( 'If set to yes, will draw slices counterclockwise.', Visualizer_Plugin::NAME )
|
74 |
+
);
|
75 |
+
|
76 |
+
self::_renderSelectItem(
|
77 |
+
esc_html__( 'Slice Text', Visualizer_Plugin::NAME ),
|
78 |
+
'pieSliceText',
|
79 |
+
$this->pieSliceText,
|
80 |
+
array(
|
81 |
+
'' => '',
|
82 |
+
'percentage' => esc_html__( 'The percentage of the slice size out of the total', Visualizer_Plugin::NAME ),
|
83 |
+
'value' => esc_html__( 'The quantitative value of the slice', Visualizer_Plugin::NAME ),
|
84 |
+
'label' => esc_html__( 'The name of the slice', Visualizer_Plugin::NAME ),
|
85 |
+
'none' => esc_html__( 'No text is displayed', Visualizer_Plugin::NAME ),
|
86 |
+
),
|
87 |
+
esc_html__( 'The content of the text displayed on the slice.', Visualizer_Plugin::NAME )
|
88 |
+
);
|
89 |
+
|
90 |
+
self::_renderTextItem(
|
91 |
+
esc_html__( 'Pie Hole', Visualizer_Plugin::NAME ),
|
92 |
+
'pieHole',
|
93 |
+
$this->pieHole,
|
94 |
+
esc_html__( 'If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional.', Visualizer_Plugin::NAME ),
|
95 |
+
'0.0'
|
96 |
+
);
|
97 |
+
|
98 |
+
self::_renderTextItem(
|
99 |
+
esc_html__( 'Start Angle', Visualizer_Plugin::NAME ),
|
100 |
+
'pieStartAngle',
|
101 |
+
$this->pieStartAngle,
|
102 |
+
esc_html__( 'The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up.', Visualizer_Plugin::NAME ),
|
103 |
+
0
|
104 |
+
);
|
105 |
+
|
106 |
+
self::_renderColorPickerItem(
|
107 |
+
esc_html__( 'Slice Border Color', Visualizer_Plugin::NAME ),
|
108 |
+
'pieSliceBorderColor',
|
109 |
+
$this->pieSliceBorderColor,
|
110 |
+
'#fff'
|
111 |
+
);
|
112 |
+
self::_renderSectionEnd();
|
113 |
+
self::_renderGroupEnd();
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Renders residue settings group.
|
118 |
+
*
|
119 |
+
* @since 1.0.0
|
120 |
+
*
|
121 |
+
* @access protected
|
122 |
+
*/
|
123 |
+
protected function _renderResidueSettings() {
|
124 |
+
self::_renderGroupStart( esc_html__( 'Residue Settings', Visualizer_Plugin::NAME ) );
|
125 |
+
self::_renderSectionStart();
|
126 |
+
self::_renderTextItem(
|
127 |
+
esc_html__( 'Visibility Threshold', Visualizer_Plugin::NAME ),
|
128 |
+
'sliceVisibilityThreshold',
|
129 |
+
$this->sliceVisibilityThreshold,
|
130 |
+
esc_html__( 'The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree.', Visualizer_Plugin::NAME ),
|
131 |
+
'0.001388889'
|
132 |
+
);
|
133 |
+
|
134 |
+
self::_renderTextItem(
|
135 |
+
esc_html__( 'Residue Slice Label', Visualizer_Plugin::NAME ),
|
136 |
+
'pieResidueSliceLabel',
|
137 |
+
$this->pieResidueSliceLabel,
|
138 |
+
esc_html__( 'A label for the combination slice that holds all slices below slice visibility threshold.' ),
|
139 |
+
esc_html__( 'Other', Visualizer_Plugin::NAME )
|
140 |
+
);
|
141 |
+
|
142 |
+
self::_renderColorPickerItem(
|
143 |
+
esc_html__( 'Residue Slice Color', Visualizer_Plugin::NAME ),
|
144 |
+
'pieResidueSliceColor',
|
145 |
+
$this->pieResidueSliceColor,
|
146 |
+
'#ccc'
|
147 |
+
);
|
148 |
+
self::_renderSectionEnd();
|
149 |
+
self::_renderGroupEnd();
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Renders slices settings.
|
154 |
+
*
|
155 |
+
* @since 1.0.0
|
156 |
+
*
|
157 |
+
* @access protected
|
158 |
+
*/
|
159 |
+
protected function _renderSlicesSettings() {
|
160 |
+
self::_renderGroupStart( esc_html__( 'Slices Settings', Visualizer_Plugin::NAME ) );
|
161 |
+
for ( $i = 0, $cnt = count( $this->__data ); $i < $cnt; $i++ ) {
|
162 |
+
self::_renderSectionStart( esc_html( $this->__data[$i][0] ), false );
|
163 |
+
self::_renderTextItem(
|
164 |
+
esc_html__( 'Slice Offset', Visualizer_Plugin::NAME ),
|
165 |
+
'slices[' . $i . '][offset]',
|
166 |
+
isset( $this->slices[$i]['color'] ) ? $this->slices[$i]['color'] : null,
|
167 |
+
esc_html__( "How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius).", Visualizer_Plugin::NAME ),
|
168 |
+
'0.0'
|
169 |
+
);
|
170 |
+
|
171 |
+
self::_renderColorPickerItem(
|
172 |
+
esc_html__( 'Slice Color', Visualizer_Plugin::NAME ),
|
173 |
+
'slices[' . $i . '][color]',
|
174 |
+
isset( $this->slices[$i]['color'] ) ? $this->slices[$i]['color'] : null,
|
175 |
+
null
|
176 |
+
);
|
177 |
+
self::_renderSectionEnd();
|
178 |
+
}
|
179 |
+
self::_renderGroupEnd();
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Renders tooltip settings section.
|
184 |
+
*
|
185 |
+
* @since 1.4.0
|
186 |
+
*
|
187 |
+
* @access protected
|
188 |
+
*/
|
189 |
+
protected function _renderTooltipSettigns() {
|
190 |
+
parent::_renderTooltipSettigns();
|
191 |
+
|
192 |
+
self::_renderSelectItem(
|
193 |
+
esc_html__( 'Text', Visualizer_Plugin::NAME ),
|
194 |
+
'tooltip[text]',
|
195 |
+
isset( $this->tooltip['text'] ) ? $this->tooltip['text'] : null,
|
196 |
+
array(
|
197 |
+
'' => '',
|
198 |
+
'both' => esc_html__( 'Display both the absolute value of the slice and the percentage of the whole', Visualizer_Plugin::NAME ),
|
199 |
+
'value' => esc_html__( 'Display only the absolute value of the slice', Visualizer_Plugin::NAME ),
|
200 |
+
'percentage' => esc_html__( 'Display only the percentage of the whole represented by the slice', Visualizer_Plugin::NAME ),
|
201 |
+
),
|
202 |
+
esc_html__( 'Determines what information to display when the user hovers over a pie slice.', Visualizer_Plugin::NAME )
|
203 |
+
);
|
204 |
+
}
|
205 |
+
|
206 |
}
|
classes/Visualizer/Render/Sidebar/Type/Scatter.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Class for scatter chart sidebar settings.
|
26 |
-
*
|
27 |
-
* @category Visualizer
|
28 |
-
* @package Render
|
29 |
-
* @subpackage Sidebar
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*/
|
33 |
-
class Visualizer_Render_Sidebar_Type_Scatter extends Visualizer_Render_Sidebar_Linear {
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @access public
|
41 |
-
* @param array $data The data what has to be associated with this render.
|
42 |
-
*/
|
43 |
-
public function __construct( $data = array() ) {
|
44 |
-
parent::__construct( $data );
|
45 |
-
|
46 |
-
// disable focus target option
|
47 |
-
$this->_includeFocusTarget = false;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Renders template.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*
|
55 |
-
* @access protected
|
56 |
-
*/
|
57 |
-
protected function _toHTML() {
|
58 |
-
$this->_renderGeneralSettings();
|
59 |
-
$this->_renderAxesSettings();
|
60 |
-
$this->_renderLineSettings();
|
61 |
-
$this->_renderSeriesSettings();
|
62 |
-
$this->_renderViewSettings();
|
63 |
-
}
|
64 |
-
|
65 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class for scatter chart sidebar settings.
|
26 |
+
*
|
27 |
+
* @category Visualizer
|
28 |
+
* @package Render
|
29 |
+
* @subpackage Sidebar
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
class Visualizer_Render_Sidebar_Type_Scatter extends Visualizer_Render_Sidebar_Linear {
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Constructor.
|
37 |
+
*
|
38 |
+
* @since 1.0.0
|
39 |
+
*
|
40 |
+
* @access public
|
41 |
+
* @param array $data The data what has to be associated with this render.
|
42 |
+
*/
|
43 |
+
public function __construct( $data = array() ) {
|
44 |
+
parent::__construct( $data );
|
45 |
+
|
46 |
+
// disable focus target option
|
47 |
+
$this->_includeFocusTarget = false;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Renders template.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*
|
55 |
+
* @access protected
|
56 |
+
*/
|
57 |
+
protected function _toHTML() {
|
58 |
+
$this->_renderGeneralSettings();
|
59 |
+
$this->_renderAxesSettings();
|
60 |
+
$this->_renderLineSettings();
|
61 |
+
$this->_renderSeriesSettings();
|
62 |
+
$this->_renderViewSettings();
|
63 |
+
}
|
64 |
+
|
65 |
}
|
classes/Visualizer/Render/Templates.php
CHANGED
@@ -1,113 +1,113 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Media view template rendering class.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Render
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Render_Templates extends Visualizer_Render {
|
32 |
-
|
33 |
-
/**
|
34 |
-
* The array of template names.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
*
|
38 |
-
* @access private
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
private $_templates = array(
|
42 |
-
'library-chart',
|
43 |
-
'library-empty',
|
44 |
-
);
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Renders concreate template and wraps it into script tag.
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
*
|
51 |
-
* @param string $id The name of a template.
|
52 |
-
* @param string $callback The name of the function to render a template.
|
53 |
-
*/
|
54 |
-
private function _renderTemplate( $id, $callback ) {
|
55 |
-
echo '<script id="tmpl-visualizer-', $id, '" type="text/html">';
|
56 |
-
call_user_func( array( $this, $callback ) );
|
57 |
-
echo '</script>';
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Renders library-chart template.
|
62 |
-
*
|
63 |
-
* @since 1.0.0
|
64 |
-
*
|
65 |
-
* @access protected
|
66 |
-
*/
|
67 |
-
protected function _renderLibraryChart() {
|
68 |
-
echo '<div class="visualizer-library-chart-footer visualizer-clearfix">';
|
69 |
-
echo '<a class="visualizer-library-chart-action visualizer-library-chart-delete" href="javascript:;" title="', esc_attr__( 'Delete', Visualizer_Plugin::NAME ), '"></a>';
|
70 |
-
echo '<a class="visualizer-library-chart-action visualizer-library-chart-insert" href="javascript:;" title="', esc_attr__( 'Insert', Visualizer_Plugin::NAME ), '"></a>';
|
71 |
-
|
72 |
-
echo '<span class="visualizer-library-chart-shortcode" title="', esc_attr__( 'Click to select', Visualizer_Plugin::NAME ), '"> [visualizer id="{{data.id}}"] </span>';
|
73 |
-
echo '</div>';
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Renders library-empty template.
|
78 |
-
*
|
79 |
-
* @since 1.0.0
|
80 |
-
*
|
81 |
-
* @access protected
|
82 |
-
*/
|
83 |
-
protected function _renderLibraryEmpty() {
|
84 |
-
echo '<div class="visualizer-library-chart">';
|
85 |
-
echo '<div class="visualizer-library-chart-canvas visualizer-library-nochart-canvas">';
|
86 |
-
echo '<div class="visualizer-library-notfound">', esc_html__( 'No charts found', Visualizer_Plugin::NAME ), '</div>';
|
87 |
-
echo '</div>';
|
88 |
-
echo '<div class="visualizer-library-chart-footer visualizer-clearfix">';
|
89 |
-
echo '<span class="visualizer-library-chart-action visualizer-library-nochart-delete"></span>';
|
90 |
-
echo '<span class="visualizer-library-chart-action visualizer-library-nochart-insert"></span>';
|
91 |
-
|
92 |
-
echo '<span class="visualizer-library-chart-shortcode">';
|
93 |
-
echo ' [visualizer] ';
|
94 |
-
echo '</span>';
|
95 |
-
echo '</div>';
|
96 |
-
echo '</div>';
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Renders templates.
|
101 |
-
*
|
102 |
-
* @since 1.0.0
|
103 |
-
*
|
104 |
-
* @access protected
|
105 |
-
*/
|
106 |
-
protected function _toHTML() {
|
107 |
-
foreach ( $this->_templates as $template ) {
|
108 |
-
$callback = '_render' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $template ) ) );
|
109 |
-
$this->_renderTemplate( $template, $callback );
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Media view template rendering class.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Render
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Render_Templates extends Visualizer_Render {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The array of template names.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
*
|
38 |
+
* @access private
|
39 |
+
* @var array
|
40 |
+
*/
|
41 |
+
private $_templates = array(
|
42 |
+
'library-chart',
|
43 |
+
'library-empty',
|
44 |
+
);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Renders concreate template and wraps it into script tag.
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*
|
51 |
+
* @param string $id The name of a template.
|
52 |
+
* @param string $callback The name of the function to render a template.
|
53 |
+
*/
|
54 |
+
private function _renderTemplate( $id, $callback ) {
|
55 |
+
echo '<script id="tmpl-visualizer-', $id, '" type="text/html">';
|
56 |
+
call_user_func( array( $this, $callback ) );
|
57 |
+
echo '</script>';
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Renders library-chart template.
|
62 |
+
*
|
63 |
+
* @since 1.0.0
|
64 |
+
*
|
65 |
+
* @access protected
|
66 |
+
*/
|
67 |
+
protected function _renderLibraryChart() {
|
68 |
+
echo '<div class="visualizer-library-chart-footer visualizer-clearfix">';
|
69 |
+
echo '<a class="visualizer-library-chart-action visualizer-library-chart-delete" href="javascript:;" title="', esc_attr__( 'Delete', Visualizer_Plugin::NAME ), '"></a>';
|
70 |
+
echo '<a class="visualizer-library-chart-action visualizer-library-chart-insert" href="javascript:;" title="', esc_attr__( 'Insert', Visualizer_Plugin::NAME ), '"></a>';
|
71 |
+
|
72 |
+
echo '<span class="visualizer-library-chart-shortcode" title="', esc_attr__( 'Click to select', Visualizer_Plugin::NAME ), '"> [visualizer id="{{data.id}}"] </span>';
|
73 |
+
echo '</div>';
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Renders library-empty template.
|
78 |
+
*
|
79 |
+
* @since 1.0.0
|
80 |
+
*
|
81 |
+
* @access protected
|
82 |
+
*/
|
83 |
+
protected function _renderLibraryEmpty() {
|
84 |
+
echo '<div class="visualizer-library-chart">';
|
85 |
+
echo '<div class="visualizer-library-chart-canvas visualizer-library-nochart-canvas">';
|
86 |
+
echo '<div class="visualizer-library-notfound">', esc_html__( 'No charts found', Visualizer_Plugin::NAME ), '</div>';
|
87 |
+
echo '</div>';
|
88 |
+
echo '<div class="visualizer-library-chart-footer visualizer-clearfix">';
|
89 |
+
echo '<span class="visualizer-library-chart-action visualizer-library-nochart-delete"></span>';
|
90 |
+
echo '<span class="visualizer-library-chart-action visualizer-library-nochart-insert"></span>';
|
91 |
+
|
92 |
+
echo '<span class="visualizer-library-chart-shortcode">';
|
93 |
+
echo ' [visualizer] ';
|
94 |
+
echo '</span>';
|
95 |
+
echo '</div>';
|
96 |
+
echo '</div>';
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Renders templates.
|
101 |
+
*
|
102 |
+
* @since 1.0.0
|
103 |
+
*
|
104 |
+
* @access protected
|
105 |
+
*/
|
106 |
+
protected function _toHTML() {
|
107 |
+
foreach ( $this->_templates as $template ) {
|
108 |
+
$callback = '_render' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $template ) ) );
|
109 |
+
$this->_renderTemplate( $template, $callback );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
}
|
classes/Visualizer/Source.php
CHANGED
@@ -1,205 +1,205 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* The abstract class for source managers.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Source
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
* @abstract
|
31 |
-
*/
|
32 |
-
abstract class Visualizer_Source {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* The array of data.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
* @var array
|
41 |
-
*/
|
42 |
-
protected $_data = array();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* The array of series.
|
46 |
-
*
|
47 |
-
* @since 1.0.0
|
48 |
-
*
|
49 |
-
* @access protected
|
50 |
-
* @var array
|
51 |
-
*/
|
52 |
-
protected $_series = array();
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Returns source name.
|
56 |
-
*
|
57 |
-
* @since 1.0.0
|
58 |
-
*
|
59 |
-
* @abstract
|
60 |
-
* @access public
|
61 |
-
* @return string The name of source.
|
62 |
-
*/
|
63 |
-
public abstract function getSourceName();
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Fetches information from source, parses it and builds series and data arrays.
|
67 |
-
*
|
68 |
-
* @since 1.0.0
|
69 |
-
*
|
70 |
-
* @abstract
|
71 |
-
* @access public
|
72 |
-
*/
|
73 |
-
public abstract function fetch();
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Returns series parsed from source.
|
77 |
-
*
|
78 |
-
* @since 1.0.0
|
79 |
-
*
|
80 |
-
* @access public
|
81 |
-
* @return array The array of series.
|
82 |
-
*/
|
83 |
-
public function getSeries() {
|
84 |
-
return $this->_series;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Returns data parsed from source.
|
89 |
-
*
|
90 |
-
* @since 1.0.0
|
91 |
-
*
|
92 |
-
* @access public
|
93 |
-
* @return string The serialized array of data.
|
94 |
-
*/
|
95 |
-
public function getData() {
|
96 |
-
return serialize( $this->_data );
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Returns raw data array.
|
101 |
-
*
|
102 |
-
* @since 1.1.0
|
103 |
-
*
|
104 |
-
* @access public
|
105 |
-
* @return array
|
106 |
-
*/
|
107 |
-
public function getRawData() {
|
108 |
-
return $this->_data;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Normalizes values according to series' type.
|
113 |
-
*
|
114 |
-
* @since 1.0.0
|
115 |
-
*
|
116 |
-
* @access protected
|
117 |
-
* @param array $data The row of data.
|
118 |
-
* @return array Normalized row of data.
|
119 |
-
*/
|
120 |
-
protected function _normalizeData( $data ) {
|
121 |
-
// normalize values
|
122 |
-
|
123 |
-
|
124 |
-
if
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
intval( $date->format( '
|
145 |
-
intval( $date->format( '
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
return $data;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Validates series tyeps.
|
158 |
-
*
|
159 |
-
* @since 1.0.1
|
160 |
-
*
|
161 |
-
* @static
|
162 |
-
* @access protected
|
163 |
-
* @param array $types The icoming series types.
|
164 |
-
* @return boolean TRUE if sereis types are valid, otherwise FALSE.
|
165 |
-
*/
|
166 |
-
protected static function _validateTypes( $types ) {
|
167 |
-
$allowed_types = array( 'string', 'number', 'boolean', 'date', 'datetime', 'timeofday' );
|
168 |
-
foreach ( $types as $type ) {
|
169 |
-
if ( !in_array( $type, $allowed_types ) ) {
|
170 |
-
return false;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
return true;
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Re populates series if the source is dynamic.
|
179 |
-
*
|
180 |
-
* @since 1.1.0
|
181 |
-
*
|
182 |
-
* @access public
|
183 |
-
* @param array $series The actual array of series.
|
184 |
-
* @param int $chart_id The chart id.
|
185 |
-
* @return array The re populated array of series or old one.
|
186 |
-
*/
|
187 |
-
public function repopulateSeries( $series, $chart_id ) {
|
188 |
-
return $series;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Re populates data if the source is dynamic.
|
193 |
-
*
|
194 |
-
* @since 1.1.0
|
195 |
-
*
|
196 |
-
* @access public
|
197 |
-
* @param array $data The actual array of data.
|
198 |
-
* @param int $chart_id The chart id.
|
199 |
-
* @return array The re populated array of data or old one.
|
200 |
-
*/
|
201 |
-
public function repopulateData( $data, $chart_id ) {
|
202 |
-
return $data;
|
203 |
-
}
|
204 |
-
|
205 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The abstract class for source managers.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Source
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
* @abstract
|
31 |
+
*/
|
32 |
+
abstract class Visualizer_Source {
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The array of data.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
* @var array
|
41 |
+
*/
|
42 |
+
protected $_data = array();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* The array of series.
|
46 |
+
*
|
47 |
+
* @since 1.0.0
|
48 |
+
*
|
49 |
+
* @access protected
|
50 |
+
* @var array
|
51 |
+
*/
|
52 |
+
protected $_series = array();
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Returns source name.
|
56 |
+
*
|
57 |
+
* @since 1.0.0
|
58 |
+
*
|
59 |
+
* @abstract
|
60 |
+
* @access public
|
61 |
+
* @return string The name of source.
|
62 |
+
*/
|
63 |
+
public abstract function getSourceName();
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Fetches information from source, parses it and builds series and data arrays.
|
67 |
+
*
|
68 |
+
* @since 1.0.0
|
69 |
+
*
|
70 |
+
* @abstract
|
71 |
+
* @access public
|
72 |
+
*/
|
73 |
+
public abstract function fetch();
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Returns series parsed from source.
|
77 |
+
*
|
78 |
+
* @since 1.0.0
|
79 |
+
*
|
80 |
+
* @access public
|
81 |
+
* @return array The array of series.
|
82 |
+
*/
|
83 |
+
public function getSeries() {
|
84 |
+
return $this->_series;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Returns data parsed from source.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
*
|
92 |
+
* @access public
|
93 |
+
* @return string The serialized array of data.
|
94 |
+
*/
|
95 |
+
public function getData() {
|
96 |
+
return serialize( $this->_data );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Returns raw data array.
|
101 |
+
*
|
102 |
+
* @since 1.1.0
|
103 |
+
*
|
104 |
+
* @access public
|
105 |
+
* @return array
|
106 |
+
*/
|
107 |
+
public function getRawData() {
|
108 |
+
return $this->_data;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Normalizes values according to series' type.
|
113 |
+
*
|
114 |
+
* @since 1.0.0
|
115 |
+
*
|
116 |
+
* @access protected
|
117 |
+
* @param array $data The row of data.
|
118 |
+
* @return array Normalized row of data.
|
119 |
+
*/
|
120 |
+
protected function _normalizeData( $data ) {
|
121 |
+
// normalize values
|
122 |
+
//print_r($data);
|
123 |
+
foreach ( $this->_series as $i => $series ) {
|
124 |
+
// if no value exists for the seires, then add null
|
125 |
+
if ( !isset( $data[$i] ) ) {
|
126 |
+
$data[$i] = null;
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( is_null( $data[$i] ) && !is_numeric($data[$i])) {
|
130 |
+
continue;
|
131 |
+
}
|
132 |
+
|
133 |
+
switch ( $series['type'] ) {
|
134 |
+
case 'number':
|
135 |
+
$data[$i] = ( is_numeric($data[$i]) ) ? floatval( $data[$i] ) : null;
|
136 |
+
break;
|
137 |
+
case 'boolean':
|
138 |
+
$data[$i] = !empty( $data[$i] ) ? filter_validate( $data[$i], FILTER_VALIDATE_BOOLEAN ) : null;
|
139 |
+
break;
|
140 |
+
case 'timeofday':
|
141 |
+
$date = new DateTime( '1984-03-16T' . $data[$i] );
|
142 |
+
if ( $date ) {
|
143 |
+
$data[$i] = array(
|
144 |
+
intval( $date->format( 'H' ) ),
|
145 |
+
intval( $date->format( 'i' ) ),
|
146 |
+
intval( $date->format( 's' ) ),
|
147 |
+
0,
|
148 |
+
);
|
149 |
+
}
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
return $data;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Validates series tyeps.
|
158 |
+
*
|
159 |
+
* @since 1.0.1
|
160 |
+
*
|
161 |
+
* @static
|
162 |
+
* @access protected
|
163 |
+
* @param array $types The icoming series types.
|
164 |
+
* @return boolean TRUE if sereis types are valid, otherwise FALSE.
|
165 |
+
*/
|
166 |
+
protected static function _validateTypes( $types ) {
|
167 |
+
$allowed_types = array( 'string', 'number', 'boolean', 'date', 'datetime', 'timeofday' );
|
168 |
+
foreach ( $types as $type ) {
|
169 |
+
if ( !in_array( $type, $allowed_types ) ) {
|
170 |
+
return false;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
return true;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Re populates series if the source is dynamic.
|
179 |
+
*
|
180 |
+
* @since 1.1.0
|
181 |
+
*
|
182 |
+
* @access public
|
183 |
+
* @param array $series The actual array of series.
|
184 |
+
* @param int $chart_id The chart id.
|
185 |
+
* @return array The re populated array of series or old one.
|
186 |
+
*/
|
187 |
+
public function repopulateSeries( $series, $chart_id ) {
|
188 |
+
return $series;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Re populates data if the source is dynamic.
|
193 |
+
*
|
194 |
+
* @since 1.1.0
|
195 |
+
*
|
196 |
+
* @access public
|
197 |
+
* @param array $data The actual array of data.
|
198 |
+
* @param int $chart_id The chart id.
|
199 |
+
* @return array The re populated array of data or old one.
|
200 |
+
*/
|
201 |
+
public function repopulateData( $data, $chart_id ) {
|
202 |
+
return $data;
|
203 |
+
}
|
204 |
+
|
205 |
}
|
classes/Visualizer/Source/Csv.php
CHANGED
@@ -1,158 +1,159 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Source manager for local CSV files.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Source
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Source_Csv extends Visualizer_Source {
|
32 |
-
|
33 |
-
/**
|
34 |
-
* The path to the file with data.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
*
|
38 |
-
* @access protected
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
protected $_filename;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Constructor.
|
45 |
-
*
|
46 |
-
* @since 1.0.0
|
47 |
-
*
|
48 |
-
* @access public
|
49 |
-
* @param string $filename The path to the file.
|
50 |
-
*/
|
51 |
-
public function __construct( $filename = null ) {
|
52 |
-
$this->_filename = trim( $filename );
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Fetches series information.
|
57 |
-
*
|
58 |
-
* @since 1.0.0
|
59 |
-
*
|
60 |
-
* @access private
|
61 |
-
* @param resource $handle The file handle resource.
|
62 |
-
*/
|
63 |
-
private function _fetchSeries( &$handle ) {
|
64 |
-
// read column titles
|
65 |
-
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
66 |
-
// read series types
|
67 |
-
$types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
68 |
-
|
69 |
-
if ( !$labels || !$types ) {
|
70 |
-
return false;
|
71 |
-
}
|
72 |
-
|
73 |
-
// if no types were setup, re read labels and empty types array
|
74 |
-
$types = array_map( 'trim', $types );
|
75 |
-
if ( !self::_validateTypes( $types ) ) {
|
76 |
-
// re open the file
|
77 |
-
fclose( $handle );
|
78 |
-
$handle = $this->_get_file_handle();
|
79 |
-
|
80 |
-
// re read the labels and empty types array
|
81 |
-
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
82 |
-
$types = array();
|
83 |
-
}
|
84 |
-
|
85 |
-
for ( $i = 0, $len = count( $labels ); $i < $len; $i++ ) {
|
86 |
-
$default_type = $i == 0 ? 'string' : 'number';
|
87 |
-
$this->_series[] = array(
|
88 |
-
'label' => $labels[$i],
|
89 |
-
'type' => isset( $types[$i] ) ? $types[$i] : $default_type,
|
90 |
-
);
|
91 |
-
}
|
92 |
-
|
93 |
-
return true;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Returns file handle to fetch data from.
|
98 |
-
*
|
99 |
-
* @since 1.4.2
|
100 |
-
*
|
101 |
-
* @access protected
|
102 |
-
* @param string $filename Optional file name to get handle. If omitted, $_filename is used.
|
103 |
-
* @return resource File handle resource on success, otherwise FALSE.
|
104 |
-
*/
|
105 |
-
protected function _get_file_handle( $filename = false ) {
|
106 |
-
// set line endings auto detect mode
|
107 |
-
@ini_set( 'auto_detect_line_endings', true );
|
108 |
-
// open file and return handle
|
109 |
-
return fopen( $filename ? $filename : $this->_filename, 'rb' );
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Fetches information from source, parses it and builds series and data arrays.
|
114 |
-
*
|
115 |
-
* @since 1.0.0
|
116 |
-
*
|
117 |
-
* @access public
|
118 |
-
* @return boolean TRUE on success, otherwise FALSE.
|
119 |
-
*/
|
120 |
-
public function fetch() {
|
121 |
-
// if filename is empty return false
|
122 |
-
if ( empty( $this->_filename ) ) {
|
123 |
-
return false;
|
124 |
-
}
|
125 |
-
|
126 |
-
// read file and fill arrays
|
127 |
-
$handle = $this->_get_file_handle();
|
128 |
-
if ( $handle ) {
|
129 |
-
// fetch series
|
130 |
-
if ( !$this->_fetchSeries( $handle ) ) {
|
131 |
-
return false;
|
132 |
-
}
|
133 |
-
|
134 |
-
// fetch data
|
135 |
-
while ( ( $data = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE ) ) !== false ) {
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
*
|
149 |
-
*
|
150 |
-
*
|
151 |
-
*
|
152 |
-
* @
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
158 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Source manager for local CSV files.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Source
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Source_Csv extends Visualizer_Source {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The path to the file with data.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
*
|
38 |
+
* @access protected
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
protected $_filename;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Constructor.
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
*
|
48 |
+
* @access public
|
49 |
+
* @param string $filename The path to the file.
|
50 |
+
*/
|
51 |
+
public function __construct( $filename = null ) {
|
52 |
+
$this->_filename = trim( $filename );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Fetches series information.
|
57 |
+
*
|
58 |
+
* @since 1.0.0
|
59 |
+
*
|
60 |
+
* @access private
|
61 |
+
* @param resource $handle The file handle resource.
|
62 |
+
*/
|
63 |
+
private function _fetchSeries( &$handle ) {
|
64 |
+
// read column titles
|
65 |
+
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
66 |
+
// read series types
|
67 |
+
$types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
68 |
+
|
69 |
+
if ( !$labels || !$types ) {
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
|
73 |
+
// if no types were setup, re read labels and empty types array
|
74 |
+
$types = array_map( 'trim', $types );
|
75 |
+
if ( !self::_validateTypes( $types ) ) {
|
76 |
+
// re open the file
|
77 |
+
fclose( $handle );
|
78 |
+
$handle = $this->_get_file_handle();
|
79 |
+
|
80 |
+
// re read the labels and empty types array
|
81 |
+
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
|
82 |
+
$types = array();
|
83 |
+
}
|
84 |
+
|
85 |
+
for ( $i = 0, $len = count( $labels ); $i < $len; $i++ ) {
|
86 |
+
$default_type = $i == 0 ? 'string' : 'number';
|
87 |
+
$this->_series[] = array(
|
88 |
+
'label' => $labels[$i],
|
89 |
+
'type' => isset( $types[$i] ) ? $types[$i] : $default_type,
|
90 |
+
);
|
91 |
+
}
|
92 |
+
|
93 |
+
return true;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Returns file handle to fetch data from.
|
98 |
+
*
|
99 |
+
* @since 1.4.2
|
100 |
+
*
|
101 |
+
* @access protected
|
102 |
+
* @param string $filename Optional file name to get handle. If omitted, $_filename is used.
|
103 |
+
* @return resource File handle resource on success, otherwise FALSE.
|
104 |
+
*/
|
105 |
+
protected function _get_file_handle( $filename = false ) {
|
106 |
+
// set line endings auto detect mode
|
107 |
+
@ini_set( 'auto_detect_line_endings', true );
|
108 |
+
// open file and return handle
|
109 |
+
return fopen( $filename ? $filename : $this->_filename, 'rb' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Fetches information from source, parses it and builds series and data arrays.
|
114 |
+
*
|
115 |
+
* @since 1.0.0
|
116 |
+
*
|
117 |
+
* @access public
|
118 |
+
* @return boolean TRUE on success, otherwise FALSE.
|
119 |
+
*/
|
120 |
+
public function fetch() {
|
121 |
+
// if filename is empty return false
|
122 |
+
if ( empty( $this->_filename ) ) {
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
// read file and fill arrays
|
127 |
+
$handle = $this->_get_file_handle();
|
128 |
+
if ( $handle ) {
|
129 |
+
// fetch series
|
130 |
+
if ( !$this->_fetchSeries( $handle ) ) {
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
|
134 |
+
// fetch data
|
135 |
+
while ( ( $data = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE ) ) !== false ) {
|
136 |
+
|
137 |
+
$this->_data[] = $this->_normalizeData( $data );
|
138 |
+
}
|
139 |
+
|
140 |
+
// close file handle
|
141 |
+
fclose( $handle );
|
142 |
+
}
|
143 |
+
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Returns source name.
|
149 |
+
*
|
150 |
+
* @since 1.0.0
|
151 |
+
*
|
152 |
+
* @access public
|
153 |
+
* @return string The name of source.
|
154 |
+
*/
|
155 |
+
public function getSourceName() {
|
156 |
+
return __CLASS__;
|
157 |
+
}
|
158 |
+
|
159 |
}
|
classes/Visualizer/Source/Csv/Remote.php
CHANGED
@@ -1,161 +1,161 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// +----------------------------------------------------------------------+
|
4 |
-
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
-
// +----------------------------------------------------------------------+
|
6 |
-
// | This program is free software; you can redistribute it and/or modify |
|
7 |
-
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
-
// | published by the Free Software Foundation. |
|
9 |
-
// | |
|
10 |
-
// | This program is distributed in the hope that it will be useful, |
|
11 |
-
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
-
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
-
// | GNU General Public License for more details. |
|
14 |
-
// | |
|
15 |
-
// | You should have received a copy of the GNU General Public License |
|
16 |
-
// | along with this program; if not, write to the Free Software |
|
17 |
-
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
-
// | MA 02110-1301 USA |
|
19 |
-
// +----------------------------------------------------------------------+
|
20 |
-
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
-
// +----------------------------------------------------------------------+
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Source manager for remote CSV files.
|
25 |
-
*
|
26 |
-
* @category Visualizer
|
27 |
-
* @package Source
|
28 |
-
*
|
29 |
-
* @since 1.1.0
|
30 |
-
*/
|
31 |
-
class Visualizer_Source_Csv_Remote extends Visualizer_Source_Csv {
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Temporary file name used when allow_url_fopen option is disabled.
|
35 |
-
*
|
36 |
-
* @since 1.4.2
|
37 |
-
*
|
38 |
-
* @access private
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $_tmpfile = false;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Returns data parsed from source.
|
45 |
-
*
|
46 |
-
* @since 1.1.0
|
47 |
-
*
|
48 |
-
* @access public
|
49 |
-
* @return string The serialized array of data.
|
50 |
-
*/
|
51 |
-
public function getData() {
|
52 |
-
return serialize( array(
|
53 |
-
'source' => $this->_filename,
|
54 |
-
'data' => $this->_data,
|
55 |
-
) );
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Re populates data and series.
|
60 |
-
*
|
61 |
-
* @since 1.1.0
|
62 |
-
*
|
63 |
-
* @access private
|
64 |
-
* @param int $chart_id The chart id.
|
65 |
-
* @return boolean TRUE on success, otherwise FALSE.
|
66 |
-
*/
|
67 |
-
private function _repopulate( $chart_id ) {
|
68 |
-
// if it has been already populated, then just return true
|
69 |
-
if ( !empty( $this->_data ) && !empty( $this->_series ) ) {
|
70 |
-
return true;
|
71 |
-
}
|
72 |
-
|
73 |
-
// if filename is empty, extract it from chart content
|
74 |
-
if ( empty( $this->_filename ) ) {
|
75 |
-
$chart = get_post( $chart_id );
|
76 |
-
$data = unserialize( $chart->post_content );
|
77 |
-
if ( !isset( $data['source'] ) ) {
|
78 |
-
return false;
|
79 |
-
}
|
80 |
-
|
81 |
-
$this->_filename = $data['source'];
|
82 |
-
}
|
83 |
-
|
84 |
-
// populate series and data information
|
85 |
-
return $this->fetch();
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Re populates data.
|
90 |
-
*
|
91 |
-
* @since 1.1.0
|
92 |
-
*
|
93 |
-
* @access public
|
94 |
-
* @param array $data The actual array of data.
|
95 |
-
* @param int $chart_id The chart id.
|
96 |
-
* @return array The re populated array of data or old one.
|
97 |
-
*/
|
98 |
-
public function repopulateData( $data, $chart_id ) {
|
99 |
-
return $this->_repopulate( $chart_id ) ? $this->_data : $data;
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Re populates series.
|
104 |
-
*
|
105 |
-
* @since 1.1.0
|
106 |
-
*
|
107 |
-
* @access public
|
108 |
-
* @param array $series The actual array of series.
|
109 |
-
* @param int $chart_id The chart id.
|
110 |
-
* @return array The re populated array of series or old one.
|
111 |
-
*/
|
112 |
-
public function repopulateSeries( $series, $chart_id ) {
|
113 |
-
return $this->_repopulate( $chart_id ) ? $this->_series : $series;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Returns source name.
|
118 |
-
*
|
119 |
-
* @since 1.0.0
|
120 |
-
*
|
121 |
-
* @access public
|
122 |
-
* @return string The name of source.
|
123 |
-
*/
|
124 |
-
public function getSourceName() {
|
125 |
-
return __CLASS__;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Returns file handle to fetch data from.
|
130 |
-
*
|
131 |
-
* @since 1.4.2
|
132 |
-
*
|
133 |
-
* @access protected
|
134 |
-
* @staticvar boolean $allow_url_fopen Determines whether or not allow_url_fopen option is enabled.
|
135 |
-
* @param string $filename Optional file name to get handle. If omitted, $_filename is used.
|
136 |
-
* @return resource File handle resource on success, otherwise FALSE.
|
137 |
-
*/
|
138 |
-
protected function _get_file_handle( $filename = false ) {
|
139 |
-
static $allow_url_fopen = null;
|
140 |
-
|
141 |
-
if ( $this->_tmpfile && is_readable( $this->_tmpfile ) ) {
|
142 |
-
return parent::_get_file_handle( $this->_tmpfile );
|
143 |
-
}
|
144 |
-
|
145 |
-
if ( is_null( $allow_url_fopen ) ) {
|
146 |
-
$allow_url_fopen = filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN );
|
147 |
-
}
|
148 |
-
|
149 |
-
$scheme = parse_url( $this->_filename, PHP_URL_SCHEME );
|
150 |
-
if ( $allow_url_fopen && in_array( $scheme, stream_get_wrappers() ) ) {
|
151 |
-
return parent::_get_file_handle( $filename );
|
152 |
-
}
|
153 |
-
|
154 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
155 |
-
|
156 |
-
$this->_tmpfile = download_url( $this->_filename );
|
157 |
-
|
158 |
-
return !is_wp_error( $this->_tmpfile ) ? parent::_get_file_handle( $this->_tmpfile ) : false;
|
159 |
-
}
|
160 |
-
|
161 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// +----------------------------------------------------------------------+
|
4 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
5 |
+
// +----------------------------------------------------------------------+
|
6 |
+
// | This program is free software; you can redistribute it and/or modify |
|
7 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
8 |
+
// | published by the Free Software Foundation. |
|
9 |
+
// | |
|
10 |
+
// | This program is distributed in the hope that it will be useful, |
|
11 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
+
// | GNU General Public License for more details. |
|
14 |
+
// | |
|
15 |
+
// | You should have received a copy of the GNU General Public License |
|
16 |
+
// | along with this program; if not, write to the Free Software |
|
17 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
18 |
+
// | MA 02110-1301 USA |
|
19 |
+
// +----------------------------------------------------------------------+
|
20 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
21 |
+
// +----------------------------------------------------------------------+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Source manager for remote CSV files.
|
25 |
+
*
|
26 |
+
* @category Visualizer
|
27 |
+
* @package Source
|
28 |
+
*
|
29 |
+
* @since 1.1.0
|
30 |
+
*/
|
31 |
+
class Visualizer_Source_Csv_Remote extends Visualizer_Source_Csv {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Temporary file name used when allow_url_fopen option is disabled.
|
35 |
+
*
|
36 |
+
* @since 1.4.2
|
37 |
+
*
|
38 |
+
* @access private
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private $_tmpfile = false;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Returns data parsed from source.
|
45 |
+
*
|
46 |
+
* @since 1.1.0
|
47 |
+
*
|
48 |
+
* @access public
|
49 |
+
* @return string The serialized array of data.
|
50 |
+
*/
|
51 |
+
public function getData() {
|
52 |
+
return serialize( array(
|
53 |
+
'source' => $this->_filename,
|
54 |
+
'data' => $this->_data,
|
55 |
+
) );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Re populates data and series.
|
60 |
+
*
|
61 |
+
* @since 1.1.0
|
62 |
+
*
|
63 |
+
* @access private
|
64 |
+
* @param int $chart_id The chart id.
|
65 |
+
* @return boolean TRUE on success, otherwise FALSE.
|
66 |
+
*/
|
67 |
+
private function _repopulate( $chart_id ) {
|
68 |
+
// if it has been already populated, then just return true
|
69 |
+
if ( !empty( $this->_data ) && !empty( $this->_series ) ) {
|
70 |
+
return true;
|
71 |
+
}
|
72 |
+
|
73 |
+
// if filename is empty, extract it from chart content
|
74 |
+
if ( empty( $this->_filename ) ) {
|
75 |
+
$chart = get_post( $chart_id );
|
76 |
+
$data = unserialize( $chart->post_content );
|
77 |
+
if ( !isset( $data['source'] ) ) {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
|
81 |
+
$this->_filename = $data['source'];
|
82 |
+
}
|
83 |
+
|
84 |
+
// populate series and data information
|
85 |
+
return $this->fetch();
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Re populates data.
|
90 |
+
*
|
91 |
+
* @since 1.1.0
|
92 |
+
*
|
93 |
+
* @access public
|
94 |
+
* @param array $data The actual array of data.
|
95 |
+
* @param int $chart_id The chart id.
|
96 |
+
* @return array The re populated array of data or old one.
|
97 |
+
*/
|
98 |
+
public function repopulateData( $data, $chart_id ) {
|
99 |
+
return $this->_repopulate( $chart_id ) ? $this->_data : $data;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Re populates series.
|
104 |
+
*
|
105 |
+
* @since 1.1.0
|
106 |
+
*
|
107 |
+
* @access public
|
108 |
+
* @param array $series The actual array of series.
|
109 |
+
* @param int $chart_id The chart id.
|
110 |
+
* @return array The re populated array of series or old one.
|
111 |
+
*/
|
112 |
+
public function repopulateSeries( $series, $chart_id ) {
|
113 |
+
return $this->_repopulate( $chart_id ) ? $this->_series : $series;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Returns source name.
|
118 |
+
*
|
119 |
+
* @since 1.0.0
|
120 |
+
*
|
121 |
+
* @access public
|
122 |
+
* @return string The name of source.
|
123 |
+
*/
|
124 |
+
public function getSourceName() {
|
125 |
+
return __CLASS__;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Returns file handle to fetch data from.
|
130 |
+
*
|
131 |
+
* @since 1.4.2
|
132 |
+
*
|
133 |
+
* @access protected
|
134 |
+
* @staticvar boolean $allow_url_fopen Determines whether or not allow_url_fopen option is enabled.
|
135 |
+
* @param string $filename Optional file name to get handle. If omitted, $_filename is used.
|
136 |
+
* @return resource File handle resource on success, otherwise FALSE.
|
137 |
+
*/
|
138 |
+
protected function _get_file_handle( $filename = false ) {
|
139 |
+
static $allow_url_fopen = null;
|
140 |
+
|
141 |
+
if ( $this->_tmpfile && is_readable( $this->_tmpfile ) ) {
|
142 |
+
return parent::_get_file_handle( $this->_tmpfile );
|
143 |
+
}
|
144 |
+
|
145 |
+
if ( is_null( $allow_url_fopen ) ) {
|
146 |
+
$allow_url_fopen = filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN );
|
147 |
+
}
|
148 |
+
|
149 |
+
$scheme = parse_url( $this->_filename, PHP_URL_SCHEME );
|
150 |
+
if ( $allow_url_fopen && in_array( $scheme, stream_get_wrappers() ) ) {
|
151 |
+
return parent::_get_file_handle( $filename );
|
152 |
+
}
|
153 |
+
|
154 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
155 |
+
|
156 |
+
$this->_tmpfile = download_url( $this->_filename );
|
157 |
+
|
158 |
+
return !is_wp_error( $this->_tmpfile ) ? parent::_get_file_handle( $this->_tmpfile ) : false;
|
159 |
+
}
|
160 |
+
|
161 |
}
|
css/frame.css
CHANGED
@@ -1,426 +1,704 @@
|
|
1 |
-
#content {
|
2 |
-
position: absolute;
|
3 |
-
top: 0;
|
4 |
-
right: 0;
|
5 |
-
bottom: 60px;
|
6 |
-
left: 0;
|
7 |
-
z-index: 75;
|
8 |
-
overflow: auto;
|
9 |
-
background-color: white;
|
10 |
-
}
|
11 |
-
|
12 |
-
#canvas {
|
13 |
-
position: absolute;
|
14 |
-
left: 10px;
|
15 |
-
right: 310px;
|
16 |
-
top: 10px;
|
17 |
-
bottom: 10px;
|
18 |
-
}
|
19 |
-
|
20 |
-
.loader {
|
21 |
-
position: absolute;
|
22 |
-
left: 50%;
|
23 |
-
top: 50%;
|
24 |
-
margin-left: -16px;
|
25 |
-
margin-top: -16px;
|
26 |
-
}
|
27 |
-
|
28 |
-
/******************************************************************************/
|
29 |
-
/******************************** SIDEBAR ***********************************/
|
30 |
-
/******************************************************************************/
|
31 |
-
|
32 |
-
#sidebar {
|
33 |
-
position: absolute;
|
34 |
-
top: 0;
|
35 |
-
right: 0;
|
36 |
-
bottom: 60px;
|
37 |
-
width: 299px;
|
38 |
-
z-index: 75;
|
39 |
-
background: whitesmoke;
|
40 |
-
border-left: 1px solid #DFDFDF;
|
41 |
-
overflow: auto;
|
42 |
-
-webkit-overflow-scrolling: touch;
|
43 |
-
}
|
44 |
-
|
45 |
-
.group-wrapper {
|
46 |
-
border-top: 1px solid #DFDFDF;
|
47 |
-
margin: 0;
|
48 |
-
padding: 0;
|
49 |
-
list-style: none;
|
50 |
-
}
|
51 |
-
|
52 |
-
.group {
|
53 |
-
margin: 0;
|
54 |
-
list-style: none;
|
55 |
-
font-size: 12px;
|
56 |
-
line-height: 18px;
|
57 |
-
}
|
58 |
-
|
59 |
-
.group.open {
|
60 |
-
border-bottom: 1px solid #DFDFDF;
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
border-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
-
|
70 |
-
-
|
71 |
-
user-select: none;
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
font-
|
76 |
-
font-
|
77 |
-
|
78 |
-
|
79 |
-
background
|
80 |
-
background-image: -webkit-
|
81 |
-
background-image: -
|
82 |
-
background-image: -
|
83 |
-
background-image: -
|
84 |
-
background-image: linear-gradient(bottom, #EEE, whiteSmoke);
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
background
|
95 |
-
background-image: -
|
96 |
-
background-image: -
|
97 |
-
background-image: linear-gradient(bottom, #6D6D6D, gray);
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
.group:hover
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
padding: 10px 20px
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
padding:
|
155 |
-
margin
|
156 |
-
}
|
157 |
-
|
158 |
-
.
|
159 |
-
|
160 |
-
font-weight:
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
}
|
184 |
-
|
185 |
-
.section-title
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
.
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
.section-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
}
|
331 |
-
|
332 |
-
.type-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
background-
|
339 |
-
}
|
340 |
-
|
341 |
-
.type-box-
|
342 |
-
|
343 |
-
}
|
344 |
-
|
345 |
-
.type-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
background-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
}
|
356 |
-
|
357 |
-
.type-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#content {
|
2 |
+
position: absolute;
|
3 |
+
top: 0;
|
4 |
+
right: 0;
|
5 |
+
bottom: 60px;
|
6 |
+
left: 0;
|
7 |
+
z-index: 75;
|
8 |
+
overflow: auto;
|
9 |
+
background-color: white;
|
10 |
+
}
|
11 |
+
|
12 |
+
#canvas {
|
13 |
+
position: absolute;
|
14 |
+
left: 10px;
|
15 |
+
right: 310px;
|
16 |
+
top: 10px;
|
17 |
+
bottom: 10px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.loader {
|
21 |
+
position: absolute;
|
22 |
+
left: 50%;
|
23 |
+
top: 50%;
|
24 |
+
margin-left: -16px;
|
25 |
+
margin-top: -16px;
|
26 |
+
}
|
27 |
+
|
28 |
+
/******************************************************************************/
|
29 |
+
/******************************** SIDEBAR ***********************************/
|
30 |
+
/******************************************************************************/
|
31 |
+
|
32 |
+
#sidebar {
|
33 |
+
position: absolute;
|
34 |
+
top: 0;
|
35 |
+
right: 0;
|
36 |
+
bottom: 60px;
|
37 |
+
width: 299px;
|
38 |
+
z-index: 75;
|
39 |
+
background: whitesmoke;
|
40 |
+
border-left: 1px solid #DFDFDF;
|
41 |
+
overflow: auto;
|
42 |
+
-webkit-overflow-scrolling: touch;
|
43 |
+
}
|
44 |
+
|
45 |
+
.group-wrapper {
|
46 |
+
border-top: 1px solid #DFDFDF;
|
47 |
+
margin: 0;
|
48 |
+
padding: 0;
|
49 |
+
list-style: none;
|
50 |
+
}
|
51 |
+
|
52 |
+
.group {
|
53 |
+
margin: 0;
|
54 |
+
list-style: none;
|
55 |
+
font-size: 12px;
|
56 |
+
line-height: 18px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.group.open {
|
60 |
+
border-bottom: 1px solid #DFDFDF;
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
.group-title {
|
65 |
+
border-top: 1px solid white;
|
66 |
+
border-bottom: 1px solid #DFDFDF;
|
67 |
+
position: relative;
|
68 |
+
cursor: pointer;
|
69 |
+
-webkit-user-select: none;
|
70 |
+
-moz-user-select: none;
|
71 |
+
-ms-user-select: none;
|
72 |
+
user-select: none;
|
73 |
+
margin: 0;
|
74 |
+
padding: 10px 20px;
|
75 |
+
font-size: 15px;
|
76 |
+
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
77 |
+
font-weight: normal;
|
78 |
+
text-shadow: 0 1px 0 white;
|
79 |
+
background: whiteSmoke;
|
80 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#EEE), to(whiteSmoke));
|
81 |
+
background-image: -webkit-linear-gradient(bottom, #EEE, whiteSmoke);
|
82 |
+
background-image: -moz-linear-gradient(bottom, #EEE, whiteSmoke);
|
83 |
+
background-image: -o-linear-gradient(bottom, #EEE, whiteSmoke);
|
84 |
+
background-image: -ms-linear-gradient(bottom, #EEE, whiteSmoke);
|
85 |
+
background-image: linear-gradient(bottom, #EEE, whiteSmoke);
|
86 |
+
font-family: "Open Sans",sans-serif;
|
87 |
+
font-weight: 700;
|
88 |
+
}
|
89 |
+
|
90 |
+
.group-title:hover,
|
91 |
+
.group.open .group-title {
|
92 |
+
color: white;
|
93 |
+
text-shadow: 0 -1px 0 #333;
|
94 |
+
background: gray;
|
95 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#6D6D6D), to(gray));
|
96 |
+
background-image: -webkit-linear-gradient(bottom, #6D6D6D, gray);
|
97 |
+
background-image: -moz-linear-gradient(bottom, #6D6D6D, gray);
|
98 |
+
background-image: -o-linear-gradient(bottom, #6D6D6D, gray);
|
99 |
+
background-image: -ms-linear-gradient(bottom, #6D6D6D, gray);
|
100 |
+
background-image: linear-gradient(bottom, #6D6D6D, gray);
|
101 |
+
font-family: "Open Sans", sans-serif;
|
102 |
+
font-weight: 700;
|
103 |
+
}
|
104 |
+
|
105 |
+
.group-title::after {
|
106 |
+
content: '';
|
107 |
+
width: 0;
|
108 |
+
height: 0;
|
109 |
+
border-color: #CCC transparent;
|
110 |
+
border-style: solid;
|
111 |
+
border-width: 6px 6px 0;
|
112 |
+
position: absolute;
|
113 |
+
top: 15px;
|
114 |
+
right: 20px;
|
115 |
+
z-index: 1;
|
116 |
+
}
|
117 |
+
|
118 |
+
.group-title:hover::after,
|
119 |
+
.group.open .group-title::after {
|
120 |
+
border-color: #EEE transparent;
|
121 |
+
}
|
122 |
+
|
123 |
+
.group:hover .group-title {
|
124 |
+
border-top-color: gray;
|
125 |
+
}
|
126 |
+
|
127 |
+
.group.open .group-title {
|
128 |
+
border-top-color: #6D6D6D;
|
129 |
+
}
|
130 |
+
|
131 |
+
.group.open .group-title::after {
|
132 |
+
border-width: 0 6px 6px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.group-content {
|
136 |
+
margin: 0;
|
137 |
+
display: none;
|
138 |
+
background-color: #FDFDFD;
|
139 |
+
padding: 10px 0 20px 0;
|
140 |
+
overflow: hidden;
|
141 |
+
}
|
142 |
+
|
143 |
+
div.group-content {
|
144 |
+
padding: 10px 20px 20px;
|
145 |
+
}
|
146 |
+
|
147 |
+
.group.open .group-content {
|
148 |
+
display: block;
|
149 |
+
}
|
150 |
+
|
151 |
+
.group-description {
|
152 |
+
font-size: 12px;
|
153 |
+
color: #555;
|
154 |
+
padding: 5px 20px 10px;
|
155 |
+
margin: 0;
|
156 |
+
}
|
157 |
+
|
158 |
+
div.group-content .group-description {
|
159 |
+
padding: 0;
|
160 |
+
font-weight: 300;
|
161 |
+
font-family: "Montserrat",sans-serif;
|
162 |
+
}
|
163 |
+
|
164 |
+
.initial-screen .group-description {
|
165 |
+
padding: 0;
|
166 |
+
font-weight: 300;
|
167 |
+
font-family: "Montserrat",sans-serif;
|
168 |
+
padding: 10px 20px 20px;
|
169 |
+
}
|
170 |
+
|
171 |
+
.section-title {
|
172 |
+
display: block;
|
173 |
+
font-weight: bold;
|
174 |
+
position: relative;
|
175 |
+
cursor: pointer;
|
176 |
+
padding: 4px 20px;
|
177 |
+
margin-bottom: 5px;
|
178 |
+
background-color: rgba(0, 0, 0, 0.02);
|
179 |
+
border-top: 1px solid #eeeeee;
|
180 |
+
-webkit-box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
|
181 |
+
box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
|
182 |
+
border-bottom: 1px solid #eeeeee;
|
183 |
+
}
|
184 |
+
|
185 |
+
.section-title::after {
|
186 |
+
content: '';
|
187 |
+
width: 0;
|
188 |
+
height: 0;
|
189 |
+
border-color: #CCC transparent;
|
190 |
+
border-style: solid;
|
191 |
+
border-width: 4px 4px 0;
|
192 |
+
position: absolute;
|
193 |
+
top: 13px;
|
194 |
+
right: 20px;
|
195 |
+
z-index: 1;
|
196 |
+
}
|
197 |
+
|
198 |
+
.section-title.open::after {
|
199 |
+
border-width: 0 4px 4px;
|
200 |
+
}
|
201 |
+
|
202 |
+
.section-items {
|
203 |
+
display: none;
|
204 |
+
padding: 5px 20px 10px 20px;
|
205 |
+
}
|
206 |
+
|
207 |
+
.section-items.open {
|
208 |
+
display: block;
|
209 |
+
}
|
210 |
+
|
211 |
+
.more-info {
|
212 |
+
text-decoration: none;
|
213 |
+
color: #21759B;
|
214 |
+
font-size: 85%;
|
215 |
+
font-weight: normal;
|
216 |
+
float: right;
|
217 |
+
display: none;
|
218 |
+
}
|
219 |
+
|
220 |
+
.section-description {
|
221 |
+
/*display: none;*/
|
222 |
+
padding: 0;
|
223 |
+
margin: 0;
|
224 |
+
font-size: 11px;
|
225 |
+
color: gray;
|
226 |
+
}
|
227 |
+
|
228 |
+
.section-table {
|
229 |
+
width: 100%;
|
230 |
+
}
|
231 |
+
|
232 |
+
.section-delimiter {
|
233 |
+
margin: 15px 0;
|
234 |
+
border-top: 1px dashed #ccc;
|
235 |
+
}
|
236 |
+
|
237 |
+
.section-table-column {
|
238 |
+
width: 50%;
|
239 |
+
text-align: left;
|
240 |
+
vertical-align: top;
|
241 |
+
padding: 0 1px;
|
242 |
+
}
|
243 |
+
|
244 |
+
.section-item {
|
245 |
+
margin-bottom: 10px;
|
246 |
+
}
|
247 |
+
|
248 |
+
.control-select,
|
249 |
+
.control-text {
|
250 |
+
width: 100%;
|
251 |
+
}
|
252 |
+
|
253 |
+
.section-description ul {
|
254 |
+
margin: 0 0 0 25px;
|
255 |
+
list-style: circle;
|
256 |
+
}
|
257 |
+
|
258 |
+
.section-description li {
|
259 |
+
list-style: circle;
|
260 |
+
margin: 0;
|
261 |
+
}
|
262 |
+
|
263 |
+
#rate-the-plugin {
|
264 |
+
margin-top: 40px;
|
265 |
+
padding: 20px;
|
266 |
+
border-top: 1px dashed #ddd;
|
267 |
+
text-align: center;
|
268 |
+
}
|
269 |
+
|
270 |
+
.rate-the-plugin{
|
271 |
+
width: 40% !important;
|
272 |
+
margin-top: -5px;
|
273 |
+
}
|
274 |
+
|
275 |
+
#rate-stars {
|
276 |
+
margin: 15px auto;
|
277 |
+
width: 100px;
|
278 |
+
height: 20px;
|
279 |
+
background-image: url('../images/star.png');
|
280 |
+
background-repeat: repeat-x;
|
281 |
+
background-position: right center;
|
282 |
+
}
|
283 |
+
|
284 |
+
#rate-link {
|
285 |
+
text-decoration: none;
|
286 |
+
font-family: "Montserrat",sans-serif;
|
287 |
+
font-weight: 400;
|
288 |
+
}
|
289 |
+
|
290 |
+
#flattr {
|
291 |
+
margin-top: 15px;
|
292 |
+
text-align: center;
|
293 |
+
}
|
294 |
+
|
295 |
+
/******************************************************************************/
|
296 |
+
/******************************** TOOLBAR ***********************************/
|
297 |
+
/******************************************************************************/
|
298 |
+
|
299 |
+
#toolbar {
|
300 |
+
height: 36px;
|
301 |
+
padding: 12px 16px;
|
302 |
+
position: absolute;
|
303 |
+
z-index: 100;
|
304 |
+
left: 0;
|
305 |
+
right: 0;
|
306 |
+
bottom: 0;
|
307 |
+
border-top: 1px solid #DFDFDF;
|
308 |
+
overflow: hidden;
|
309 |
+
-webkit-box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, 0.1);
|
310 |
+
box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, 0.1);
|
311 |
+
}
|
312 |
+
|
313 |
+
#toolbar .push-right {
|
314 |
+
float: right;
|
315 |
+
}
|
316 |
+
|
317 |
+
.toolbar-div{
|
318 |
+
display: inline-block;
|
319 |
+
vertical-align: top;
|
320 |
+
width: 30%;
|
321 |
+
}
|
322 |
+
|
323 |
+
/******************************************************************************/
|
324 |
+
/******************************** TYPE PICKER ******************************/
|
325 |
+
/******************************************************************************/
|
326 |
+
|
327 |
+
#type-picker {
|
328 |
+
margin: 50px auto;
|
329 |
+
width: 952px;
|
330 |
+
}
|
331 |
+
|
332 |
+
.type-box {
|
333 |
+
float: left;
|
334 |
+
margin: 0 20px 20px 0;
|
335 |
+
border: 1px dashed #ddd;
|
336 |
+
-webkit-box-shadow: 0px 0px 8px #ddd;
|
337 |
+
box-shadow: 0px 0px 8px #ddd;
|
338 |
+
background-color: #efefef;
|
339 |
+
}
|
340 |
+
|
341 |
+
.type-box:nth-child(3n+3) {
|
342 |
+
margin-right: 0px;
|
343 |
+
}
|
344 |
+
|
345 |
+
.type-label {
|
346 |
+
display: block;
|
347 |
+
width: 270px;
|
348 |
+
height: 195px;
|
349 |
+
padding: 15px;
|
350 |
+
background-color: white;
|
351 |
+
background-image: url(../images/chart_types_g.png);
|
352 |
+
background-repeat: no-repeat;
|
353 |
+
background-position: center center;
|
354 |
+
border: 1px solid #e0e0e0;
|
355 |
+
}
|
356 |
+
|
357 |
+
.type-label-selected,
|
358 |
+
.type-label:hover {
|
359 |
+
background-image: url(../images/chart_types.png);
|
360 |
+
}
|
361 |
+
|
362 |
+
.type-box-area .type-label {
|
363 |
+
background-position: 0px -225px;
|
364 |
+
}
|
365 |
+
|
366 |
+
.type-box-line .type-label {
|
367 |
+
background-position: -600px 0px;
|
368 |
+
}
|
369 |
+
|
370 |
+
.type-box-scatter .type-label {
|
371 |
+
background-position: -300px 0px;
|
372 |
+
}
|
373 |
+
|
374 |
+
.type-box-pie .type-label {
|
375 |
+
background-position: 0px 0px;
|
376 |
+
}
|
377 |
+
|
378 |
+
.type-box-gauge .type-label {
|
379 |
+
background-position: 0px -450px;
|
380 |
+
}
|
381 |
+
|
382 |
+
.type-box-geo .type-label {
|
383 |
+
background-position: -600px -450px;
|
384 |
+
}
|
385 |
+
|
386 |
+
.type-box-candlestick .type-label {
|
387 |
+
background-position: -300px -450px;
|
388 |
+
}
|
389 |
+
|
390 |
+
.type-box-bar .type-label {
|
391 |
+
background-position: -300px -225px;
|
392 |
+
}
|
393 |
+
|
394 |
+
.type-box-column .type-label {
|
395 |
+
background-position: -600px -225px;
|
396 |
+
}
|
397 |
+
|
398 |
+
/******************************************************************************/
|
399 |
+
/******************************** OTHER STYLES ******************************/
|
400 |
+
/******************************************************************************/
|
401 |
+
|
402 |
+
#thehole {
|
403 |
+
position: absolute;
|
404 |
+
left: 0;
|
405 |
+
top: 0;
|
406 |
+
width: 1px;
|
407 |
+
height: 1px;
|
408 |
+
border: 0;
|
409 |
+
opacity: 0;
|
410 |
+
-moz-opacity: 0;
|
411 |
+
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
412 |
+
}
|
413 |
+
|
414 |
+
.locker, .locker-loader {
|
415 |
+
left: 0;
|
416 |
+
top: 0;
|
417 |
+
position: absolute;
|
418 |
+
}
|
419 |
+
|
420 |
+
.locker {
|
421 |
+
z-index: 1000;
|
422 |
+
background-color: white;
|
423 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
|
424 |
+
filter: alpha(opacity=80);
|
425 |
+
opacity: 0.8;
|
426 |
+
}
|
427 |
+
|
428 |
+
.locker-loader {
|
429 |
+
z-index: 1001;
|
430 |
+
background: url(../images/ajax-loader.gif) no-repeat center center;
|
431 |
+
}
|
432 |
+
|
433 |
+
.file-wrapper {
|
434 |
+
position: relative;
|
435 |
+
overflow: hidden;
|
436 |
+
}
|
437 |
+
|
438 |
+
.file {
|
439 |
+
font-size: 200px;
|
440 |
+
position: absolute;
|
441 |
+
top: 0;
|
442 |
+
right: 0;
|
443 |
+
opacity: 0;
|
444 |
+
-moz-opacity: 0;
|
445 |
+
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
446 |
+
cursor: pointer;
|
447 |
+
}
|
448 |
+
|
449 |
+
#remote-file {
|
450 |
+
float: right;
|
451 |
+
clear: both;
|
452 |
+
}
|
453 |
+
|
454 |
+
.form-inline {
|
455 |
+
margin: 0 auto;
|
456 |
+
display: table;
|
457 |
+
vertical-align: middle;
|
458 |
+
}
|
459 |
+
|
460 |
+
.computer-btn{
|
461 |
+
color: #646464 !important;
|
462 |
+
border: medium none rgb(100, 100, 100) !important;
|
463 |
+
background: #E6E6E6 url("../images/computer.png") no-repeat scroll 7px 1px !important;
|
464 |
+
padding-left: 27px !important;
|
465 |
+
transition: all 0.3s ease 0s;
|
466 |
+
font-family: "Open Sans",sans-serif;
|
467 |
+
font-weight: 700;
|
468 |
+
border: 1px solid #B0B0B0 !important;
|
469 |
+
box-shadow: none !important;
|
470 |
+
text-shadow:none!important;
|
471 |
+
|
472 |
+
}
|
473 |
+
|
474 |
+
.computer-btn:hover{
|
475 |
+
color: white !important;
|
476 |
+
background: #2f8cea url("../images/computer.png") no-repeat scroll 7px -36px !important;
|
477 |
+
transition: all 0.3s ease 0s;
|
478 |
+
padding-left: 27px !important;
|
479 |
+
-webkit-transition: all .3s ease;
|
480 |
+
-moz-transition: all .3s ease;
|
481 |
+
-ms-transition: all .3s ease;
|
482 |
+
-o-transition: all .3s ease;
|
483 |
+
transition: all .3s ease;
|
484 |
+
box-shadow: 0px 1px 0px rgba(171, 171, 171, 0.5) inset, 0px 1px 0px rgba(0, 0, 0, 0.15) !important;
|
485 |
+
border: 1px solid #2f8cea !important;
|
486 |
+
box-shadow: none !important;
|
487 |
+
|
488 |
+
|
489 |
+
}
|
490 |
+
|
491 |
+
.just-on-pro{
|
492 |
+
background: #FFF url("../images/available_pro.png") no-repeat scroll 0px 1px !important;
|
493 |
+
width: 250px;
|
494 |
+
height: 100px;
|
495 |
+
cursor:not-allowed;
|
496 |
+
opacity: 0.8;
|
497 |
+
margin-bottom: 10px;
|
498 |
+
}
|
499 |
+
|
500 |
+
|
501 |
+
|
502 |
+
.from-web{
|
503 |
+
margin-top: 0px;
|
504 |
+
margin-bottom: 15px !important;
|
505 |
+
}
|
506 |
+
|
507 |
+
.from-web-btn{
|
508 |
+
color: #646464 !important;
|
509 |
+
border: medium none #646464 !important;
|
510 |
+
background: #E6E6E6 url("../images/web.png") no-repeat scroll 7px 1px !important;
|
511 |
+
padding-left: 25px !important;
|
512 |
+
transition: all 0.3s ease 0s;
|
513 |
+
border: 1px solid #B0B0B0 !important;
|
514 |
+
box-shadow: none !important;
|
515 |
+
font-family: "Open Sans",sans-serif;
|
516 |
+
font-weight: 700;
|
517 |
+
margin-left: 2px !important;
|
518 |
+
}
|
519 |
+
|
520 |
+
.from-web-btn:hover{
|
521 |
+
color: white !important;
|
522 |
+
background: #89B158 url("../images/web.png") no-repeat scroll 7px -38px !important;
|
523 |
+
transition: all 0.3s ease 0s;
|
524 |
+
padding-left: 25px !important;
|
525 |
+
-webkit-transition: all .3s ease;
|
526 |
+
-moz-transition: all .3s ease;
|
527 |
+
-ms-transition: all .3s ease;
|
528 |
+
-o-transition: all .3s ease;
|
529 |
+
transition: all .3s ease;
|
530 |
+
margin-left: 2px !important;
|
531 |
+
border: 1px solid #89B158 !important;
|
532 |
+
box-shadow: none !important;
|
533 |
+
}
|
534 |
+
|
535 |
+
.preview{
|
536 |
+
width: 100%;
|
537 |
+
}
|
538 |
+
.from-chart-btn{
|
539 |
+
color: #646464 !important;
|
540 |
+
border: medium none #646464 !important;
|
541 |
+
background: #E6E6E6 url("../images/from_chart.png") no-repeat scroll 7px 1px !important;
|
542 |
+
padding-left: 25px !important;
|
543 |
+
transition: all 0.3s ease 0s;
|
544 |
+
border: 1px solid #B0B0B0 !important;
|
545 |
+
box-shadow: none !important;
|
546 |
+
font-family: "Open Sans",sans-serif;
|
547 |
+
font-weight: 700;
|
548 |
+
margin-left: 2px !important;
|
549 |
+
margin-top: 2px !important;
|
550 |
+
}
|
551 |
+
|
552 |
+
.from-chart-btn:hover{
|
553 |
+
color: white !important;
|
554 |
+
background: #10aecb url("../images/from_chart.png") no-repeat scroll 7px -36px !important;
|
555 |
+
transition: all 0.3s ease 0s;
|
556 |
+
padding-left: 25px !important;
|
557 |
+
-webkit-transition: all .3s ease;
|
558 |
+
-moz-transition: all .3s ease;
|
559 |
+
-ms-transition: all .3s ease;
|
560 |
+
-o-transition: all .3s ease;
|
561 |
+
transition: all .3s ease;
|
562 |
+
margin-left: 2px !important;
|
563 |
+
border: 1px solid #10aecb !important;
|
564 |
+
box-shadow: none !important;
|
565 |
+
margin-top: 2px !important;
|
566 |
+
}
|
567 |
+
|
568 |
+
input#existing-chart {
|
569 |
+
left: 18px;
|
570 |
+
width: 110px;
|
571 |
+
position: relative;
|
572 |
+
}
|
573 |
+
|
574 |
+
select#chart-id {
|
575 |
+
left: 44px;
|
576 |
+
position: relative;
|
577 |
+
width: 120px;
|
578 |
+
}
|
579 |
+
|
580 |
+
button#editor-chart-button {
|
581 |
+
width: 260px;
|
582 |
+
margin: 0 auto;
|
583 |
+
display: block;
|
584 |
+
background-color: #2f8cea !important;
|
585 |
+
color: white !important;
|
586 |
+
border: 1px solid #2c80d6 !important;
|
587 |
+
box-shadow: none !important;
|
588 |
+
-webkit-transition: all .3s ease;
|
589 |
+
-moz-transition: all .3s ease;
|
590 |
+
-ms-transition: all .3s ease;
|
591 |
+
-o-transition: all .3s ease;
|
592 |
+
transition: all .3s ease;
|
593 |
+
text-shadow: none;
|
594 |
+
}
|
595 |
+
|
596 |
+
.preview-btn{
|
597 |
+
font-family: "Open Sans",sans-serif;
|
598 |
+
font-weight: 700;
|
599 |
+
background-color: #2f8cea !important;
|
600 |
+
color: white !important;
|
601 |
+
border: 1px solid #2c80d6 !important;
|
602 |
+
box-shadow: none !important;
|
603 |
+
-webkit-transition: all .3s ease;
|
604 |
+
-moz-transition: all .3s ease;
|
605 |
+
-ms-transition: all .3s ease;
|
606 |
+
-o-transition: all .3s ease;
|
607 |
+
transition: all .3s ease;
|
608 |
+
}
|
609 |
+
|
610 |
+
.preview-btn:hover{
|
611 |
+
font-family: "Open Sans",sans-serif;
|
612 |
+
font-weight: 700;
|
613 |
+
background-color: #2c80d6 !important;
|
614 |
+
color: white !important;
|
615 |
+
border: 1px solid #2c80d6 !important;
|
616 |
+
box-shadow: none !important;
|
617 |
+
-webkit-transition: all .3s ease;
|
618 |
+
-moz-transition: all .3s ease;
|
619 |
+
-ms-transition: all .3s ease;
|
620 |
+
-o-transition: all .3s ease;
|
621 |
+
transition: all .3s ease;
|
622 |
+
}
|
623 |
+
|
624 |
+
.show-live-btn{
|
625 |
+
margin-top: 15px !important;
|
626 |
+
width: 100%;
|
627 |
+
background-color: #F90 !important;
|
628 |
+
border-color: #E98B00 !important;
|
629 |
+
font-family: "Open Sans",sans-serif;
|
630 |
+
font-weight: 700;
|
631 |
+
box-shadow: none !important;
|
632 |
+
}
|
633 |
+
|
634 |
+
|
635 |
+
.show-live-btn:hover{
|
636 |
+
margin-top: 15px !important;
|
637 |
+
width: 100%;
|
638 |
+
background-color: #ea8c00 !important;
|
639 |
+
border-color: #E98B00 !important;
|
640 |
+
font-family: "Open Sans",sans-serif;
|
641 |
+
font-weight: 700;
|
642 |
+
box-shadow: none !important;
|
643 |
+
-webkit-transition: all .3s ease;
|
644 |
+
-moz-transition: all .3s ease;
|
645 |
+
-ms-transition: all .3s ease;
|
646 |
+
-o-transition: all .3s ease;
|
647 |
+
transition: all .3s ease;
|
648 |
+
}
|
649 |
+
|
650 |
+
.check-pro-btn {
|
651 |
+
height: 40px;
|
652 |
+
width: 245px;
|
653 |
+
display: block;
|
654 |
+
margin: 0 auto;
|
655 |
+
}
|
656 |
+
|
657 |
+
.advanced-settings-btn, .return-settings-btn {
|
658 |
+
cursor: pointer;
|
659 |
+
display: block;
|
660 |
+
margin: 0 auto;
|
661 |
+
width: 260px;
|
662 |
+
line-height: 34px;
|
663 |
+
font-size: 17px;
|
664 |
+
width: 260px;
|
665 |
+
height: auto;
|
666 |
+
-webkit-border-radius: 3px;
|
667 |
+
-moz-border-radius: 3px;
|
668 |
+
border-radius: 3px;
|
669 |
+
margin-bottom: 20px;
|
670 |
+
margin-top:5px;
|
671 |
+
}
|
672 |
+
|
673 |
+
.return-settings-btn {
|
674 |
+
margin: 10px auto;
|
675 |
+
}
|
676 |
+
|
677 |
+
.hidden-setting {
|
678 |
+
display:none;
|
679 |
+
}
|
680 |
+
|
681 |
+
|
682 |
+
|
683 |
+
/* ====== RESPONSIVE ====== */
|
684 |
+
|
685 |
+
|
686 |
+
@media (max-width: 1366px) {
|
687 |
+
.group-title {
|
688 |
+
padding: 4px 20px;
|
689 |
+
font-weight: 400;
|
690 |
+
font-size: 14px;
|
691 |
+
}
|
692 |
+
.group-title::after {
|
693 |
+
top: 10px;
|
694 |
+
}
|
695 |
+
#rate-stars {
|
696 |
+
margin: 3px 0 10px 40%;
|
697 |
+
}
|
698 |
+
.rate-the-plugin {
|
699 |
+
margin-left: -8%;
|
700 |
+
}
|
701 |
+
|
702 |
+
|
703 |
+
|
704 |
+
}
|
css/library.css
CHANGED
@@ -1,145 +1,145 @@
|
|
1 |
-
#visualizer-icon {
|
2 |
-
background-image: url('../images/icon.png');
|
3 |
-
}
|
4 |
-
|
5 |
-
.visualizer-clearfix {
|
6 |
-
*zoom: 1;
|
7 |
-
}
|
8 |
-
|
9 |
-
.visualizer-clearfix:before,
|
10 |
-
.visualizer-clearfix:after {
|
11 |
-
display: table;
|
12 |
-
line-height: 0;
|
13 |
-
content: "";
|
14 |
-
}
|
15 |
-
|
16 |
-
.visualizer-clearfix:after {
|
17 |
-
clear: both;
|
18 |
-
}
|
19 |
-
|
20 |
-
#visualizer-types {
|
21 |
-
margin: 20px 0 10px;
|
22 |
-
}
|
23 |
-
|
24 |
-
#visualizer-library {
|
25 |
-
margin: 20px 0;
|
26 |
-
}
|
27 |
-
|
28 |
-
.loader {
|
29 |
-
position: absolute;
|
30 |
-
left: 50%;
|
31 |
-
top: 50%;
|
32 |
-
margin-left: -16px;
|
33 |
-
margin-top: -16px;
|
34 |
-
}
|
35 |
-
|
36 |
-
.visualizer-chart {
|
37 |
-
float: left;
|
38 |
-
padding: 5px;
|
39 |
-
margin: 0 24px 24px 0;
|
40 |
-
border: 1px solid #ddd;
|
41 |
-
-webkit-box-shadow: 0px 0px 8px #ddd;
|
42 |
-
box-shadow: 0px 0px 8px #ddd;
|
43 |
-
background-color: #efefef;
|
44 |
-
display: none;
|
45 |
-
}
|
46 |
-
|
47 |
-
.visualizer-chart-canvas {
|
48 |
-
border: 1px solid #ddd;
|
49 |
-
background-color: white;
|
50 |
-
position: relative;
|
51 |
-
width: 30%;
|
52 |
-
height: 18.75%;
|
53 |
-
}
|
54 |
-
|
55 |
-
.visualizer-nochart-canvas {
|
56 |
-
background-image: url('../images/notfound.png?v=4');
|
57 |
-
background-repeat: repeat;
|
58 |
-
}
|
59 |
-
|
60 |
-
.visualizer-notfound {
|
61 |
-
text-align: center;
|
62 |
-
font-weight: bold;
|
63 |
-
font-size: 14px;
|
64 |
-
margin-top: -7px;
|
65 |
-
position: absolute;
|
66 |
-
top: 50%;
|
67 |
-
left: 0;
|
68 |
-
right: 0;
|
69 |
-
}
|
70 |
-
|
71 |
-
.visualizer-chart-action {
|
72 |
-
float: right;
|
73 |
-
display: block;
|
74 |
-
height: 16px;
|
75 |
-
width: 16px;
|
76 |
-
background-repeat: no-repeat;
|
77 |
-
background-image: url('../images/ui-icons.png');
|
78 |
-
margin: 2px 5px 0;
|
79 |
-
}
|
80 |
-
|
81 |
-
.visualizer-nochart-delete,
|
82 |
-
.visualizer-chart-delete {
|
83 |
-
background-position: -176px -96px;
|
84 |
-
}
|
85 |
-
|
86 |
-
.visualizer-nochart-clone,
|
87 |
-
.visualizer-chart-clone {
|
88 |
-
background-position: -176px -128px;
|
89 |
-
}
|
90 |
-
|
91 |
-
.visualizer-nochart-edit,
|
92 |
-
.visualizer-chart-edit {
|
93 |
-
background-position: -64px -112px;
|
94 |
-
}
|
95 |
-
|
96 |
-
.visualizer-nochart-clone,
|
97 |
-
.visualizer-nochart-delete,
|
98 |
-
.visualizer-nochart-edit {
|
99 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
100 |
-
filter: alpha(opacity=50);
|
101 |
-
opacity: 0.5
|
102 |
-
}
|
103 |
-
|
104 |
-
.visualizer-chart-footer {
|
105 |
-
margin-top: 4px;
|
106 |
-
}
|
107 |
-
|
108 |
-
.visualizer-chart-shortcode {
|
109 |
-
color: #aaa;
|
110 |
-
text-shadow: 0 1px 0 #fff;
|
111 |
-
cursor: pointer;
|
112 |
-
padding: 3px 0;
|
113 |
-
}
|
114 |
-
|
115 |
-
.visualizer-chart-shortcode::selection,
|
116 |
-
.visualizer-chart-shortcode::-moz-selection {
|
117 |
-
background-color: #a8d1ff;
|
118 |
-
color: black;
|
119 |
-
text-shadow: none;
|
120 |
-
}
|
121 |
-
|
122 |
-
.visualizer-list-item {
|
123 |
-
float: left;
|
124 |
-
margin-right: 20px;
|
125 |
-
}
|
126 |
-
|
127 |
-
.page-numbers {
|
128 |
-
padding: 5px 10px;
|
129 |
-
background-color: #aaa;
|
130 |
-
color: white !important;
|
131 |
-
text-decoration: none;
|
132 |
-
border-radius: 2px;
|
133 |
-
box-shadow: 0 0 5px #ccc;
|
134 |
-
font-weight: bold;
|
135 |
-
}
|
136 |
-
|
137 |
-
.page-numbers.current,
|
138 |
-
a.page-numbers:hover {
|
139 |
-
background-color: lightcoral;
|
140 |
-
box-shadow: 0 0 5px lightpink;
|
141 |
-
}
|
142 |
-
|
143 |
-
.visualizer-library-pagination {
|
144 |
-
display: none;
|
145 |
}
|
1 |
+
#visualizer-icon {
|
2 |
+
background-image: url('../images/icon.png');
|
3 |
+
}
|
4 |
+
|
5 |
+
.visualizer-clearfix {
|
6 |
+
*zoom: 1;
|
7 |
+
}
|
8 |
+
|
9 |
+
.visualizer-clearfix:before,
|
10 |
+
.visualizer-clearfix:after {
|
11 |
+
display: table;
|
12 |
+
line-height: 0;
|
13 |
+
content: "";
|
14 |
+
}
|
15 |
+
|
16 |
+
.visualizer-clearfix:after {
|
17 |
+
clear: both;
|
18 |
+
}
|
19 |
+
|
20 |
+
#visualizer-types {
|
21 |
+
margin: 20px 0 10px;
|
22 |
+
}
|
23 |
+
|
24 |
+
#visualizer-library {
|
25 |
+
margin: 20px 0;
|
26 |
+
}
|
27 |
+
|
28 |
+
.loader {
|
29 |
+
position: absolute;
|
30 |
+
left: 50%;
|
31 |
+
top: 50%;
|
32 |
+
margin-left: -16px;
|
33 |
+
margin-top: -16px;
|
34 |
+
}
|
35 |
+
|
36 |
+
.visualizer-chart {
|
37 |
+
float: left;
|
38 |
+
padding: 5px;
|
39 |
+
margin: 0 24px 24px 0;
|
40 |
+
border: 1px solid #ddd;
|
41 |
+
-webkit-box-shadow: 0px 0px 8px #ddd;
|
42 |
+
box-shadow: 0px 0px 8px #ddd;
|
43 |
+
background-color: #efefef;
|
44 |
+
display: none;
|
45 |
+
}
|
46 |
+
|
47 |
+
.visualizer-chart-canvas {
|
48 |
+
border: 1px solid #ddd;
|
49 |
+
background-color: white;
|
50 |
+
position: relative;
|
51 |
+
width: 30%;
|
52 |
+
height: 18.75%;
|
53 |
+
}
|
54 |
+
|
55 |
+
.visualizer-nochart-canvas {
|
56 |
+
background-image: url('../images/notfound.png?v=4');
|
57 |
+
background-repeat: repeat;
|
58 |
+
}
|
59 |
+
|
60 |
+
.visualizer-notfound {
|
61 |
+
text-align: center;
|
62 |
+
font-weight: bold;
|
63 |
+
font-size: 14px;
|
64 |
+
margin-top: -7px;
|
65 |
+
position: absolute;
|
66 |
+
top: 50%;
|
67 |
+
left: 0;
|
68 |
+
right: 0;
|
69 |
+
}
|
70 |
+
|
71 |
+
.visualizer-chart-action {
|
72 |
+
float: right;
|
73 |
+
display: block;
|
74 |
+
height: 16px;
|
75 |
+
width: 16px;
|
76 |
+
background-repeat: no-repeat;
|
77 |
+
background-image: url('../images/ui-icons.png');
|
78 |
+
margin: 2px 5px 0;
|
79 |
+
}
|
80 |
+
|
81 |
+
.visualizer-nochart-delete,
|
82 |
+
.visualizer-chart-delete {
|
83 |
+
background-position: -176px -96px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.visualizer-nochart-clone,
|
87 |
+
.visualizer-chart-clone {
|
88 |
+
background-position: -176px -128px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.visualizer-nochart-edit,
|
92 |
+
.visualizer-chart-edit {
|
93 |
+
background-position: -64px -112px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.visualizer-nochart-clone,
|
97 |
+
.visualizer-nochart-delete,
|
98 |
+
.visualizer-nochart-edit {
|
99 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
100 |
+
filter: alpha(opacity=50);
|
101 |
+
opacity: 0.5
|
102 |
+
}
|
103 |
+
|
104 |
+
.visualizer-chart-footer {
|
105 |
+
margin-top: 4px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.visualizer-chart-shortcode {
|
109 |
+
color: #aaa;
|
110 |
+
text-shadow: 0 1px 0 #fff;
|
111 |
+
cursor: pointer;
|
112 |
+
padding: 3px 0;
|
113 |
+
}
|
114 |
+
|
115 |
+
.visualizer-chart-shortcode::selection,
|
116 |
+
.visualizer-chart-shortcode::-moz-selection {
|
117 |
+
background-color: #a8d1ff;
|
118 |
+
color: black;
|
119 |
+
text-shadow: none;
|
120 |
+
}
|
121 |
+
|
122 |
+
.visualizer-list-item {
|
123 |
+
float: left;
|
124 |
+
margin-right: 20px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.page-numbers {
|
128 |
+
padding: 5px 10px;
|
129 |
+
background-color: #aaa;
|
130 |
+
color: white !important;
|
131 |
+
text-decoration: none;
|
132 |
+
border-radius: 2px;
|
133 |
+
box-shadow: 0 0 5px #ccc;
|
134 |
+
font-weight: bold;
|
135 |
+
}
|
136 |
+
|
137 |
+
.page-numbers.current,
|
138 |
+
a.page-numbers:hover {
|
139 |
+
background-color: lightcoral;
|
140 |
+
box-shadow: 0 0 5px lightpink;
|
141 |
+
}
|
142 |
+
|
143 |
+
.visualizer-library-pagination {
|
144 |
+
display: none;
|
145 |
}
|
css/media.css
CHANGED
@@ -1,152 +1,152 @@
|
|
1 |
-
#visualizer-library-view {
|
2 |
-
padding: 30px 10px 10px 30px;
|
3 |
-
}
|
4 |
-
|
5 |
-
.visualizer-library-filters {
|
6 |
-
margin-top: 18px !important;
|
7 |
-
margin-left: 14px !important;
|
8 |
-
}
|
9 |
-
|
10 |
-
.visualizer-clearfix {
|
11 |
-
*zoom: 1;
|
12 |
-
}
|
13 |
-
|
14 |
-
.visualizer-clearfix:before,
|
15 |
-
.visualizer-clearfix:after {
|
16 |
-
display: table;
|
17 |
-
line-height: 0;
|
18 |
-
content: "";
|
19 |
-
}
|
20 |
-
|
21 |
-
.visualizer-clearfix:after {
|
22 |
-
clear: both;
|
23 |
-
}
|
24 |
-
|
25 |
-
.visualizer-library-chart {
|
26 |
-
float: left;
|
27 |
-
margin: 0 20px 20px 0;
|
28 |
-
padding: 5px;
|
29 |
-
border: 1px solid #ddd;
|
30 |
-
-webkit-box-shadow: 0px 0px 8px #ddd;
|
31 |
-
box-shadow: 0px 0px 8px #ddd;
|
32 |
-
background-color: #efefef;
|
33 |
-
}
|
34 |
-
|
35 |
-
.visualizer-library-chart-canvas {
|
36 |
-
height: 187px;
|
37 |
-
width: 250px;
|
38 |
-
border: 1px solid #ddd;
|
39 |
-
background-color: white;
|
40 |
-
background-image: url('../images/ajax-loader.gif');
|
41 |
-
background-position: center center;
|
42 |
-
background-repeat: no-repeat;
|
43 |
-
}
|
44 |
-
|
45 |
-
.visualizer-library-nochart-canvas {
|
46 |
-
background-image: url('../images/notfound.png?v=4');
|
47 |
-
background-repeat: repeat;
|
48 |
-
position: relative;
|
49 |
-
}
|
50 |
-
|
51 |
-
.visualizer-library-notfound {
|
52 |
-
text-align: center;
|
53 |
-
font-weight: bold;
|
54 |
-
font-size: 14px;
|
55 |
-
margin-top: -7px;
|
56 |
-
position: absolute;
|
57 |
-
top: 50%;
|
58 |
-
left: 0;
|
59 |
-
right: 0;
|
60 |
-
}
|
61 |
-
|
62 |
-
.visualizer-library-chart-action {
|
63 |
-
float: right;
|
64 |
-
display: block;
|
65 |
-
height: 16px;
|
66 |
-
width: 16px;
|
67 |
-
background-repeat: no-repeat;
|
68 |
-
background-image: url('../images/ui-icons.png');
|
69 |
-
margin: 2px 5px 0;
|
70 |
-
}
|
71 |
-
|
72 |
-
.visualizer-library-nochart-delete,
|
73 |
-
.visualizer-library-chart-delete {
|
74 |
-
background-position: -176px -96px;
|
75 |
-
}
|
76 |
-
|
77 |
-
.visualizer-library-nochart-insert,
|
78 |
-
.visualizer-library-chart-insert {
|
79 |
-
background-position: -48px -48px;
|
80 |
-
}
|
81 |
-
|
82 |
-
.visualizer-library-nochart-delete,
|
83 |
-
.visualizer-library-nochart-insert {
|
84 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
85 |
-
filter: alpha(opacity=50);
|
86 |
-
opacity: 0.5
|
87 |
-
}
|
88 |
-
|
89 |
-
.visualizer-library-chart-footer {
|
90 |
-
margin-top: 4px;
|
91 |
-
}
|
92 |
-
|
93 |
-
.visualizer-library-chart-shortcode {
|
94 |
-
color: #aaa;
|
95 |
-
text-shadow: 0 1px 0 #fff;
|
96 |
-
cursor: pointer;
|
97 |
-
padding: 3px 0;
|
98 |
-
}
|
99 |
-
|
100 |
-
.visualizer-library-chart-shortcode::selection,
|
101 |
-
.visualizer-library-chart-shortcode::-moz-selection {
|
102 |
-
background-color: #a8d1ff;
|
103 |
-
color: black;
|
104 |
-
text-shadow: none;
|
105 |
-
}
|
106 |
-
|
107 |
-
#visualizer-library-pagination {
|
108 |
-
margin-right: 30px;
|
109 |
-
}
|
110 |
-
|
111 |
-
.visualizer-library-pagination-item {
|
112 |
-
float: left;
|
113 |
-
margin-left: 20px;
|
114 |
-
margin-top: 10px;
|
115 |
-
}
|
116 |
-
|
117 |
-
.visualizer-library-pagination-page {
|
118 |
-
padding: 5px 10px;
|
119 |
-
background-color: #aaa;
|
120 |
-
color: white !important;
|
121 |
-
text-decoration: none;
|
122 |
-
border-radius: 2px;
|
123 |
-
box-shadow: 0 0 5px #ccc;
|
124 |
-
font-weight: bold;
|
125 |
-
}
|
126 |
-
|
127 |
-
.visualizer-library-pagination-active > .visualizer-library-pagination-page,
|
128 |
-
a.visualizer-library-pagination-page:hover {
|
129 |
-
background-color: lightcoral;
|
130 |
-
box-shadow: 0 0 5px lightpink;
|
131 |
-
}
|
132 |
-
|
133 |
-
.locker, .locker-loader {
|
134 |
-
left: 0;
|
135 |
-
top: 0;
|
136 |
-
width: 100%;
|
137 |
-
height: 100%;
|
138 |
-
position: absolute;
|
139 |
-
}
|
140 |
-
|
141 |
-
.locker {
|
142 |
-
z-index: 1000;
|
143 |
-
background-color: white;
|
144 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
|
145 |
-
filter: alpha(opacity=80);
|
146 |
-
opacity: 0.8;
|
147 |
-
}
|
148 |
-
|
149 |
-
.locker-loader {
|
150 |
-
z-index: 1001;
|
151 |
-
background: url(../images/ajax-loader.gif) no-repeat center center;
|
152 |
}
|
1 |
+
#visualizer-library-view {
|
2 |
+
padding: 30px 10px 10px 30px;
|
3 |
+
}
|
4 |
+
|
5 |
+
.visualizer-library-filters {
|
6 |
+
margin-top: 18px !important;
|
7 |
+
margin-left: 14px !important;
|
8 |
+
}
|
9 |
+
|
10 |
+
.visualizer-clearfix {
|
11 |
+
*zoom: 1;
|
12 |
+
}
|
13 |
+
|
14 |
+
.visualizer-clearfix:before,
|
15 |
+
.visualizer-clearfix:after {
|
16 |
+
display: table;
|
17 |
+
line-height: 0;
|
18 |
+
content: "";
|
19 |
+
}
|
20 |
+
|
21 |
+
.visualizer-clearfix:after {
|
22 |
+
clear: both;
|
23 |
+
}
|
24 |
+
|
25 |
+
.visualizer-library-chart {
|
26 |
+
float: left;
|
27 |
+
margin: 0 20px 20px 0;
|
28 |
+
padding: 5px;
|
29 |
+
border: 1px solid #ddd;
|
30 |
+
-webkit-box-shadow: 0px 0px 8px #ddd;
|
31 |
+
box-shadow: 0px 0px 8px #ddd;
|
32 |
+
background-color: #efefef;
|
33 |
+
}
|
34 |
+
|
35 |
+
.visualizer-library-chart-canvas {
|
36 |
+
height: 187px;
|
37 |
+
width: 250px;
|
38 |
+
border: 1px solid #ddd;
|
39 |
+
background-color: white;
|
40 |
+
background-image: url('../images/ajax-loader.gif');
|
41 |
+
background-position: center center;
|
42 |
+
background-repeat: no-repeat;
|
43 |
+
}
|
44 |
+
|
45 |
+
.visualizer-library-nochart-canvas {
|
46 |
+
background-image: url('../images/notfound.png?v=4');
|
47 |
+
background-repeat: repeat;
|
48 |
+
position: relative;
|
49 |
+
}
|
50 |
+
|
51 |
+
.visualizer-library-notfound {
|
52 |
+
text-align: center;
|
53 |
+
font-weight: bold;
|
54 |
+
font-size: 14px;
|
55 |
+
margin-top: -7px;
|
56 |
+
position: absolute;
|
57 |
+
top: 50%;
|
58 |
+
left: 0;
|
59 |
+
right: 0;
|
60 |
+
}
|
61 |
+
|
62 |
+
.visualizer-library-chart-action {
|
63 |
+
float: right;
|
64 |
+
display: block;
|
65 |
+
height: 16px;
|
66 |
+
width: 16px;
|
67 |
+
background-repeat: no-repeat;
|
68 |
+
background-image: url('../images/ui-icons.png');
|
69 |
+
margin: 2px 5px 0;
|
70 |
+
}
|
71 |
+
|
72 |
+
.visualizer-library-nochart-delete,
|
73 |
+
.visualizer-library-chart-delete {
|
74 |
+
background-position: -176px -96px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.visualizer-library-nochart-insert,
|
78 |
+
.visualizer-library-chart-insert {
|
79 |
+
background-position: -48px -48px;
|
80 |
+
}
|
81 |
+
|
82 |
+
.visualizer-library-nochart-delete,
|
83 |
+
.visualizer-library-nochart-insert {
|
84 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
85 |
+
filter: alpha(opacity=50);
|
86 |
+
opacity: 0.5
|
87 |
+
}
|
88 |
+
|
89 |
+
.visualizer-library-chart-footer {
|
90 |
+
margin-top: 4px;
|
91 |
+
}
|
92 |
+
|
93 |
+
.visualizer-library-chart-shortcode {
|
94 |
+
color: #aaa;
|
95 |
+
text-shadow: 0 1px 0 #fff;
|
96 |
+
cursor: pointer;
|
97 |
+
padding: 3px 0;
|
98 |
+
}
|
99 |
+
|
100 |
+
.visualizer-library-chart-shortcode::selection,
|
101 |
+
.visualizer-library-chart-shortcode::-moz-selection {
|
102 |
+
background-color: #a8d1ff;
|
103 |
+
color: black;
|
104 |
+
text-shadow: none;
|
105 |
+
}
|
106 |
+
|
107 |
+
#visualizer-library-pagination {
|
108 |
+
margin-right: 30px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.visualizer-library-pagination-item {
|
112 |
+
float: left;
|
113 |
+
margin-left: 20px;
|
114 |
+
margin-top: 10px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.visualizer-library-pagination-page {
|
118 |
+
padding: 5px 10px;
|
119 |
+
background-color: #aaa;
|
120 |
+
color: white !important;
|
121 |
+
text-decoration: none;
|
122 |
+
border-radius: 2px;
|
123 |
+
box-shadow: 0 0 5px #ccc;
|
124 |
+
font-weight: bold;
|
125 |
+
}
|
126 |
+
|
127 |
+
.visualizer-library-pagination-active > .visualizer-library-pagination-page,
|
128 |
+
a.visualizer-library-pagination-page:hover {
|
129 |
+
background-color: lightcoral;
|
130 |
+
box-shadow: 0 0 5px lightpink;
|
131 |
+
}
|
132 |
+
|
133 |
+
.locker, .locker-loader {
|
134 |
+
left: 0;
|
135 |
+
top: 0;
|
136 |
+
width: 100%;
|
137 |
+
height: 100%;
|
138 |
+
position: absolute;
|
139 |
+
}
|
140 |
+
|
141 |
+
.locker {
|
142 |
+
z-index: 1000;
|
143 |
+
background-color: white;
|
144 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
|
145 |
+
filter: alpha(opacity=80);
|
146 |
+
opacity: 0.8;
|
147 |
+
}
|
148 |
+
|
149 |
+
.locker-loader {
|
150 |
+
z-index: 1001;
|
151 |
+
background: url(../images/ajax-loader.gif) no-repeat center center;
|
152 |
}
|
humans.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
/* TEAM */
|
2 |
-
Chef: Eugene Manuilov
|
3 |
-
Contact: eugene@manuilov.org
|
4 |
-
From: Kyiv, Ukraine
|
5 |
-
|
6 |
-
/* THANKS */
|
7 |
-
|
8 |
-
/* PLUGIN */
|
9 |
-
Created: 2013
|
10 |
-
Components: jQuery, Backbone.js, Underscore.js, Google Visualization API
|
11 |
-
IDE: NetBeans IDE 7.3.1 (Ubuntu)
|
12 |
VCS: Git (Bitbucket.org)
|
1 |
+
/* TEAM */
|
2 |
+
Chef: Eugene Manuilov
|
3 |
+
Contact: eugene@manuilov.org
|
4 |
+
From: Kyiv, Ukraine
|
5 |
+
|
6 |
+
/* THANKS */
|
7 |
+
|
8 |
+
/* PLUGIN */
|
9 |
+
Created: 2013
|
10 |
+
Components: jQuery, Backbone.js, Underscore.js, Google Visualization API
|
11 |
+
IDE: NetBeans IDE 7.3.1 (Ubuntu)
|
12 |
VCS: Git (Bitbucket.org)
|
images/ajax-loader.gif
CHANGED
Binary file
|
images/available_pro.png
ADDED
Binary file
|
images/computer.png
ADDED
Binary file
|
images/from_chart.png
ADDED
Binary file
|
images/star.png
CHANGED
Binary file
|
images/view24(2).png
ADDED
Binary file
|
images/web.png
ADDED
Binary file
|
index.php
CHANGED
@@ -1,102 +1,127 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Visualizer: Charts and Graphs
|
4 |
-
Plugin URI: https://
|
5 |
-
Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
|
6 |
-
Version: 1.
|
7 |
-
Author: Themeisle
|
8 |
-
Author URI: http://themeisle.com
|
9 |
-
|
10 |
-
License:
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
//
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
//
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
*
|
53 |
-
*
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Visualizer: Charts and Graphs
|
4 |
+
Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs/
|
5 |
+
Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
|
6 |
+
Version: 1.5.3
|
7 |
+
Author: Themeisle
|
8 |
+
Author URI: http://themeisle.com
|
9 |
+
License: GPL v2.0 or later
|
10 |
+
License URI: http://www.opensource.org/licenses/gpl-license.php
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
// +----------------------------------------------------------------------+
|
15 |
+
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) |
|
16 |
+
// +----------------------------------------------------------------------+
|
17 |
+
// | This program is free software; you can redistribute it and/or modify |
|
18 |
+
// | it under the terms of the GNU General Public License, version 2, as |
|
19 |
+
// | published by the Free Software Foundation. |
|
20 |
+
// | |
|
21 |
+
// | This program is distributed in the hope that it will be useful, |
|
22 |
+
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
23 |
+
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
24 |
+
// | GNU General Public License for more details. |
|
25 |
+
// | |
|
26 |
+
// | You should have received a copy of the GNU General Public License |
|
27 |
+
// | along with this program; if not, write to the Free Software |
|
28 |
+
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
|
29 |
+
// | MA 02110-1301 USA |
|
30 |
+
// +----------------------------------------------------------------------+
|
31 |
+
// | Author: Eugene Manuilov <eugene@manuilov.org> |
|
32 |
+
// +----------------------------------------------------------------------+
|
33 |
+
|
34 |
+
// prevent direct access to the plugin folder
|
35 |
+
if ( !defined( 'ABSPATH' ) ) {
|
36 |
+
header( 'HTTP/1.0 404 Not Found', true, 404 );
|
37 |
+
exit;
|
38 |
+
}
|
39 |
+
|
40 |
+
// don't load the plugin, if it has been already loaded
|
41 |
+
if ( class_exists( 'Visualizer_Plugin', false ) ) {
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
|
45 |
+
// Added by Ash/Upwork
|
46 |
+
if ( class_exists( 'Visualizer_Pro', false ) ){
|
47 |
+
define( 'Visualizer_Pro', true);
|
48 |
+
}
|
49 |
+
// Added by Ash/Upwork
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Automatically loads classes for the plugin. Checks a namespace and loads only
|
53 |
+
* approved classes.
|
54 |
+
*
|
55 |
+
* @since 1.0.0
|
56 |
+
*
|
57 |
+
* @param string $class The class name to autoload.
|
58 |
+
* @return boolean Returns TRUE if the class is located. Otherwise FALSE.
|
59 |
+
*/
|
60 |
+
function visualizer_autoloader( $class ) {
|
61 |
+
$namespaces = array( 'Visualizer' );
|
62 |
+
foreach ( $namespaces as $namespace ) {
|
63 |
+
if ( substr( $class, 0, strlen( $namespace ) ) == $namespace ) {
|
64 |
+
$filename = dirname( __FILE__ ) . str_replace( '_', DIRECTORY_SEPARATOR, "_classes_{$class}.php" );
|
65 |
+
if ( is_readable( $filename ) ) {
|
66 |
+
require $filename;
|
67 |
+
return true;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Instantiates the plugin and setup all modules.
|
77 |
+
*
|
78 |
+
* @since 1.0.0
|
79 |
+
*/
|
80 |
+
function visualizer_launch() {
|
81 |
+
// setup environment
|
82 |
+
define( 'VISUALIZER_BASEFILE', __FILE__ );
|
83 |
+
define( 'VISUALIZER_ABSURL', plugins_url( '/', __FILE__ ) );
|
84 |
+
define( 'VISUALIZER_ABSPATH', dirname( __FILE__ ) );
|
85 |
+
|
86 |
+
if ( !defined( 'VISUALIZER_CSV_DELIMITER' ) ) {
|
87 |
+
define( 'VISUALIZER_CSV_DELIMITER', ',' );
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( !defined( 'VISUALIZER_CSV_ENCLOSURE' ) ) {
|
91 |
+
define( 'VISUALIZER_CSV_ENCLOSURE', '"' );
|
92 |
+
}
|
93 |
+
|
94 |
+
// don't load the plugin if cron job is running or doing autosave
|
95 |
+
$doing_autosave = defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE;
|
96 |
+
$doing_cron = defined( 'DOING_CRON' ) && DOING_CRON;
|
97 |
+
$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
|
98 |
+
if ( $doing_autosave || $doing_cron ) {
|
99 |
+
return;
|
100 |
+
}
|
101 |
+
|
102 |
+
// instantiate the plugin
|
103 |
+
$plugin = Visualizer_Plugin::instance();
|
104 |
+
|
105 |
+
// set general modules
|
106 |
+
$plugin->setModule( Visualizer_Module_Setup::NAME );
|
107 |
+
$plugin->setModule( Visualizer_Module_Sources::NAME );
|
108 |
+
|
109 |
+
if ( $doing_ajax ) {
|
110 |
+
// set ajax modules
|
111 |
+
$plugin->setModule( Visualizer_Module_Chart::NAME );
|
112 |
+
} else {
|
113 |
+
if ( is_admin() ) {
|
114 |
+
// set admin modules
|
115 |
+
$plugin->setModule( Visualizer_Module_Admin::NAME );
|
116 |
+
} else {
|
117 |
+
// set frontend modules
|
118 |
+
$plugin->setModule( Visualizer_Module_Frontend::NAME );
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
// register autoloader function
|
124 |
+
spl_autoload_register( 'visualizer_autoloader' );
|
125 |
+
|
126 |
+
// launch the plugin
|
127 |
+
visualizer_launch();
|
js/frame.js
CHANGED
@@ -1,104 +1,124 @@
|
|
1 |
-
(function($) {
|
2 |
-
$(document).ready(function() {
|
3 |
-
$('.type-radio').change(function() {
|
4 |
-
$('.type-label-selected').removeClass('type-label-selected');
|
5 |
-
$(this).parent().addClass('type-label-selected');
|
6 |
-
});
|
7 |
-
|
8 |
-
$('.group-title').click(function() {
|
9 |
-
var parent = $(this).parent();
|
10 |
-
|
11 |
-
if (parent.hasClass('open')) {
|
12 |
-
parent.removeClass('open');
|
13 |
-
} else {
|
14 |
-
$('.group.open').removeClass('open');
|
15 |
-
parent.addClass('open');
|
16 |
-
}
|
17 |
-
});
|
18 |
-
|
19 |
-
$('#remote-file').click(function() {
|
20 |
-
var url = $.trim(prompt(visualizer.l10n.remotecsv_prompt));
|
21 |
-
|
22 |
-
if (url != '') {
|
23 |
-
if(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(url)) {
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
});
|
45 |
-
|
46 |
-
$('
|
47 |
-
$(
|
48 |
-
});
|
49 |
-
|
50 |
-
$('.
|
51 |
-
$(this).parent().find('.section-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
$
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
$(this)
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
$(document).ready(function() {
|
3 |
+
$('.type-radio').change(function() {
|
4 |
+
$('.type-label-selected').removeClass('type-label-selected');
|
5 |
+
$(this).parent().addClass('type-label-selected');
|
6 |
+
});
|
7 |
+
|
8 |
+
$('.group-title').click(function() {
|
9 |
+
var parent = $(this).parent();
|
10 |
+
|
11 |
+
if (parent.hasClass('open')) {
|
12 |
+
parent.removeClass('open');
|
13 |
+
} else {
|
14 |
+
$('.group.open').removeClass('open');
|
15 |
+
parent.addClass('open');
|
16 |
+
}
|
17 |
+
});
|
18 |
+
|
19 |
+
$('#remote-file').click(function() {
|
20 |
+
var url = $.trim(prompt(visualizer.l10n.remotecsv_prompt));
|
21 |
+
|
22 |
+
if (url != '') {
|
23 |
+
if (/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(url)) {
|
24 |
+
if (url.substr(url.length - 8) == '/pubhtml') {
|
25 |
+
url = url.substring(0, url.length - 8) + '/export?format=csv';
|
26 |
+
}
|
27 |
+
|
28 |
+
$('#remote-data').val(url);
|
29 |
+
$('#csv-file').val('');
|
30 |
+
$('#canvas').lock();
|
31 |
+
$('#csv-form').submit();
|
32 |
+
} else {
|
33 |
+
alert(visualizer.l10n.invalid_source);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
});
|
37 |
+
|
38 |
+
$('#csv-file').change(function() {
|
39 |
+
if ($.trim($(this).val()) != '') {
|
40 |
+
$('#remote-data').val('');
|
41 |
+
$('#canvas').lock();
|
42 |
+
$('#csv-form').submit();
|
43 |
+
}
|
44 |
+
});
|
45 |
+
|
46 |
+
$('#thehole').load(function() {
|
47 |
+
$('#canvas').unlock();
|
48 |
+
});
|
49 |
+
|
50 |
+
$('.section-title').click(function() {
|
51 |
+
$(this).toggleClass('open').parent().find('.section-items').toggle();
|
52 |
+
});
|
53 |
+
|
54 |
+
$('.more-info').click(function() {
|
55 |
+
$(this).parent().find('.section-description:first').toggle();
|
56 |
+
return false;
|
57 |
+
});
|
58 |
+
});
|
59 |
+
})(jQuery);
|
60 |
+
|
61 |
+
(function($) {
|
62 |
+
$.fn.lock = function() {
|
63 |
+
$(this).each(function() {
|
64 |
+
var $this = $(this);
|
65 |
+
var position = $this.css('position');
|
66 |
+
|
67 |
+
if (!position) {
|
68 |
+
position = 'static';
|
69 |
+
}
|
70 |
+
|
71 |
+
switch(position) {
|
72 |
+
case 'absolute':
|
73 |
+
case 'relative':
|
74 |
+
break;
|
75 |
+
default:
|
76 |
+
$this.css('position', 'relative');
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
$this.data('position', position);
|
80 |
+
|
81 |
+
var width = $this.width(),
|
82 |
+
height = $this.height();
|
83 |
+
|
84 |
+
var locker = $('<div class="locker"></div>');
|
85 |
+
locker.width(width).height(height);
|
86 |
+
|
87 |
+
var loader = $('<div class="locker-loader"></div>');
|
88 |
+
loader.width(width).height(height);
|
89 |
+
|
90 |
+
locker.append(loader);
|
91 |
+
$this.append(locker);
|
92 |
+
$(window).resize(function() {
|
93 |
+
$this.find('.locker,.locker-loader').width($this.width()).height($this.height());
|
94 |
+
});
|
95 |
+
});
|
96 |
+
|
97 |
+
return $(this);
|
98 |
+
}
|
99 |
+
|
100 |
+
$.fn.unlock = function() {
|
101 |
+
$(this).each(function() {
|
102 |
+
$(this).find('.locker').remove();
|
103 |
+
$(this).css('position', $(this).data('position'));
|
104 |
+
});
|
105 |
+
|
106 |
+
return $(this);
|
107 |
+
}
|
108 |
+
})(jQuery);
|
109 |
+
|
110 |
+
//Hide / show settings in sidebar
|
111 |
+
(function($) {
|
112 |
+
$(document).ready(function() {
|
113 |
+
|
114 |
+
$('.advanced-settings-btn').click(function(){
|
115 |
+
$('.second-screen, .return-settings-btn').removeClass("hidden-setting");
|
116 |
+
$('.initial-screen').addClass("hidden-setting");
|
117 |
+
});
|
118 |
+
|
119 |
+
$('.return-settings-btn').click(function(){
|
120 |
+
$('.second-screen, .return-settings-btn').addClass("hidden-setting");
|
121 |
+
$('.initial-screen').removeClass("hidden-setting");
|
122 |
+
});
|
123 |
+
});
|
124 |
+
})(jQuery);
|
js/library.js
CHANGED
@@ -1,95 +1,95 @@
|
|
1 |
-
(function(wpmv) {
|
2 |
-
var vm, vmv;
|
3 |
-
|
4 |
-
vm = visualizer.media = {};
|
5 |
-
vmv = vm.view = {};
|
6 |
-
|
7 |
-
vmv.Chart = wpmv.MediaFrame.extend({
|
8 |
-
initialize: function() {
|
9 |
-
var self = this;
|
10 |
-
|
11 |
-
_.defaults(self.options, {
|
12 |
-
action: '',
|
13 |
-
state: 'iframe:visualizer'
|
14 |
-
});
|
15 |
-
|
16 |
-
wpmv.MediaFrame.prototype.initialize.apply(self, arguments);
|
17 |
-
|
18 |
-
wpmv.settings.tabUrl = self.options.action;
|
19 |
-
self.createIframeStates();
|
20 |
-
},
|
21 |
-
|
22 |
-
open: function() {
|
23 |
-
wpmv.MediaFrame.prototype.open.apply(this, arguments);
|
24 |
-
this.$el.addClass('hide-menu');
|
25 |
-
}
|
26 |
-
});
|
27 |
-
})(wp.media.view);
|
28 |
-
|
29 |
-
(function($, vmv, vu) {
|
30 |
-
var resizeTimeout;
|
31 |
-
|
32 |
-
$.fn.adjust = function() {
|
33 |
-
return $(this).each(function() {
|
34 |
-
var width = $('#visualizer-library').width(),
|
35 |
-
margin = width * 0.02;
|
36 |
-
|
37 |
-
width *= 0.305;
|
38 |
-
$(this).width(width - 14).height(width * 0.75).parent().css('margin-right', margin + 'px').css('margin-bottom', margin + 'px');
|
39 |
-
});
|
40 |
-
}
|
41 |
-
|
42 |
-
$('.visualizer-chart-canvas').adjust();
|
43 |
-
|
44 |
-
$(document).ready(function() {
|
45 |
-
$('.visualizer-chart, .visualizer-library-pagination').fadeIn(500);
|
46 |
-
|
47 |
-
$('.visualizer-chart-shortcode').click(function(e) {
|
48 |
-
var range, selection;
|
49 |
-
|
50 |
-
if (window.getSelection && document.createRange) {
|
51 |
-
selection = window.getSelection();
|
52 |
-
range = document.createRange();
|
53 |
-
range.selectNodeContents(e.target);
|
54 |
-
selection.removeAllRanges();
|
55 |
-
selection.addRange(range);
|
56 |
-
} else if (document.selection && document.body.createTextRange) {
|
57 |
-
range = document.body.createTextRange();
|
58 |
-
range.moveToElementText(e.target);
|
59 |
-
range.select();
|
60 |
-
}
|
61 |
-
});
|
62 |
-
|
63 |
-
$('.add-new-h2').click(function() {
|
64 |
-
var wnd = window,
|
65 |
-
view = new vmv.Chart({action: vu.create});
|
66 |
-
|
67 |
-
wnd.send_to_editor = function() {
|
68 |
-
wnd.location.href = vu.base;
|
69 |
-
};
|
70 |
-
view.open();
|
71 |
-
|
72 |
-
return false;
|
73 |
-
});
|
74 |
-
|
75 |
-
$('.visualizer-chart-edit').click(function() {
|
76 |
-
var wnd = window,
|
77 |
-
view = new vmv.Chart({action: vu.edit + '&chart=' + $(this).attr('data-chart')});
|
78 |
-
|
79 |
-
wnd.send_to_editor = function() {
|
80 |
-
wnd.location.reload();
|
81 |
-
};
|
82 |
-
|
83 |
-
view.open();
|
84 |
-
|
85 |
-
return false;
|
86 |
-
});
|
87 |
-
|
88 |
-
$(window).resize(function() {
|
89 |
-
clearTimeout(resizeTimeout);
|
90 |
-
resizeTimeout = setTimeout(function() {
|
91 |
-
$('.visualizer-chart-canvas').adjust();
|
92 |
-
}, 100);
|
93 |
-
});
|
94 |
-
});
|
95 |
})(jQuery, visualizer.media.view, visualizer.urls);
|
1 |
+
(function(wpmv) {
|
2 |
+
var vm, vmv;
|
3 |
+
|
4 |
+
vm = visualizer.media = {};
|
5 |
+
vmv = vm.view = {};
|
6 |
+
|
7 |
+
vmv.Chart = wpmv.MediaFrame.extend({
|
8 |
+
initialize: function() {
|
9 |
+
var self = this;
|
10 |
+
|
11 |
+
_.defaults(self.options, {
|
12 |
+
action: '',
|
13 |
+
state: 'iframe:visualizer'
|
14 |
+
});
|
15 |
+
|
16 |
+
wpmv.MediaFrame.prototype.initialize.apply(self, arguments);
|
17 |
+
|
18 |
+
wpmv.settings.tabUrl = self.options.action;
|
19 |
+
self.createIframeStates();
|
20 |
+
},
|
21 |
+
|
22 |
+
open: function() {
|
23 |
+
wpmv.MediaFrame.prototype.open.apply(this, arguments);
|
24 |
+
this.$el.addClass('hide-menu');
|
25 |
+
}
|
26 |
+
});
|
27 |
+
})(wp.media.view);
|
28 |
+
|
29 |
+
(function($, vmv, vu) {
|
30 |
+
var resizeTimeout;
|
31 |
+
|
32 |
+
$.fn.adjust = function() {
|
33 |
+
return $(this).each(function() {
|
34 |
+
var width = $('#visualizer-library').width(),
|
35 |
+
margin = width * 0.02;
|
36 |
+
|
37 |
+
width *= 0.305;
|
38 |
+
$(this).width(width - 14).height(width * 0.75).parent().css('margin-right', margin + 'px').css('margin-bottom', margin + 'px');
|
39 |
+
});
|
40 |
+
}
|
41 |
+
|
42 |
+
$('.visualizer-chart-canvas').adjust();
|
43 |
+
|
44 |
+
$(document).ready(function() {
|
45 |
+
$('.visualizer-chart, .visualizer-library-pagination').fadeIn(500);
|
46 |
+
|
47 |
+
$('.visualizer-chart-shortcode').click(function(e) {
|
48 |
+
var range, selection;
|
49 |
+
|
50 |
+
if (window.getSelection && document.createRange) {
|
51 |
+
selection = window.getSelection();
|
52 |
+
range = document.createRange();
|
53 |
+
range.selectNodeContents(e.target);
|
54 |
+
selection.removeAllRanges();
|
55 |
+
selection.addRange(range);
|
56 |
+
} else if (document.selection && document.body.createTextRange) {
|
57 |
+
range = document.body.createTextRange();
|
58 |
+
range.moveToElementText(e.target);
|
59 |
+
range.select();
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
$('.add-new-h2').click(function() {
|
64 |
+
var wnd = window,
|
65 |
+
view = new vmv.Chart({action: vu.create});
|
66 |
+
|
67 |
+
wnd.send_to_editor = function() {
|
68 |
+
wnd.location.href = vu.base;
|
69 |
+
};
|
70 |
+
view.open();
|
71 |
+
|
72 |
+
return false;
|
73 |
+
});
|
74 |
+
|
75 |
+
$('.visualizer-chart-edit').click(function() {
|
76 |
+
var wnd = window,
|
77 |
+
view = new vmv.Chart({action: vu.edit + '&chart=' + $(this).attr('data-chart')});
|
78 |
+
|
79 |
+
wnd.send_to_editor = function() {
|
80 |
+
wnd.location.reload();
|
81 |
+
};
|
82 |
+
|
83 |
+
view.open();
|
84 |
+
|
85 |
+
return false;
|
86 |
+
});
|
87 |
+
|
88 |
+
$(window).resize(function() {
|
89 |
+
clearTimeout(resizeTimeout);
|
90 |
+
resizeTimeout = setTimeout(function() {
|
91 |
+
$('.visualizer-chart-canvas').adjust();
|
92 |
+
}, 100);
|
93 |
+
});
|
94 |
+
});
|
95 |
})(jQuery, visualizer.media.view, visualizer.urls);
|
js/media.js
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
-
(function(wpmv, g) {
|
2 |
-
var mediaFrame, wpmvtv;
|
3 |
-
|
4 |
-
wpmvtv = wpmv.toolbar.visualizer;
|
5 |
-
mediaFrame = wpmv.MediaFrame.Post;
|
6 |
-
|
7 |
-
g.load("visualization", "1", { packages: ["corechart", "geochart", "gauge"] });
|
8 |
-
|
9 |
-
wpmv.MediaFrame.Post = mediaFrame.extend({
|
10 |
-
initialize: function() {
|
11 |
-
var self = this;
|
12 |
-
|
13 |
-
mediaFrame.prototype.initialize.apply(self, arguments);
|
14 |
-
|
15 |
-
self.states.add([
|
16 |
-
new wp.media.controller.Visualizer({
|
17 |
-
id: 'visualizer',
|
18 |
-
menu: 'default',
|
19 |
-
title: wpmv.l10n.visualizer.controller.title,
|
20 |
-
priority: 200,
|
21 |
-
type: 'link',
|
22 |
-
src: wpmv.l10n.visualizer.buildurl
|
23 |
-
})
|
24 |
-
]);
|
25 |
-
|
26 |
-
self.on('router:create:visualizer', self.createRouter, self);
|
27 |
-
self.on('router:render:visualizer', self.visualizerRouter, self);
|
28 |
-
|
29 |
-
self.on('content:create:library', self.contentCreateLibrary, self);
|
30 |
-
self.on('content:create:builder', self.iframeContent, self);
|
31 |
-
},
|
32 |
-
|
33 |
-
visualizerRouter: function(view) {
|
34 |
-
view.set({
|
35 |
-
builder: {
|
36 |
-
text: wpmv.l10n.visualizer.routers.create,
|
37 |
-
priority: 40
|
38 |
-
},
|
39 |
-
library: {
|
40 |
-
text: wpmv.l10n.visualizer.routers.library,
|
41 |
-
priority: 20
|
42 |
-
}
|
43 |
-
});
|
44 |
-
},
|
45 |
-
|
46 |
-
contentCreateLibrary: function(region) {
|
47 |
-
var self = this;
|
48 |
-
|
49 |
-
self.toolbar.set(new wpmvtv.Library({controller: self}));
|
50 |
-
self.$el.removeClass('hide-toolbar');
|
51 |
-
|
52 |
-
region.view = new wpmv.visualizer.Library({
|
53 |
-
controller: self,
|
54 |
-
collection: self.state().library
|
55 |
-
});
|
56 |
-
}
|
57 |
-
});
|
58 |
-
})(wp.media.view, google);
|
1 |
+
(function(wpmv, g) {
|
2 |
+
var mediaFrame, wpmvtv;
|
3 |
+
|
4 |
+
wpmvtv = wpmv.toolbar.visualizer;
|
5 |
+
mediaFrame = wpmv.MediaFrame.Post;
|
6 |
+
|
7 |
+
g.load("visualization", "1", { packages: ["corechart", "geochart", "gauge"] });
|
8 |
+
|
9 |
+
wpmv.MediaFrame.Post = mediaFrame.extend({
|
10 |
+
initialize: function() {
|
11 |
+
var self = this;
|
12 |
+
|
13 |
+
mediaFrame.prototype.initialize.apply(self, arguments);
|
14 |
+
|
15 |
+
self.states.add([
|
16 |
+
new wp.media.controller.Visualizer({
|
17 |
+
id: 'visualizer',
|
18 |
+
menu: 'default',
|
19 |
+
title: wpmv.l10n.visualizer.controller.title,
|
20 |
+
priority: 200,
|
21 |
+
type: 'link',
|
22 |
+
src: wpmv.l10n.visualizer.buildurl
|
23 |
+
})
|
24 |
+
]);
|
25 |
+
|
26 |
+
self.on('router:create:visualizer', self.createRouter, self);
|
27 |
+
self.on('router:render:visualizer', self.visualizerRouter, self);
|
28 |
+
|
29 |
+
self.on('content:create:library', self.contentCreateLibrary, self);
|
30 |
+
self.on('content:create:builder', self.iframeContent, self);
|
31 |
+
},
|
32 |
+
|
33 |
+
visualizerRouter: function(view) {
|
34 |
+
view.set({
|
35 |
+
builder: {
|
36 |
+
text: wpmv.l10n.visualizer.routers.create,
|
37 |
+
priority: 40
|
38 |
+
},
|
39 |
+
library: {
|
40 |
+
text: wpmv.l10n.visualizer.routers.library,
|
41 |
+
priority: 20
|
42 |
+
}
|
43 |
+
});
|
44 |
+
},
|
45 |
+
|
46 |
+
contentCreateLibrary: function(region) {
|
47 |
+
var self = this;
|
48 |
+
|
49 |
+
self.toolbar.set(new wpmvtv.Library({controller: self}));
|
50 |
+
self.$el.removeClass('hide-toolbar');
|
51 |
+
|
52 |
+
region.view = new wpmv.visualizer.Library({
|
53 |
+
controller: self,
|
54 |
+
collection: self.state().library
|
55 |
+
});
|
56 |
+
}
|
57 |
+
});
|
58 |
+
})(wp.media.view, google);
|
js/media/collection.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
(function(wpmm) {
|
2 |
-
wpmm.visualizer.Charts = Backbone.Collection.extend({
|
3 |
-
model: wpmm.visualizer.Chart,
|
4 |
-
|
5 |
-
sync: function(method, model, options) {
|
6 |
-
if ('read' === method) {
|
7 |
-
options = options || {};
|
8 |
-
options.type = 'GET';
|
9 |
-
options.data = _.extend( options.data || {}, {
|
10 |
-
action: wp.media.view.l10n.visualizer.actions.get_charts
|
11 |
-
});
|
12 |
-
|
13 |
-
return wp.media.ajax( options );
|
14 |
-
} else {
|
15 |
-
return Backbone.sync.apply( this, arguments );
|
16 |
-
}
|
17 |
-
}
|
18 |
-
});
|
19 |
})(wp.media.model);
|
1 |
+
(function(wpmm) {
|
2 |
+
wpmm.visualizer.Charts = Backbone.Collection.extend({
|
3 |
+
model: wpmm.visualizer.Chart,
|
4 |
+
|
5 |
+
sync: function(method, model, options) {
|
6 |
+
if ('read' === method) {
|
7 |
+
options = options || {};
|
8 |
+
options.type = 'GET';
|
9 |
+
options.data = _.extend( options.data || {}, {
|
10 |
+
action: wp.media.view.l10n.visualizer.actions.get_charts
|
11 |
+
});
|
12 |
+
|
13 |
+
return wp.media.ajax( options );
|
14 |
+
} else {
|
15 |
+
return Backbone.sync.apply( this, arguments );
|
16 |
+
}
|
17 |
+
}
|
18 |
+
});
|
19 |
})(wp.media.model);
|
js/media/controller.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
(function(wpm) {
|
2 |
-
var wpmmv, wpmc;
|
3 |
-
|
4 |
-
wpmc = wpm.controller;
|
5 |
-
wpmmv = wpm.model.visualizer;
|
6 |
-
|
7 |
-
wpmc.Visualizer = wpmc.State.extend({
|
8 |
-
defaults: {
|
9 |
-
toolbar: 'visualizer',
|
10 |
-
content: 'library',
|
11 |
-
sidebar: 'visualizer',
|
12 |
-
router: 'visualizer'
|
13 |
-
},
|
14 |
-
|
15 |
-
initialize: function() {
|
16 |
-
this.library = new wpmmv.Charts();
|
17 |
-
}
|
18 |
-
});
|
19 |
})(wp.media);
|
1 |
+
(function(wpm) {
|
2 |
+
var wpmmv, wpmc;
|
3 |
+
|
4 |
+
wpmc = wpm.controller;
|
5 |
+
wpmmv = wpm.model.visualizer;
|
6 |
+
|
7 |
+
wpmc.Visualizer = wpmc.State.extend({
|
8 |
+
defaults: {
|
9 |
+
toolbar: 'visualizer',
|
10 |
+
content: 'library',
|
11 |
+
sidebar: 'visualizer',
|
12 |
+
router: 'visualizer'
|
13 |
+
},
|
14 |
+
|
15 |
+
initialize: function() {
|
16 |
+
this.library = new wpmmv.Charts();
|
17 |
+
}
|
18 |
+
});
|
19 |
})(wp.media);
|
js/media/model.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
(function($, wpmm, wpmvlv) {
|
2 |
-
wpmm.visualizer = {};
|
3 |
-
|
4 |
-
wpmm.visualizer.Chart = Backbone.Model.extend({
|
5 |
-
sync: function(method, model, options) {
|
6 |
-
if ('delete' == method) {
|
7 |
-
options = options || {};
|
8 |
-
options.data = _.extend( options.data || {}, {
|
9 |
-
action: wpmvlv.actions.delete_chart,
|
10 |
-
chart: model.get('id'),
|
11 |
-
nonce: wpmvlv.nonce
|
12 |
-
});
|
13 |
-
|
14 |
-
return wp.media.ajax( options );
|
15 |
-
} else {
|
16 |
-
return;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
});
|
20 |
-
})(jQuery, wp.media.model, wp.media.view.l10n.visualizer);
|
1 |
+
(function($, wpmm, wpmvlv) {
|
2 |
+
wpmm.visualizer = {};
|
3 |
+
|
4 |
+
wpmm.visualizer.Chart = Backbone.Model.extend({
|
5 |
+
sync: function(method, model, options) {
|
6 |
+
if ('delete' == method) {
|
7 |
+
options = options || {};
|
8 |
+
options.data = _.extend( options.data || {}, {
|
9 |
+
action: wpmvlv.actions.delete_chart,
|
10 |
+
chart: model.get('id'),
|
11 |
+
nonce: wpmvlv.nonce
|
12 |
+
});
|
13 |
+
|
14 |
+
return wp.media.ajax( options );
|
15 |
+
} else {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
});
|
20 |
+
})(jQuery, wp.media.model, wp.media.view.l10n.visualizer);
|
js/media/toolbar.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
(function(wpmv, wpmvt) {
|
2 |
-
var wpmvvl, wpmvtv, wpmvlvb;
|
3 |
-
|
4 |
-
wpmvvl = wpmv.visualizer.Library;
|
5 |
-
wpmvlvb = wpmv.l10n.visualizer.button;
|
6 |
-
|
7 |
-
wpmv.toolbar = wpmv.toolbar || {};
|
8 |
-
wpmvtv = wpmv.toolbar.visualizer = {};
|
9 |
-
|
10 |
-
/**
|
11 |
-
* =========================================================================
|
12 |
-
* Library Toolbar
|
13 |
-
* =========================================================================
|
14 |
-
*/
|
15 |
-
wpmvtv.Library = wpmvt.extend({
|
16 |
-
initialize: function() {
|
17 |
-
var self = this;
|
18 |
-
|
19 |
-
_.defaults(self.options, {
|
20 |
-
close: false,
|
21 |
-
items: {
|
22 |
-
type_filter: new wpmvvl.Types({
|
23 |
-
controller: self.controller,
|
24 |
-
priority: -100
|
25 |
-
}),
|
26 |
-
pagination: new wpmvvl.Pagination({
|
27 |
-
controller: self.controller,
|
28 |
-
priority: 100
|
29 |
-
})
|
30 |
-
}
|
31 |
-
});
|
32 |
-
|
33 |
-
wpmvt.prototype.initialize.apply(self, arguments);
|
34 |
-
}
|
35 |
-
});
|
36 |
})(wp.media.view, wp.media.view.Toolbar);
|
1 |
+
(function(wpmv, wpmvt) {
|
2 |
+
var wpmvvl, wpmvtv, wpmvlvb;
|
3 |
+
|
4 |
+
wpmvvl = wpmv.visualizer.Library;
|
5 |
+
wpmvlvb = wpmv.l10n.visualizer.button;
|
6 |
+
|
7 |
+
wpmv.toolbar = wpmv.toolbar || {};
|
8 |
+
wpmvtv = wpmv.toolbar.visualizer = {};
|
9 |
+
|
10 |
+
/**
|
11 |
+
* =========================================================================
|
12 |
+
* Library Toolbar
|
13 |
+
* =========================================================================
|
14 |
+
*/
|
15 |
+
wpmvtv.Library = wpmvt.extend({
|
16 |
+
initialize: function() {
|
17 |
+
var self = this;
|
18 |
+
|
19 |
+
_.defaults(self.options, {
|
20 |
+
close: false,
|
21 |
+
items: {
|
22 |
+
type_filter: new wpmvvl.Types({
|
23 |
+
controller: self.controller,
|
24 |
+
priority: -100
|
25 |
+
}),
|
26 |
+
pagination: new wpmvvl.Pagination({
|
27 |
+
controller: self.controller,
|
28 |
+
priority: 100
|
29 |
+
})
|
30 |
+
}
|
31 |
+
});
|
32 |
+
|
33 |
+
wpmvt.prototype.initialize.apply(self, arguments);
|
34 |
+
}
|
35 |
+
});
|
36 |
})(wp.media.view, wp.media.view.Toolbar);
|
js/media/view.js
CHANGED
@@ -1,504 +1,504 @@
|
|
1 |
-
(function($, wpm) {
|
2 |
-
var libraryWidth, libraryHeight, wpmv, wpmV, wpmvv, wpmvvl, wpmvvb, l10n;
|
3 |
-
|
4 |
-
wpmv = wpm.view;
|
5 |
-
wpmV = wpm.View;
|
6 |
-
wpmvv = wpmv.visualizer = {};
|
7 |
-
l10n = wpmv.l10n.visualizer;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* =========================================================================
|
11 |
-
* COMMON
|
12 |
-
* =========================================================================
|
13 |
-
*/
|
14 |
-
|
15 |
-
if (!_.isFunction(wpmV.prototype.make)) {
|
16 |
-
wpmV.prototype.make = function(tag, attrs, val) {
|
17 |
-
var html, attr;
|
18 |
-
|
19 |
-
html = '<' + tag;
|
20 |
-
for (attr in attrs) {
|
21 |
-
html += ' ' + attr + '="' + attrs[attr] + '"';
|
22 |
-
}
|
23 |
-
html += '>' + val + '</' + tag + '>';
|
24 |
-
|
25 |
-
return html;
|
26 |
-
};
|
27 |
-
}
|
28 |
-
|
29 |
-
wpmvv.Chart = wpmV.extend({
|
30 |
-
className: 'visualizer-library-chart-canvas',
|
31 |
-
|
32 |
-
constructor: function(options) {
|
33 |
-
this.id = 'visualizer-chart-' + options.model.get('id');
|
34 |
-
wpmV.apply(this, arguments);
|
35 |
-
},
|
36 |
-
|
37 |
-
render: function() {
|
38 |
-
var self, model, chart, gv, type, series, data, table, settings, i, j, row, date, format, formatter, axis, property;
|
39 |
-
|
40 |
-
self = this;
|
41 |
-
gv = google.visualization;
|
42 |
-
model = self.model;
|
43 |
-
|
44 |
-
self.$el
|
45 |
-
.width(self.options.width)
|
46 |
-
.height(self.options.height)
|
47 |
-
.css('background-image', 'none');
|
48 |
-
|
49 |
-
type = model.get('type');
|
50 |
-
series = model.get('series');
|
51 |
-
data = model.get('data');
|
52 |
-
settings = model.get('settings');
|
53 |
-
|
54 |
-
settings.width = self.options.width;
|
55 |
-
settings.height = self.options.height;
|
56 |
-
|
57 |
-
table = new gv.DataTable({cols: series});
|
58 |
-
chart = type == 'gauge' ? 'Gauge' : type.charAt(0).toUpperCase() + type.slice(1) + 'Chart';
|
59 |
-
chart = new gv[chart](self.el);
|
60 |
-
|
61 |
-
switch (type) {
|
62 |
-
case 'pie':
|
63 |
-
if (settings.slices) {
|
64 |
-
for (i in settings.slices) {
|
65 |
-
if (settings.slices[i]['color'] == '') {
|
66 |
-
delete settings.slices[i]['color'];
|
67 |
-
}
|
68 |
-
}
|
69 |
-
}
|
70 |
-
break;
|
71 |
-
case 'line':
|
72 |
-
case 'bar':
|
73 |
-
case 'column':
|
74 |
-
case 'area':
|
75 |
-
case 'scatter':
|
76 |
-
case 'candlestick':
|
77 |
-
if (settings.series) {
|
78 |
-
for (i in settings.series) {
|
79 |
-
if (settings.series[i]['color'] == '') {
|
80 |
-
delete settings.series[i]['color'];
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
84 |
-
break;
|
85 |
-
case 'geo':
|
86 |
-
if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
|
87 |
-
settings['region'] = 'world';
|
88 |
-
}
|
89 |
-
break;
|
90 |
-
case 'gauge':
|
91 |
-
break;
|
92 |
-
default:
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
if (series[0] && (series[0].type == 'date' || series[0].type == 'datetime')) {
|
97 |
-
axis = false;
|
98 |
-
switch (type) {
|
99 |
-
case 'line':
|
100 |
-
case 'area':
|
101 |
-
case 'scatter':
|
102 |
-
case 'candlestick':
|
103 |
-
case 'column':
|
104 |
-
axis = settings.hAxis;
|
105 |
-
break;
|
106 |
-
case 'bar':
|
107 |
-
axis = settings.vAxis;
|
108 |
-
break;
|
109 |
-
}
|
110 |
-
|
111 |
-
if (axis) {
|
112 |
-
for (property in axis.viewWindow) {
|
113 |
-
date = new Date(axis.viewWindow[property]);
|
114 |
-
if (Object.prototype.toString.call(date) === "[object Date]") {
|
115 |
-
if (!isNaN(date.getTime())) {
|
116 |
-
axis.viewWindow[property] = date;
|
117 |
-
continue;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
delete axis.viewWindow[property];
|
122 |
-
}
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
for (i = 0; i < data.length; i++) {
|
127 |
-
row = [];
|
128 |
-
for (j = 0; j < series.length; j++) {
|
129 |
-
if (series[j].type == 'date' || series[j].type == 'datetime') {
|
130 |
-
date = new Date(data[i][j]);
|
131 |
-
data[i][j] = null;
|
132 |
-
if (Object.prototype.toString.call(date) === "[object Date]") {
|
133 |
-
if (!isNaN(date.getTime())) {
|
134 |
-
data[i][j] = date;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
}
|
138 |
-
row.push(data[i][j]);
|
139 |
-
}
|
140 |
-
table.addRow(row);
|
141 |
-
}
|
142 |
-
|
143 |
-
if (settings.series) {
|
144 |
-
for (i = 0; i < settings.series.length; i++) {
|
145 |
-
format = settings.series[i].format;
|
146 |
-
if (!format || format == '') {
|
147 |
-
continue;
|
148 |
-
}
|
149 |
-
|
150 |
-
formatter = null;
|
151 |
-
switch (series[i + 1].type) {
|
152 |
-
case 'number':
|
153 |
-
formatter = new gv.NumberFormat({pattern: format});
|
154 |
-
break;
|
155 |
-
case 'date':
|
156 |
-
case 'datetime':
|
157 |
-
case 'timeofday':
|
158 |
-
formatter = new gv.DateFormat({pattern: format});
|
159 |
-
break;
|
160 |
-
}
|
161 |
-
|
162 |
-
if (formatter) {
|
163 |
-
formatter.format(table, i + 1);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
chart.draw(table, settings);
|
169 |
-
}
|
170 |
-
});
|
171 |
-
|
172 |
-
/**
|
173 |
-
* =========================================================================
|
174 |
-
* LIBRARY
|
175 |
-
* =========================================================================
|
176 |
-
*/
|
177 |
-
|
178 |
-
wpmvvl = wpmvv.Library = wpmV.extend({
|
179 |
-
id: 'visualizer-library-view',
|
180 |
-
className: 'visualizer-clearfix',
|
181 |
-
template: wpm.template('visualizer-library-empty'),
|
182 |
-
|
183 |
-
initialize: function() {
|
184 |
-
var self = this;
|
185 |
-
|
186 |
-
_.defaults(self.options, {
|
187 |
-
filter: 'all',
|
188 |
-
page: 1
|
189 |
-
});
|
190 |
-
|
191 |
-
self.controller.on('visualizer:library:filter', self.onFilterChanged, self);
|
192 |
-
self.controller.on('visualizer:library:page', self.onPageChanged, self);
|
193 |
-
self.collection.on('reset', self.renderCollection, self);
|
194 |
-
|
195 |
-
self.resetCollection();
|
196 |
-
},
|
197 |
-
|
198 |
-
onFilterChanged: function(filter) {
|
199 |
-
this.options.filter = filter;
|
200 |
-
this.options.page = 1;
|
201 |
-
this.resetCollection();
|
202 |
-
},
|
203 |
-
|
204 |
-
onPageChanged: function(page) {
|
205 |
-
this.options.page = page;
|
206 |
-
this.resetCollection();
|
207 |
-
},
|
208 |
-
|
209 |
-
render: function() {},
|
210 |
-
|
211 |
-
renderCollection: function() {
|
212 |
-
var self = this;
|
213 |
-
|
214 |
-
if (self.collection.length > 0) {
|
215 |
-
self.$el.html('');
|
216 |
-
self.collection.each(self.addChart, self);
|
217 |
-
} else {
|
218 |
-
self.$el.html(self.template({}));
|
219 |
-
}
|
220 |
-
},
|
221 |
-
|
222 |
-
addChart: function(chart) {
|
223 |
-
var self = this,
|
224 |
-
view = new wpmvvl.Chart({ model: chart });
|
225 |
-
|
226 |
-
self.$el.append(view.$el);
|
227 |
-
self.views.set('#visualizer-chart-' + chart.get('id'), view, { silent: true });
|
228 |
-
view.render();
|
229 |
-
},
|
230 |
-
|
231 |
-
resetCollection: function() {
|
232 |
-
var self = this,
|
233 |
-
controller = self.controller,
|
234 |
-
content = controller.$el.find(controller.content.selector);
|
235 |
-
|
236 |
-
content.lock();
|
237 |
-
self.collection.fetch({
|
238 |
-
silent: false,
|
239 |
-
data: {
|
240 |
-
filter: self.options.filter,
|
241 |
-
page: self.options.page
|
242 |
-
},
|
243 |
-
statusCode: {
|
244 |
-
200: function(response) {
|
245 |
-
var paginationView = controller.toolbar.get('toolbar').get('pagination');
|
246 |
-
|
247 |
-
if (self.options.page > response.total) {
|
248 |
-
self.options.page = response.total;
|
249 |
-
self.resetCollection();
|
250 |
-
} else {
|
251 |
-
paginationView.options.page = self.options.page;
|
252 |
-
paginationView.options.total = response.total || 1;
|
253 |
-
paginationView.render();
|
254 |
-
}
|
255 |
-
|
256 |
-
self.renderCollection();
|
257 |
-
content.unlock();
|
258 |
-
}
|
259 |
-
}
|
260 |
-
});
|
261 |
-
}
|
262 |
-
});
|
263 |
-
|
264 |
-
wpmvvl.Chart = wpmV.extend({
|
265 |
-
className: 'visualizer-library-chart',
|
266 |
-
template: wpm.template('visualizer-library-chart'),
|
267 |
-
|
268 |
-
events: {
|
269 |
-
'click .visualizer-library-chart-delete': 'deleteChart',
|
270 |
-
'click .visualizer-library-chart-insert': 'insertChart',
|
271 |
-
'click .visualizer-library-chart-shortcode': 'selectShortcode'
|
272 |
-
},
|
273 |
-
|
274 |
-
initialize: function() {
|
275 |
-
var self = this;
|
276 |
-
|
277 |
-
if (!libraryWidth && !libraryHeight) {
|
278 |
-
libraryWidth = $('#visualizer-library-view').width() / 3 - 40;
|
279 |
-
libraryHeight = libraryWidth * 3 / 4;
|
280 |
-
|
281 |
-
libraryWidth = Math.floor(libraryWidth);
|
282 |
-
libraryHeight = Math.floor(libraryHeight);
|
283 |
-
}
|
284 |
-
|
285 |
-
self._view = new wpmvv.Chart({
|
286 |
-
model: self.model,
|
287 |
-
width: libraryWidth,
|
288 |
-
height: libraryHeight
|
289 |
-
});
|
290 |
-
|
291 |
-
self.$el.html(self.template(self.model.toJSON())).prepend(self._view.$el);
|
292 |
-
self.views.set('#' + self._view.id, self._view, { silent: true });
|
293 |
-
},
|
294 |
-
|
295 |
-
render: function() {
|
296 |
-
this._view.render();
|
297 |
-
},
|
298 |
-
|
299 |
-
deleteChart: function() {
|
300 |
-
var self = this;
|
301 |
-
|
302 |
-
if (showNotice.warn()) {
|
303 |
-
self.model.destroy({
|
304 |
-
wait: true,
|
305 |
-
success: function() {
|
306 |
-
self.views.parent.resetCollection();
|
307 |
-
}
|
308 |
-
});
|
309 |
-
}
|
310 |
-
},
|
311 |
-
|
312 |
-
insertChart: function() {
|
313 |
-
wpm.editor.insert('[visualizer id="' + this.model.get('id') + '"]');
|
314 |
-
},
|
315 |
-
|
316 |
-
selectShortcode: function(e) {
|
317 |
-
var range, selection;
|
318 |
-
|
319 |
-
if (window.getSelection && document.createRange) {
|
320 |
-
selection = window.getSelection();
|
321 |
-
range = document.createRange();
|
322 |
-
range.selectNodeContents(e.target);
|
323 |
-
selection.removeAllRanges();
|
324 |
-
selection.addRange(range);
|
325 |
-
} else if (document.selection && document.body.createTextRange) {
|
326 |
-
range = document.body.createTextRange();
|
327 |
-
range.moveToElementText(e.target);
|
328 |
-
range.select();
|
329 |
-
}
|
330 |
-
}
|
331 |
-
});
|
332 |
-
|
333 |
-
wpmvvl.Types = wpmV.extend({
|
334 |
-
tagName: 'select',
|
335 |
-
className: 'visualizer-library-filters',
|
336 |
-
|
337 |
-
events: {
|
338 |
-
change: 'onFilterChange'
|
339 |
-
},
|
340 |
-
|
341 |
-
initialize: function() {
|
342 |
-
var self = this;
|
343 |
-
|
344 |
-
self.createFilters();
|
345 |
-
self.$el.html(_.chain(self.filters).map(function(filter) {
|
346 |
-
return {
|
347 |
-
el: self.make('option', {value: filter.key}, filter.text),
|
348 |
-
priority: filter.priority || 50
|
349 |
-
};
|
350 |
-
}).sortBy('priority').pluck('el').value());
|
351 |
-
},
|
352 |
-
|
353 |
-
createFilters: function() {
|
354 |
-
var self = this;
|
355 |
-
|
356 |
-
self.filters = {};
|
357 |
-
_.each(['all', 'pie', 'line', 'area', 'bar', 'column', 'geo', 'scatter', 'gauge', 'candlestick'], function(type, i) {
|
358 |
-
self.filters[type] = {
|
359 |
-
text: l10n.library.filters[type],
|
360 |
-
key: type,
|
361 |
-
priority: (i + 1) * 10
|
362 |
-
};
|
363 |
-
});
|
364 |
-
},
|
365 |
-
|
366 |
-
onFilterChange: function() {
|
367 |
-
this.controller.trigger('visualizer:library:filter', this.el.value);
|
368 |
-
}
|
369 |
-
});
|
370 |
-
|
371 |
-
wpmvvl.Pagination = wpmV.extend({
|
372 |
-
id: 'visualizer-library-pagination',
|
373 |
-
tagName: 'ul',
|
374 |
-
|
375 |
-
events: {
|
376 |
-
'click a.visualizer-library-pagination-page': 'onPageChange'
|
377 |
-
},
|
378 |
-
|
379 |
-
initialize: function() {
|
380 |
-
_.defaults(this.options, {
|
381 |
-
total: 1,
|
382 |
-
page: 1
|
383 |
-
});
|
384 |
-
},
|
385 |
-
|
386 |
-
render: function() {
|
387 |
-
var self, items;
|
388 |
-
|
389 |
-
self = this;
|
390 |
-
if (self.options.page <= 1 && self.options.total <= 1) {
|
391 |
-
self.$el.html('');
|
392 |
-
return;
|
393 |
-
}
|
394 |
-
|
395 |
-
items = self._pagination(self.options.page, self.options.total, 7);
|
396 |
-
|
397 |
-
self.$el.html(_.chain(items).map(function(item) {
|
398 |
-
var content, className;
|
399 |
-
|
400 |
-
content = item == '...' || item == self.options.page
|
401 |
-
? self.make('span', { class: 'visualizer-library-pagination-page' }, item)
|
402 |
-
: self.make('a', { class: 'visualizer-library-pagination-page', href: 'javascript:;', 'data-page': item }, item);
|
403 |
-
|
404 |
-
className = item == self.options.page
|
405 |
-
? 'visualizer-library-pagination-item visualizer-library-pagination-active'
|
406 |
-
: 'visualizer-library-pagination-item';
|
407 |
-
|
408 |
-
return self.make('li', { class: className }, content);
|
409 |
-
}).value());
|
410 |
-
},
|
411 |
-
|
412 |
-
_pagination: function(current, total, max) {
|
413 |
-
var i, tmp, pagenation = [];
|
414 |
-
|
415 |
-
if ( total <= max ) {
|
416 |
-
for ( i = 1; i <= total; i++ ) {
|
417 |
-
pagenation.push(i);
|
418 |
-
}
|
419 |
-
} else {
|
420 |
-
tmp = current - Math.floor( max / 2 );
|
421 |
-
|
422 |
-
if ( max % 2 == 0 ) {
|
423 |
-
tmp++;
|
424 |
-
}
|
425 |
-
|
426 |
-
if ( tmp < 1 ) {
|
427 |
-
tmp = 1;
|
428 |
-
}
|
429 |
-
|
430 |
-
if ( tmp + max > total ) {
|
431 |
-
tmp = total - max + 1;
|
432 |
-
}
|
433 |
-
|
434 |
-
for ( i = 1; i <= max; i++ ) {
|
435 |
-
pagenation.push(tmp++);
|
436 |
-
}
|
437 |
-
|
438 |
-
if ( pagenation[0] != 1 ) {
|
439 |
-
pagenation[0] = 1;
|
440 |
-
pagenation[1] = '...';
|
441 |
-
}
|
442 |
-
|
443 |
-
if ( pagenation[max - 1] != total ) {
|
444 |
-
pagenation[max - 1] = total;
|
445 |
-
pagenation[max - 2] = '...';
|
446 |
-
}
|
447 |
-
}
|
448 |
-
|
449 |
-
return pagenation;
|
450 |
-
},
|
451 |
-
|
452 |
-
onPageChange: function(e) {
|
453 |
-
this.controller.trigger('visualizer:library:page', $(e.target).data('page'));
|
454 |
-
}
|
455 |
-
});
|
456 |
-
})(jQuery, wp.media);
|
457 |
-
|
458 |
-
(function($) {
|
459 |
-
$.fn.lock = function() {
|
460 |
-
$(this).each(function() {
|
461 |
-
var locker = $('<div class="locker"></div>'),
|
462 |
-
loader = $('<div class="locker-loader"></div>'),
|
463 |
-
$this = $(this),
|
464 |
-
position = $this.css('position');
|
465 |
-
|
466 |
-
if ($this.find('.locker').length > 0) {
|
467 |
-
return;
|
468 |
-
}
|
469 |
-
|
470 |
-
if (!position) {
|
471 |
-
position = 'static';
|
472 |
-
}
|
473 |
-
|
474 |
-
$this.css('overflow', 'hidden');
|
475 |
-
switch(position) {
|
476 |
-
case 'absolute':
|
477 |
-
case 'relative':
|
478 |
-
break;
|
479 |
-
default:
|
480 |
-
$this.css('position', 'relative');
|
481 |
-
break;
|
482 |
-
}
|
483 |
-
$this.data('position', position);
|
484 |
-
|
485 |
-
locker.css('top', $this.scrollTop() + 'px').append(loader);
|
486 |
-
$this.append(locker);
|
487 |
-
});
|
488 |
-
|
489 |
-
return $(this);
|
490 |
-
}
|
491 |
-
|
492 |
-
$.fn.unlock = function() {
|
493 |
-
$(this).each(function() {
|
494 |
-
var $this = $(this);
|
495 |
-
|
496 |
-
$this.css({
|
497 |
-
position: $this.data('position'),
|
498 |
-
overflow: 'auto'
|
499 |
-
}).find('.locker').remove();
|
500 |
-
});
|
501 |
-
|
502 |
-
return $(this);
|
503 |
-
}
|
504 |
})(jQuery);
|
1 |
+
(function($, wpm) {
|
2 |
+
var libraryWidth, libraryHeight, wpmv, wpmV, wpmvv, wpmvvl, wpmvvb, l10n;
|
3 |
+
|
4 |
+
wpmv = wpm.view;
|
5 |
+
wpmV = wpm.View;
|
6 |
+
wpmvv = wpmv.visualizer = {};
|
7 |
+
l10n = wpmv.l10n.visualizer;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* =========================================================================
|
11 |
+
* COMMON
|
12 |
+
* =========================================================================
|
13 |
+
*/
|
14 |
+
|
15 |
+
if (!_.isFunction(wpmV.prototype.make)) {
|
16 |
+
wpmV.prototype.make = function(tag, attrs, val) {
|
17 |
+
var html, attr;
|
18 |
+
|
19 |
+
html = '<' + tag;
|
20 |
+
for (attr in attrs) {
|
21 |
+
html += ' ' + attr + '="' + attrs[attr] + '"';
|
22 |
+
}
|
23 |
+
html += '>' + val + '</' + tag + '>';
|
24 |
+
|
25 |
+
return html;
|
26 |
+
};
|
27 |
+
}
|
28 |
+
|
29 |
+
wpmvv.Chart = wpmV.extend({
|
30 |
+
className: 'visualizer-library-chart-canvas',
|
31 |
+
|
32 |
+
constructor: function(options) {
|
33 |
+
this.id = 'visualizer-chart-' + options.model.get('id');
|
34 |
+
wpmV.apply(this, arguments);
|
35 |
+
},
|
36 |
+
|
37 |
+
render: function() {
|
38 |
+
var self, model, chart, gv, type, series, data, table, settings, i, j, row, date, format, formatter, axis, property;
|
39 |
+
|
40 |
+
self = this;
|
41 |
+
gv = google.visualization;
|
42 |
+
model = self.model;
|
43 |
+
|
44 |
+
self.$el
|
45 |
+
.width(self.options.width)
|
46 |
+
.height(self.options.height)
|
47 |
+
.css('background-image', 'none');
|
48 |
+
|
49 |
+
type = model.get('type');
|
50 |
+
series = model.get('series');
|
51 |
+
data = model.get('data');
|
52 |
+
settings = model.get('settings');
|
53 |
+
|
54 |
+
settings.width = self.options.width;
|
55 |
+
settings.height = self.options.height;
|
56 |
+
|
57 |
+
table = new gv.DataTable({cols: series});
|
58 |
+
chart = type == 'gauge' ? 'Gauge' : type.charAt(0).toUpperCase() + type.slice(1) + 'Chart';
|
59 |
+
chart = new gv[chart](self.el);
|
60 |
+
|
61 |
+
switch (type) {
|
62 |
+
case 'pie':
|
63 |
+
if (settings.slices) {
|
64 |
+
for (i in settings.slices) {
|
65 |
+
if (settings.slices[i]['color'] == '') {
|
66 |
+
delete settings.slices[i]['color'];
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
break;
|
71 |
+
case 'line':
|
72 |
+
case 'bar':
|
73 |
+
case 'column':
|
74 |
+
case 'area':
|
75 |
+
case 'scatter':
|
76 |
+
case 'candlestick':
|
77 |
+
if (settings.series) {
|
78 |
+
for (i in settings.series) {
|
79 |
+
if (settings.series[i]['color'] == '') {
|
80 |
+
delete settings.series[i]['color'];
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
break;
|
85 |
+
case 'geo':
|
86 |
+
if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
|
87 |
+
settings['region'] = 'world';
|
88 |
+
}
|
89 |
+
break;
|
90 |
+
case 'gauge':
|
91 |
+
break;
|
92 |
+
default:
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
if (series[0] && (series[0].type == 'date' || series[0].type == 'datetime')) {
|
97 |
+
axis = false;
|
98 |
+
switch (type) {
|
99 |
+
case 'line':
|
100 |
+
case 'area':
|
101 |
+
case 'scatter':
|
102 |
+
case 'candlestick':
|
103 |
+
case 'column':
|
104 |
+
axis = settings.hAxis;
|
105 |
+
break;
|
106 |
+
case 'bar':
|
107 |
+
axis = settings.vAxis;
|
108 |
+
break;
|
109 |
+
}
|
110 |
+
|
111 |
+
if (axis) {
|
112 |
+
for (property in axis.viewWindow) {
|
113 |
+
date = new Date(axis.viewWindow[property]);
|
114 |
+
if (Object.prototype.toString.call(date) === "[object Date]") {
|
115 |
+
if (!isNaN(date.getTime())) {
|
116 |
+
axis.viewWindow[property] = date;
|
117 |
+
continue;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
delete axis.viewWindow[property];
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
for (i = 0; i < data.length; i++) {
|
127 |
+
row = [];
|
128 |
+
for (j = 0; j < series.length; j++) {
|
129 |
+
if (series[j].type == 'date' || series[j].type == 'datetime') {
|
130 |
+
date = new Date(data[i][j]);
|
131 |
+
data[i][j] = null;
|
132 |
+
if (Object.prototype.toString.call(date) === "[object Date]") {
|
133 |
+
if (!isNaN(date.getTime())) {
|
134 |
+
data[i][j] = date;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
row.push(data[i][j]);
|
139 |
+
}
|
140 |
+
table.addRow(row);
|
141 |
+
}
|
142 |
+
|
143 |
+
if (settings.series) {
|
144 |
+
for (i = 0; i < settings.series.length; i++) {
|
145 |
+
format = settings.series[i].format;
|
146 |
+
if (!format || format == '') {
|
147 |
+
continue;
|
148 |
+
}
|
149 |
+
|
150 |
+
formatter = null;
|
151 |
+
switch (series[i + 1].type) {
|
152 |
+
case 'number':
|
153 |
+
formatter = new gv.NumberFormat({pattern: format});
|
154 |
+
break;
|
155 |
+
case 'date':
|
156 |
+
case 'datetime':
|
157 |
+
case 'timeofday':
|
158 |
+
formatter = new gv.DateFormat({pattern: format});
|
159 |
+
break;
|
160 |
+
}
|
161 |
+
|
162 |
+
if (formatter) {
|
163 |
+
formatter.format(table, i + 1);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
chart.draw(table, settings);
|
169 |
+
}
|
170 |
+
});
|
171 |
+
|
172 |
+
/**
|
173 |
+
* =========================================================================
|
174 |
+
* LIBRARY
|
175 |
+
* =========================================================================
|
176 |
+
*/
|
177 |
+
|
178 |
+
wpmvvl = wpmvv.Library = wpmV.extend({
|
179 |
+
id: 'visualizer-library-view',
|
180 |
+
className: 'visualizer-clearfix',
|
181 |
+
template: wpm.template('visualizer-library-empty'),
|
182 |
+
|
183 |
+
initialize: function() {
|
184 |
+
var self = this;
|
185 |
+
|
186 |
+
_.defaults(self.options, {
|
187 |
+
filter: 'all',
|
188 |
+
page: 1
|
189 |
+
});
|
190 |
+
|
191 |
+
self.controller.on('visualizer:library:filter', self.onFilterChanged, self);
|
192 |
+
self.controller.on('visualizer:library:page', self.onPageChanged, self);
|
193 |
+
self.collection.on('reset', self.renderCollection, self);
|
194 |
+
|
195 |
+
self.resetCollection();
|
196 |
+
},
|
197 |
+
|
198 |
+
onFilterChanged: function(filter) {
|
199 |
+
this.options.filter = filter;
|
200 |
+
this.options.page = 1;
|
201 |
+
this.resetCollection();
|
202 |
+
},
|
203 |
+
|
204 |
+
onPageChanged: function(page) {
|
205 |
+
this.options.page = page;
|
206 |
+
this.resetCollection();
|
207 |
+
},
|
208 |
+
|
209 |
+
render: function() {},
|
210 |
+
|
211 |
+
renderCollection: function() {
|
212 |
+
var self = this;
|
213 |
+
|
214 |
+
if (self.collection.length > 0) {
|
215 |
+
self.$el.html('');
|
216 |
+
self.collection.each(self.addChart, self);
|
217 |
+
} else {
|
218 |
+
self.$el.html(self.template({}));
|
219 |
+
}
|
220 |
+
},
|
221 |
+
|
222 |
+
addChart: function(chart) {
|
223 |
+
var self = this,
|
224 |
+
view = new wpmvvl.Chart({ model: chart });
|
225 |
+
|
226 |
+
self.$el.append(view.$el);
|
227 |
+
self.views.set('#visualizer-chart-' + chart.get('id'), view, { silent: true });
|
228 |
+
view.render();
|
229 |
+
},
|
230 |
+
|
231 |
+
resetCollection: function() {
|
232 |
+
var self = this,
|
233 |
+
controller = self.controller,
|
234 |
+
content = controller.$el.find(controller.content.selector);
|
235 |
+
|
236 |
+
content.lock();
|
237 |
+
self.collection.fetch({
|
238 |
+
silent: false,
|
239 |
+
data: {
|
240 |
+
filter: self.options.filter,
|
241 |
+
page: self.options.page
|
242 |
+
},
|
243 |
+
statusCode: {
|
244 |
+
200: function(response) {
|
245 |
+
var paginationView = controller.toolbar.get('toolbar').get('pagination');
|
246 |
+
|
247 |
+
if (self.options.page > response.total) {
|
248 |
+
self.options.page = response.total;
|
249 |
+
self.resetCollection();
|
250 |
+
} else {
|
251 |
+
paginationView.options.page = self.options.page;
|
252 |
+
paginationView.options.total = response.total || 1;
|
253 |
+
paginationView.render();
|
254 |
+
}
|
255 |
+
|
256 |
+
self.renderCollection();
|
257 |
+
content.unlock();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
});
|
261 |
+
}
|
262 |
+
});
|
263 |
+
|
264 |
+
wpmvvl.Chart = wpmV.extend({
|
265 |
+
className: 'visualizer-library-chart',
|
266 |
+
template: wpm.template('visualizer-library-chart'),
|
267 |
+
|
268 |
+
events: {
|
269 |
+
'click .visualizer-library-chart-delete': 'deleteChart',
|
270 |
+
'click .visualizer-library-chart-insert': 'insertChart',
|
271 |
+
'click .visualizer-library-chart-shortcode': 'selectShortcode'
|
272 |
+
},
|
273 |
+
|
274 |
+
initialize: function() {
|
275 |
+
var self = this;
|
276 |
+
|
277 |
+
if (!libraryWidth && !libraryHeight) {
|
278 |
+
libraryWidth = $('#visualizer-library-view').width() / 3 - 40;
|
279 |
+
libraryHeight = libraryWidth * 3 / 4;
|
280 |
+
|
281 |
+
libraryWidth = Math.floor(libraryWidth);
|
282 |
+
libraryHeight = Math.floor(libraryHeight);
|
283 |
+
}
|
284 |
+
|
285 |
+
self._view = new wpmvv.Chart({
|
286 |
+
model: self.model,
|
287 |
+
width: libraryWidth,
|
288 |
+
height: libraryHeight
|
289 |
+
});
|
290 |
+
|
291 |
+
self.$el.html(self.template(self.model.toJSON())).prepend(self._view.$el);
|
292 |
+
self.views.set('#' + self._view.id, self._view, { silent: true });
|
293 |
+
},
|
294 |
+
|
295 |
+
render: function() {
|
296 |
+
this._view.render();
|
297 |
+
},
|
298 |
+
|
299 |
+
deleteChart: function() {
|
300 |
+
var self = this;
|
301 |
+
|
302 |
+
if (showNotice.warn()) {
|
303 |
+
self.model.destroy({
|
304 |
+
wait: true,
|
305 |
+
success: function() {
|
306 |
+
self.views.parent.resetCollection();
|
307 |
+
}
|
308 |
+
});
|
309 |
+
}
|
310 |
+
},
|
311 |
+
|
312 |
+
insertChart: function() {
|
313 |
+
wpm.editor.insert('[visualizer id="' + this.model.get('id') + '"]');
|
314 |
+
},
|
315 |
+
|
316 |
+
selectShortcode: function(e) {
|
317 |
+
var range, selection;
|
318 |
+
|
319 |
+
if (window.getSelection && document.createRange) {
|
320 |
+
selection = window.getSelection();
|
321 |
+
range = document.createRange();
|
322 |
+
range.selectNodeContents(e.target);
|
323 |
+
selection.removeAllRanges();
|
324 |
+
selection.addRange(range);
|
325 |
+
} else if (document.selection && document.body.createTextRange) {
|
326 |
+
range = document.body.createTextRange();
|
327 |
+
range.moveToElementText(e.target);
|
328 |
+
range.select();
|
329 |
+
}
|
330 |
+
}
|
331 |
+
});
|
332 |
+
|
333 |
+
wpmvvl.Types = wpmV.extend({
|
334 |
+
tagName: 'select',
|
335 |
+
className: 'visualizer-library-filters',
|
336 |
+
|
337 |
+
events: {
|
338 |
+
change: 'onFilterChange'
|
339 |
+
},
|
340 |
+
|
341 |
+
initialize: function() {
|
342 |
+
var self = this;
|
343 |
+
|
344 |
+
self.createFilters();
|
345 |
+
self.$el.html(_.chain(self.filters).map(function(filter) {
|
346 |
+
return {
|
347 |
+
el: self.make('option', {value: filter.key}, filter.text),
|
348 |
+
priority: filter.priority || 50
|
349 |
+
};
|
350 |
+
}).sortBy('priority').pluck('el').value());
|
351 |
+
},
|
352 |
+
|
353 |
+
createFilters: function() {
|
354 |
+
var self = this;
|
355 |
+
|
356 |
+
self.filters = {};
|
357 |
+
_.each(['all', 'pie', 'line', 'area', 'bar', 'column', 'geo', 'scatter', 'gauge', 'candlestick'], function(type, i) {
|
358 |
+
self.filters[type] = {
|
359 |
+
text: l10n.library.filters[type],
|
360 |
+
key: type,
|
361 |
+
priority: (i + 1) * 10
|
362 |
+
};
|
363 |
+
});
|
364 |
+
},
|
365 |
+
|
366 |
+
onFilterChange: function() {
|
367 |
+
this.controller.trigger('visualizer:library:filter', this.el.value);
|
368 |
+
}
|
369 |
+
});
|
370 |
+
|
371 |
+
wpmvvl.Pagination = wpmV.extend({
|
372 |
+
id: 'visualizer-library-pagination',
|
373 |
+
tagName: 'ul',
|
374 |
+
|
375 |
+
events: {
|
376 |
+
'click a.visualizer-library-pagination-page': 'onPageChange'
|
377 |
+
},
|
378 |
+
|
379 |
+
initialize: function() {
|
380 |
+
_.defaults(this.options, {
|
381 |
+
total: 1,
|
382 |
+
page: 1
|
383 |
+
});
|
384 |
+
},
|
385 |
+
|
386 |
+
render: function() {
|
387 |
+
var self, items;
|
388 |
+
|
389 |
+
self = this;
|
390 |
+
if (self.options.page <= 1 && self.options.total <= 1) {
|
391 |
+
self.$el.html('');
|
392 |
+
return;
|
393 |
+
}
|
394 |
+
|
395 |
+
items = self._pagination(self.options.page, self.options.total, 7);
|
396 |
+
|
397 |
+
self.$el.html(_.chain(items).map(function(item) {
|
398 |
+
var content, className;
|
399 |
+
|
400 |
+
content = item == '...' || item == self.options.page
|
401 |
+
? self.make('span', { class: 'visualizer-library-pagination-page' }, item)
|
402 |
+
: self.make('a', { class: 'visualizer-library-pagination-page', href: 'javascript:;', 'data-page': item }, item);
|
403 |
+
|
404 |
+
className = item == self.options.page
|
405 |
+
? 'visualizer-library-pagination-item visualizer-library-pagination-active'
|
406 |
+
: 'visualizer-library-pagination-item';
|
407 |
+
|
408 |
+
return self.make('li', { class: className }, content);
|
409 |
+
}).value());
|
410 |
+
},
|
411 |
+
|
412 |
+
_pagination: function(current, total, max) {
|
413 |
+
var i, tmp, pagenation = [];
|
414 |
+
|
415 |
+
if ( total <= max ) {
|
416 |
+
for ( i = 1; i <= total; i++ ) {
|
417 |
+
pagenation.push(i);
|
418 |
+
}
|
419 |
+
} else {
|
420 |
+
tmp = current - Math.floor( max / 2 );
|
421 |
+
|
422 |
+
if ( max % 2 == 0 ) {
|
423 |
+
tmp++;
|
424 |
+
}
|
425 |
+
|
426 |
+
if ( tmp < 1 ) {
|
427 |
+
tmp = 1;
|
428 |
+
}
|
429 |
+
|
430 |
+
if ( tmp + max > total ) {
|
431 |
+
tmp = total - max + 1;
|
432 |
+
}
|
433 |
+
|
434 |
+
for ( i = 1; i <= max; i++ ) {
|
435 |
+
pagenation.push(tmp++);
|
436 |
+
}
|
437 |
+
|
438 |
+
if ( pagenation[0] != 1 ) {
|
439 |
+
pagenation[0] = 1;
|
440 |
+
pagenation[1] = '...';
|
441 |
+
}
|
442 |
+
|
443 |
+
if ( pagenation[max - 1] != total ) {
|
444 |
+
pagenation[max - 1] = total;
|
445 |
+
pagenation[max - 2] = '...';
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
return pagenation;
|
450 |
+
},
|
451 |
+
|
452 |
+
onPageChange: function(e) {
|
453 |
+
this.controller.trigger('visualizer:library:page', $(e.target).data('page'));
|
454 |
+
}
|
455 |
+
});
|
456 |
+
})(jQuery, wp.media);
|
457 |
+
|
458 |
+
(function($) {
|
459 |
+
$.fn.lock = function() {
|
460 |
+
$(this).each(function() {
|
461 |
+
var locker = $('<div class="locker"></div>'),
|
462 |
+
loader = $('<div class="locker-loader"></div>'),
|
463 |
+
$this = $(this),
|
464 |
+
position = $this.css('position');
|
465 |
+
|
466 |
+
if ($this.find('.locker').length > 0) {
|
467 |
+
return;
|
468 |
+
}
|
469 |
+
|
470 |
+
if (!position) {
|
471 |
+
position = 'static';
|
472 |
+
}
|
473 |
+
|
474 |
+
$this.css('overflow', 'hidden');
|
475 |
+
switch(position) {
|
476 |
+
case 'absolute':
|
477 |
+
case 'relative':
|
478 |
+
break;
|
479 |
+
default:
|
480 |
+
$this.css('position', 'relative');
|
481 |
+
break;
|
482 |
+
}
|
483 |
+
$this.data('position', position);
|
484 |
+
|
485 |
+
locker.css('top', $this.scrollTop() + 'px').append(loader);
|
486 |
+
$this.append(locker);
|
487 |
+
});
|
488 |
+
|
489 |
+
return $(this);
|
490 |
+
}
|
491 |
+
|
492 |
+
$.fn.unlock = function() {
|
493 |
+
$(this).each(function() {
|
494 |
+
var $this = $(this);
|
495 |
+
|
496 |
+
$this.css({
|
497 |
+
position: $this.data('position'),
|
498 |
+
overflow: 'auto'
|
499 |
+
}).find('.locker').remove();
|
500 |
+
});
|
501 |
+
|
502 |
+
return $(this);
|
503 |
+
}
|
504 |
})(jQuery);
|
js/preview.js
CHANGED
@@ -1,84 +1,88 @@
|
|
1 |
-
(function($, v) {
|
2 |
-
var timeout;
|
3 |
-
|
4 |
-
$(document).ready(function() {
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
"
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
reverse_key =
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
84 |
})(jQuery);
|
1 |
+
(function($, v) {
|
2 |
+
var timeout;
|
3 |
+
|
4 |
+
$(document).ready(function() {
|
5 |
+
$('#settings-button').click(function() {
|
6 |
+
$('#settings-form').submit();
|
7 |
+
});
|
8 |
+
|
9 |
+
function updateChart() {
|
10 |
+
clearTimeout(timeout);
|
11 |
+
timeout = setTimeout(function() {
|
12 |
+
var settings = $('#settings-form').serializeObject();
|
13 |
+
|
14 |
+
delete settings['width'];
|
15 |
+
delete settings['height'];
|
16 |
+
|
17 |
+
v.charts.canvas.settings = settings;
|
18 |
+
v.render();
|
19 |
+
}, 1000);
|
20 |
+
}
|
21 |
+
|
22 |
+
$('.control-text').change(updateChart).keyup(updateChart);
|
23 |
+
$('.control-select, .control-checkbox').change(updateChart);
|
24 |
+
$('.color-picker-hex').wpColorPicker({
|
25 |
+
change: updateChart,
|
26 |
+
clear: updateChart
|
27 |
+
});
|
28 |
+
});
|
29 |
+
})(jQuery, visualizer);
|
30 |
+
|
31 |
+
(function($) {
|
32 |
+
$.fn.serializeObject = function() {
|
33 |
+
var self = this,
|
34 |
+
json = {},
|
35 |
+
push_counters = {},
|
36 |
+
patterns = {
|
37 |
+
"validate": /^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,
|
38 |
+
"key": /[a-zA-Z0-9_]+|(?=\[\])/g,
|
39 |
+
"push": /^$/,
|
40 |
+
"fixed": /^\d+$/,
|
41 |
+
"named": /^[a-zA-Z0-9_]+$/
|
42 |
+
};
|
43 |
+
|
44 |
+
this.build = function(base, key, value) {
|
45 |
+
base[key] = value;
|
46 |
+
return base;
|
47 |
+
};
|
48 |
+
|
49 |
+
this.push_counter = function(key) {
|
50 |
+
if (push_counters[key] === undefined) {
|
51 |
+
push_counters[key] = 0;
|
52 |
+
}
|
53 |
+
return push_counters[key]++;
|
54 |
+
};
|
55 |
+
|
56 |
+
$.each($(this).serializeArray(), function() {
|
57 |
+
// skip invalid keys
|
58 |
+
if (!patterns.validate.test(this.name)) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
|
62 |
+
var k,
|
63 |
+
keys = this.name.match(patterns.key),
|
64 |
+
merge = this.value,
|
65 |
+
reverse_key = this.name;
|
66 |
+
|
67 |
+
while ((k = keys.pop()) !== undefined) {
|
68 |
+
// adjust reverse_key
|
69 |
+
reverse_key = reverse_key.replace(new RegExp("\\[" + k + "\\]$"), '');
|
70 |
+
|
71 |
+
if (k.match(patterns.push)) {
|
72 |
+
// push
|
73 |
+
merge = self.build([], self.push_counter(reverse_key), merge);
|
74 |
+
} else if (k.match(patterns.fixed)) {
|
75 |
+
// fixed
|
76 |
+
merge = self.build([], k, merge);
|
77 |
+
} else if (k.match(patterns.named)) {
|
78 |
+
// named
|
79 |
+
merge = self.build({}, k, merge);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
json = $.extend(true, json, merge);
|
84 |
+
});
|
85 |
+
|
86 |
+
return json;
|
87 |
+
};
|
88 |
})(jQuery);
|
js/render.js
CHANGED
@@ -1,158 +1,158 @@
|
|
1 |
-
(function(v, g) {
|
2 |
-
var gv;
|
3 |
-
|
4 |
-
v.objects = {};
|
5 |
-
|
6 |
-
v.renderChart = function(id) {
|
7 |
-
var chart, render, container, series, data, table, settings, i, j, row, date, axis, property, format, formatter;
|
8 |
-
|
9 |
-
chart = v.charts[id];
|
10 |
-
series = chart.series;
|
11 |
-
data = chart.data;
|
12 |
-
settings = chart.settings;
|
13 |
-
|
14 |
-
container = document.getElementById(id);
|
15 |
-
table = new gv.DataTable({cols: series});
|
16 |
-
|
17 |
-
render = v.objects[id] || null;
|
18 |
-
if (!render) {
|
19 |
-
render = chart.type == 'gauge'
|
20 |
-
? 'Gauge'
|
21 |
-
: chart.type.charAt(0).toUpperCase() + chart.type.slice(1) + 'Chart';
|
22 |
-
|
23 |
-
render = new gv[render](container);
|
24 |
-
}
|
25 |
-
|
26 |
-
switch (v.charts[id].type) {
|
27 |
-
case 'pie':
|
28 |
-
if (settings.slices) {
|
29 |
-
for (i in settings.slices) {
|
30 |
-
if (settings.slices[i]['color'] == '') {
|
31 |
-
delete settings.slices[i]['color'];
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
break;
|
36 |
-
case 'line':
|
37 |
-
case 'bar':
|
38 |
-
case 'column':
|
39 |
-
case 'area':
|
40 |
-
case 'scatter':
|
41 |
-
case 'candlestick':
|
42 |
-
if (settings.series) {
|
43 |
-
for (i in settings.series) {
|
44 |
-
if (settings.series[i]['color'] == '') {
|
45 |
-
delete settings.series[i]['color'];
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
break;
|
50 |
-
case 'geo':
|
51 |
-
if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
|
52 |
-
settings['region'] = 'world';
|
53 |
-
}
|
54 |
-
break;
|
55 |
-
case 'gauge':
|
56 |
-
break;
|
57 |
-
default:
|
58 |
-
return;
|
59 |
-
}
|
60 |
-
|
61 |
-
if (series[0] && (series[0].type == 'date' || series[0].type == 'datetime')) {
|
62 |
-
axis = false;
|
63 |
-
switch (v.charts[id].type) {
|
64 |
-
case 'line':
|
65 |
-
case 'area':
|
66 |
-
case 'scatter':
|
67 |
-
case 'candlestick':
|
68 |
-
case 'column':
|
69 |
-
axis = settings.hAxis;
|
70 |
-
break;
|
71 |
-
case 'bar':
|
72 |
-
axis = settings.vAxis;
|
73 |
-
break;
|
74 |
-
}
|
75 |
-
|
76 |
-
if (axis) {
|
77 |
-
for (property in axis.viewWindow) {
|
78 |
-
date = new Date(axis.viewWindow[property]);
|
79 |
-
if (Object.prototype.toString.call(date) === "[object Date]") {
|
80 |
-
if (!isNaN(date.getTime())) {
|
81 |
-
axis.viewWindow[property] = date;
|
82 |
-
continue;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
delete axis.viewWindow[property];
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
for (i = 0; i < data.length; i++) {
|
92 |
-
row = [];
|
93 |
-
for (j = 0; j < series.length; j++) {
|
94 |
-
if (series[j].type == 'date' || series[j].type == 'datetime') {
|
95 |
-
date = new Date(data[i][j]);
|
96 |
-
data[i][j] = null;
|
97 |
-
if (Object.prototype.toString.call(date) === "[object Date]") {
|
98 |
-
if (!isNaN(date.getTime())) {
|
99 |
-
data[i][j] = date;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
}
|
103 |
-
row.push(data[i][j]);
|
104 |
-
}
|
105 |
-
table.addRow(row);
|
106 |
-
}
|
107 |
-
|
108 |
-
if (settings.series) {
|
109 |
-
for (i = 0; i < settings.series.length; i++) {
|
110 |
-
format = settings.series[i].format;
|
111 |
-
if (!format || format == '') {
|
112 |
-
continue;
|
113 |
-
}
|
114 |
-
|
115 |
-
formatter = null;
|
116 |
-
switch (series[i + 1].type) {
|
117 |
-
case 'number':
|
118 |
-
formatter = new g.visualization.NumberFormat({pattern: format});
|
119 |
-
break;
|
120 |
-
case 'date':
|
121 |
-
case 'datetime':
|
122 |
-
case 'timeofday':
|
123 |
-
formatter = new g.visualization.DateFormat({pattern: format});
|
124 |
-
break;
|
125 |
-
}
|
126 |
-
|
127 |
-
if (formatter) {
|
128 |
-
formatter.format(table, i + 1);
|
129 |
-
}
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
render.draw(table, settings);
|
134 |
-
};
|
135 |
-
|
136 |
-
v.render = function() {
|
137 |
-
for (var id in (v.charts || {})) {
|
138 |
-
v.renderChart(id);
|
139 |
-
}
|
140 |
-
};
|
141 |
-
|
142 |
-
g.load("visualization", "1", {packages: ["corechart", "geochart", "gauge"]});
|
143 |
-
g.setOnLoadCallback(function() {
|
144 |
-
gv = g.visualization;
|
145 |
-
v.render();
|
146 |
-
});
|
147 |
-
})(visualizer, google);
|
148 |
-
|
149 |
-
(function($, v) {
|
150 |
-
var resizeTimeout;
|
151 |
-
|
152 |
-
$(document).ready(function() {
|
153 |
-
$(window).resize(function() {
|
154 |
-
clearTimeout(resizeTimeout);
|
155 |
-
resizeTimeout = setTimeout(v.render, 100);
|
156 |
-
});
|
157 |
-
});
|
158 |
})(jQuery, visualizer);
|
1 |
+
(function(v, g) {
|
2 |
+
var gv;
|
3 |
+
|
4 |
+
v.objects = {};
|
5 |
+
|
6 |
+
v.renderChart = function(id) {
|
7 |
+
var chart, render, container, series, data, table, settings, i, j, row, date, axis, property, format, formatter;
|
8 |
+
|
9 |
+
chart = v.charts[id];
|
10 |
+
series = chart.series;
|
11 |
+
data = chart.data;
|
12 |
+
settings = chart.settings;
|
13 |
+
|
14 |
+
container = document.getElementById(id);
|
15 |
+
table = new gv.DataTable({cols: series});
|
16 |
+
|
17 |
+
render = v.objects[id] || null;
|
18 |
+
if (!render) {
|
19 |
+
render = chart.type == 'gauge'
|
20 |
+
? 'Gauge'
|
21 |
+
: chart.type.charAt(0).toUpperCase() + chart.type.slice(1) + 'Chart';
|
22 |
+
|
23 |
+
render = new gv[render](container);
|
24 |
+
}
|
25 |
+
|
26 |
+
switch (v.charts[id].type) {
|
27 |
+
case 'pie':
|
28 |
+
if (settings.slices) {
|
29 |
+
for (i in settings.slices) {
|
30 |
+
if (settings.slices[i]['color'] == '') {
|
31 |
+
delete settings.slices[i]['color'];
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
break;
|
36 |
+
case 'line':
|
37 |
+
case 'bar':
|
38 |
+
case 'column':
|
39 |
+
case 'area':
|
40 |
+
case 'scatter':
|
41 |
+
case 'candlestick':
|
42 |
+
if (settings.series) {
|
43 |
+
for (i in settings.series) {
|
44 |
+
if (settings.series[i]['color'] == '') {
|
45 |
+
delete settings.series[i]['color'];
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
break;
|
50 |
+
case 'geo':
|
51 |
+
if (settings.region != undefined && settings.region.replace(/^\s+|\s+$/g, '') == '') {
|
52 |
+
settings['region'] = 'world';
|
53 |
+
}
|
54 |
+
break;
|
55 |
+
case 'gauge':
|
56 |
+
break;
|
57 |
+
default:
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
if (series[0] && (series[0].type == 'date' || series[0].type == 'datetime')) {
|
62 |
+
axis = false;
|
63 |
+
switch (v.charts[id].type) {
|
64 |
+
case 'line':
|
65 |
+
case 'area':
|
66 |
+
case 'scatter':
|
67 |
+
case 'candlestick':
|
68 |
+
case 'column':
|
69 |
+
axis = settings.hAxis;
|
70 |
+
break;
|
71 |
+
case 'bar':
|
72 |
+
axis = settings.vAxis;
|
73 |
+
break;
|
74 |
+
}
|
75 |
+
|
76 |
+
if (axis) {
|
77 |
+
for (property in axis.viewWindow) {
|
78 |
+
date = new Date(axis.viewWindow[property]);
|
79 |
+
if (Object.prototype.toString.call(date) === "[object Date]") {
|
80 |
+
if (!isNaN(date.getTime())) {
|
81 |
+
axis.viewWindow[property] = date;
|
82 |
+
continue;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
delete axis.viewWindow[property];
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
for (i = 0; i < data.length; i++) {
|
92 |
+
row = [];
|
93 |
+
for (j = 0; j < series.length; j++) {
|
94 |
+
if (series[j].type == 'date' || series[j].type == 'datetime') {
|
95 |
+
date = new Date(data[i][j]);
|
96 |
+
data[i][j] = null;
|
97 |
+
if (Object.prototype.toString.call(date) === "[object Date]") {
|
98 |
+
if (!isNaN(date.getTime())) {
|
99 |
+
data[i][j] = date;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
row.push(data[i][j]);
|
104 |
+
}
|
105 |
+
table.addRow(row);
|
106 |
+
}
|
107 |
+
|
108 |
+
if (settings.series) {
|
109 |
+
for (i = 0; i < settings.series.length; i++) {
|
110 |
+
format = settings.series[i].format;
|
111 |
+
if (!format || format == '') {
|
112 |
+
continue;
|
113 |
+
}
|
114 |
+
|
115 |
+
formatter = null;
|
116 |
+
switch (series[i + 1].type) {
|
117 |
+
case 'number':
|
118 |
+
formatter = new g.visualization.NumberFormat({pattern: format});
|
119 |
+
break;
|
120 |
+
case 'date':
|
121 |
+
case 'datetime':
|
122 |
+
case 'timeofday':
|
123 |
+
formatter = new g.visualization.DateFormat({pattern: format});
|
124 |
+
break;
|
125 |
+
}
|
126 |
+
|
127 |
+
if (formatter) {
|
128 |
+
formatter.format(table, i + 1);
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
render.draw(table, settings);
|
134 |
+
};
|
135 |
+
|
136 |
+
v.render = function() {
|
137 |
+
for (var id in (v.charts || {})) {
|
138 |
+
v.renderChart(id);
|
139 |
+
}
|
140 |
+
};
|
141 |
+
|
142 |
+
g.load("visualization", "1", {packages: ["corechart", "geochart", "gauge"]});
|
143 |
+
g.setOnLoadCallback(function() {
|
144 |
+
gv = g.visualization;
|
145 |
+
v.render();
|
146 |
+
});
|
147 |
+
})(visualizer, google);
|
148 |
+
|
149 |
+
(function($, v) {
|
150 |
+
var resizeTimeout;
|
151 |
+
|
152 |
+
$(document).ready(function() {
|
153 |
+
$(window).resize(function() {
|
154 |
+
clearTimeout(resizeTimeout);
|
155 |
+
resizeTimeout = setTimeout(v.render, 100);
|
156 |
+
});
|
157 |
+
});
|
158 |
})(jQuery, visualizer);
|
js/visualizer-pointer.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready( function($) {
|
2 |
+
visualizer_pointer_open_pointer(0);
|
3 |
+
function visualizer_pointer_open_pointer(i) {
|
4 |
+
if(visualizer.pointers[i]) {
|
5 |
+
pointer = visualizer.pointers[i];
|
6 |
+
options = $.extend(pointer.options, {
|
7 |
+
close: function () {
|
8 |
+
$.post(ajaxurl, {
|
9 |
+
pointer: pointer.pointer_id,
|
10 |
+
action: 'dismiss-wp-pointer'
|
11 |
+
});
|
12 |
+
}
|
13 |
+
});
|
14 |
+
$(pointer.target).pointer(options).pointer('open');
|
15 |
+
}
|
16 |
+
}
|
17 |
+
});
|
languages/visualizer-en_US.po
CHANGED
@@ -1,1417 +1,1417 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Visualizer\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2014-04-05 14:41+0300\n"
|
6 |
-
"PO-Revision-Date: 2014-04-05 14:41+0300\n"
|
7 |
-
"Last-Translator: Eugene Manuilov <eugene@manuilov.org>\n"
|
8 |
-
"Language-Team: Eugene Manuilov <eugene@manuilov.org>\n"
|
9 |
-
"Language: en_US\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-Basepath: ./../\n"
|
14 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
15 |
-
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
16 |
-
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
|
17 |
-
"_n_noop;_nc;_nx;_nx_noop\n"
|
18 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
-
"X-Generator: Poedit 1.5.4\n"
|
20 |
-
"X-Poedit-SearchPath-0: classes/Visualizer\n"
|
21 |
-
|
22 |
-
#: classes/Visualizer/Render/Sidebar.php:101
|
23 |
-
msgid "Right of the chart"
|
24 |
-
msgstr "Right of the chart"
|
25 |
-
|
26 |
-
#: classes/Visualizer/Render/Sidebar.php:102
|
27 |
-
msgid "Above the chart"
|
28 |
-
msgstr "Above the chart"
|
29 |
-
|
30 |
-
#: classes/Visualizer/Render/Sidebar.php:103
|
31 |
-
msgid "Below the chart"
|
32 |
-
msgstr "Below the chart"
|
33 |
-
|
34 |
-
#: classes/Visualizer/Render/Sidebar.php:104
|
35 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:82
|
36 |
-
msgid "Inside the chart"
|
37 |
-
msgstr "Inside the chart"
|
38 |
-
|
39 |
-
#: classes/Visualizer/Render/Sidebar.php:105
|
40 |
-
msgid "Omit the legend"
|
41 |
-
msgstr "Omit the legend"
|
42 |
-
|
43 |
-
#: classes/Visualizer/Render/Sidebar.php:110
|
44 |
-
msgid "Aligned to the start of the allocated area"
|
45 |
-
msgstr "Aligned to the start of the allocated area"
|
46 |
-
|
47 |
-
#: classes/Visualizer/Render/Sidebar.php:111
|
48 |
-
msgid "Centered in the allocated area"
|
49 |
-
msgstr "Centered in the allocated area"
|
50 |
-
|
51 |
-
#: classes/Visualizer/Render/Sidebar.php:112
|
52 |
-
msgid "Aligned to the end of the allocated area"
|
53 |
-
msgstr "Aligned to the end of the allocated area"
|
54 |
-
|
55 |
-
#: classes/Visualizer/Render/Sidebar.php:117
|
56 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:233
|
57 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:400
|
58 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:108
|
59 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:167
|
60 |
-
msgid "Yes"
|
61 |
-
msgstr "Yes"
|
62 |
-
|
63 |
-
#: classes/Visualizer/Render/Sidebar.php:118
|
64 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:232
|
65 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:399
|
66 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:107
|
67 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:166
|
68 |
-
msgid "No"
|
69 |
-
msgstr "No"
|
70 |
-
|
71 |
-
#: classes/Visualizer/Render/Sidebar.php:131
|
72 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:97
|
73 |
-
msgid "Chart Title"
|
74 |
-
msgstr "Chart Title"
|
75 |
-
|
76 |
-
#: classes/Visualizer/Render/Sidebar.php:134
|
77 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:100
|
78 |
-
msgid "Text to display above the chart."
|
79 |
-
msgstr "Text to display above the chart."
|
80 |
-
|
81 |
-
#: classes/Visualizer/Render/Sidebar.php:138
|
82 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:112
|
83 |
-
msgid "Chart Title Color"
|
84 |
-
msgstr "Chart Title Color"
|
85 |
-
|
86 |
-
#: classes/Visualizer/Render/Sidebar.php:153
|
87 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:181
|
88 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:293
|
89 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:58
|
90 |
-
msgid "General Settings"
|
91 |
-
msgstr "General Settings"
|
92 |
-
|
93 |
-
#: classes/Visualizer/Render/Sidebar.php:155
|
94 |
-
msgid ""
|
95 |
-
"Configure title, font styles, tooltip, legend and else settings for the "
|
96 |
-
"chart."
|
97 |
-
msgstr ""
|
98 |
-
"Configure title, font styles, tooltip, legend and else settings for the "
|
99 |
-
"chart."
|
100 |
-
|
101 |
-
#: classes/Visualizer/Render/Sidebar.php:158
|
102 |
-
msgid "Title"
|
103 |
-
msgstr "Title"
|
104 |
-
|
105 |
-
#: classes/Visualizer/Render/Sidebar.php:162
|
106 |
-
msgid "Font Styles"
|
107 |
-
msgstr "Font Styles"
|
108 |
-
|
109 |
-
#: classes/Visualizer/Render/Sidebar.php:165
|
110 |
-
msgid "Family And Size"
|
111 |
-
msgstr "Family And Size"
|
112 |
-
|
113 |
-
#: classes/Visualizer/Render/Sidebar.php:191
|
114 |
-
msgid "The default font family and size for all text in the chart."
|
115 |
-
msgstr "The default font family and size for all text in the chart."
|
116 |
-
|
117 |
-
#: classes/Visualizer/Render/Sidebar.php:196
|
118 |
-
msgid "Legend"
|
119 |
-
msgstr "Legend"
|
120 |
-
|
121 |
-
#: classes/Visualizer/Render/Sidebar.php:198
|
122 |
-
msgid "Position"
|
123 |
-
msgstr "Position"
|
124 |
-
|
125 |
-
#: classes/Visualizer/Render/Sidebar.php:202
|
126 |
-
msgid "Determines where to place the legend, compared to the chart area."
|
127 |
-
msgstr "Determines where to place the legend, compared to the chart area."
|
128 |
-
|
129 |
-
#: classes/Visualizer/Render/Sidebar.php:206
|
130 |
-
msgid "Alignment"
|
131 |
-
msgstr "Alignment"
|
132 |
-
|
133 |
-
#: classes/Visualizer/Render/Sidebar.php:210
|
134 |
-
msgid "Determines the alignment of the legend."
|
135 |
-
msgstr "Determines the alignment of the legend."
|
136 |
-
|
137 |
-
#: classes/Visualizer/Render/Sidebar.php:214
|
138 |
-
msgid "Font Color"
|
139 |
-
msgstr "Font Color"
|
140 |
-
|
141 |
-
#: classes/Visualizer/Render/Sidebar.php:221
|
142 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:128
|
143 |
-
msgid "Tooltip"
|
144 |
-
msgstr "Tooltip"
|
145 |
-
|
146 |
-
#: classes/Visualizer/Render/Sidebar.php:236
|
147 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:143
|
148 |
-
msgid "Trigger"
|
149 |
-
msgstr "Trigger"
|
150 |
-
|
151 |
-
#: classes/Visualizer/Render/Sidebar.php:241
|
152 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:148
|
153 |
-
msgid "The tooltip will be displayed when the user hovers over an element"
|
154 |
-
msgstr "The tooltip will be displayed when the user hovers over an element"
|
155 |
-
|
156 |
-
#: classes/Visualizer/Render/Sidebar.php:242
|
157 |
-
msgid "The tooltip will be displayed when the user selects an element"
|
158 |
-
msgstr "The tooltip will be displayed when the user selects an element"
|
159 |
-
|
160 |
-
#: classes/Visualizer/Render/Sidebar.php:243
|
161 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:149
|
162 |
-
msgid "The tooltip will not be displayed"
|
163 |
-
msgstr "The tooltip will not be displayed"
|
164 |
-
|
165 |
-
#: classes/Visualizer/Render/Sidebar.php:245
|
166 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:151
|
167 |
-
msgid ""
|
168 |
-
"Determines the user interaction that causes the tooltip to be displayed."
|
169 |
-
msgstr ""
|
170 |
-
"Determines the user interaction that causes the tooltip to be displayed."
|
171 |
-
|
172 |
-
#: classes/Visualizer/Render/Sidebar.php:249
|
173 |
-
msgid "Show Color Code"
|
174 |
-
msgstr "Show Color Code"
|
175 |
-
|
176 |
-
#: classes/Visualizer/Render/Sidebar.php:253
|
177 |
-
msgid ""
|
178 |
-
"If set to yes, will show colored squares next to the slice information in "
|
179 |
-
"the tooltip."
|
180 |
-
msgstr ""
|
181 |
-
"If set to yes, will show colored squares next to the slice information in "
|
182 |
-
"the tooltip."
|
183 |
-
|
184 |
-
#: classes/Visualizer/Render/Sidebar.php:265
|
185 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:229
|
186 |
-
msgid "Layout & Chart Area"
|
187 |
-
msgstr "Layout & Chart Area"
|
188 |
-
|
189 |
-
#: classes/Visualizer/Render/Sidebar.php:266
|
190 |
-
msgid "Layout"
|
191 |
-
msgstr "Layout"
|
192 |
-
|
193 |
-
#: classes/Visualizer/Render/Sidebar.php:267
|
194 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:326
|
195 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:231
|
196 |
-
msgid ""
|
197 |
-
"Configure the total size of the chart. Two formats are supported: a number, "
|
198 |
-
"or a number followed by %. A simple number is a value in pixels; a number "
|
199 |
-
"followed by % is a percentage."
|
200 |
-
msgstr ""
|
201 |
-
"Configure the total size of the chart. Two formats are supported: a number, "
|
202 |
-
"or a number followed by %. A simple number is a value in pixels; a number "
|
203 |
-
"followed by % is a percentage."
|
204 |
-
|
205 |
-
#: classes/Visualizer/Render/Sidebar.php:271
|
206 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:330
|
207 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:235
|
208 |
-
msgid "Width And Height Of Chart"
|
209 |
-
msgstr "Width And Height Of Chart"
|
210 |
-
|
211 |
-
#: classes/Visualizer/Render/Sidebar.php:285
|
212 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:344
|
213 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:249
|
214 |
-
msgid "Determines the total width and height of the chart."
|
215 |
-
msgstr "Determines the total width and height of the chart."
|
216 |
-
|
217 |
-
#: classes/Visualizer/Render/Sidebar.php:291
|
218 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:359
|
219 |
-
msgid ""
|
220 |
-
"Configure the background color for the main area of the chart and the chart "
|
221 |
-
"border width and color."
|
222 |
-
msgstr ""
|
223 |
-
"Configure the background color for the main area of the chart and the chart "
|
224 |
-
"border width and color."
|
225 |
-
|
226 |
-
#: classes/Visualizer/Render/Sidebar.php:294
|
227 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:362
|
228 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:103
|
229 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:127
|
230 |
-
msgid "Stroke Width"
|
231 |
-
msgstr "Stroke Width"
|
232 |
-
|
233 |
-
#: classes/Visualizer/Render/Sidebar.php:297
|
234 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:365
|
235 |
-
msgid "The chart border width in pixels."
|
236 |
-
msgstr "The chart border width in pixels."
|
237 |
-
|
238 |
-
#: classes/Visualizer/Render/Sidebar.php:302
|
239 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:370
|
240 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:111
|
241 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:135
|
242 |
-
msgid "Stroke Color"
|
243 |
-
msgstr "Stroke Color"
|
244 |
-
|
245 |
-
#: classes/Visualizer/Render/Sidebar.php:310
|
246 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:377
|
247 |
-
msgid "Background Color"
|
248 |
-
msgstr "Background Color"
|
249 |
-
|
250 |
-
#: classes/Visualizer/Render/Sidebar.php:319
|
251 |
-
msgid "Transparent background"
|
252 |
-
msgstr "Transparent background"
|
253 |
-
|
254 |
-
#: classes/Visualizer/Render/Sidebar.php:324
|
255 |
-
msgid "Chart Area"
|
256 |
-
msgstr "Chart Area"
|
257 |
-
|
258 |
-
#: classes/Visualizer/Render/Sidebar.php:325
|
259 |
-
msgid ""
|
260 |
-
"Configure the placement and size of the chart area (where the chart itself "
|
261 |
-
"is drawn, excluding axis and legends). Two formats are supported: a number, "
|
262 |
-
"or a number followed by %. A simple number is a value in pixels; a number "
|
263 |
-
"followed by % is a percentage."
|
264 |
-
msgstr ""
|
265 |
-
"Configure the placement and size of the chart area (where the chart itself "
|
266 |
-
"is drawn, excluding axis and legends). Two formats are supported: a number, "
|
267 |
-
"or a number followed by %. A simple number is a value in pixels; a number "
|
268 |
-
"followed by % is a percentage."
|
269 |
-
|
270 |
-
#: classes/Visualizer/Render/Sidebar.php:329
|
271 |
-
msgid "Left And Top Margins"
|
272 |
-
msgstr "Left And Top Margins"
|
273 |
-
|
274 |
-
#: classes/Visualizer/Render/Sidebar.php:343
|
275 |
-
msgid "Determines how far to draw the chart from the left and top borders."
|
276 |
-
msgstr "Determines how far to draw the chart from the left and top borders."
|
277 |
-
|
278 |
-
#: classes/Visualizer/Render/Sidebar.php:349
|
279 |
-
msgid "Width And Height Of Chart Area"
|
280 |
-
msgstr "Width And Height Of Chart Area"
|
281 |
-
|
282 |
-
#: classes/Visualizer/Render/Sidebar.php:363
|
283 |
-
msgid "Determines the width and hight of the chart area."
|
284 |
-
msgstr "Determines the width and hight of the chart area."
|
285 |
-
|
286 |
-
#: classes/Visualizer/Render/Sidebar.php:414
|
287 |
-
msgid "Hex Value"
|
288 |
-
msgstr "Hex Value"
|
289 |
-
|
290 |
-
#: classes/Visualizer/Render/Sidebar.php:527
|
291 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:424
|
292 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:453
|
293 |
-
msgid "Number Format"
|
294 |
-
msgstr "Number Format"
|
295 |
-
|
296 |
-
#: classes/Visualizer/Render/Sidebar.php:530
|
297 |
-
#, php-format
|
298 |
-
msgid ""
|
299 |
-
"Enter custom format pattern to apply to this series value, similar to the "
|
300 |
-
"%sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# "
|
301 |
-
"to add dollar sign before digits. Pay attention that if you use #%% "
|
302 |
-
"percentage format then your values will be multiplied by 100."
|
303 |
-
msgstr ""
|
304 |
-
"Enter custom format pattern to apply to this series value, similar to the "
|
305 |
-
"%sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# "
|
306 |
-
"to add dollar sign before digits. Pay attention that if you use #%% "
|
307 |
-
"percentage format then your values will be multiplied by 100."
|
308 |
-
|
309 |
-
#: classes/Visualizer/Render/Sidebar.php:538
|
310 |
-
msgid "Date Format"
|
311 |
-
msgstr "Date Format"
|
312 |
-
|
313 |
-
#: classes/Visualizer/Render/Sidebar.php:541
|
314 |
-
#, php-format
|
315 |
-
msgid ""
|
316 |
-
"Enter custom format pattern to apply to this series value, similar to the "
|
317 |
-
"%sICU date and time format%s."
|
318 |
-
msgstr ""
|
319 |
-
"Enter custom format pattern to apply to this series value, similar to the "
|
320 |
-
"%sICU date and time format%s."
|
321 |
-
|
322 |
-
#: classes/Visualizer/Render/Library.php:63
|
323 |
-
#: classes/Visualizer/Render/Templates.php:69
|
324 |
-
msgid "Delete"
|
325 |
-
msgstr "Delete"
|
326 |
-
|
327 |
-
#: classes/Visualizer/Render/Library.php:64
|
328 |
-
msgid "Clone"
|
329 |
-
msgstr "Clone"
|
330 |
-
|
331 |
-
#: classes/Visualizer/Render/Library.php:65
|
332 |
-
msgid "Edit"
|
333 |
-
msgstr "Edit"
|
334 |
-
|
335 |
-
#: classes/Visualizer/Render/Library.php:67
|
336 |
-
#: classes/Visualizer/Render/Templates.php:72
|
337 |
-
msgid "Click to select"
|
338 |
-
msgstr "Click to select"
|
339 |
-
|
340 |
-
#: classes/Visualizer/Render/Library.php:118
|
341 |
-
#: classes/Visualizer/Render/Templates.php:86
|
342 |
-
msgid "No charts found"
|
343 |
-
msgstr "No charts found"
|
344 |
-
|
345 |
-
#: classes/Visualizer/Render/Library.php:145
|
346 |
-
#: classes/Visualizer/Module/Admin.php:213
|
347 |
-
msgid "Visualizer Library"
|
348 |
-
msgstr "Visualizer Library"
|
349 |
-
|
350 |
-
#: classes/Visualizer/Render/Library.php:146
|
351 |
-
msgid "Add New"
|
352 |
-
msgstr "Add New"
|
353 |
-
|
354 |
-
#: classes/Visualizer/Render/Library.php:165
|
355 |
-
#, php-format
|
356 |
-
msgid ""
|
357 |
-
"%s option is disabled in your php.ini config. Please, enable it by change "
|
358 |
-
"its value to 1. This option increases the speed of remote CSV uploading."
|
359 |
-
msgstr ""
|
360 |
-
"%s option is disabled in your php.ini config. Please, enable it by change "
|
361 |
-
"its value to 1. This option increases the speed of remote CSV uploading."
|
362 |
-
|
363 |
-
#: classes/Visualizer/Render/Templates.php:70
|
364 |
-
msgid "Insert"
|
365 |
-
msgstr "Insert"
|
366 |
-
|
367 |
-
#: classes/Visualizer/Render/Page.php:74
|
368 |
-
msgid "Like the plugin? Show us your love!"
|
369 |
-
msgstr "Like the plugin? Show us your love!"
|
370 |
-
|
371 |
-
#: classes/Visualizer/Render/Page.php:77
|
372 |
-
msgid "Rate it on WordPress.org"
|
373 |
-
msgstr "Rate it on WordPress.org"
|
374 |
-
|
375 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:82
|
376 |
-
msgid "Straight line without curve"
|
377 |
-
msgstr "Straight line without curve"
|
378 |
-
|
379 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:83
|
380 |
-
msgid "The angles of the line will be smoothed"
|
381 |
-
msgstr "The angles of the line will be smoothed"
|
382 |
-
|
383 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:121
|
384 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:240
|
385 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:115
|
386 |
-
msgid "Line Width And Point Size"
|
387 |
-
msgstr "Line Width And Point Size"
|
388 |
-
|
389 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:135
|
390 |
-
msgid ""
|
391 |
-
"Data line width and diameter of displayed points in pixels. Use zero to hide "
|
392 |
-
"all lines or points."
|
393 |
-
msgstr ""
|
394 |
-
"Data line width and diameter of displayed points in pixels. Use zero to hide "
|
395 |
-
"all lines or points."
|
396 |
-
|
397 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:141
|
398 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:264
|
399 |
-
msgid "Curve Type"
|
400 |
-
msgstr "Curve Type"
|
401 |
-
|
402 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:145
|
403 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:235
|
404 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:268
|
405 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:402
|
406 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:110
|
407 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:169
|
408 |
-
msgid "Determines whether the series has to be presented in the legend or not."
|
409 |
-
msgstr ""
|
410 |
-
"Determines whether the series has to be presented in the legend or not."
|
411 |
-
|
412 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:153
|
413 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:47
|
414 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:61
|
415 |
-
msgid "Focus Target"
|
416 |
-
msgstr "Focus Target"
|
417 |
-
|
418 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:158
|
419 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:52
|
420 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:66
|
421 |
-
msgid "Focus on a single data point."
|
422 |
-
msgstr "Focus on a single data point."
|
423 |
-
|
424 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:159
|
425 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:53
|
426 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:67
|
427 |
-
msgid "Focus on a grouping of all data points along the major axis."
|
428 |
-
msgstr "Focus on a grouping of all data points along the major axis."
|
429 |
-
|
430 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:161
|
431 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:55
|
432 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:69
|
433 |
-
msgid ""
|
434 |
-
"The type of the entity that receives focus on mouse hover. Also affects "
|
435 |
-
"which entity is selected by mouse click."
|
436 |
-
msgstr ""
|
437 |
-
"The type of the entity that receives focus on mouse hover. Also affects "
|
438 |
-
"which entity is selected by mouse click."
|
439 |
-
|
440 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:166
|
441 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:75
|
442 |
-
msgid "Selection Mode"
|
443 |
-
msgstr "Selection Mode"
|
444 |
-
|
445 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:171
|
446 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:80
|
447 |
-
msgid "Single data point"
|
448 |
-
msgstr "Single data point"
|
449 |
-
|
450 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:172
|
451 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:81
|
452 |
-
msgid "Multiple data points"
|
453 |
-
msgstr "Multiple data points"
|
454 |
-
|
455 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:174
|
456 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:83
|
457 |
-
msgid "Determines how many data points an user can select on a chart."
|
458 |
-
msgstr "Determines how many data points an user can select on a chart."
|
459 |
-
|
460 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:178
|
461 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:87
|
462 |
-
msgid "Aggregation Target"
|
463 |
-
msgstr "Aggregation Target"
|
464 |
-
|
465 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:183
|
466 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:92
|
467 |
-
msgid "Group selected data by x-value"
|
468 |
-
msgstr "Group selected data by x-value"
|
469 |
-
|
470 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:184
|
471 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:93
|
472 |
-
msgid "Group selected data by series"
|
473 |
-
msgstr "Group selected data by series"
|
474 |
-
|
475 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:185
|
476 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:94
|
477 |
-
msgid ""
|
478 |
-
"Group selected data by x-value if all selections have the same x-value, and "
|
479 |
-
"by series otherwise"
|
480 |
-
msgstr ""
|
481 |
-
"Group selected data by x-value if all selections have the same x-value, and "
|
482 |
-
"by series otherwise"
|
483 |
-
|
484 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:186
|
485 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:95
|
486 |
-
msgid "Show only one tooltip per selection"
|
487 |
-
msgstr "Show only one tooltip per selection"
|
488 |
-
|
489 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:188
|
490 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:97
|
491 |
-
msgid ""
|
492 |
-
"Determines how multiple data selections are rolled up into tooltips. To make "
|
493 |
-
"it working you need to set multiple selection mode and tooltip trigger to "
|
494 |
-
"display it when an user selects an element."
|
495 |
-
msgstr ""
|
496 |
-
"Determines how multiple data selections are rolled up into tooltips. To make "
|
497 |
-
"it working you need to set multiple selection mode and tooltip trigger to "
|
498 |
-
"display it when an user selects an element."
|
499 |
-
|
500 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:194
|
501 |
-
msgid "Point Opacity"
|
502 |
-
msgstr "Point Opacity"
|
503 |
-
|
504 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:197
|
505 |
-
msgid ""
|
506 |
-
"The transparency of data points, with 1.0 being completely opaque and 0.0 "
|
507 |
-
"fully transparent."
|
508 |
-
msgstr ""
|
509 |
-
"The transparency of data points, with 1.0 being completely opaque and 0.0 "
|
510 |
-
"fully transparent."
|
511 |
-
|
512 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:210
|
513 |
-
msgid "Lines Settings"
|
514 |
-
msgstr "Lines Settings"
|
515 |
-
|
516 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:227
|
517 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:394
|
518 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:102
|
519 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:161
|
520 |
-
msgid "Visible In Legend"
|
521 |
-
msgstr "Visible In Legend"
|
522 |
-
|
523 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:256
|
524 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:131
|
525 |
-
msgid "Overrides the global line width and point size values for this series."
|
526 |
-
msgstr "Overrides the global line width and point size values for this series."
|
527 |
-
|
528 |
-
#: classes/Visualizer/Render/Sidebar/Linear.php:273
|
529 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:196
|
530 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:213
|
531 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:308
|
532 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:325
|
533 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:408
|
534 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:146
|
535 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:173
|
536 |
-
msgid "Color"
|
537 |
-
msgstr "Color"
|
538 |
-
|
539 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:44
|
540 |
-
msgid "Bars Settings"
|
541 |
-
msgstr "Bars Settings"
|
542 |
-
|
543 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:61
|
544 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:84
|
545 |
-
msgid "Is Stacked"
|
546 |
-
msgstr "Is Stacked"
|
547 |
-
|
548 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:65
|
549 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:88
|
550 |
-
msgid "If set to yes, series elements are stacked."
|
551 |
-
msgstr "If set to yes, series elements are stacked."
|
552 |
-
|
553 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:71
|
554 |
-
msgid "Bars Opacity"
|
555 |
-
msgstr "Bars Opacity"
|
556 |
-
|
557 |
-
#: classes/Visualizer/Render/Sidebar/Columnar.php:74
|
558 |
-
msgid ""
|
559 |
-
"Bars transparency, with 1.0 being completely opaque and 0.0 fully "
|
560 |
-
"transparent."
|
561 |
-
msgstr ""
|
562 |
-
"Bars transparency, with 1.0 being completely opaque and 0.0 fully "
|
563 |
-
"transparent."
|
564 |
-
|
565 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:83
|
566 |
-
msgid "Outside the chart"
|
567 |
-
msgstr "Outside the chart"
|
568 |
-
|
569 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:84
|
570 |
-
msgid "None"
|
571 |
-
msgstr "None"
|
572 |
-
|
573 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:104
|
574 |
-
msgid "Chart Title Position"
|
575 |
-
msgstr "Chart Title Position"
|
576 |
-
|
577 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:108
|
578 |
-
msgid "Where to place the chart title, compared to the chart area."
|
579 |
-
msgstr "Where to place the chart title, compared to the chart area."
|
580 |
-
|
581 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:121
|
582 |
-
msgid "Axes Titles Position"
|
583 |
-
msgstr "Axes Titles Position"
|
584 |
-
|
585 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:125
|
586 |
-
msgid "Determines where to place the axis titles, compared to the chart area."
|
587 |
-
msgstr "Determines where to place the axis titles, compared to the chart area."
|
588 |
-
|
589 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:138
|
590 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:250
|
591 |
-
msgid "Axis Title"
|
592 |
-
msgstr "Axis Title"
|
593 |
-
|
594 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:141
|
595 |
-
msgid "The title of the horizontal axis."
|
596 |
-
msgstr "The title of the horizontal axis."
|
597 |
-
|
598 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:145
|
599 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:257
|
600 |
-
msgid "Text Position"
|
601 |
-
msgstr "Text Position"
|
602 |
-
|
603 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:149
|
604 |
-
msgid "Position of the horizontal axis text, relative to the chart area."
|
605 |
-
msgstr "Position of the horizontal axis text, relative to the chart area."
|
606 |
-
|
607 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:153
|
608 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:265
|
609 |
-
msgid "Direction"
|
610 |
-
msgstr "Direction"
|
611 |
-
|
612 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:158
|
613 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:270
|
614 |
-
msgid "Identical Direction"
|
615 |
-
msgstr "Identical Direction"
|
616 |
-
|
617 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:159
|
618 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:271
|
619 |
-
msgid "Reverse Direction"
|
620 |
-
msgstr "Reverse Direction"
|
621 |
-
|
622 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:161
|
623 |
-
msgid "The direction in which the values along the horizontal axis grow."
|
624 |
-
msgstr "The direction in which the values along the horizontal axis grow."
|
625 |
-
|
626 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:165
|
627 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:277
|
628 |
-
msgid "Base Line Color"
|
629 |
-
msgstr "Base Line Color"
|
630 |
-
|
631 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:180
|
632 |
-
msgid "Horizontal Axis Settings"
|
633 |
-
msgstr "Horizontal Axis Settings"
|
634 |
-
|
635 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:186
|
636 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:298
|
637 |
-
msgid "Grid Lines"
|
638 |
-
msgstr "Grid Lines"
|
639 |
-
|
640 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:188
|
641 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:205
|
642 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:300
|
643 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:317
|
644 |
-
msgid "Count"
|
645 |
-
msgstr "Count"
|
646 |
-
|
647 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:191
|
648 |
-
msgid ""
|
649 |
-
"The number of horizontal gridlines inside the chart area. Minimum value is "
|
650 |
-
"2. Specify -1 to automatically compute the number of gridlines."
|
651 |
-
msgstr ""
|
652 |
-
"The number of horizontal gridlines inside the chart area. Minimum value is "
|
653 |
-
"2. Specify -1 to automatically compute the number of gridlines."
|
654 |
-
|
655 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:203
|
656 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:315
|
657 |
-
msgid "Minor Grid Lines"
|
658 |
-
msgstr "Minor Grid Lines"
|
659 |
-
|
660 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:208
|
661 |
-
msgid "The number of horizontal minor gridlines between two regular gridlines."
|
662 |
-
msgstr ""
|
663 |
-
"The number of horizontal minor gridlines between two regular gridlines."
|
664 |
-
|
665 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:222
|
666 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:334
|
667 |
-
msgid "View Window"
|
668 |
-
msgstr "View Window"
|
669 |
-
|
670 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:224
|
671 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:336
|
672 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:202
|
673 |
-
msgid "Maximum Value"
|
674 |
-
msgstr "Maximum Value"
|
675 |
-
|
676 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:231
|
677 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:343
|
678 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:188
|
679 |
-
msgid "Minimum Value"
|
680 |
-
msgstr "Minimum Value"
|
681 |
-
|
682 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:253
|
683 |
-
msgid "The title of the vertical axis."
|
684 |
-
msgstr "The title of the vertical axis."
|
685 |
-
|
686 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:261
|
687 |
-
msgid "Position of the vertical axis text, relative to the chart area."
|
688 |
-
msgstr "Position of the vertical axis text, relative to the chart area."
|
689 |
-
|
690 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:273
|
691 |
-
msgid "The direction in which the values along the vertical axis grow."
|
692 |
-
msgstr "The direction in which the values along the vertical axis grow."
|
693 |
-
|
694 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:292
|
695 |
-
msgid "Vertical Axis Settings"
|
696 |
-
msgstr "Vertical Axis Settings"
|
697 |
-
|
698 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:303
|
699 |
-
msgid ""
|
700 |
-
"The number of vertical gridlines inside the chart area. Minimum value is 2. "
|
701 |
-
"Specify -1 to automatically compute the number of gridlines."
|
702 |
-
msgstr ""
|
703 |
-
"The number of vertical gridlines inside the chart area. Minimum value is 2. "
|
704 |
-
"Specify -1 to automatically compute the number of gridlines."
|
705 |
-
|
706 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:320
|
707 |
-
msgid "The number of vertical minor gridlines between two regular gridlines."
|
708 |
-
msgstr "The number of vertical minor gridlines between two regular gridlines."
|
709 |
-
|
710 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:373
|
711 |
-
msgid "Series Settings"
|
712 |
-
msgstr "Series Settings"
|
713 |
-
|
714 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:429
|
715 |
-
msgid "Enter custom format pattern to apply to horizontal axis labels."
|
716 |
-
msgstr "Enter custom format pattern to apply to horizontal axis labels."
|
717 |
-
|
718 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:431
|
719 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:460
|
720 |
-
#, php-format
|
721 |
-
msgid ""
|
722 |
-
"For number axis labels, this is a subset of the decimal formatting %sICU "
|
723 |
-
"pattern set%s. For instance, $#,###.## will display values $1,234.56 for "
|
724 |
-
"value 1234.56. Pay attention that if you use #%% percentage format then your "
|
725 |
-
"values will be multiplied by 100."
|
726 |
-
msgstr ""
|
727 |
-
"For number axis labels, this is a subset of the decimal formatting %sICU "
|
728 |
-
"pattern set%s. For instance, $#,###.## will display values $1,234.56 for "
|
729 |
-
"value 1234.56. Pay attention that if you use #%% percentage format then your "
|
730 |
-
"values will be multiplied by 100."
|
731 |
-
|
732 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:436
|
733 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:465
|
734 |
-
#, php-format
|
735 |
-
msgid ""
|
736 |
-
"For date axis labels, this is a subset of the date formatting %sICU date and "
|
737 |
-
"time format%s."
|
738 |
-
msgstr ""
|
739 |
-
"For date axis labels, this is a subset of the date formatting %sICU date and "
|
740 |
-
"time format%s."
|
741 |
-
|
742 |
-
#: classes/Visualizer/Render/Sidebar/Graph.php:458
|
743 |
-
msgid "Enter custom format pattern to apply to vertical axis labels."
|
744 |
-
msgstr "Enter custom format pattern to apply to vertical axis labels."
|
745 |
-
|
746 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:58
|
747 |
-
msgid "Map Settings"
|
748 |
-
msgstr "Map Settings"
|
749 |
-
|
750 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:59
|
751 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:71
|
752 |
-
msgid "Region"
|
753 |
-
msgstr "Region"
|
754 |
-
|
755 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:61
|
756 |
-
msgid ""
|
757 |
-
"Configure the region area to display on the map. (Surrounding areas will be "
|
758 |
-
"displayed as well.) Can be one of the following:"
|
759 |
-
msgstr ""
|
760 |
-
"Configure the region area to display on the map. (Surrounding areas will be "
|
761 |
-
"displayed as well.) Can be one of the following:"
|
762 |
-
|
763 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:63
|
764 |
-
msgid "'world' - A map of the entire world."
|
765 |
-
msgstr "'world' - A map of the entire world."
|
766 |
-
|
767 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:64
|
768 |
-
#, php-format
|
769 |
-
msgid ""
|
770 |
-
"A continent or a sub-continent, specified by its %s code, e.g., '011' for "
|
771 |
-
"Western Africa."
|
772 |
-
msgstr ""
|
773 |
-
"A continent or a sub-continent, specified by its %s code, e.g., '011' for "
|
774 |
-
"Western Africa."
|
775 |
-
|
776 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:65
|
777 |
-
#, php-format
|
778 |
-
msgid "A country, specified by its %s code, e.g., 'AU' for Australia."
|
779 |
-
msgstr "A country, specified by its %s code, e.g., 'AU' for Australia."
|
780 |
-
|
781 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:66
|
782 |
-
#, php-format
|
783 |
-
msgid ""
|
784 |
-
"A state in the United States, specified by its %s code, e.g., 'US-AL' for "
|
785 |
-
"Alabama. Note that the resolution option must be set to either 'provinces' "
|
786 |
-
"or 'metros'."
|
787 |
-
msgstr ""
|
788 |
-
"A state in the United States, specified by its %s code, e.g., 'US-AL' for "
|
789 |
-
"Alabama. Note that the resolution option must be set to either 'provinces' "
|
790 |
-
"or 'metros'."
|
791 |
-
|
792 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:79
|
793 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:91
|
794 |
-
msgid "Resolution"
|
795 |
-
msgstr "Resolution"
|
796 |
-
|
797 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:82
|
798 |
-
msgid "The resolution of the map borders. Choose one of the following values:"
|
799 |
-
msgstr "The resolution of the map borders. Choose one of the following values:"
|
800 |
-
|
801 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:84
|
802 |
-
msgid "'countries' - Supported for all regions, except for US state regions."
|
803 |
-
msgstr "'countries' - Supported for all regions, except for US state regions."
|
804 |
-
|
805 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:85
|
806 |
-
msgid ""
|
807 |
-
"'provinces' - Supported only for country regions and US state regions. Not "
|
808 |
-
"supported for all countries; please test a country to see whether this "
|
809 |
-
"option is supported."
|
810 |
-
msgstr ""
|
811 |
-
"'provinces' - Supported only for country regions and US state regions. Not "
|
812 |
-
"supported for all countries; please test a country to see whether this "
|
813 |
-
"option is supported."
|
814 |
-
|
815 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:86
|
816 |
-
msgid ""
|
817 |
-
"'metros' - Supported for the US country region and US state regions only."
|
818 |
-
msgstr ""
|
819 |
-
"'metros' - Supported for the US country region and US state regions only."
|
820 |
-
|
821 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:96
|
822 |
-
msgid "Countries"
|
823 |
-
msgstr "Countries"
|
824 |
-
|
825 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:97
|
826 |
-
msgid "Provinces"
|
827 |
-
msgstr "Provinces"
|
828 |
-
|
829 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:98
|
830 |
-
msgid "Metros"
|
831 |
-
msgstr "Metros"
|
832 |
-
|
833 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:104
|
834 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:116
|
835 |
-
msgid "Display Mode"
|
836 |
-
msgstr "Display Mode"
|
837 |
-
|
838 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:107
|
839 |
-
msgid ""
|
840 |
-
"Determines which type of map this is. The following values are supported:"
|
841 |
-
msgstr ""
|
842 |
-
"Determines which type of map this is. The following values are supported:"
|
843 |
-
|
844 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:109
|
845 |
-
msgid "'auto' - Choose based on the format of the data."
|
846 |
-
msgstr "'auto' - Choose based on the format of the data."
|
847 |
-
|
848 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:110
|
849 |
-
msgid "'regions' - This is a region map."
|
850 |
-
msgstr "'regions' - This is a region map."
|
851 |
-
|
852 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:111
|
853 |
-
msgid "'markers' - This is a marker map."
|
854 |
-
msgstr "'markers' - This is a marker map."
|
855 |
-
|
856 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:121
|
857 |
-
msgid "Auto"
|
858 |
-
msgstr "Auto"
|
859 |
-
|
860 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:122
|
861 |
-
msgid "Regions"
|
862 |
-
msgstr "Regions"
|
863 |
-
|
864 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:123
|
865 |
-
msgid "Markers"
|
866 |
-
msgstr "Markers"
|
867 |
-
|
868 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:163
|
869 |
-
msgid "Color Axis"
|
870 |
-
msgstr "Color Axis"
|
871 |
-
|
872 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:165
|
873 |
-
msgid ""
|
874 |
-
"Configure color axis gradient scale, minimum and maximun values and a color "
|
875 |
-
"of the dateless regions."
|
876 |
-
msgstr ""
|
877 |
-
"Configure color axis gradient scale, minimum and maximun values and a color "
|
878 |
-
"of the dateless regions."
|
879 |
-
|
880 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:169
|
881 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:233
|
882 |
-
msgid "Minimum And Maximum Values"
|
883 |
-
msgstr "Minimum And Maximum Values"
|
884 |
-
|
885 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:183
|
886 |
-
msgid "Determines the minimum and maximum values of color axis."
|
887 |
-
msgstr "Determines the minimum and maximum values of color axis."
|
888 |
-
|
889 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:195
|
890 |
-
msgid "Intermediate Value"
|
891 |
-
msgstr "Intermediate Value"
|
892 |
-
|
893 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:209
|
894 |
-
msgid "Dateless Region"
|
895 |
-
msgstr "Dateless Region"
|
896 |
-
|
897 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:227
|
898 |
-
msgid "Size Axis"
|
899 |
-
msgstr "Size Axis"
|
900 |
-
|
901 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:229
|
902 |
-
msgid ""
|
903 |
-
"Configure how values are associated with bubble size, minimum and maximun "
|
904 |
-
"values and marker opacity setting."
|
905 |
-
msgstr ""
|
906 |
-
"Configure how values are associated with bubble size, minimum and maximun "
|
907 |
-
"values and marker opacity setting."
|
908 |
-
|
909 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:247
|
910 |
-
msgid "Determines the minimum and maximum values of size axis."
|
911 |
-
msgstr "Determines the minimum and maximum values of size axis."
|
912 |
-
|
913 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:253
|
914 |
-
msgid "Minimum And Maximum Marker Radius"
|
915 |
-
msgstr "Minimum And Maximum Marker Radius"
|
916 |
-
|
917 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:267
|
918 |
-
msgid ""
|
919 |
-
"Determines the radius of the smallest and largest possible bubbles, in "
|
920 |
-
"pixels."
|
921 |
-
msgstr ""
|
922 |
-
"Determines the radius of the smallest and largest possible bubbles, in "
|
923 |
-
"pixels."
|
924 |
-
|
925 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:272
|
926 |
-
msgid "Marker Opacity"
|
927 |
-
msgstr "Marker Opacity"
|
928 |
-
|
929 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:275
|
930 |
-
msgid ""
|
931 |
-
"The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully "
|
932 |
-
"opaque."
|
933 |
-
msgstr ""
|
934 |
-
"The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully "
|
935 |
-
"opaque."
|
936 |
-
|
937 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:293
|
938 |
-
msgid "Magnifying Glass"
|
939 |
-
msgstr "Magnifying Glass"
|
940 |
-
|
941 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:295
|
942 |
-
msgid ""
|
943 |
-
"Configure magnifying glass settings, which appears, when the user lingers "
|
944 |
-
"over a cluttered marker. Note: this feature is not supported in browsers "
|
945 |
-
"that do not support SVG, i.e. Internet Explorer version 8 or earlier."
|
946 |
-
msgstr ""
|
947 |
-
"Configure magnifying glass settings, which appears, when the user lingers "
|
948 |
-
"over a cluttered marker. Note: this feature is not supported in browsers "
|
949 |
-
"that do not support SVG, i.e. Internet Explorer version 8 or earlier."
|
950 |
-
|
951 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:298
|
952 |
-
msgid "Enabled"
|
953 |
-
msgstr "Enabled"
|
954 |
-
|
955 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:302
|
956 |
-
msgid ""
|
957 |
-
"If yes, when the user lingers over a cluttered marker, a magnifiying glass "
|
958 |
-
"will be opened."
|
959 |
-
msgstr ""
|
960 |
-
"If yes, when the user lingers over a cluttered marker, a magnifiying glass "
|
961 |
-
"will be opened."
|
962 |
-
|
963 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:306
|
964 |
-
msgid "Zoom Factor"
|
965 |
-
msgstr "Zoom Factor"
|
966 |
-
|
967 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:309
|
968 |
-
msgid ""
|
969 |
-
"The zoom factor of the magnifying glass. Can be any number greater than 0."
|
970 |
-
msgstr ""
|
971 |
-
"The zoom factor of the magnifying glass. Can be any number greater than 0."
|
972 |
-
|
973 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:324
|
974 |
-
msgid "Layout Settings"
|
975 |
-
msgstr "Layout Settings"
|
976 |
-
|
977 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:349
|
978 |
-
msgid "Keep Aspect Ratio"
|
979 |
-
msgstr "Keep Aspect Ratio"
|
980 |
-
|
981 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:353
|
982 |
-
msgid ""
|
983 |
-
"If yes, the map will be drawn at the largest size that can fit inside the "
|
984 |
-
"chart area at its natural aspect ratio. If only one of the width and height "
|
985 |
-
"options is specified, the other one will be calculated according to the "
|
986 |
-
"aspect ratio."
|
987 |
-
msgstr ""
|
988 |
-
"If yes, the map will be drawn at the largest size that can fit inside the "
|
989 |
-
"chart area at its natural aspect ratio. If only one of the width and height "
|
990 |
-
"options is specified, the other one will be calculated according to the "
|
991 |
-
"aspect ratio."
|
992 |
-
|
993 |
-
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:354
|
994 |
-
msgid ""
|
995 |
-
"If no, the map will be stretched to the exact size of the chart as specified "
|
996 |
-
"by the width and height options."
|
997 |
-
msgstr ""
|
998 |
-
"If no, the map will be stretched to the exact size of the chart as specified "
|
999 |
-
"by the width and height options."
|
1000 |
-
|
1001 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:74
|
1002 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:138
|
1003 |
-
msgid "Area Opacity"
|
1004 |
-
msgstr "Area Opacity"
|
1005 |
-
|
1006 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:77
|
1007 |
-
msgid ""
|
1008 |
-
"The default opacity of the colored area under an area chart series, where "
|
1009 |
-
"0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an "
|
1010 |
-
"individual series, set the area opacity value in the series property."
|
1011 |
-
msgstr ""
|
1012 |
-
"The default opacity of the colored area under an area chart series, where "
|
1013 |
-
"0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an "
|
1014 |
-
"individual series, set the area opacity value in the series property."
|
1015 |
-
|
1016 |
-
#: classes/Visualizer/Render/Sidebar/Type/Area.php:141
|
1017 |
-
msgid ""
|
1018 |
-
"The opacity of the colored area, where 0.0 is fully transparent and 1.0 is "
|
1019 |
-
"fully opaque."
|
1020 |
-
msgstr ""
|
1021 |
-
"The opacity of the colored area, where 0.0 is fully transparent and 1.0 is "
|
1022 |
-
"fully opaque."
|
1023 |
-
|
1024 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:63
|
1025 |
-
msgid "Min And Max Values"
|
1026 |
-
msgstr "Min And Max Values"
|
1027 |
-
|
1028 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:77
|
1029 |
-
msgid "The maximal and minimal values of the gauge."
|
1030 |
-
msgstr "The maximal and minimal values of the gauge."
|
1031 |
-
|
1032 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:82
|
1033 |
-
msgid "Minor Ticks"
|
1034 |
-
msgstr "Minor Ticks"
|
1035 |
-
|
1036 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:85
|
1037 |
-
msgid "The number of minor tick section in each major tick section."
|
1038 |
-
msgstr "The number of minor tick section in each major tick section."
|
1039 |
-
|
1040 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:103
|
1041 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:128
|
1042 |
-
msgid "Green Color"
|
1043 |
-
msgstr "Green Color"
|
1044 |
-
|
1045 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:105
|
1046 |
-
msgid "Configure the green section of the gauge chart."
|
1047 |
-
msgstr "Configure the green section of the gauge chart."
|
1048 |
-
|
1049 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:109
|
1050 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:151
|
1051 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:193
|
1052 |
-
msgid "From And To Range"
|
1053 |
-
msgstr "From And To Range"
|
1054 |
-
|
1055 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:123
|
1056 |
-
msgid "The lowest and highest values for a range marked by a green color."
|
1057 |
-
msgstr "The lowest and highest values for a range marked by a green color."
|
1058 |
-
|
1059 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:145
|
1060 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:170
|
1061 |
-
msgid "Yellow Color"
|
1062 |
-
msgstr "Yellow Color"
|
1063 |
-
|
1064 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:147
|
1065 |
-
msgid "Configure the yellow section of the gauge chart."
|
1066 |
-
msgstr "Configure the yellow section of the gauge chart."
|
1067 |
-
|
1068 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:165
|
1069 |
-
msgid "The lowest and highest values for a range marked by a yellow color."
|
1070 |
-
msgstr "The lowest and highest values for a range marked by a yellow color."
|
1071 |
-
|
1072 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:187
|
1073 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:212
|
1074 |
-
msgid "Red Color"
|
1075 |
-
msgstr "Red Color"
|
1076 |
-
|
1077 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:189
|
1078 |
-
msgid "Configure the red section of the gauge chart."
|
1079 |
-
msgstr "Configure the red section of the gauge chart."
|
1080 |
-
|
1081 |
-
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:207
|
1082 |
-
msgid "The lowest and highest values for a range marked by a red color."
|
1083 |
-
msgstr "The lowest and highest values for a range marked by a red color."
|
1084 |
-
|
1085 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:58
|
1086 |
-
msgid "Pie Settings"
|
1087 |
-
msgstr "Pie Settings"
|
1088 |
-
|
1089 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:61
|
1090 |
-
msgid "Is 3D"
|
1091 |
-
msgstr "Is 3D"
|
1092 |
-
|
1093 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:65
|
1094 |
-
msgid "If set to yes, displays a three-dimensional chart."
|
1095 |
-
msgstr "If set to yes, displays a three-dimensional chart."
|
1096 |
-
|
1097 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:69
|
1098 |
-
msgid "Reverse Categories"
|
1099 |
-
msgstr "Reverse Categories"
|
1100 |
-
|
1101 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:73
|
1102 |
-
msgid "If set to yes, will draw slices counterclockwise."
|
1103 |
-
msgstr "If set to yes, will draw slices counterclockwise."
|
1104 |
-
|
1105 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:77
|
1106 |
-
msgid "Slice Text"
|
1107 |
-
msgstr "Slice Text"
|
1108 |
-
|
1109 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:82
|
1110 |
-
msgid "The percentage of the slice size out of the total"
|
1111 |
-
msgstr "The percentage of the slice size out of the total"
|
1112 |
-
|
1113 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:83
|
1114 |
-
msgid "The quantitative value of the slice"
|
1115 |
-
msgstr "The quantitative value of the slice"
|
1116 |
-
|
1117 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:84
|
1118 |
-
msgid "The name of the slice"
|
1119 |
-
msgstr "The name of the slice"
|
1120 |
-
|
1121 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:85
|
1122 |
-
msgid "No text is displayed"
|
1123 |
-
msgstr "No text is displayed"
|
1124 |
-
|
1125 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:87
|
1126 |
-
msgid "The content of the text displayed on the slice."
|
1127 |
-
msgstr "The content of the text displayed on the slice."
|
1128 |
-
|
1129 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:91
|
1130 |
-
msgid "Pie Hole"
|
1131 |
-
msgstr "Pie Hole"
|
1132 |
-
|
1133 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:94
|
1134 |
-
msgid ""
|
1135 |
-
"If between 0 and 1, displays a donut chart. The hole with have a radius "
|
1136 |
-
"equal to number times the radius of the chart. Only applicable when the "
|
1137 |
-
"chart is two-dimensional."
|
1138 |
-
msgstr ""
|
1139 |
-
"If between 0 and 1, displays a donut chart. The hole with have a radius "
|
1140 |
-
"equal to number times the radius of the chart. Only applicable when the "
|
1141 |
-
"chart is two-dimensional."
|
1142 |
-
|
1143 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:99
|
1144 |
-
msgid "Start Angle"
|
1145 |
-
msgstr "Start Angle"
|
1146 |
-
|
1147 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:102
|
1148 |
-
msgid ""
|
1149 |
-
"The angle, in degrees, to rotate the chart by. The default of 0 will orient "
|
1150 |
-
"the leftmost edge of the first slice directly up."
|
1151 |
-
msgstr ""
|
1152 |
-
"The angle, in degrees, to rotate the chart by. The default of 0 will orient "
|
1153 |
-
"the leftmost edge of the first slice directly up."
|
1154 |
-
|
1155 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:107
|
1156 |
-
msgid "Slice Border Color"
|
1157 |
-
msgstr "Slice Border Color"
|
1158 |
-
|
1159 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:124
|
1160 |
-
msgid "Residue Settings"
|
1161 |
-
msgstr "Residue Settings"
|
1162 |
-
|
1163 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:127
|
1164 |
-
msgid "Visibility Threshold"
|
1165 |
-
msgstr "Visibility Threshold"
|
1166 |
-
|
1167 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:130
|
1168 |
-
msgid ""
|
1169 |
-
"The slice relative part, below which a slice will not show individually. All "
|
1170 |
-
"slices that have not passed this threshold will be combined to a single "
|
1171 |
-
"slice, whose size is the sum of all their sizes. Default is not to show "
|
1172 |
-
"individually any slice which is smaller than half a degree."
|
1173 |
-
msgstr ""
|
1174 |
-
"The slice relative part, below which a slice will not show individually. All "
|
1175 |
-
"slices that have not passed this threshold will be combined to a single "
|
1176 |
-
"slice, whose size is the sum of all their sizes. Default is not to show "
|
1177 |
-
"individually any slice which is smaller than half a degree."
|
1178 |
-
|
1179 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:135
|
1180 |
-
msgid "Residue Slice Label"
|
1181 |
-
msgstr "Residue Slice Label"
|
1182 |
-
|
1183 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:138
|
1184 |
-
msgid ""
|
1185 |
-
"A label for the combination slice that holds all slices below slice "
|
1186 |
-
"visibility threshold."
|
1187 |
-
msgstr ""
|
1188 |
-
"A label for the combination slice that holds all slices below slice "
|
1189 |
-
"visibility threshold."
|
1190 |
-
|
1191 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:139
|
1192 |
-
msgid "Other"
|
1193 |
-
msgstr "Other"
|
1194 |
-
|
1195 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:143
|
1196 |
-
msgid "Residue Slice Color"
|
1197 |
-
msgstr "Residue Slice Color"
|
1198 |
-
|
1199 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:160
|
1200 |
-
msgid "Slices Settings"
|
1201 |
-
msgstr "Slices Settings"
|
1202 |
-
|
1203 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:164
|
1204 |
-
msgid "Slice Offset"
|
1205 |
-
msgstr "Slice Offset"
|
1206 |
-
|
1207 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:167
|
1208 |
-
msgid ""
|
1209 |
-
"How far to separate the slice from the rest of the pie, from 0.0 (not at "
|
1210 |
-
"all) to 1.0 (the pie's radius)."
|
1211 |
-
msgstr ""
|
1212 |
-
"How far to separate the slice from the rest of the pie, from 0.0 (not at "
|
1213 |
-
"all) to 1.0 (the pie's radius)."
|
1214 |
-
|
1215 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:172
|
1216 |
-
msgid "Slice Color"
|
1217 |
-
msgstr "Slice Color"
|
1218 |
-
|
1219 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:193
|
1220 |
-
msgid "Text"
|
1221 |
-
msgstr "Text"
|
1222 |
-
|
1223 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:198
|
1224 |
-
msgid ""
|
1225 |
-
"Display both the absolute value of the slice and the percentage of the whole"
|
1226 |
-
msgstr ""
|
1227 |
-
"Display both the absolute value of the slice and the percentage of the whole"
|
1228 |
-
|
1229 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:199
|
1230 |
-
msgid "Display only the absolute value of the slice"
|
1231 |
-
msgstr "Display only the absolute value of the slice"
|
1232 |
-
|
1233 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:200
|
1234 |
-
msgid "Display only the percentage of the whole represented by the slice"
|
1235 |
-
msgstr "Display only the percentage of the whole represented by the slice"
|
1236 |
-
|
1237 |
-
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:202
|
1238 |
-
msgid ""
|
1239 |
-
"Determines what information to display when the user hovers over a pie slice."
|
1240 |
-
msgstr ""
|
1241 |
-
"Determines what information to display when the user hovers over a pie slice."
|
1242 |
-
|
1243 |
-
#: classes/Visualizer/Render/Sidebar/Type/Line.php:63
|
1244 |
-
msgid "Interpolate Nulls"
|
1245 |
-
msgstr "Interpolate Nulls"
|
1246 |
-
|
1247 |
-
#: classes/Visualizer/Render/Sidebar/Type/Line.php:67
|
1248 |
-
msgid ""
|
1249 |
-
"Whether to guess the value of missing points. If yes, it will guess the "
|
1250 |
-
"value of any missing data based on neighboring points. If no, it will leave "
|
1251 |
-
"a break in the line at the unknown point."
|
1252 |
-
msgstr ""
|
1253 |
-
"Whether to guess the value of missing points. If yes, it will guess the "
|
1254 |
-
"value of any missing data based on neighboring points. If no, it will leave "
|
1255 |
-
"a break in the line at the unknown point."
|
1256 |
-
|
1257 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:58
|
1258 |
-
msgid "Candles Settings"
|
1259 |
-
msgstr "Candles Settings"
|
1260 |
-
|
1261 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:101
|
1262 |
-
msgid "Failing Candles"
|
1263 |
-
msgstr "Failing Candles"
|
1264 |
-
|
1265 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:106
|
1266 |
-
msgid "The stroke width of falling candles."
|
1267 |
-
msgstr "The stroke width of falling candles."
|
1268 |
-
|
1269 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:118
|
1270 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:142
|
1271 |
-
msgid "Fill Color"
|
1272 |
-
msgstr "Fill Color"
|
1273 |
-
|
1274 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:125
|
1275 |
-
msgid "Rising Candles"
|
1276 |
-
msgstr "Rising Candles"
|
1277 |
-
|
1278 |
-
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:130
|
1279 |
-
msgid "The stroke width of rising candles."
|
1280 |
-
msgstr "The stroke width of rising candles."
|
1281 |
-
|
1282 |
-
#: classes/Visualizer/Render/Page/Settings.php:56
|
1283 |
-
#: classes/Visualizer/Render/Page/Data.php:102
|
1284 |
-
msgid "Back"
|
1285 |
-
msgstr "Back"
|
1286 |
-
|
1287 |
-
#: classes/Visualizer/Render/Page/Data.php:62
|
1288 |
-
msgid "Upload CSV File"
|
1289 |
-
msgstr "Upload CSV File"
|
1290 |
-
|
1291 |
-
#: classes/Visualizer/Render/Page/Data.php:67
|
1292 |
-
msgid ""
|
1293 |
-
"Select and upload your data CSV file here. The first row of the CSV file "
|
1294 |
-
"should contain the column headings. The second one should contain series "
|
1295 |
-
"type (string, number, boolean, date, datetime, timeofday)."
|
1296 |
-
msgstr ""
|
1297 |
-
"Select and upload your data CSV file here. The first row of the CSV file "
|
1298 |
-
"should contain the column headings. The second one should contain series "
|
1299 |
-
"type (string, number, boolean, date, datetime, timeofday)."
|
1300 |
-
|
1301 |
-
#: classes/Visualizer/Render/Page/Data.php:71
|
1302 |
-
msgid ""
|
1303 |
-
"If you are unsure about how to format your data CSV then please take a look "
|
1304 |
-
"at this sample:"
|
1305 |
-
msgstr ""
|
1306 |
-
"If you are unsure about how to format your data CSV then please take a look "
|
1307 |
-
"at this sample:"
|
1308 |
-
|
1309 |
-
#: classes/Visualizer/Render/Page/Data.php:73
|
1310 |
-
#, php-format
|
1311 |
-
msgid "or read how you can add Google spreadsheet in following %sarticle%s."
|
1312 |
-
msgstr "or read how you can add Google spreadsheet in following %sarticle%s."
|
1313 |
-
|
1314 |
-
#: classes/Visualizer/Render/Page/Data.php:81
|
1315 |
-
msgid "From Computer"
|
1316 |
-
msgstr "From Computer"
|
1317 |
-
|
1318 |
-
#: classes/Visualizer/Render/Page/Data.php:85
|
1319 |
-
msgid "From Web"
|
1320 |
-
msgstr "From Web"
|
1321 |
-
|
1322 |
-
#: classes/Visualizer/Render/Page/Data.php:105
|
1323 |
-
#: classes/Visualizer/Render/Page/Types.php:84
|
1324 |
-
msgid "Next"
|
1325 |
-
msgstr "Next"
|
1326 |
-
|
1327 |
-
#: classes/Visualizer/Module/Admin.php:78
|
1328 |
-
msgid "All"
|
1329 |
-
msgstr "All"
|
1330 |
-
|
1331 |
-
#: classes/Visualizer/Module/Admin.php:79
|
1332 |
-
msgid "Pie"
|
1333 |
-
msgstr "Pie"
|
1334 |
-
|
1335 |
-
#: classes/Visualizer/Module/Admin.php:80
|
1336 |
-
msgid "Line"
|
1337 |
-
msgstr "Line"
|
1338 |
-
|
1339 |
-
#: classes/Visualizer/Module/Admin.php:81
|
1340 |
-
msgid "Area"
|
1341 |
-
msgstr "Area"
|
1342 |
-
|
1343 |
-
#: classes/Visualizer/Module/Admin.php:82
|
1344 |
-
msgid "Geo"
|
1345 |
-
msgstr "Geo"
|
1346 |
-
|
1347 |
-
#: classes/Visualizer/Module/Admin.php:83
|
1348 |
-
msgid "Bar"
|
1349 |
-
msgstr "Bar"
|
1350 |
-
|
1351 |
-
#: classes/Visualizer/Module/Admin.php:84
|
1352 |
-
msgid "Column"
|
1353 |
-
msgstr "Column"
|
1354 |
-
|
1355 |
-
#: classes/Visualizer/Module/Admin.php:85
|
1356 |
-
msgid "Gauge"
|
1357 |
-
msgstr "Gauge"
|
1358 |
-
|
1359 |
-
#: classes/Visualizer/Module/Admin.php:86
|
1360 |
-
msgid "Scatter"
|
1361 |
-
msgstr "Scatter"
|
1362 |
-
|
1363 |
-
#: classes/Visualizer/Module/Admin.php:87
|
1364 |
-
msgid "Candelstick"
|
1365 |
-
msgstr "Candelstick"
|
1366 |
-
|
1367 |
-
#: classes/Visualizer/Module/Admin.php:132
|
1368 |
-
msgid "Visualizations"
|
1369 |
-
msgstr "Visualizations"
|
1370 |
-
|
1371 |
-
#: classes/Visualizer/Module/Admin.php:135
|
1372 |
-
msgid "From Library"
|
1373 |
-
msgstr "From Library"
|
1374 |
-
|
1375 |
-
#: classes/Visualizer/Module/Admin.php:136
|
1376 |
-
msgid "Create New"
|
1377 |
-
msgstr "Create New"
|
1378 |
-
|
1379 |
-
#: classes/Visualizer/Module/Admin.php:324
|
1380 |
-
msgid "Library"
|
1381 |
-
msgstr "Library"
|
1382 |
-
|
1383 |
-
#: classes/Visualizer/Module/Admin.php:347
|
1384 |
-
msgid "Knowledge Base"
|
1385 |
-
msgstr "Knowledge Base"
|
1386 |
-
|
1387 |
-
#: classes/Visualizer/Module/Admin.php:352
|
1388 |
-
msgid "Donate"
|
1389 |
-
msgstr "Donate"
|
1390 |
-
|
1391 |
-
#: classes/Visualizer/Module/Chart.php:318
|
1392 |
-
msgid "Please, enter the URL of CSV file:"
|
1393 |
-
msgstr "Please, enter the URL of CSV file:"
|
1394 |
-
|
1395 |
-
#: classes/Visualizer/Module/Chart.php:319
|
1396 |
-
msgid "You have entered invalid URL. Please, insert proper URL."
|
1397 |
-
msgstr "You have entered invalid URL. Please, insert proper URL."
|
1398 |
-
|
1399 |
-
#: classes/Visualizer/Module/Chart.php:381
|
1400 |
-
msgid "Save Chart"
|
1401 |
-
msgstr "Save Chart"
|
1402 |
-
|
1403 |
-
#: classes/Visualizer/Module/Chart.php:382
|
1404 |
-
msgid "Create Chart"
|
1405 |
-
msgstr "Create Chart"
|
1406 |
-
|
1407 |
-
#: classes/Visualizer/Module/Chart.php:384
|
1408 |
-
msgid "Insert Chart"
|
1409 |
-
msgstr "Insert Chart"
|
1410 |
-
|
1411 |
-
#: classes/Visualizer/Module/Chart.php:444
|
1412 |
-
msgid "CSV file with chart data was not uploaded. Please, try again."
|
1413 |
-
msgstr "CSV file with chart data was not uploaded. Please, try again."
|
1414 |
-
|
1415 |
-
#: classes/Visualizer/Module/Chart.php:459
|
1416 |
-
msgid "CSV file is broken or invalid. Please, try again."
|
1417 |
-
msgstr "CSV file is broken or invalid. Please, try again."
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Visualizer\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-04-05 14:41+0300\n"
|
6 |
+
"PO-Revision-Date: 2014-04-05 14:41+0300\n"
|
7 |
+
"Last-Translator: Eugene Manuilov <eugene@manuilov.org>\n"
|
8 |
+
"Language-Team: Eugene Manuilov <eugene@manuilov.org>\n"
|
9 |
+
"Language: en_US\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-Basepath: ./../\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
15 |
+
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
16 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
|
17 |
+
"_n_noop;_nc;_nx;_nx_noop\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
"X-Generator: Poedit 1.5.4\n"
|
20 |
+
"X-Poedit-SearchPath-0: classes/Visualizer\n"
|
21 |
+
|
22 |
+
#: classes/Visualizer/Render/Sidebar.php:101
|
23 |
+
msgid "Right of the chart"
|
24 |
+
msgstr "Right of the chart"
|
25 |
+
|
26 |
+
#: classes/Visualizer/Render/Sidebar.php:102
|
27 |
+
msgid "Above the chart"
|
28 |
+
msgstr "Above the chart"
|
29 |
+
|
30 |
+
#: classes/Visualizer/Render/Sidebar.php:103
|
31 |
+
msgid "Below the chart"
|
32 |
+
msgstr "Below the chart"
|
33 |
+
|
34 |
+
#: classes/Visualizer/Render/Sidebar.php:104
|
35 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:82
|
36 |
+
msgid "Inside the chart"
|
37 |
+
msgstr "Inside the chart"
|
38 |
+
|
39 |
+
#: classes/Visualizer/Render/Sidebar.php:105
|
40 |
+
msgid "Omit the legend"
|
41 |
+
msgstr "Omit the legend"
|
42 |
+
|
43 |
+
#: classes/Visualizer/Render/Sidebar.php:110
|
44 |
+
msgid "Aligned to the start of the allocated area"
|
45 |
+
msgstr "Aligned to the start of the allocated area"
|
46 |
+
|
47 |
+
#: classes/Visualizer/Render/Sidebar.php:111
|
48 |
+
msgid "Centered in the allocated area"
|
49 |
+
msgstr "Centered in the allocated area"
|
50 |
+
|
51 |
+
#: classes/Visualizer/Render/Sidebar.php:112
|
52 |
+
msgid "Aligned to the end of the allocated area"
|
53 |
+
msgstr "Aligned to the end of the allocated area"
|
54 |
+
|
55 |
+
#: classes/Visualizer/Render/Sidebar.php:117
|
56 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:233
|
57 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:400
|
58 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:108
|
59 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:167
|
60 |
+
msgid "Yes"
|
61 |
+
msgstr "Yes"
|
62 |
+
|
63 |
+
#: classes/Visualizer/Render/Sidebar.php:118
|
64 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:232
|
65 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:399
|
66 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:107
|
67 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:166
|
68 |
+
msgid "No"
|
69 |
+
msgstr "No"
|
70 |
+
|
71 |
+
#: classes/Visualizer/Render/Sidebar.php:131
|
72 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:97
|
73 |
+
msgid "Chart Title"
|
74 |
+
msgstr "Chart Title"
|
75 |
+
|
76 |
+
#: classes/Visualizer/Render/Sidebar.php:134
|
77 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:100
|
78 |
+
msgid "Text to display above the chart."
|
79 |
+
msgstr "Text to display above the chart."
|
80 |
+
|
81 |
+
#: classes/Visualizer/Render/Sidebar.php:138
|
82 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:112
|
83 |
+
msgid "Chart Title Color"
|
84 |
+
msgstr "Chart Title Color"
|
85 |
+
|
86 |
+
#: classes/Visualizer/Render/Sidebar.php:153
|
87 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:181
|
88 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:293
|
89 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:58
|
90 |
+
msgid "General Settings"
|
91 |
+
msgstr "General Settings"
|
92 |
+
|
93 |
+
#: classes/Visualizer/Render/Sidebar.php:155
|
94 |
+
msgid ""
|
95 |
+
"Configure title, font styles, tooltip, legend and else settings for the "
|
96 |
+
"chart."
|
97 |
+
msgstr ""
|
98 |
+
"Configure title, font styles, tooltip, legend and else settings for the "
|
99 |
+
"chart."
|
100 |
+
|
101 |
+
#: classes/Visualizer/Render/Sidebar.php:158
|
102 |
+
msgid "Title"
|
103 |
+
msgstr "Title"
|
104 |
+
|
105 |
+
#: classes/Visualizer/Render/Sidebar.php:162
|
106 |
+
msgid "Font Styles"
|
107 |
+
msgstr "Font Styles"
|
108 |
+
|
109 |
+
#: classes/Visualizer/Render/Sidebar.php:165
|
110 |
+
msgid "Family And Size"
|
111 |
+
msgstr "Family And Size"
|
112 |
+
|
113 |
+
#: classes/Visualizer/Render/Sidebar.php:191
|
114 |
+
msgid "The default font family and size for all text in the chart."
|
115 |
+
msgstr "The default font family and size for all text in the chart."
|
116 |
+
|
117 |
+
#: classes/Visualizer/Render/Sidebar.php:196
|
118 |
+
msgid "Legend"
|
119 |
+
msgstr "Legend"
|
120 |
+
|
121 |
+
#: classes/Visualizer/Render/Sidebar.php:198
|
122 |
+
msgid "Position"
|
123 |
+
msgstr "Position"
|
124 |
+
|
125 |
+
#: classes/Visualizer/Render/Sidebar.php:202
|
126 |
+
msgid "Determines where to place the legend, compared to the chart area."
|
127 |
+
msgstr "Determines where to place the legend, compared to the chart area."
|
128 |
+
|
129 |
+
#: classes/Visualizer/Render/Sidebar.php:206
|
130 |
+
msgid "Alignment"
|
131 |
+
msgstr "Alignment"
|
132 |
+
|
133 |
+
#: classes/Visualizer/Render/Sidebar.php:210
|
134 |
+
msgid "Determines the alignment of the legend."
|
135 |
+
msgstr "Determines the alignment of the legend."
|
136 |
+
|
137 |
+
#: classes/Visualizer/Render/Sidebar.php:214
|
138 |
+
msgid "Font Color"
|
139 |
+
msgstr "Font Color"
|
140 |
+
|
141 |
+
#: classes/Visualizer/Render/Sidebar.php:221
|
142 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:128
|
143 |
+
msgid "Tooltip"
|
144 |
+
msgstr "Tooltip"
|
145 |
+
|
146 |
+
#: classes/Visualizer/Render/Sidebar.php:236
|
147 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:143
|
148 |
+
msgid "Trigger"
|
149 |
+
msgstr "Trigger"
|
150 |
+
|
151 |
+
#: classes/Visualizer/Render/Sidebar.php:241
|
152 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:148
|
153 |
+
msgid "The tooltip will be displayed when the user hovers over an element"
|
154 |
+
msgstr "The tooltip will be displayed when the user hovers over an element"
|
155 |
+
|
156 |
+
#: classes/Visualizer/Render/Sidebar.php:242
|
157 |
+
msgid "The tooltip will be displayed when the user selects an element"
|
158 |
+
msgstr "The tooltip will be displayed when the user selects an element"
|
159 |
+
|
160 |
+
#: classes/Visualizer/Render/Sidebar.php:243
|
161 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:149
|
162 |
+
msgid "The tooltip will not be displayed"
|
163 |
+
msgstr "The tooltip will not be displayed"
|
164 |
+
|
165 |
+
#: classes/Visualizer/Render/Sidebar.php:245
|
166 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:151
|
167 |
+
msgid ""
|
168 |
+
"Determines the user interaction that causes the tooltip to be displayed."
|
169 |
+
msgstr ""
|
170 |
+
"Determines the user interaction that causes the tooltip to be displayed."
|
171 |
+
|
172 |
+
#: classes/Visualizer/Render/Sidebar.php:249
|
173 |
+
msgid "Show Color Code"
|
174 |
+
msgstr "Show Color Code"
|
175 |
+
|
176 |
+
#: classes/Visualizer/Render/Sidebar.php:253
|
177 |
+
msgid ""
|
178 |
+
"If set to yes, will show colored squares next to the slice information in "
|
179 |
+
"the tooltip."
|
180 |
+
msgstr ""
|
181 |
+
"If set to yes, will show colored squares next to the slice information in "
|
182 |
+
"the tooltip."
|
183 |
+
|
184 |
+
#: classes/Visualizer/Render/Sidebar.php:265
|
185 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:229
|
186 |
+
msgid "Layout & Chart Area"
|
187 |
+
msgstr "Layout & Chart Area"
|
188 |
+
|
189 |
+
#: classes/Visualizer/Render/Sidebar.php:266
|
190 |
+
msgid "Layout"
|
191 |
+
msgstr "Layout"
|
192 |
+
|
193 |
+
#: classes/Visualizer/Render/Sidebar.php:267
|
194 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:326
|
195 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:231
|
196 |
+
msgid ""
|
197 |
+
"Configure the total size of the chart. Two formats are supported: a number, "
|
198 |
+
"or a number followed by %. A simple number is a value in pixels; a number "
|
199 |
+
"followed by % is a percentage."
|
200 |
+
msgstr ""
|
201 |
+
"Configure the total size of the chart. Two formats are supported: a number, "
|
202 |
+
"or a number followed by %. A simple number is a value in pixels; a number "
|
203 |
+
"followed by % is a percentage."
|
204 |
+
|
205 |
+
#: classes/Visualizer/Render/Sidebar.php:271
|
206 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:330
|
207 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:235
|
208 |
+
msgid "Width And Height Of Chart"
|
209 |
+
msgstr "Width And Height Of Chart"
|
210 |
+
|
211 |
+
#: classes/Visualizer/Render/Sidebar.php:285
|
212 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:344
|
213 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:249
|
214 |
+
msgid "Determines the total width and height of the chart."
|
215 |
+
msgstr "Determines the total width and height of the chart."
|
216 |
+
|
217 |
+
#: classes/Visualizer/Render/Sidebar.php:291
|
218 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:359
|
219 |
+
msgid ""
|
220 |
+
"Configure the background color for the main area of the chart and the chart "
|
221 |
+
"border width and color."
|
222 |
+
msgstr ""
|
223 |
+
"Configure the background color for the main area of the chart and the chart "
|
224 |
+
"border width and color."
|
225 |
+
|
226 |
+
#: classes/Visualizer/Render/Sidebar.php:294
|
227 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:362
|
228 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:103
|
229 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:127
|
230 |
+
msgid "Stroke Width"
|
231 |
+
msgstr "Stroke Width"
|
232 |
+
|
233 |
+
#: classes/Visualizer/Render/Sidebar.php:297
|
234 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:365
|
235 |
+
msgid "The chart border width in pixels."
|
236 |
+
msgstr "The chart border width in pixels."
|
237 |
+
|
238 |
+
#: classes/Visualizer/Render/Sidebar.php:302
|
239 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:370
|
240 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:111
|
241 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:135
|
242 |
+
msgid "Stroke Color"
|
243 |
+
msgstr "Stroke Color"
|
244 |
+
|
245 |
+
#: classes/Visualizer/Render/Sidebar.php:310
|
246 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:377
|
247 |
+
msgid "Background Color"
|
248 |
+
msgstr "Background Color"
|
249 |
+
|
250 |
+
#: classes/Visualizer/Render/Sidebar.php:319
|
251 |
+
msgid "Transparent background"
|
252 |
+
msgstr "Transparent background"
|
253 |
+
|
254 |
+
#: classes/Visualizer/Render/Sidebar.php:324
|
255 |
+
msgid "Chart Area"
|
256 |
+
msgstr "Chart Area"
|
257 |
+
|
258 |
+
#: classes/Visualizer/Render/Sidebar.php:325
|
259 |
+
msgid ""
|
260 |
+
"Configure the placement and size of the chart area (where the chart itself "
|
261 |
+
"is drawn, excluding axis and legends). Two formats are supported: a number, "
|
262 |
+
"or a number followed by %. A simple number is a value in pixels; a number "
|
263 |
+
"followed by % is a percentage."
|
264 |
+
msgstr ""
|
265 |
+
"Configure the placement and size of the chart area (where the chart itself "
|
266 |
+
"is drawn, excluding axis and legends). Two formats are supported: a number, "
|
267 |
+
"or a number followed by %. A simple number is a value in pixels; a number "
|
268 |
+
"followed by % is a percentage."
|
269 |
+
|
270 |
+
#: classes/Visualizer/Render/Sidebar.php:329
|
271 |
+
msgid "Left And Top Margins"
|
272 |
+
msgstr "Left And Top Margins"
|
273 |
+
|
274 |
+
#: classes/Visualizer/Render/Sidebar.php:343
|
275 |
+
msgid "Determines how far to draw the chart from the left and top borders."
|
276 |
+
msgstr "Determines how far to draw the chart from the left and top borders."
|
277 |
+
|
278 |
+
#: classes/Visualizer/Render/Sidebar.php:349
|
279 |
+
msgid "Width And Height Of Chart Area"
|
280 |
+
msgstr "Width And Height Of Chart Area"
|
281 |
+
|
282 |
+
#: classes/Visualizer/Render/Sidebar.php:363
|
283 |
+
msgid "Determines the width and hight of the chart area."
|
284 |
+
msgstr "Determines the width and hight of the chart area."
|
285 |
+
|
286 |
+
#: classes/Visualizer/Render/Sidebar.php:414
|
287 |
+
msgid "Hex Value"
|
288 |
+
msgstr "Hex Value"
|
289 |
+
|
290 |
+
#: classes/Visualizer/Render/Sidebar.php:527
|
291 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:424
|
292 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:453
|
293 |
+
msgid "Number Format"
|
294 |
+
msgstr "Number Format"
|
295 |
+
|
296 |
+
#: classes/Visualizer/Render/Sidebar.php:530
|
297 |
+
#, php-format
|
298 |
+
msgid ""
|
299 |
+
"Enter custom format pattern to apply to this series value, similar to the "
|
300 |
+
"%sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# "
|
301 |
+
"to add dollar sign before digits. Pay attention that if you use #%% "
|
302 |
+
"percentage format then your values will be multiplied by 100."
|
303 |
+
msgstr ""
|
304 |
+
"Enter custom format pattern to apply to this series value, similar to the "
|
305 |
+
"%sICU pattern set%s. Use something like #,### to get 1,234 as output, or $# "
|
306 |
+
"to add dollar sign before digits. Pay attention that if you use #%% "
|
307 |
+
"percentage format then your values will be multiplied by 100."
|
308 |
+
|
309 |
+
#: classes/Visualizer/Render/Sidebar.php:538
|
310 |
+
msgid "Date Format"
|
311 |
+
msgstr "Date Format"
|
312 |
+
|
313 |
+
#: classes/Visualizer/Render/Sidebar.php:541
|
314 |
+
#, php-format
|
315 |
+
msgid ""
|
316 |
+
"Enter custom format pattern to apply to this series value, similar to the "
|
317 |
+
"%sICU date and time format%s."
|
318 |
+
msgstr ""
|
319 |
+
"Enter custom format pattern to apply to this series value, similar to the "
|
320 |
+
"%sICU date and time format%s."
|
321 |
+
|
322 |
+
#: classes/Visualizer/Render/Library.php:63
|
323 |
+
#: classes/Visualizer/Render/Templates.php:69
|
324 |
+
msgid "Delete"
|
325 |
+
msgstr "Delete"
|
326 |
+
|
327 |
+
#: classes/Visualizer/Render/Library.php:64
|
328 |
+
msgid "Clone"
|
329 |
+
msgstr "Clone"
|
330 |
+
|
331 |
+
#: classes/Visualizer/Render/Library.php:65
|
332 |
+
msgid "Edit"
|
333 |
+
msgstr "Edit"
|
334 |
+
|
335 |
+
#: classes/Visualizer/Render/Library.php:67
|
336 |
+
#: classes/Visualizer/Render/Templates.php:72
|
337 |
+
msgid "Click to select"
|
338 |
+
msgstr "Click to select"
|
339 |
+
|
340 |
+
#: classes/Visualizer/Render/Library.php:118
|
341 |
+
#: classes/Visualizer/Render/Templates.php:86
|
342 |
+
msgid "No charts found"
|
343 |
+
msgstr "No charts found"
|
344 |
+
|
345 |
+
#: classes/Visualizer/Render/Library.php:145
|
346 |
+
#: classes/Visualizer/Module/Admin.php:213
|
347 |
+
msgid "Visualizer Library"
|
348 |
+
msgstr "Visualizer Library"
|
349 |
+
|
350 |
+
#: classes/Visualizer/Render/Library.php:146
|
351 |
+
msgid "Add New"
|
352 |
+
msgstr "Add New"
|
353 |
+
|
354 |
+
#: classes/Visualizer/Render/Library.php:165
|
355 |
+
#, php-format
|
356 |
+
msgid ""
|
357 |
+
"%s option is disabled in your php.ini config. Please, enable it by change "
|
358 |
+
"its value to 1. This option increases the speed of remote CSV uploading."
|
359 |
+
msgstr ""
|
360 |
+
"%s option is disabled in your php.ini config. Please, enable it by change "
|
361 |
+
"its value to 1. This option increases the speed of remote CSV uploading."
|
362 |
+
|
363 |
+
#: classes/Visualizer/Render/Templates.php:70
|
364 |
+
msgid "Insert"
|
365 |
+
msgstr "Insert"
|
366 |
+
|
367 |
+
#: classes/Visualizer/Render/Page.php:74
|
368 |
+
msgid "Like the plugin? Show us your love!"
|
369 |
+
msgstr "Like the plugin? Show us your love!"
|
370 |
+
|
371 |
+
#: classes/Visualizer/Render/Page.php:77
|
372 |
+
msgid "Rate it on WordPress.org"
|
373 |
+
msgstr "Rate it on WordPress.org"
|
374 |
+
|
375 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:82
|
376 |
+
msgid "Straight line without curve"
|
377 |
+
msgstr "Straight line without curve"
|
378 |
+
|
379 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:83
|
380 |
+
msgid "The angles of the line will be smoothed"
|
381 |
+
msgstr "The angles of the line will be smoothed"
|
382 |
+
|
383 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:121
|
384 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:240
|
385 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:115
|
386 |
+
msgid "Line Width And Point Size"
|
387 |
+
msgstr "Line Width And Point Size"
|
388 |
+
|
389 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:135
|
390 |
+
msgid ""
|
391 |
+
"Data line width and diameter of displayed points in pixels. Use zero to hide "
|
392 |
+
"all lines or points."
|
393 |
+
msgstr ""
|
394 |
+
"Data line width and diameter of displayed points in pixels. Use zero to hide "
|
395 |
+
"all lines or points."
|
396 |
+
|
397 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:141
|
398 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:264
|
399 |
+
msgid "Curve Type"
|
400 |
+
msgstr "Curve Type"
|
401 |
+
|
402 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:145
|
403 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:235
|
404 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:268
|
405 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:402
|
406 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:110
|
407 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:169
|
408 |
+
msgid "Determines whether the series has to be presented in the legend or not."
|
409 |
+
msgstr ""
|
410 |
+
"Determines whether the series has to be presented in the legend or not."
|
411 |
+
|
412 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:153
|
413 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:47
|
414 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:61
|
415 |
+
msgid "Focus Target"
|
416 |
+
msgstr "Focus Target"
|
417 |
+
|
418 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:158
|
419 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:52
|
420 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:66
|
421 |
+
msgid "Focus on a single data point."
|
422 |
+
msgstr "Focus on a single data point."
|
423 |
+
|
424 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:159
|
425 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:53
|
426 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:67
|
427 |
+
msgid "Focus on a grouping of all data points along the major axis."
|
428 |
+
msgstr "Focus on a grouping of all data points along the major axis."
|
429 |
+
|
430 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:161
|
431 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:55
|
432 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:69
|
433 |
+
msgid ""
|
434 |
+
"The type of the entity that receives focus on mouse hover. Also affects "
|
435 |
+
"which entity is selected by mouse click."
|
436 |
+
msgstr ""
|
437 |
+
"The type of the entity that receives focus on mouse hover. Also affects "
|
438 |
+
"which entity is selected by mouse click."
|
439 |
+
|
440 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:166
|
441 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:75
|
442 |
+
msgid "Selection Mode"
|
443 |
+
msgstr "Selection Mode"
|
444 |
+
|
445 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:171
|
446 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:80
|
447 |
+
msgid "Single data point"
|
448 |
+
msgstr "Single data point"
|
449 |
+
|
450 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:172
|
451 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:81
|
452 |
+
msgid "Multiple data points"
|
453 |
+
msgstr "Multiple data points"
|
454 |
+
|
455 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:174
|
456 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:83
|
457 |
+
msgid "Determines how many data points an user can select on a chart."
|
458 |
+
msgstr "Determines how many data points an user can select on a chart."
|
459 |
+
|
460 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:178
|
461 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:87
|
462 |
+
msgid "Aggregation Target"
|
463 |
+
msgstr "Aggregation Target"
|
464 |
+
|
465 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:183
|
466 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:92
|
467 |
+
msgid "Group selected data by x-value"
|
468 |
+
msgstr "Group selected data by x-value"
|
469 |
+
|
470 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:184
|
471 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:93
|
472 |
+
msgid "Group selected data by series"
|
473 |
+
msgstr "Group selected data by series"
|
474 |
+
|
475 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:185
|
476 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:94
|
477 |
+
msgid ""
|
478 |
+
"Group selected data by x-value if all selections have the same x-value, and "
|
479 |
+
"by series otherwise"
|
480 |
+
msgstr ""
|
481 |
+
"Group selected data by x-value if all selections have the same x-value, and "
|
482 |
+
"by series otherwise"
|
483 |
+
|
484 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:186
|
485 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:95
|
486 |
+
msgid "Show only one tooltip per selection"
|
487 |
+
msgstr "Show only one tooltip per selection"
|
488 |
+
|
489 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:188
|
490 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:97
|
491 |
+
msgid ""
|
492 |
+
"Determines how multiple data selections are rolled up into tooltips. To make "
|
493 |
+
"it working you need to set multiple selection mode and tooltip trigger to "
|
494 |
+
"display it when an user selects an element."
|
495 |
+
msgstr ""
|
496 |
+
"Determines how multiple data selections are rolled up into tooltips. To make "
|
497 |
+
"it working you need to set multiple selection mode and tooltip trigger to "
|
498 |
+
"display it when an user selects an element."
|
499 |
+
|
500 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:194
|
501 |
+
msgid "Point Opacity"
|
502 |
+
msgstr "Point Opacity"
|
503 |
+
|
504 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:197
|
505 |
+
msgid ""
|
506 |
+
"The transparency of data points, with 1.0 being completely opaque and 0.0 "
|
507 |
+
"fully transparent."
|
508 |
+
msgstr ""
|
509 |
+
"The transparency of data points, with 1.0 being completely opaque and 0.0 "
|
510 |
+
"fully transparent."
|
511 |
+
|
512 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:210
|
513 |
+
msgid "Lines Settings"
|
514 |
+
msgstr "Lines Settings"
|
515 |
+
|
516 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:227
|
517 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:394
|
518 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:102
|
519 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:161
|
520 |
+
msgid "Visible In Legend"
|
521 |
+
msgstr "Visible In Legend"
|
522 |
+
|
523 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:256
|
524 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:131
|
525 |
+
msgid "Overrides the global line width and point size values for this series."
|
526 |
+
msgstr "Overrides the global line width and point size values for this series."
|
527 |
+
|
528 |
+
#: classes/Visualizer/Render/Sidebar/Linear.php:273
|
529 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:196
|
530 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:213
|
531 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:308
|
532 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:325
|
533 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:408
|
534 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:146
|
535 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:173
|
536 |
+
msgid "Color"
|
537 |
+
msgstr "Color"
|
538 |
+
|
539 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:44
|
540 |
+
msgid "Bars Settings"
|
541 |
+
msgstr "Bars Settings"
|
542 |
+
|
543 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:61
|
544 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:84
|
545 |
+
msgid "Is Stacked"
|
546 |
+
msgstr "Is Stacked"
|
547 |
+
|
548 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:65
|
549 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:88
|
550 |
+
msgid "If set to yes, series elements are stacked."
|
551 |
+
msgstr "If set to yes, series elements are stacked."
|
552 |
+
|
553 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:71
|
554 |
+
msgid "Bars Opacity"
|
555 |
+
msgstr "Bars Opacity"
|
556 |
+
|
557 |
+
#: classes/Visualizer/Render/Sidebar/Columnar.php:74
|
558 |
+
msgid ""
|
559 |
+
"Bars transparency, with 1.0 being completely opaque and 0.0 fully "
|
560 |
+
"transparent."
|
561 |
+
msgstr ""
|
562 |
+
"Bars transparency, with 1.0 being completely opaque and 0.0 fully "
|
563 |
+
"transparent."
|
564 |
+
|
565 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:83
|
566 |
+
msgid "Outside the chart"
|
567 |
+
msgstr "Outside the chart"
|
568 |
+
|
569 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:84
|
570 |
+
msgid "None"
|
571 |
+
msgstr "None"
|
572 |
+
|
573 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:104
|
574 |
+
msgid "Chart Title Position"
|
575 |
+
msgstr "Chart Title Position"
|
576 |
+
|
577 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:108
|
578 |
+
msgid "Where to place the chart title, compared to the chart area."
|
579 |
+
msgstr "Where to place the chart title, compared to the chart area."
|
580 |
+
|
581 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:121
|
582 |
+
msgid "Axes Titles Position"
|
583 |
+
msgstr "Axes Titles Position"
|
584 |
+
|
585 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:125
|
586 |
+
msgid "Determines where to place the axis titles, compared to the chart area."
|
587 |
+
msgstr "Determines where to place the axis titles, compared to the chart area."
|
588 |
+
|
589 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:138
|
590 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:250
|
591 |
+
msgid "Axis Title"
|
592 |
+
msgstr "Axis Title"
|
593 |
+
|
594 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:141
|
595 |
+
msgid "The title of the horizontal axis."
|
596 |
+
msgstr "The title of the horizontal axis."
|
597 |
+
|
598 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:145
|
599 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:257
|
600 |
+
msgid "Text Position"
|
601 |
+
msgstr "Text Position"
|
602 |
+
|
603 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:149
|
604 |
+
msgid "Position of the horizontal axis text, relative to the chart area."
|
605 |
+
msgstr "Position of the horizontal axis text, relative to the chart area."
|
606 |
+
|
607 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:153
|
608 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:265
|
609 |
+
msgid "Direction"
|
610 |
+
msgstr "Direction"
|
611 |
+
|
612 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:158
|
613 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:270
|
614 |
+
msgid "Identical Direction"
|
615 |
+
msgstr "Identical Direction"
|
616 |
+
|
617 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:159
|
618 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:271
|
619 |
+
msgid "Reverse Direction"
|
620 |
+
msgstr "Reverse Direction"
|
621 |
+
|
622 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:161
|
623 |
+
msgid "The direction in which the values along the horizontal axis grow."
|
624 |
+
msgstr "The direction in which the values along the horizontal axis grow."
|
625 |
+
|
626 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:165
|
627 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:277
|
628 |
+
msgid "Base Line Color"
|
629 |
+
msgstr "Base Line Color"
|
630 |
+
|
631 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:180
|
632 |
+
msgid "Horizontal Axis Settings"
|
633 |
+
msgstr "Horizontal Axis Settings"
|
634 |
+
|
635 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:186
|
636 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:298
|
637 |
+
msgid "Grid Lines"
|
638 |
+
msgstr "Grid Lines"
|
639 |
+
|
640 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:188
|
641 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:205
|
642 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:300
|
643 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:317
|
644 |
+
msgid "Count"
|
645 |
+
msgstr "Count"
|
646 |
+
|
647 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:191
|
648 |
+
msgid ""
|
649 |
+
"The number of horizontal gridlines inside the chart area. Minimum value is "
|
650 |
+
"2. Specify -1 to automatically compute the number of gridlines."
|
651 |
+
msgstr ""
|
652 |
+
"The number of horizontal gridlines inside the chart area. Minimum value is "
|
653 |
+
"2. Specify -1 to automatically compute the number of gridlines."
|
654 |
+
|
655 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:203
|
656 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:315
|
657 |
+
msgid "Minor Grid Lines"
|
658 |
+
msgstr "Minor Grid Lines"
|
659 |
+
|
660 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:208
|
661 |
+
msgid "The number of horizontal minor gridlines between two regular gridlines."
|
662 |
+
msgstr ""
|
663 |
+
"The number of horizontal minor gridlines between two regular gridlines."
|
664 |
+
|
665 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:222
|
666 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:334
|
667 |
+
msgid "View Window"
|
668 |
+
msgstr "View Window"
|
669 |
+
|
670 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:224
|
671 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:336
|
672 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:202
|
673 |
+
msgid "Maximum Value"
|
674 |
+
msgstr "Maximum Value"
|
675 |
+
|
676 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:231
|
677 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:343
|
678 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:188
|
679 |
+
msgid "Minimum Value"
|
680 |
+
msgstr "Minimum Value"
|
681 |
+
|
682 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:253
|
683 |
+
msgid "The title of the vertical axis."
|
684 |
+
msgstr "The title of the vertical axis."
|
685 |
+
|
686 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:261
|
687 |
+
msgid "Position of the vertical axis text, relative to the chart area."
|
688 |
+
msgstr "Position of the vertical axis text, relative to the chart area."
|
689 |
+
|
690 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:273
|
691 |
+
msgid "The direction in which the values along the vertical axis grow."
|
692 |
+
msgstr "The direction in which the values along the vertical axis grow."
|
693 |
+
|
694 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:292
|
695 |
+
msgid "Vertical Axis Settings"
|
696 |
+
msgstr "Vertical Axis Settings"
|
697 |
+
|
698 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:303
|
699 |
+
msgid ""
|
700 |
+
"The number of vertical gridlines inside the chart area. Minimum value is 2. "
|
701 |
+
"Specify -1 to automatically compute the number of gridlines."
|
702 |
+
msgstr ""
|
703 |
+
"The number of vertical gridlines inside the chart area. Minimum value is 2. "
|
704 |
+
"Specify -1 to automatically compute the number of gridlines."
|
705 |
+
|
706 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:320
|
707 |
+
msgid "The number of vertical minor gridlines between two regular gridlines."
|
708 |
+
msgstr "The number of vertical minor gridlines between two regular gridlines."
|
709 |
+
|
710 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:373
|
711 |
+
msgid "Series Settings"
|
712 |
+
msgstr "Series Settings"
|
713 |
+
|
714 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:429
|
715 |
+
msgid "Enter custom format pattern to apply to horizontal axis labels."
|
716 |
+
msgstr "Enter custom format pattern to apply to horizontal axis labels."
|
717 |
+
|
718 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:431
|
719 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:460
|
720 |
+
#, php-format
|
721 |
+
msgid ""
|
722 |
+
"For number axis labels, this is a subset of the decimal formatting %sICU "
|
723 |
+
"pattern set%s. For instance, $#,###.## will display values $1,234.56 for "
|
724 |
+
"value 1234.56. Pay attention that if you use #%% percentage format then your "
|
725 |
+
"values will be multiplied by 100."
|
726 |
+
msgstr ""
|
727 |
+
"For number axis labels, this is a subset of the decimal formatting %sICU "
|
728 |
+
"pattern set%s. For instance, $#,###.## will display values $1,234.56 for "
|
729 |
+
"value 1234.56. Pay attention that if you use #%% percentage format then your "
|
730 |
+
"values will be multiplied by 100."
|
731 |
+
|
732 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:436
|
733 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:465
|
734 |
+
#, php-format
|
735 |
+
msgid ""
|
736 |
+
"For date axis labels, this is a subset of the date formatting %sICU date and "
|
737 |
+
"time format%s."
|
738 |
+
msgstr ""
|
739 |
+
"For date axis labels, this is a subset of the date formatting %sICU date and "
|
740 |
+
"time format%s."
|
741 |
+
|
742 |
+
#: classes/Visualizer/Render/Sidebar/Graph.php:458
|
743 |
+
msgid "Enter custom format pattern to apply to vertical axis labels."
|
744 |
+
msgstr "Enter custom format pattern to apply to vertical axis labels."
|
745 |
+
|
746 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:58
|
747 |
+
msgid "Map Settings"
|
748 |
+
msgstr "Map Settings"
|
749 |
+
|
750 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:59
|
751 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:71
|
752 |
+
msgid "Region"
|
753 |
+
msgstr "Region"
|
754 |
+
|
755 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:61
|
756 |
+
msgid ""
|
757 |
+
"Configure the region area to display on the map. (Surrounding areas will be "
|
758 |
+
"displayed as well.) Can be one of the following:"
|
759 |
+
msgstr ""
|
760 |
+
"Configure the region area to display on the map. (Surrounding areas will be "
|
761 |
+
"displayed as well.) Can be one of the following:"
|
762 |
+
|
763 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:63
|
764 |
+
msgid "'world' - A map of the entire world."
|
765 |
+
msgstr "'world' - A map of the entire world."
|
766 |
+
|
767 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:64
|
768 |
+
#, php-format
|
769 |
+
msgid ""
|
770 |
+
"A continent or a sub-continent, specified by its %s code, e.g., '011' for "
|
771 |
+
"Western Africa."
|
772 |
+
msgstr ""
|
773 |
+
"A continent or a sub-continent, specified by its %s code, e.g., '011' for "
|
774 |
+
"Western Africa."
|
775 |
+
|
776 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:65
|
777 |
+
#, php-format
|
778 |
+
msgid "A country, specified by its %s code, e.g., 'AU' for Australia."
|
779 |
+
msgstr "A country, specified by its %s code, e.g., 'AU' for Australia."
|
780 |
+
|
781 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:66
|
782 |
+
#, php-format
|
783 |
+
msgid ""
|
784 |
+
"A state in the United States, specified by its %s code, e.g., 'US-AL' for "
|
785 |
+
"Alabama. Note that the resolution option must be set to either 'provinces' "
|
786 |
+
"or 'metros'."
|
787 |
+
msgstr ""
|
788 |
+
"A state in the United States, specified by its %s code, e.g., 'US-AL' for "
|
789 |
+
"Alabama. Note that the resolution option must be set to either 'provinces' "
|
790 |
+
"or 'metros'."
|
791 |
+
|
792 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:79
|
793 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:91
|
794 |
+
msgid "Resolution"
|
795 |
+
msgstr "Resolution"
|
796 |
+
|
797 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:82
|
798 |
+
msgid "The resolution of the map borders. Choose one of the following values:"
|
799 |
+
msgstr "The resolution of the map borders. Choose one of the following values:"
|
800 |
+
|
801 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:84
|
802 |
+
msgid "'countries' - Supported for all regions, except for US state regions."
|
803 |
+
msgstr "'countries' - Supported for all regions, except for US state regions."
|
804 |
+
|
805 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:85
|
806 |
+
msgid ""
|
807 |
+
"'provinces' - Supported only for country regions and US state regions. Not "
|
808 |
+
"supported for all countries; please test a country to see whether this "
|
809 |
+
"option is supported."
|
810 |
+
msgstr ""
|
811 |
+
"'provinces' - Supported only for country regions and US state regions. Not "
|
812 |
+
"supported for all countries; please test a country to see whether this "
|
813 |
+
"option is supported."
|
814 |
+
|
815 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:86
|
816 |
+
msgid ""
|
817 |
+
"'metros' - Supported for the US country region and US state regions only."
|
818 |
+
msgstr ""
|
819 |
+
"'metros' - Supported for the US country region and US state regions only."
|
820 |
+
|
821 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:96
|
822 |
+
msgid "Countries"
|
823 |
+
msgstr "Countries"
|
824 |
+
|
825 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:97
|
826 |
+
msgid "Provinces"
|
827 |
+
msgstr "Provinces"
|
828 |
+
|
829 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:98
|
830 |
+
msgid "Metros"
|
831 |
+
msgstr "Metros"
|
832 |
+
|
833 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:104
|
834 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:116
|
835 |
+
msgid "Display Mode"
|
836 |
+
msgstr "Display Mode"
|
837 |
+
|
838 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:107
|
839 |
+
msgid ""
|
840 |
+
"Determines which type of map this is. The following values are supported:"
|
841 |
+
msgstr ""
|
842 |
+
"Determines which type of map this is. The following values are supported:"
|
843 |
+
|
844 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:109
|
845 |
+
msgid "'auto' - Choose based on the format of the data."
|
846 |
+
msgstr "'auto' - Choose based on the format of the data."
|
847 |
+
|
848 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:110
|
849 |
+
msgid "'regions' - This is a region map."
|
850 |
+
msgstr "'regions' - This is a region map."
|
851 |
+
|
852 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:111
|
853 |
+
msgid "'markers' - This is a marker map."
|
854 |
+
msgstr "'markers' - This is a marker map."
|
855 |
+
|
856 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:121
|
857 |
+
msgid "Auto"
|
858 |
+
msgstr "Auto"
|
859 |
+
|
860 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:122
|
861 |
+
msgid "Regions"
|
862 |
+
msgstr "Regions"
|
863 |
+
|
864 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:123
|
865 |
+
msgid "Markers"
|
866 |
+
msgstr "Markers"
|
867 |
+
|
868 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:163
|
869 |
+
msgid "Color Axis"
|
870 |
+
msgstr "Color Axis"
|
871 |
+
|
872 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:165
|
873 |
+
msgid ""
|
874 |
+
"Configure color axis gradient scale, minimum and maximun values and a color "
|
875 |
+
"of the dateless regions."
|
876 |
+
msgstr ""
|
877 |
+
"Configure color axis gradient scale, minimum and maximun values and a color "
|
878 |
+
"of the dateless regions."
|
879 |
+
|
880 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:169
|
881 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:233
|
882 |
+
msgid "Minimum And Maximum Values"
|
883 |
+
msgstr "Minimum And Maximum Values"
|
884 |
+
|
885 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:183
|
886 |
+
msgid "Determines the minimum and maximum values of color axis."
|
887 |
+
msgstr "Determines the minimum and maximum values of color axis."
|
888 |
+
|
889 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:195
|
890 |
+
msgid "Intermediate Value"
|
891 |
+
msgstr "Intermediate Value"
|
892 |
+
|
893 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:209
|
894 |
+
msgid "Dateless Region"
|
895 |
+
msgstr "Dateless Region"
|
896 |
+
|
897 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:227
|
898 |
+
msgid "Size Axis"
|
899 |
+
msgstr "Size Axis"
|
900 |
+
|
901 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:229
|
902 |
+
msgid ""
|
903 |
+
"Configure how values are associated with bubble size, minimum and maximun "
|
904 |
+
"values and marker opacity setting."
|
905 |
+
msgstr ""
|
906 |
+
"Configure how values are associated with bubble size, minimum and maximun "
|
907 |
+
"values and marker opacity setting."
|
908 |
+
|
909 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:247
|
910 |
+
msgid "Determines the minimum and maximum values of size axis."
|
911 |
+
msgstr "Determines the minimum and maximum values of size axis."
|
912 |
+
|
913 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:253
|
914 |
+
msgid "Minimum And Maximum Marker Radius"
|
915 |
+
msgstr "Minimum And Maximum Marker Radius"
|
916 |
+
|
917 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:267
|
918 |
+
msgid ""
|
919 |
+
"Determines the radius of the smallest and largest possible bubbles, in "
|
920 |
+
"pixels."
|
921 |
+
msgstr ""
|
922 |
+
"Determines the radius of the smallest and largest possible bubbles, in "
|
923 |
+
"pixels."
|
924 |
+
|
925 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:272
|
926 |
+
msgid "Marker Opacity"
|
927 |
+
msgstr "Marker Opacity"
|
928 |
+
|
929 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:275
|
930 |
+
msgid ""
|
931 |
+
"The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully "
|
932 |
+
"opaque."
|
933 |
+
msgstr ""
|
934 |
+
"The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully "
|
935 |
+
"opaque."
|
936 |
+
|
937 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:293
|
938 |
+
msgid "Magnifying Glass"
|
939 |
+
msgstr "Magnifying Glass"
|
940 |
+
|
941 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:295
|
942 |
+
msgid ""
|
943 |
+
"Configure magnifying glass settings, which appears, when the user lingers "
|
944 |
+
"over a cluttered marker. Note: this feature is not supported in browsers "
|
945 |
+
"that do not support SVG, i.e. Internet Explorer version 8 or earlier."
|
946 |
+
msgstr ""
|
947 |
+
"Configure magnifying glass settings, which appears, when the user lingers "
|
948 |
+
"over a cluttered marker. Note: this feature is not supported in browsers "
|
949 |
+
"that do not support SVG, i.e. Internet Explorer version 8 or earlier."
|
950 |
+
|
951 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:298
|
952 |
+
msgid "Enabled"
|
953 |
+
msgstr "Enabled"
|
954 |
+
|
955 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:302
|
956 |
+
msgid ""
|
957 |
+
"If yes, when the user lingers over a cluttered marker, a magnifiying glass "
|
958 |
+
"will be opened."
|
959 |
+
msgstr ""
|
960 |
+
"If yes, when the user lingers over a cluttered marker, a magnifiying glass "
|
961 |
+
"will be opened."
|
962 |
+
|
963 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:306
|
964 |
+
msgid "Zoom Factor"
|
965 |
+
msgstr "Zoom Factor"
|
966 |
+
|
967 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:309
|
968 |
+
msgid ""
|
969 |
+
"The zoom factor of the magnifying glass. Can be any number greater than 0."
|
970 |
+
msgstr ""
|
971 |
+
"The zoom factor of the magnifying glass. Can be any number greater than 0."
|
972 |
+
|
973 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:324
|
974 |
+
msgid "Layout Settings"
|
975 |
+
msgstr "Layout Settings"
|
976 |
+
|
977 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:349
|
978 |
+
msgid "Keep Aspect Ratio"
|
979 |
+
msgstr "Keep Aspect Ratio"
|
980 |
+
|
981 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:353
|
982 |
+
msgid ""
|
983 |
+
"If yes, the map will be drawn at the largest size that can fit inside the "
|
984 |
+
"chart area at its natural aspect ratio. If only one of the width and height "
|
985 |
+
"options is specified, the other one will be calculated according to the "
|
986 |
+
"aspect ratio."
|
987 |
+
msgstr ""
|
988 |
+
"If yes, the map will be drawn at the largest size that can fit inside the "
|
989 |
+
"chart area at its natural aspect ratio. If only one of the width and height "
|
990 |
+
"options is specified, the other one will be calculated according to the "
|
991 |
+
"aspect ratio."
|
992 |
+
|
993 |
+
#: classes/Visualizer/Render/Sidebar/Type/Geo.php:354
|
994 |
+
msgid ""
|
995 |
+
"If no, the map will be stretched to the exact size of the chart as specified "
|
996 |
+
"by the width and height options."
|
997 |
+
msgstr ""
|
998 |
+
"If no, the map will be stretched to the exact size of the chart as specified "
|
999 |
+
"by the width and height options."
|
1000 |
+
|
1001 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:74
|
1002 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:138
|
1003 |
+
msgid "Area Opacity"
|
1004 |
+
msgstr "Area Opacity"
|
1005 |
+
|
1006 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:77
|
1007 |
+
msgid ""
|
1008 |
+
"The default opacity of the colored area under an area chart series, where "
|
1009 |
+
"0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an "
|
1010 |
+
"individual series, set the area opacity value in the series property."
|
1011 |
+
msgstr ""
|
1012 |
+
"The default opacity of the colored area under an area chart series, where "
|
1013 |
+
"0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an "
|
1014 |
+
"individual series, set the area opacity value in the series property."
|
1015 |
+
|
1016 |
+
#: classes/Visualizer/Render/Sidebar/Type/Area.php:141
|
1017 |
+
msgid ""
|
1018 |
+
"The opacity of the colored area, where 0.0 is fully transparent and 1.0 is "
|
1019 |
+
"fully opaque."
|
1020 |
+
msgstr ""
|
1021 |
+
"The opacity of the colored area, where 0.0 is fully transparent and 1.0 is "
|
1022 |
+
"fully opaque."
|
1023 |
+
|
1024 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:63
|
1025 |
+
msgid "Min And Max Values"
|
1026 |
+
msgstr "Min And Max Values"
|
1027 |
+
|
1028 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:77
|
1029 |
+
msgid "The maximal and minimal values of the gauge."
|
1030 |
+
msgstr "The maximal and minimal values of the gauge."
|
1031 |
+
|
1032 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:82
|
1033 |
+
msgid "Minor Ticks"
|
1034 |
+
msgstr "Minor Ticks"
|
1035 |
+
|
1036 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:85
|
1037 |
+
msgid "The number of minor tick section in each major tick section."
|
1038 |
+
msgstr "The number of minor tick section in each major tick section."
|
1039 |
+
|
1040 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:103
|
1041 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:128
|
1042 |
+
msgid "Green Color"
|
1043 |
+
msgstr "Green Color"
|
1044 |
+
|
1045 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:105
|
1046 |
+
msgid "Configure the green section of the gauge chart."
|
1047 |
+
msgstr "Configure the green section of the gauge chart."
|
1048 |
+
|
1049 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:109
|
1050 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:151
|
1051 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:193
|
1052 |
+
msgid "From And To Range"
|
1053 |
+
msgstr "From And To Range"
|
1054 |
+
|
1055 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:123
|
1056 |
+
msgid "The lowest and highest values for a range marked by a green color."
|
1057 |
+
msgstr "The lowest and highest values for a range marked by a green color."
|
1058 |
+
|
1059 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:145
|
1060 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:170
|
1061 |
+
msgid "Yellow Color"
|
1062 |
+
msgstr "Yellow Color"
|
1063 |
+
|
1064 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:147
|
1065 |
+
msgid "Configure the yellow section of the gauge chart."
|
1066 |
+
msgstr "Configure the yellow section of the gauge chart."
|
1067 |
+
|
1068 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:165
|
1069 |
+
msgid "The lowest and highest values for a range marked by a yellow color."
|
1070 |
+
msgstr "The lowest and highest values for a range marked by a yellow color."
|
1071 |
+
|
1072 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:187
|
1073 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:212
|
1074 |
+
msgid "Red Color"
|
1075 |
+
msgstr "Red Color"
|
1076 |
+
|
1077 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:189
|
1078 |
+
msgid "Configure the red section of the gauge chart."
|
1079 |
+
msgstr "Configure the red section of the gauge chart."
|
1080 |
+
|
1081 |
+
#: classes/Visualizer/Render/Sidebar/Type/Gauge.php:207
|
1082 |
+
msgid "The lowest and highest values for a range marked by a red color."
|
1083 |
+
msgstr "The lowest and highest values for a range marked by a red color."
|
1084 |
+
|
1085 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:58
|
1086 |
+
msgid "Pie Settings"
|
1087 |
+
msgstr "Pie Settings"
|
1088 |
+
|
1089 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:61
|
1090 |
+
msgid "Is 3D"
|
1091 |
+
msgstr "Is 3D"
|
1092 |
+
|
1093 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:65
|
1094 |
+
msgid "If set to yes, displays a three-dimensional chart."
|
1095 |
+
msgstr "If set to yes, displays a three-dimensional chart."
|
1096 |
+
|
1097 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:69
|
1098 |
+
msgid "Reverse Categories"
|
1099 |
+
msgstr "Reverse Categories"
|
1100 |
+
|
1101 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:73
|
1102 |
+
msgid "If set to yes, will draw slices counterclockwise."
|
1103 |
+
msgstr "If set to yes, will draw slices counterclockwise."
|
1104 |
+
|
1105 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:77
|
1106 |
+
msgid "Slice Text"
|
1107 |
+
msgstr "Slice Text"
|
1108 |
+
|
1109 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:82
|
1110 |
+
msgid "The percentage of the slice size out of the total"
|
1111 |
+
msgstr "The percentage of the slice size out of the total"
|
1112 |
+
|
1113 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:83
|
1114 |
+
msgid "The quantitative value of the slice"
|
1115 |
+
msgstr "The quantitative value of the slice"
|
1116 |
+
|
1117 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:84
|
1118 |
+
msgid "The name of the slice"
|
1119 |
+
msgstr "The name of the slice"
|
1120 |
+
|
1121 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:85
|
1122 |
+
msgid "No text is displayed"
|
1123 |
+
msgstr "No text is displayed"
|
1124 |
+
|
1125 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:87
|
1126 |
+
msgid "The content of the text displayed on the slice."
|
1127 |
+
msgstr "The content of the text displayed on the slice."
|
1128 |
+
|
1129 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:91
|
1130 |
+
msgid "Pie Hole"
|
1131 |
+
msgstr "Pie Hole"
|
1132 |
+
|
1133 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:94
|
1134 |
+
msgid ""
|
1135 |
+
"If between 0 and 1, displays a donut chart. The hole with have a radius "
|
1136 |
+
"equal to number times the radius of the chart. Only applicable when the "
|
1137 |
+
"chart is two-dimensional."
|
1138 |
+
msgstr ""
|
1139 |
+
"If between 0 and 1, displays a donut chart. The hole with have a radius "
|
1140 |
+
"equal to number times the radius of the chart. Only applicable when the "
|
1141 |
+
"chart is two-dimensional."
|
1142 |
+
|
1143 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:99
|
1144 |
+
msgid "Start Angle"
|
1145 |
+
msgstr "Start Angle"
|
1146 |
+
|
1147 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:102
|
1148 |
+
msgid ""
|
1149 |
+
"The angle, in degrees, to rotate the chart by. The default of 0 will orient "
|
1150 |
+
"the leftmost edge of the first slice directly up."
|
1151 |
+
msgstr ""
|
1152 |
+
"The angle, in degrees, to rotate the chart by. The default of 0 will orient "
|
1153 |
+
"the leftmost edge of the first slice directly up."
|
1154 |
+
|
1155 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:107
|
1156 |
+
msgid "Slice Border Color"
|
1157 |
+
msgstr "Slice Border Color"
|
1158 |
+
|
1159 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:124
|
1160 |
+
msgid "Residue Settings"
|
1161 |
+
msgstr "Residue Settings"
|
1162 |
+
|
1163 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:127
|
1164 |
+
msgid "Visibility Threshold"
|
1165 |
+
msgstr "Visibility Threshold"
|
1166 |
+
|
1167 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:130
|
1168 |
+
msgid ""
|
1169 |
+
"The slice relative part, below which a slice will not show individually. All "
|
1170 |
+
"slices that have not passed this threshold will be combined to a single "
|
1171 |
+
"slice, whose size is the sum of all their sizes. Default is not to show "
|
1172 |
+
"individually any slice which is smaller than half a degree."
|
1173 |
+
msgstr ""
|
1174 |
+
"The slice relative part, below which a slice will not show individually. All "
|
1175 |
+
"slices that have not passed this threshold will be combined to a single "
|
1176 |
+
"slice, whose size is the sum of all their sizes. Default is not to show "
|
1177 |
+
"individually any slice which is smaller than half a degree."
|
1178 |
+
|
1179 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:135
|
1180 |
+
msgid "Residue Slice Label"
|
1181 |
+
msgstr "Residue Slice Label"
|
1182 |
+
|
1183 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:138
|
1184 |
+
msgid ""
|
1185 |
+
"A label for the combination slice that holds all slices below slice "
|
1186 |
+
"visibility threshold."
|
1187 |
+
msgstr ""
|
1188 |
+
"A label for the combination slice that holds all slices below slice "
|
1189 |
+
"visibility threshold."
|
1190 |
+
|
1191 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:139
|
1192 |
+
msgid "Other"
|
1193 |
+
msgstr "Other"
|
1194 |
+
|
1195 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:143
|
1196 |
+
msgid "Residue Slice Color"
|
1197 |
+
msgstr "Residue Slice Color"
|
1198 |
+
|
1199 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:160
|
1200 |
+
msgid "Slices Settings"
|
1201 |
+
msgstr "Slices Settings"
|
1202 |
+
|
1203 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:164
|
1204 |
+
msgid "Slice Offset"
|
1205 |
+
msgstr "Slice Offset"
|
1206 |
+
|
1207 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:167
|
1208 |
+
msgid ""
|
1209 |
+
"How far to separate the slice from the rest of the pie, from 0.0 (not at "
|
1210 |
+
"all) to 1.0 (the pie's radius)."
|
1211 |
+
msgstr ""
|
1212 |
+
"How far to separate the slice from the rest of the pie, from 0.0 (not at "
|
1213 |
+
"all) to 1.0 (the pie's radius)."
|
1214 |
+
|
1215 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:172
|
1216 |
+
msgid "Slice Color"
|
1217 |
+
msgstr "Slice Color"
|
1218 |
+
|
1219 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:193
|
1220 |
+
msgid "Text"
|
1221 |
+
msgstr "Text"
|
1222 |
+
|
1223 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:198
|
1224 |
+
msgid ""
|
1225 |
+
"Display both the absolute value of the slice and the percentage of the whole"
|
1226 |
+
msgstr ""
|
1227 |
+
"Display both the absolute value of the slice and the percentage of the whole"
|
1228 |
+
|
1229 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:199
|
1230 |
+
msgid "Display only the absolute value of the slice"
|
1231 |
+
msgstr "Display only the absolute value of the slice"
|
1232 |
+
|
1233 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:200
|
1234 |
+
msgid "Display only the percentage of the whole represented by the slice"
|
1235 |
+
msgstr "Display only the percentage of the whole represented by the slice"
|
1236 |
+
|
1237 |
+
#: classes/Visualizer/Render/Sidebar/Type/Pie.php:202
|
1238 |
+
msgid ""
|
1239 |
+
"Determines what information to display when the user hovers over a pie slice."
|
1240 |
+
msgstr ""
|
1241 |
+
"Determines what information to display when the user hovers over a pie slice."
|
1242 |
+
|
1243 |
+
#: classes/Visualizer/Render/Sidebar/Type/Line.php:63
|
1244 |
+
msgid "Interpolate Nulls"
|
1245 |
+
msgstr "Interpolate Nulls"
|
1246 |
+
|
1247 |
+
#: classes/Visualizer/Render/Sidebar/Type/Line.php:67
|
1248 |
+
msgid ""
|
1249 |
+
"Whether to guess the value of missing points. If yes, it will guess the "
|
1250 |
+
"value of any missing data based on neighboring points. If no, it will leave "
|
1251 |
+
"a break in the line at the unknown point."
|
1252 |
+
msgstr ""
|
1253 |
+
"Whether to guess the value of missing points. If yes, it will guess the "
|
1254 |
+
"value of any missing data based on neighboring points. If no, it will leave "
|
1255 |
+
"a break in the line at the unknown point."
|
1256 |
+
|
1257 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:58
|
1258 |
+
msgid "Candles Settings"
|
1259 |
+
msgstr "Candles Settings"
|
1260 |
+
|
1261 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:101
|
1262 |
+
msgid "Failing Candles"
|
1263 |
+
msgstr "Failing Candles"
|
1264 |
+
|
1265 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:106
|
1266 |
+
msgid "The stroke width of falling candles."
|
1267 |
+
msgstr "The stroke width of falling candles."
|
1268 |
+
|
1269 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:118
|
1270 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:142
|
1271 |
+
msgid "Fill Color"
|
1272 |
+
msgstr "Fill Color"
|
1273 |
+
|
1274 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:125
|
1275 |
+
msgid "Rising Candles"
|
1276 |
+
msgstr "Rising Candles"
|
1277 |
+
|
1278 |
+
#: classes/Visualizer/Render/Sidebar/Type/Candlestick.php:130
|
1279 |
+
msgid "The stroke width of rising candles."
|
1280 |
+
msgstr "The stroke width of rising candles."
|
1281 |
+
|
1282 |
+
#: classes/Visualizer/Render/Page/Settings.php:56
|
1283 |
+
#: classes/Visualizer/Render/Page/Data.php:102
|
1284 |
+
msgid "Back"
|
1285 |
+
msgstr "Back"
|
1286 |
+
|
1287 |
+
#: classes/Visualizer/Render/Page/Data.php:62
|
1288 |
+
msgid "Upload CSV File"
|
1289 |
+
msgstr "Upload CSV File"
|
1290 |
+
|
1291 |
+
#: classes/Visualizer/Render/Page/Data.php:67
|
1292 |
+
msgid ""
|
1293 |
+
"Select and upload your data CSV file here. The first row of the CSV file "
|
1294 |
+
"should contain the column headings. The second one should contain series "
|
1295 |
+
"type (string, number, boolean, date, datetime, timeofday)."
|
1296 |
+
msgstr ""
|
1297 |
+
"Select and upload your data CSV file here. The first row of the CSV file "
|
1298 |
+
"should contain the column headings. The second one should contain series "
|
1299 |
+
"type (string, number, boolean, date, datetime, timeofday)."
|
1300 |
+
|
1301 |
+
#: classes/Visualizer/Render/Page/Data.php:71
|
1302 |
+
msgid ""
|
1303 |
+
"If you are unsure about how to format your data CSV then please take a look "
|
1304 |
+
"at this sample:"
|
1305 |
+
msgstr ""
|
1306 |
+
"If you are unsure about how to format your data CSV then please take a look "
|
1307 |
+
"at this sample:"
|
1308 |
+
|
1309 |
+
#: classes/Visualizer/Render/Page/Data.php:73
|
1310 |
+
#, php-format
|
1311 |
+
msgid "or read how you can add Google spreadsheet in following %sarticle%s."
|
1312 |
+
msgstr "or read how you can add Google spreadsheet in following %sarticle%s."
|
1313 |
+
|
1314 |
+
#: classes/Visualizer/Render/Page/Data.php:81
|
1315 |
+
msgid "From Computer"
|
1316 |
+
msgstr "From Computer"
|
1317 |
+
|
1318 |
+
#: classes/Visualizer/Render/Page/Data.php:85
|
1319 |
+
msgid "From Web"
|
1320 |
+
msgstr "From Web"
|
1321 |
+
|
1322 |
+
#: classes/Visualizer/Render/Page/Data.php:105
|
1323 |
+
#: classes/Visualizer/Render/Page/Types.php:84
|
1324 |
+
msgid "Next"
|
1325 |
+
msgstr "Next"
|
1326 |
+
|
1327 |
+
#: classes/Visualizer/Module/Admin.php:78
|
1328 |
+
msgid "All"
|
1329 |
+
msgstr "All"
|
1330 |
+
|
1331 |
+
#: classes/Visualizer/Module/Admin.php:79
|
1332 |
+
msgid "Pie"
|
1333 |
+
msgstr "Pie"
|
1334 |
+
|
1335 |
+
#: classes/Visualizer/Module/Admin.php:80
|
1336 |
+
msgid "Line"
|
1337 |
+
msgstr "Line"
|
1338 |
+
|
1339 |
+
#: classes/Visualizer/Module/Admin.php:81
|
1340 |
+
msgid "Area"
|
1341 |
+
msgstr "Area"
|
1342 |
+
|
1343 |
+
#: classes/Visualizer/Module/Admin.php:82
|
1344 |
+
msgid "Geo"
|
1345 |
+
msgstr "Geo"
|
1346 |
+
|
1347 |
+
#: classes/Visualizer/Module/Admin.php:83
|
1348 |
+
msgid "Bar"
|
1349 |
+
msgstr "Bar"
|
1350 |
+
|
1351 |
+
#: classes/Visualizer/Module/Admin.php:84
|
1352 |
+
msgid "Column"
|
1353 |
+
msgstr "Column"
|
1354 |
+
|
1355 |
+
#: classes/Visualizer/Module/Admin.php:85
|
1356 |
+
msgid "Gauge"
|
1357 |
+
msgstr "Gauge"
|
1358 |
+
|
1359 |
+
#: classes/Visualizer/Module/Admin.php:86
|
1360 |
+
msgid "Scatter"
|
1361 |
+
msgstr "Scatter"
|
1362 |
+
|
1363 |
+
#: classes/Visualizer/Module/Admin.php:87
|
1364 |
+
msgid "Candelstick"
|
1365 |
+
msgstr "Candelstick"
|
1366 |
+
|
1367 |
+
#: classes/Visualizer/Module/Admin.php:132
|
1368 |
+
msgid "Visualizations"
|
1369 |
+
msgstr "Visualizations"
|
1370 |
+
|
1371 |
+
#: classes/Visualizer/Module/Admin.php:135
|
1372 |
+
msgid "From Library"
|
1373 |
+
msgstr "From Library"
|
1374 |
+
|
1375 |
+
#: classes/Visualizer/Module/Admin.php:136
|
1376 |
+
msgid "Create New"
|
1377 |
+
msgstr "Create New"
|
1378 |
+
|
1379 |
+
#: classes/Visualizer/Module/Admin.php:324
|
1380 |
+
msgid "Library"
|
1381 |
+
msgstr "Library"
|
1382 |
+
|
1383 |
+
#: classes/Visualizer/Module/Admin.php:347
|
1384 |
+
msgid "Knowledge Base"
|
1385 |
+
msgstr "Knowledge Base"
|
1386 |
+
|
1387 |
+
#: classes/Visualizer/Module/Admin.php:352
|
1388 |
+
msgid "Donate"
|
1389 |
+
msgstr "Donate"
|
1390 |
+
|
1391 |
+
#: classes/Visualizer/Module/Chart.php:318
|
1392 |
+
msgid "Please, enter the URL of CSV file:"
|
1393 |
+
msgstr "Please, enter the URL of CSV file:"
|
1394 |
+
|
1395 |
+
#: classes/Visualizer/Module/Chart.php:319
|
1396 |
+
msgid "You have entered invalid URL. Please, insert proper URL."
|
1397 |
+
msgstr "You have entered invalid URL. Please, insert proper URL."
|
1398 |
+
|
1399 |
+
#: classes/Visualizer/Module/Chart.php:381
|
1400 |
+
msgid "Save Chart"
|
1401 |
+
msgstr "Save Chart"
|
1402 |
+
|
1403 |
+
#: classes/Visualizer/Module/Chart.php:382
|
1404 |
+
msgid "Create Chart"
|
1405 |
+
msgstr "Create Chart"
|
1406 |
+
|
1407 |
+
#: classes/Visualizer/Module/Chart.php:384
|
1408 |
+
msgid "Insert Chart"
|
1409 |
+
msgstr "Insert Chart"
|
1410 |
+
|
1411 |
+
#: classes/Visualizer/Module/Chart.php:444
|
1412 |
+
msgid "CSV file with chart data was not uploaded. Please, try again."
|
1413 |
+
msgstr "CSV file with chart data was not uploaded. Please, try again."
|
1414 |
+
|
1415 |
+
#: classes/Visualizer/Module/Chart.php:459
|
1416 |
+
msgid "CSV file is broken or invalid. Please, try again."
|
1417 |
+
msgstr "CSV file is broken or invalid. Please, try again."
|
readme.txt
CHANGED
@@ -1,139 +1,163 @@
|
|
1 |
-
===
|
2 |
-
Contributors:
|
3 |
-
Tags:
|
4 |
-
Requires at least: 3.5
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag:
|
7 |
-
License: GPL v2.0 or later
|
8 |
-
License URI: http://www.opensource.org/licenses/gpl-license.php
|
9 |
-
|
10 |
-
A simple
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
WordPress Visualizer
|
15 |
-
|
16 |
-
The plugin uses Google Visualization API to
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
*
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
*
|
81 |
-
*
|
82 |
-
* Fixed
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
*
|
89 |
-
*
|
90 |
-
|
91 |
-
|
92 |
-
*
|
93 |
-
*
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
*
|
99 |
-
|
100 |
-
= 1.
|
101 |
-
*
|
102 |
-
|
103 |
-
= 1.
|
104 |
-
*
|
105 |
-
*
|
106 |
-
* Fixed
|
107 |
-
*
|
108 |
-
|
109 |
-
|
110 |
-
*
|
111 |
-
|
112 |
-
|
113 |
-
* Implemented
|
114 |
-
* Implemented
|
115 |
-
*
|
116 |
-
|
117 |
-
|
118 |
-
*
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
*
|
129 |
-
|
130 |
-
|
131 |
-
*
|
132 |
-
*
|
133 |
-
*
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WordPress Charts and Graphs ===
|
2 |
+
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
|
3 |
+
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
|
4 |
+
Requires at least: 3.5
|
5 |
+
Tested up to: 4.4.2
|
6 |
+
Stable tag: trunk
|
7 |
+
License: GPL v2.0 or later
|
8 |
+
License URI: http://www.opensource.org/licenses/gpl-license.php
|
9 |
+
|
10 |
+
A simple and quite powerful WordPress chart plugin to create, manage and embed interactive charts into your WordPress posts and pages.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
<a href="http://themeisle.com/plugins/visualizer-charts-and-graphs/" rel="friend">WordPress Visualizer plugin</a> is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages.
|
15 |
+
|
16 |
+
The plugin uses Google Visualization API to add charts, which support cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
|
17 |
+
|
18 |
+
> **Time-saving features available in the Pro version:**
|
19 |
+
>
|
20 |
+
> * Import data from other charts
|
21 |
+
> * Easy edit the data using a live editor
|
22 |
+
> * Priority email support from the developer of the plugin
|
23 |
+
> * Support and updates for 1 year
|
24 |
+
>
|
25 |
+
> **[Learn more about Visualizer PRO](http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/)**
|
26 |
+
|
27 |
+
|
28 |
+
### 9 Chart types ###
|
29 |
+
This WordPress graph plugin provides a variety of charts that are optimized to address your WordPress data visualization needs. It is line chart, area chart, bar chart, column chart, pie chart, geo chart, gauge chart, candlestick chart and scatter chart. These charts are based on pure HTML5/SVG technology (adopting VML for old IE versions), so no extra plugins are required. Adding these charts to your page can be done in a few simple steps.
|
30 |
+
|
31 |
+
### Flexible and customizable ###
|
32 |
+
Make the charts your own. Configure an extensive set of options to perfectly match the look and feel of your website. You can use Google Chart Tools with their default setting - all customization is optional and the basic setup is launch-ready. However, charts can be easily customizable in case your webpage adopts a style which is at odds with provided defaults. Every chart exposes a number of options that customize its look and feel.
|
33 |
+
|
34 |
+
### HTML5/SVG ###
|
35 |
+
Charts are rendered using HTML5/SVG technology to provide cross-browser compatibility (including VML for older IE versions) and cross platform portability to iPhones, iPads and Android. Your users will never have to mess with extra plugins or any software. If they have a web browser, they can see your charts.
|
36 |
+
|
37 |
+
*above descriptions were partially taken from Google Visualization API site*
|
38 |
+
|
39 |
+
The plugins works perfectly with the all <a href="http://justfreethemes.com" rel="friend">free</a> or <a href="http://www.codeinwp.com/blog/best-wordpress-themes/" rel="friend">premium WordPress themes</a>
|
40 |
+
|
41 |
+
### Knowledge Base ###
|
42 |
+
|
43 |
+
1. [How can I create a chart?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-create-a-chart%3F)
|
44 |
+
1. [How can I edit a chart?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-edit-a-chart%3F)
|
45 |
+
1. [How can I clone a chart?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-clone-a-chart%3F)
|
46 |
+
1. [How can I delete a chart?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-delete-a-chart%3F)
|
47 |
+
1. [How can I highlight a single bar?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-highlight-a-single-bar%3F)
|
48 |
+
1. [How can I populate chart series and data dynamically?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-populate-chart-series-and-data-dynamically%3F)
|
49 |
+
1. [How can I populate data from Google Spreadsheet?](https://github.com/madpixelslabs/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F)
|
50 |
+
|
51 |
+
== Installation ==
|
52 |
+
|
53 |
+
1. Upload the files to the `/wp-content/plugins/visualizer/` directory.
|
54 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
55 |
+
|
56 |
+
== Frequently Asked Questions ==
|
57 |
+
|
58 |
+
= Shortcode does not turn into graph =
|
59 |
+
|
60 |
+
Pay attention that to turn your shortcodes into graphs, your theme has to have `<?php wp_footer(); ?>` call at the bottom of **footer.php** file.
|
61 |
+
|
62 |
+
== Screenshots ==
|
63 |
+
|
64 |
+
1. Chart type selection
|
65 |
+
2. Chart data uploading
|
66 |
+
3. Chart options editing
|
67 |
+
4. Charts media library
|
68 |
+
5. Charts library
|
69 |
+
|
70 |
+
== Changelog ==
|
71 |
+
|
72 |
+
= 1.5.3 =
|
73 |
+
* Fixed the missing create chart button
|
74 |
+
|
75 |
+
= 1.5.1 =
|
76 |
+
* Fixed bug with from web button
|
77 |
+
|
78 |
+
= 1.5 =
|
79 |
+
* Added support for live editor
|
80 |
+
* Added support for importing data from other charts
|
81 |
+
* Added filter for chart settings
|
82 |
+
* Fixed bug when zero was not working on the charts
|
83 |
+
|
84 |
+
= 1.4.2.3 =
|
85 |
+
* Implemented ability to edit horizontal and vertical axis number format for bar and column charts
|
86 |
+
|
87 |
+
= 1.4.2.2 =
|
88 |
+
* Added ability to pass a class for chart wrapper div
|
89 |
+
* Added proper label for custom post type
|
90 |
+
|
91 |
+
= 1.4.2.1 =
|
92 |
+
* Fixed issue with download_url function which not exists at front end
|
93 |
+
* Added functionality which prevents direct access to the plugin folder
|
94 |
+
|
95 |
+
= 1.4.2 =
|
96 |
+
* Fixed remote CSV uploading issue when allow_url_fopen option is disabled in php.ini
|
97 |
+
* Replaced flattr image on widget and added donate link to plugin meta data
|
98 |
+
* Added notification message at library page when allow_url_fopen option is disabled
|
99 |
+
|
100 |
+
= 1.4.1.1 =
|
101 |
+
* Removed CSV parser escape constant to prevent warnings which appears when PHP 5.2.x or less is used
|
102 |
+
|
103 |
+
= 1.4.1 =
|
104 |
+
* Fixed issue which prevents the plugin working on SSL backend
|
105 |
+
* Fixed issue with CSV file uploading in IE and other browsers
|
106 |
+
* Fixed issue with empty series, which appears due to leading space in a source file
|
107 |
+
* Added ability to define custom delimiter, enclosure and escape variables for CSV parsing
|
108 |
+
|
109 |
+
= 1.4 =
|
110 |
+
* Implemented aggregation target and selection mode options for candlestick chart
|
111 |
+
* Implemented focus target and data opacity for columnar chars
|
112 |
+
* Implemented data opacity and interpolate nulls settings for line chart
|
113 |
+
* Implemented ability to edit tooltip settings
|
114 |
+
* Implemented new settings for linear charts like selection mode and aggregation target
|
115 |
+
* Implemented area and point opacity settings for area chart
|
116 |
+
* Implemented new settings for pie chart like pie hole, start angle and slice offset
|
117 |
+
* Implemented ability to select a color for chart title and legend items
|
118 |
+
* Fixed number formatting settings for linear charts, from now it works only for axis labels
|
119 |
+
* Reworked general settings section by moving title and font settings into separate groups
|
120 |
+
|
121 |
+
= 1.3.0.2 =
|
122 |
+
* Replaced links to github wiki
|
123 |
+
|
124 |
+
= 1.3.0.1 =
|
125 |
+
* Added Flattr button
|
126 |
+
|
127 |
+
= 1.3.0 =
|
128 |
+
* Implemented ability to set number and date formatters
|
129 |
+
* Implemented ability to select transparent background for a chart
|
130 |
+
* Fixed JS bugs which appear when post type editor support is disabled
|
131 |
+
* Fixed issue with NULL values for numeric series
|
132 |
+
* Fixed invalid charts rendering at "Add Media" library
|
133 |
+
* Fixed compatibility issue with another Google API related plugins
|
134 |
+
* Added "rate the plugin" box
|
135 |
+
|
136 |
+
= 1.2.0 =
|
137 |
+
* Implemented minor grid lines settings.
|
138 |
+
* Implemented view window settings.
|
139 |
+
* Horizontal and vertical axes settings were split into separate groups.
|
140 |
+
|
141 |
+
= 1.1.4 =
|
142 |
+
* Bug with float values has been fixed.
|
143 |
+
|
144 |
+
= 1.1.3 =
|
145 |
+
* Issue with "fseek warning" for Google Spreadsheet document source, was fixed.
|
146 |
+
|
147 |
+
= 1.1.2 =
|
148 |
+
* Compatibility issues with WordPress version 3.6 has been fixed.
|
149 |
+
|
150 |
+
= 1.1.1 =
|
151 |
+
* Active type tab in the charts library was fixed.
|
152 |
+
* Library styles were updated.
|
153 |
+
|
154 |
+
= 1.1.0 =
|
155 |
+
* Auto population was added for remote CSV file source.
|
156 |
+
* Ability to hook chart series and data was implemented.
|
157 |
+
* Ability to upload CSV files from web was implemented.
|
158 |
+
|
159 |
+
= 1.0.1 =
|
160 |
+
* The bug with CSV file uploading was fixed.
|
161 |
+
|
162 |
+
= 1.0.0 =
|
163 |
+
* The first version of the plugin was implemented.
|
samples/area.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
Month,Bolivia,Ecuador,Madagascar,Papua New Guinea,Rwanda
|
2 |
-
date,number,number,number,number,number
|
3 |
-
2004/05,165,938,522,998,450
|
4 |
-
2005/06,135,1120,599,1268,288
|
5 |
-
2006/07,157,1167,587,807,397
|
6 |
-
2007/08,139,1110,615,968,215
|
7 |
2008/09,136,691,629,1026,366
|
1 |
+
Month,Bolivia,Ecuador,Madagascar,Papua New Guinea,Rwanda
|
2 |
+
date,number,number,number,number,number
|
3 |
+
2004/05,165,938,522,998,450
|
4 |
+
2005/06,135,1120,599,1268,288
|
5 |
+
2006/07,157,1167,587,807,397
|
6 |
+
2007/08,139,1110,615,968,215
|
7 |
2008/09,136,691,629,1026,366
|
samples/bar.csv
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
Year,Austria,Bulgaria,Denmark,Greece
|
2 |
-
string,number,number,number,number
|
3 |
-
2003,1336060,400361,1001582,997974
|
4 |
-
2004,1538156,366849,1119450,941795
|
5 |
-
2005,1576579,440514,993360,930593
|
6 |
-
2006,1600652,434552,1004163,897127
|
7 |
-
2007,1968113,393032,979198,1080887
|
8 |
2008,1901067,517206,916965,1056036
|
1 |
+
Year,Austria,Bulgaria,Denmark,Greece
|
2 |
+
string,number,number,number,number
|
3 |
+
2003,1336060,400361,1001582,997974
|
4 |
+
2004,1538156,366849,1119450,941795
|
5 |
+
2005,1576579,440514,993360,930593
|
6 |
+
2006,1600652,434552,1004163,897127
|
7 |
+
2007,1968113,393032,979198,1080887
|
8 |
2008,1901067,517206,916965,1056036
|
samples/candlestick.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
Date,GBP/USD,,,
|
2 |
-
date,number,number,number,number
|
3 |
-
2013-07-10,20,28,38,45
|
4 |
-
2013-07-11,31,38,55,66
|
5 |
-
2013-07-12,50,55,77,80
|
6 |
-
2013-07-13,50,77,66,77
|
7 |
-
2013-07-14,15,66,22,68
|
1 |
+
Date,GBP/USD,,,
|
2 |
+
date,number,number,number,number
|
3 |
+
2013-07-10,20,28,38,45
|
4 |
+
2013-07-11,31,38,55,66
|
5 |
+
2013-07-12,50,55,77,80
|
6 |
+
2013-07-13,50,77,66,77
|
7 |
+
2013-07-14,15,66,22,68
|
samples/column.csv
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
City,Population in 2012,Population in 2011,Population in 2010
|
2 |
-
string,number,number,number
|
3 |
-
Milan,1324110,907563,607906
|
4 |
-
Naples,959574,1324110,1137128
|
5 |
-
Turin,907563,959574,1080181
|
6 |
-
Palermo,655875,371282,907563
|
7 |
-
Genoa,607906,580181,707563
|
8 |
-
Bologna,380181,655875,480181
|
9 |
Florence,371282,607906,655875
|
1 |
+
City,Population in 2012,Population in 2011,Population in 2010
|
2 |
+
string,number,number,number
|
3 |
+
Milan,1324110,907563,607906
|
4 |
+
Naples,959574,1324110,1137128
|
5 |
+
Turin,907563,959574,1080181
|
6 |
+
Palermo,655875,371282,907563
|
7 |
+
Genoa,607906,580181,707563
|
8 |
+
Bologna,380181,655875,480181
|
9 |
Florence,371282,607906,655875
|
samples/gauge.csv
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
System,Loading
|
2 |
-
string,number
|
3 |
-
Memory,80
|
4 |
-
CPU,55
|
5 |
Network,68
|
1 |
+
System,Loading
|
2 |
+
string,number
|
3 |
+
Memory,80
|
4 |
+
CPU,55
|
5 |
Network,68
|
samples/geo.csv
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
Country,Popularity
|
2 |
-
string,number
|
3 |
-
Germany,200
|
4 |
-
United States,300
|
5 |
-
Brazil,400
|
6 |
-
Canada,500
|
7 |
-
France,600
|
8 |
RU,700
|
1 |
+
Country,Popularity
|
2 |
+
string,number
|
3 |
+
Germany,200
|
4 |
+
United States,300
|
5 |
+
Brazil,400
|
6 |
+
Canada,500
|
7 |
+
France,600
|
8 |
RU,700
|
samples/line.csv
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
x,Cats,Blanket1,Blanket2
|
2 |
-
string,number,number,number
|
3 |
-
A,1,1,0.5
|
4 |
-
B,2,0.5,1
|
5 |
-
C,4,1,0.5
|
6 |
-
D,8,0.5,1
|
7 |
-
E,7,1,0.5
|
8 |
-
F,7,0.5,1
|
9 |
-
G,8,1,0.5
|
10 |
-
H,4,0.5,1
|
11 |
-
I,2,1,0.5
|
12 |
-
J,3.5,0.5,1
|
13 |
-
K,3,1,0.5
|
14 |
-
L,3.5,0.5,1
|
15 |
-
M,1,1,0.5
|
16 |
N,1,0.5,1
|
1 |
+
x,Cats,Blanket1,Blanket2
|
2 |
+
string,number,number,number
|
3 |
+
A,1,1,0.5
|
4 |
+
B,2,0.5,1
|
5 |
+
C,4,1,0.5
|
6 |
+
D,8,0.5,1
|
7 |
+
E,7,1,0.5
|
8 |
+
F,7,0.5,1
|
9 |
+
G,8,1,0.5
|
10 |
+
H,4,0.5,1
|
11 |
+
I,2,1,0.5
|
12 |
+
J,3.5,0.5,1
|
13 |
+
K,3,1,0.5
|
14 |
+
L,3.5,0.5,1
|
15 |
+
M,1,1,0.5
|
16 |
N,1,0.5,1
|
samples/pie.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
Task,Hours per Day
|
2 |
-
string,number
|
3 |
-
Work,11
|
4 |
-
Eat,2
|
5 |
-
Commute,2
|
6 |
-
Watch TV,2
|
7 |
Sleep,7
|
1 |
+
Task,Hours per Day
|
2 |
+
string,number
|
3 |
+
Work,11
|
4 |
+
Eat,2
|
5 |
+
Commute,2
|
6 |
+
Watch TV,2
|
7 |
Sleep,7
|
samples/scatter.csv
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
Dispersion,Male,Female
|
2 |
-
number,number,number
|
3 |
-
10,75,54
|
4 |
-
20,,64
|
5 |
-
33,22,23
|
6 |
-
55,16,
|
7 |
-
14,61,
|
8 |
48,3,52
|
1 |
+
Dispersion,Male,Female
|
2 |
+
number,number,number
|
3 |
+
10,75,54
|
4 |
+
20,,64
|
5 |
+
33,22,23
|
6 |
+
55,16,
|
7 |
+
14,61,
|
8 |
48,3,52
|