Version Description
- Added support for 3 more chart types
- Fixed issue with charts not saving
Download this release
Release Info
Developer | codeinwp |
Plugin | WordPress Charts and Graphs Lite |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- classes/Visualizer/Module/Admin.php +12 -6
- classes/Visualizer/Module/Chart.php +10 -65
- classes/Visualizer/Module/Frontend.php +3 -2
- classes/Visualizer/Plugin.php +3 -1
- classes/Visualizer/Render/Page/Types.php +12 -5
- classes/Visualizer/Render/Sidebar.php +9 -0
- css/frame.css +60 -0
- images/chart_types.png +0 -0
- images/chart_types_g.png +0 -0
- index.php +1 -1
- js/media.js +1 -1
- js/render.js +39 -5
- readme.txt +8 -2
- samples/combo.csv +8 -0
- samples/table.csv +7 -0
- samples/timeline.csv +6 -0
classes/Visualizer/Module/Admin.php
CHANGED
@@ -139,8 +139,8 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
139 |
* @access private
|
140 |
* @return array The associated array of chart types with localized names.
|
141 |
*/
|
142 |
-
|
143 |
-
|
144 |
'all' => esc_html__( 'All', Visualizer_Plugin::NAME ),
|
145 |
'pie' => esc_html__( 'Pie', Visualizer_Plugin::NAME ),
|
146 |
'line' => esc_html__( 'Line', Visualizer_Plugin::NAME ),
|
@@ -150,8 +150,12 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
150 |
'column' => esc_html__( 'Column', Visualizer_Plugin::NAME ),
|
151 |
'gauge' => esc_html__( 'Gauge', Visualizer_Plugin::NAME ),
|
152 |
'scatter' => esc_html__( 'Scatter', Visualizer_Plugin::NAME ),
|
153 |
-
'candlestick' => esc_html__( '
|
154 |
);
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
|
157 |
/**
|
@@ -169,7 +173,8 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
169 |
if ( post_type_supports( $typenow, 'editor' ) ) {
|
170 |
wp_enqueue_style( 'visualizer-media', VISUALIZER_ABSURL . 'css/media.css', array( 'media-views' ), Visualizer_Plugin::VERSION );
|
171 |
|
172 |
-
wp_enqueue_script( 'visualizer-google-jsapi', '//www.
|
|
|
173 |
wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', array( 'visualizer-google-jsapi' ), Visualizer_Plugin::VERSION, true );
|
174 |
wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true );
|
175 |
wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
|
@@ -249,8 +254,9 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
249 |
|
250 |
wp_enqueue_media();
|
251 |
wp_enqueue_script( 'visualizer-library', VISUALIZER_ABSURL . 'js/library.js', array( 'jquery', 'media-views' ), Visualizer_Plugin::VERSION, true );
|
252 |
-
wp_enqueue_script( 'google-jsapi', '//www.
|
253 |
-
wp_enqueue_script( '
|
|
|
254 |
}
|
255 |
if ( get_bloginfo( 'version' ) < '3.3' )
|
256 |
return;
|
139 |
* @access private
|
140 |
* @return array The associated array of chart types with localized names.
|
141 |
*/
|
142 |
+
public static function _getChartTypesLocalized() {
|
143 |
+
$types = array(
|
144 |
'all' => esc_html__( 'All', Visualizer_Plugin::NAME ),
|
145 |
'pie' => esc_html__( 'Pie', Visualizer_Plugin::NAME ),
|
146 |
'line' => esc_html__( 'Line', Visualizer_Plugin::NAME ),
|
150 |
'column' => esc_html__( 'Column', Visualizer_Plugin::NAME ),
|
151 |
'gauge' => esc_html__( 'Gauge', Visualizer_Plugin::NAME ),
|
152 |
'scatter' => esc_html__( 'Scatter', Visualizer_Plugin::NAME ),
|
153 |
+
'candlestick' => esc_html__( 'Candlestick', Visualizer_Plugin::NAME ),
|
154 |
);
|
155 |
+
|
156 |
+
$types = apply_filters("visualizer_pro_chart_types", $types);
|
157 |
+
|
158 |
+
return $types;
|
159 |
}
|
160 |
|
161 |
/**
|
173 |
if ( post_type_supports( $typenow, 'editor' ) ) {
|
174 |
wp_enqueue_style( 'visualizer-media', VISUALIZER_ABSURL . 'css/media.css', array( 'media-views' ), Visualizer_Plugin::VERSION );
|
175 |
|
176 |
+
wp_enqueue_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array( 'media-editor' ), null, true );
|
177 |
+
wp_enqueue_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array( 'visualizer-google-jsapi-new' ), null, true );
|
178 |
wp_enqueue_script( 'visualizer-media-model', VISUALIZER_ABSURL . 'js/media/model.js', array( 'visualizer-google-jsapi' ), Visualizer_Plugin::VERSION, true );
|
179 |
wp_enqueue_script( 'visualizer-media-collection', VISUALIZER_ABSURL . 'js/media/collection.js', array( 'visualizer-media-model' ), Visualizer_Plugin::VERSION, true );
|
180 |
wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
|
254 |
|
255 |
wp_enqueue_media();
|
256 |
wp_enqueue_script( 'visualizer-library', VISUALIZER_ABSURL . 'js/library.js', array( 'jquery', 'media-views' ), Visualizer_Plugin::VERSION, true );
|
257 |
+
wp_enqueue_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
258 |
+
wp_enqueue_script( 'google-jsapi-old', '//www.google.com/jsapi', array('google-jsapi-new'), null, true );
|
259 |
+
wp_enqueue_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi-old', 'visualizer-library' ), Visualizer_Plugin::VERSION, true );
|
260 |
}
|
261 |
if ( get_bloginfo( 'version' ) < '3.3' )
|
262 |
return;
|
classes/Visualizer/Module/Chart.php
CHANGED
@@ -240,8 +240,9 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
240 |
wp_register_style( 'visualizer-frame', VISUALIZER_ABSURL . 'css/frame.css', array(), Visualizer_Plugin::VERSION );
|
241 |
|
242 |
wp_register_script( 'visualizer-frame', VISUALIZER_ABSURL . 'js/frame.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true );
|
243 |
-
wp_register_script( 'google-jsapi', '//www.
|
244 |
-
wp_register_script( '
|
|
|
245 |
wp_register_script( 'visualizer-preview', VISUALIZER_ABSURL . 'js/preview.js', array( 'wp-color-picker', 'visualizer-render' ), Visualizer_Plugin::VERSION, true );
|
246 |
|
247 |
// added by Ash/Upwork
|
@@ -350,68 +351,6 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
350 |
wp_iframe( array( $render, 'render') );
|
351 |
}
|
352 |
|
353 |
-
/**
|
354 |
-
* Handles chart settigns page.
|
355 |
-
*
|
356 |
-
* @since 1.0.0
|
357 |
-
*
|
358 |
-
* @access private
|
359 |
-
*/
|
360 |
-
private function _handleSettingsPage() {
|
361 |
-
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
362 |
-
if ( $this->_chart->post_status == 'auto-draft' ) {
|
363 |
-
$this->_chart->post_status = 'publish';
|
364 |
-
wp_update_post( $this->_chart->to_array() );
|
365 |
-
}
|
366 |
-
|
367 |
-
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $_POST );
|
368 |
-
|
369 |
-
$render = new Visualizer_Render_Page_Send();
|
370 |
-
$render->text = sprintf( '[visualizer id="%d"]', $this->_chart->ID );
|
371 |
-
|
372 |
-
wp_iframe( array( $render, 'render') );
|
373 |
-
return;
|
374 |
-
}
|
375 |
-
|
376 |
-
$data = $this->_getChartArray();
|
377 |
-
|
378 |
-
$sidebar = '';
|
379 |
-
$sidebar_class = 'Visualizer_Render_Sidebar_Type_' . ucfirst( $data['type'] );
|
380 |
-
if ( class_exists( $sidebar_class, true ) ) {
|
381 |
-
$sidebar = new $sidebar_class( $data['settings'] );
|
382 |
-
$sidebar->__series = $data['series'];
|
383 |
-
$sidebar->__data = $data['data'];
|
384 |
-
}
|
385 |
-
|
386 |
-
unset( $data['settings']['width'], $data['settings']['height'] );
|
387 |
-
|
388 |
-
wp_enqueue_style( 'wp-color-picker' );
|
389 |
-
wp_enqueue_style( 'visualizer-frame' );
|
390 |
-
|
391 |
-
wp_enqueue_script( 'visualizer-preview' );
|
392 |
-
wp_localize_script( 'visualizer-render', 'visualizer', array(
|
393 |
-
'charts' => array(
|
394 |
-
'canvas' => $data,
|
395 |
-
),
|
396 |
-
) );
|
397 |
-
|
398 |
-
$render = new Visualizer_Render_Page_Settings();
|
399 |
-
|
400 |
-
$render->sidebar = $sidebar;
|
401 |
-
if ( filter_input( INPUT_GET, 'library', FILTER_VALIDATE_BOOLEAN ) ) {
|
402 |
-
$render->button = filter_input( INPUT_GET, 'action' ) == Visualizer_Plugin::ACTION_EDIT_CHART
|
403 |
-
? esc_html__( 'Save Chart', Visualizer_Plugin::NAME )
|
404 |
-
: esc_html__( 'Create Chart', Visualizer_Plugin::NAME );
|
405 |
-
} else {
|
406 |
-
$render->button = esc_attr__( 'Insert Chart', Visualizer_Plugin::NAME );
|
407 |
-
}
|
408 |
-
|
409 |
-
$this->_addAction( 'admin_head', 'renderFlattrScript' );
|
410 |
-
|
411 |
-
wp_iframe( array( $render, 'render') );
|
412 |
-
}
|
413 |
-
|
414 |
-
|
415 |
// changed by Ash/Upwork
|
416 |
private function _handleDataAndSettingsPage(){
|
417 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
@@ -437,7 +376,13 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
437 |
$sidebar = new $sidebar_class( $data['settings'] );
|
438 |
$sidebar->__series = $data['series'];
|
439 |
$sidebar->__data = $data['data'];
|
440 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
|
442 |
unset( $data['settings']['width'], $data['settings']['height'] );
|
443 |
|
240 |
wp_register_style( 'visualizer-frame', VISUALIZER_ABSURL . 'css/frame.css', array(), Visualizer_Plugin::VERSION );
|
241 |
|
242 |
wp_register_script( 'visualizer-frame', VISUALIZER_ABSURL . 'js/frame.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true );
|
243 |
+
wp_register_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
244 |
+
wp_register_script( 'google-jsapi-old', '//www.google.com/jsapi', array('google-jsapi-new'), null, true );
|
245 |
+
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'google-jsapi-old', 'google-jsapi-new', 'visualizer-frame' ), Visualizer_Plugin::VERSION, true );
|
246 |
wp_register_script( 'visualizer-preview', VISUALIZER_ABSURL . 'js/preview.js', array( 'wp-color-picker', 'visualizer-render' ), Visualizer_Plugin::VERSION, true );
|
247 |
|
248 |
// added by Ash/Upwork
|
351 |
wp_iframe( array( $render, 'render') );
|
352 |
}
|
353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
// changed by Ash/Upwork
|
355 |
private function _handleDataAndSettingsPage(){
|
356 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) {
|
376 |
$sidebar = new $sidebar_class( $data['settings'] );
|
377 |
$sidebar->__series = $data['series'];
|
378 |
$sidebar->__data = $data['data'];
|
379 |
+
} else {
|
380 |
+
$sidebar = apply_filters("visualizer_pro_chart_type_sidebar", '', $data);
|
381 |
+
if ($sidebar != '') {
|
382 |
+
$sidebar->__series = $data['series'];
|
383 |
+
$sidebar->__data = $data['data'];
|
384 |
+
}
|
385 |
+
}
|
386 |
|
387 |
unset( $data['settings']['width'], $data['settings']['height'] );
|
388 |
|
classes/Visualizer/Module/Frontend.php
CHANGED
@@ -77,8 +77,9 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
77 |
* @access public
|
78 |
*/
|
79 |
public function enqueueScripts() {
|
80 |
-
wp_register_script( 'visualizer-google-jsapi', '//www.
|
81 |
-
wp_register_script( 'visualizer-
|
|
|
82 |
}
|
83 |
|
84 |
/**
|
77 |
* @access public
|
78 |
*/
|
79 |
public function enqueueScripts() {
|
80 |
+
wp_register_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
81 |
+
wp_register_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array('visualizer-google-jsapi-new'), null, true );
|
82 |
+
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'visualizer-google-jsapi-old', 'jquery' ), Visualizer_Plugin::VERSION, true );
|
83 |
}
|
84 |
|
85 |
/**
|
classes/Visualizer/Plugin.php
CHANGED
@@ -166,7 +166,9 @@ class Visualizer_Plugin {
|
|
166 |
* @return array
|
167 |
*/
|
168 |
public static function getChartTypes() {
|
169 |
-
|
|
|
|
|
170 |
}
|
171 |
|
172 |
}
|
166 |
* @return array
|
167 |
*/
|
168 |
public static function getChartTypes() {
|
169 |
+
$array = array_keys(Visualizer_Module_Admin::_getChartTypesLocalized());
|
170 |
+
unset($array[0]); // all
|
171 |
+
return $array;
|
172 |
}
|
173 |
|
174 |
}
|
classes/Visualizer/Render/Page/Types.php
CHANGED
@@ -80,8 +80,15 @@ class Visualizer_Render_Page_Types extends Visualizer_Render_Page {
|
|
80 |
*
|
81 |
* @access protected
|
82 |
*/
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
*
|
81 |
* @access protected
|
82 |
*/
|
83 |
+
protected function _renderToolbar() {
|
84 |
+
if( defined( 'Visualizer_Pro' ) ){
|
85 |
+
global $Visualizer_Pro;
|
86 |
+
}else{
|
87 |
+
echo "<a class='pro-upsell' href='".Visualizer_Plugin::PRO_TEASER_URL."' target='_blank'>";
|
88 |
+
echo "<span class='dashicons dashicons-plus-alt'></span>";
|
89 |
+
echo esc_html( "Three Additional Chart Types Available in the Pro Version ( Table, Timeline and Combo Chart ) ", Visualizer_Plugin::NAME );
|
90 |
+
echo "</a>";
|
91 |
+
}
|
92 |
+
echo '<input type="submit" class="button button-primary button-large push-right" value="', esc_attr__( 'Next', Visualizer_Plugin::NAME ), '">';
|
93 |
+
}
|
94 |
+
}
|
classes/Visualizer/Render/Sidebar.php
CHANGED
@@ -545,4 +545,13 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
|
|
545 |
}
|
546 |
}
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
}
|
545 |
}
|
546 |
}
|
547 |
|
548 |
+
protected static function _renderCheckboxItem( $title, $name, $value, $default, $desc ) {
|
549 |
+
echo '<div class="section-item">';
|
550 |
+
echo '<a class="more-info" href="javascript:;">[?]</a>';
|
551 |
+
echo '<b>', $title, '</b>';
|
552 |
+
echo '<input type="checkbox" class="control-check" value="', $default, '" name="', $name, '" ', ($value == $default ? "checked" : ""), '>';
|
553 |
+
echo '<p class="section-description">', $desc, '</p>';
|
554 |
+
echo '</div>';
|
555 |
+
}
|
556 |
+
|
557 |
}
|
css/frame.css
CHANGED
@@ -250,6 +250,13 @@ div.group-content .group-description {
|
|
250 |
width: 100%;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
.section-description ul {
|
254 |
margin: 0 0 0 25px;
|
255 |
list-style: circle;
|
@@ -303,6 +310,7 @@ div.group-content .group-description {
|
|
303 |
z-index: 100;
|
304 |
left: 0;
|
305 |
right: 0;
|
|
|
306 |
bottom: 0;
|
307 |
border-top: 1px solid #DFDFDF;
|
308 |
overflow: hidden;
|
@@ -314,10 +322,14 @@ div.group-content .group-description {
|
|
314 |
float: right;
|
315 |
}
|
316 |
|
|
|
|
|
|
|
317 |
.toolbar-div{
|
318 |
display: inline-block;
|
319 |
vertical-align: top;
|
320 |
width: 30%;
|
|
|
321 |
}
|
322 |
|
323 |
/******************************************************************************/
|
@@ -395,6 +407,54 @@ div.group-content .group-description {
|
|
395 |
background-position: -600px -225px;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
/******************************************************************************/
|
399 |
/******************************** OTHER STYLES ******************************/
|
400 |
/******************************************************************************/
|
250 |
width: 100%;
|
251 |
}
|
252 |
|
253 |
+
.control-check {
|
254 |
+
float: right;
|
255 |
+
}
|
256 |
+
.control-check::after {
|
257 |
+
clear: both;
|
258 |
+
}
|
259 |
+
|
260 |
.section-description ul {
|
261 |
margin: 0 0 0 25px;
|
262 |
list-style: circle;
|
310 |
z-index: 100;
|
311 |
left: 0;
|
312 |
right: 0;
|
313 |
+
text-align: center;
|
314 |
bottom: 0;
|
315 |
border-top: 1px solid #DFDFDF;
|
316 |
overflow: hidden;
|
322 |
float: right;
|
323 |
}
|
324 |
|
325 |
+
.toolbar-div a{
|
326 |
+
float:left;
|
327 |
+
}
|
328 |
.toolbar-div{
|
329 |
display: inline-block;
|
330 |
vertical-align: top;
|
331 |
width: 30%;
|
332 |
+
float:left;
|
333 |
}
|
334 |
|
335 |
/******************************************************************************/
|
407 |
background-position: -600px -225px;
|
408 |
}
|
409 |
|
410 |
+
.type-box-table .type-label {
|
411 |
+
background-position: -301px -670px;
|
412 |
+
}
|
413 |
+
|
414 |
+
.type-box-timeline .type-label {
|
415 |
+
background-position: -2px -670px;
|
416 |
+
}
|
417 |
+
|
418 |
+
.type-box-combo .type-label {
|
419 |
+
background-position: -597px -670px;
|
420 |
+
}
|
421 |
+
|
422 |
+
a.pro-upsell {
|
423 |
+
margin: 0;
|
424 |
+
display: flex;
|
425 |
+
align-items: center;
|
426 |
+
height: 20px;
|
427 |
+
padding:10px 20px;
|
428 |
+
border-radius: 50px;
|
429 |
+
-moz-border-radius: 50px;
|
430 |
+
-webkit-border-radius: 50px;
|
431 |
+
background-color: #4285F4;
|
432 |
+
text-decoration: none;
|
433 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
434 |
+
border: 1px solid #2c80d6;
|
435 |
+
transition: all .5s ease-in;
|
436 |
+
top: 10px;
|
437 |
+
position: relative;
|
438 |
+
}
|
439 |
+
|
440 |
+
a.pro-upsell:hover {
|
441 |
+
background-color: #5a95f5;
|
442 |
+
box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
|
443 |
+
}
|
444 |
+
|
445 |
+
a.pro-upsell span {
|
446 |
+
color: #fff;
|
447 |
+
margin-right: 10px;
|
448 |
+
display:inline-block;
|
449 |
+
}
|
450 |
+
|
451 |
+
a.pro-upsell {
|
452 |
+
font-weight: bold;
|
453 |
+
font-size: 13px;
|
454 |
+
color: #fff;
|
455 |
+
display: inline;
|
456 |
+
}
|
457 |
+
|
458 |
/******************************************************************************/
|
459 |
/******************************** OTHER STYLES ******************************/
|
460 |
/******************************************************************************/
|
images/chart_types.png
CHANGED
Binary file
|
images/chart_types_g.png
CHANGED
Binary file
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
Author: Themeisle
|
8 |
Author URI: http://themeisle.com
|
9 |
License: GPL v2.0 or later
|
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.6
|
7 |
Author: Themeisle
|
8 |
Author URI: http://themeisle.com
|
9 |
License: GPL v2.0 or later
|
js/media.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
wpmvtv = wpmv.toolbar.visualizer;
|
5 |
mediaFrame = wpmv.MediaFrame.Post;
|
6 |
|
7 |
-
g.load("
|
8 |
|
9 |
wpmv.MediaFrame.Post = mediaFrame.extend({
|
10 |
initialize: function() {
|
4 |
wpmvtv = wpmv.toolbar.visualizer;
|
5 |
mediaFrame = wpmv.MediaFrame.Post;
|
6 |
|
7 |
+
g.charts.load("current", { packages: ["corechart", "geochart", "gauge", "table", "timeline"] });
|
8 |
|
9 |
wpmv.MediaFrame.Post = mediaFrame.extend({
|
10 |
initialize: function() {
|
js/render.js
CHANGED
@@ -16,9 +16,16 @@
|
|
16 |
|
17 |
render = v.objects[id] || null;
|
18 |
if (!render) {
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
render = new gv[render](container);
|
24 |
}
|
@@ -52,8 +59,35 @@
|
|
52 |
settings['region'] = 'world';
|
53 |
}
|
54 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
case 'gauge':
|
56 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
default:
|
58 |
return;
|
59 |
}
|
@@ -139,8 +173,8 @@
|
|
139 |
}
|
140 |
};
|
141 |
|
142 |
-
g.load("
|
143 |
-
g.setOnLoadCallback(function() {
|
144 |
gv = g.visualization;
|
145 |
v.render();
|
146 |
});
|
16 |
|
17 |
render = v.objects[id] || null;
|
18 |
if (!render) {
|
19 |
+
switch (chart.type) {
|
20 |
+
case "gauge":
|
21 |
+
case "table":
|
22 |
+
case "timeline":
|
23 |
+
render = chart.type.charAt(0).toUpperCase() + chart.type.slice(1);
|
24 |
+
break;
|
25 |
+
default:
|
26 |
+
render = chart.type.charAt(0).toUpperCase() + chart.type.slice(1) + 'Chart';
|
27 |
+
break;
|
28 |
+
}
|
29 |
|
30 |
render = new gv[render](container);
|
31 |
}
|
59 |
settings['region'] = 'world';
|
60 |
}
|
61 |
break;
|
62 |
+
case 'table':
|
63 |
+
if (parseInt(settings['pagination']) != 1)
|
64 |
+
{
|
65 |
+
delete settings['pageSize'];
|
66 |
+
}
|
67 |
+
break;
|
68 |
case 'gauge':
|
69 |
break;
|
70 |
+
case 'timeline':
|
71 |
+
settings['timeline'] = [];
|
72 |
+
settings['timeline']['groupByRowLabel'] = settings['groupByRowLabel'] ? true : false;
|
73 |
+
settings['timeline']['colorByRowLabel'] = settings['colorByRowLabel'] ? true : false;
|
74 |
+
settings['timeline']['showRowLabels'] = settings['showRowLabels'] ? true : false;
|
75 |
+
if(settings['singleColor'] != '') {
|
76 |
+
settings['timeline']['singleColor'] = settings['singleColor'];
|
77 |
+
}
|
78 |
+
break;
|
79 |
+
case 'combo':
|
80 |
+
if (settings.series) {
|
81 |
+
for (i in settings.series) {
|
82 |
+
if (settings.series[i]['type'] == '') {
|
83 |
+
delete settings.series[i]['type'];
|
84 |
+
}
|
85 |
+
if (settings.series[i]['color'] == '') {
|
86 |
+
delete settings.series[i]['color'];
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
break;
|
91 |
default:
|
92 |
return;
|
93 |
}
|
173 |
}
|
174 |
};
|
175 |
|
176 |
+
g.charts.load("current", {packages: ["corechart", "geochart", "gauge", "table", "timeline"]});
|
177 |
+
g.charts.setOnLoadCallback(function() {
|
178 |
gv = g.visualization;
|
179 |
v.render();
|
180 |
});
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
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.5.
|
6 |
Stable tag: trunk
|
7 |
License: GPL v2.0 or later
|
8 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
@@ -19,13 +19,14 @@ The plugin uses Google Visualization API to add charts, which support cross-brow
|
|
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 ###
|
@@ -69,6 +70,11 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
= 1.5.5 =
|
73 |
* Added export for charts
|
74 |
* Enable default value for focus target. Fixed issue with hover which was not working on some machines.
|
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.5.3
|
6 |
Stable tag: trunk
|
7 |
License: GPL v2.0 or later
|
8 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
19 |
>
|
20 |
> * Import data from other charts
|
21 |
> * Easy edit the data using a live editor
|
22 |
+
> * 3 more chart types ( Combo, Timeline and Table chart )
|
23 |
> * Priority email support from the developer of the plugin
|
24 |
> * Support and updates for 1 year
|
25 |
>
|
26 |
> **[Learn more about Visualizer PRO](http://themeisle.com/plugins/visualizer-charts-and-graphs-pro-addon/)**
|
27 |
|
28 |
|
29 |
+
### 9 Chart types + 3 more in the pro version ###
|
30 |
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.
|
31 |
|
32 |
### Flexible and customizable ###
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.5.6 =
|
74 |
+
* Added support for 3 more chart types
|
75 |
+
* Fixed issue with charts not saving
|
76 |
+
|
77 |
+
|
78 |
= 1.5.5 =
|
79 |
* Added export for charts
|
80 |
* Enable default value for focus target. Fixed issue with hover which was not working on some machines.
|
samples/combo.csv
ADDED
@@ -0,0 +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
|
samples/table.csv
ADDED
@@ -0,0 +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
|
samples/timeline.csv
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Category,Work,From,To
|
2 |
+
string,string,date,date
|
3 |
+
1,Requirements,2013-01-01,2013-01-30
|
4 |
+
1,Customer Discussion,2013-01-01,2013-01-30
|
5 |
+
2,Design,2013-02-01,2013-02-27
|
6 |
+
3,Implementation,2013-03-01,2013-04-30
|