Version Description
- 2018-08-15
Download this release
Release Info
Developer | codeinwp |
Plugin | WordPress Charts and Graphs Lite |
Version | 3.0.11 |
Comparing to | |
See all releases |
Code changes from version 3.0.10 to 3.0.11
- CHANGELOG.md +5 -0
- classes/Visualizer/Module/Chart.php +14 -1
- classes/Visualizer/Plugin.php +1 -1
- css/media.css +1 -1
- index.php +1 -1
- js/render.js +42 -25
- readme.md +6 -0
- readme.txt +6 -0
- themeisle-hash.json +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.0.10 - 2018-07-20
|
3 |
**Changes:**
|
4 |
* Fixed problem with chart reverting to the default values
|
1 |
|
2 |
+
### v3.0.11 - 2018-08-15
|
3 |
+
**Changes:**
|
4 |
+
* Fixed issue with the Series Settings options for the Table Chart
|
5 |
+
* Fixed issue with chart showing "Table has no columns" with remote sources
|
6 |
+
|
7 |
### v3.0.10 - 2018-07-20
|
8 |
**Changes:**
|
9 |
* Fixed problem with chart reverting to the default values
|
classes/Visualizer/Module/Chart.php
CHANGED
@@ -494,7 +494,20 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
494 |
}
|
495 |
if ( $source ) {
|
496 |
if ( $source->fetch() ) {
|
497 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
wp_update_post( $chart->to_array() );
|
499 |
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
500 |
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
494 |
}
|
495 |
if ( $source ) {
|
496 |
if ( $source->fetch() ) {
|
497 |
+
$content = $source->getData();
|
498 |
+
$populate = true;
|
499 |
+
if ( is_string( $content ) && is_array( unserialize( $content ) ) ) {
|
500 |
+
$json = unserialize( $content );
|
501 |
+
// if source exists, so should data. if source exists but data is blank, do not populate the chart.
|
502 |
+
// if we populate the data even if it is empty, the chart will show "Table has no columns".
|
503 |
+
if ( array_key_exists( 'source', $json ) && ! empty( $json['source'] ) && ( ! array_key_exists( 'data', $json ) || empty( $json['data'] ) ) ) {
|
504 |
+
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Not populating chart data as source exists (%s) but data is empty!', $json['source'] ), 'warn', __FILE__, __LINE__ );
|
505 |
+
$populate = false;
|
506 |
+
}
|
507 |
+
}
|
508 |
+
if ( $populate ) {
|
509 |
+
$chart->post_content = $content;
|
510 |
+
}
|
511 |
wp_update_post( $chart->to_array() );
|
512 |
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
513 |
update_post_meta( $chart->ID, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
classes/Visualizer/Plugin.php
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
-
const VERSION = '3.0.
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
28 |
class Visualizer_Plugin {
|
29 |
|
30 |
const NAME = 'visualizer';
|
31 |
+
const VERSION = '3.0.11';
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
css/media.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 3.0.
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
1 |
/*
|
2 |
+
Version: 3.0.11
|
3 |
*/
|
4 |
#visualizer-library-view {
|
5 |
padding: 30px 10px 10px 30px;
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Visualizer: Charts and Graphs Lite
|
5 |
Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
|
6 |
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.
|
7 |
-
Version: 3.0.
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
4 |
Plugin Name: Visualizer: Charts and Graphs Lite
|
5 |
Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
|
6 |
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.
|
7 |
+
Version: 3.0.11
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
js/render.js
CHANGED
@@ -182,33 +182,28 @@ var __visualizer_chart_images = [];
|
|
182 |
}
|
183 |
|
184 |
if (settings.series) {
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
formatter.format(table, i + 1);
|
205 |
-
}
|
206 |
-
}
|
207 |
} else if (chart.type === 'pie' && settings.format && settings.format !== '') {
|
208 |
-
|
209 |
-
formatter.format(table, 1);
|
210 |
}
|
211 |
-
|
212 |
v.override(settings);
|
213 |
|
214 |
g.visualization.events.addListener(render, 'ready', function () {
|
@@ -225,6 +220,28 @@ var __visualizer_chart_images = [];
|
|
225 |
render.draw(table, settings);
|
226 |
};
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
v.override = function(settings) {
|
229 |
if (settings.manual) {
|
230 |
try{
|
182 |
}
|
183 |
|
184 |
if (settings.series) {
|
185 |
+
switch(chart.type){
|
186 |
+
case 'table':
|
187 |
+
for(i in settings.series){
|
188 |
+
i = parseInt(i);
|
189 |
+
if (!series[i + 1]) {
|
190 |
+
continue;
|
191 |
+
}
|
192 |
+
v.format_data(table, series[i + 1].type, settings.series[i].format, i + 1);
|
193 |
+
}
|
194 |
+
break;
|
195 |
+
default:
|
196 |
+
for (i = 0; i < settings.series.length; i++) {
|
197 |
+
if (!series[i + 1]) {
|
198 |
+
continue;
|
199 |
+
}
|
200 |
+
v.format_data(table, series[i + 1].type, settings.series[i].format, i + 1);
|
201 |
+
}
|
202 |
+
break;
|
203 |
+
}
|
|
|
|
|
|
|
204 |
} else if (chart.type === 'pie' && settings.format && settings.format !== '') {
|
205 |
+
v.format_data(table, 'number', settings.format, 1);
|
|
|
206 |
}
|
|
|
207 |
v.override(settings);
|
208 |
|
209 |
g.visualization.events.addListener(render, 'ready', function () {
|
220 |
render.draw(table, settings);
|
221 |
};
|
222 |
|
223 |
+
v.format_data = function(table, type, format, index) {
|
224 |
+
if (!format || format === '') {
|
225 |
+
return;
|
226 |
+
}
|
227 |
+
|
228 |
+
var formatter = null;
|
229 |
+
switch (type) {
|
230 |
+
case 'number':
|
231 |
+
formatter = new g.visualization.NumberFormat({pattern: format});
|
232 |
+
break;
|
233 |
+
case 'date':
|
234 |
+
case 'datetime':
|
235 |
+
case 'timeofday':
|
236 |
+
formatter = new g.visualization.DateFormat({pattern: format});
|
237 |
+
break;
|
238 |
+
}
|
239 |
+
|
240 |
+
if (formatter) {
|
241 |
+
formatter.format(table, index);
|
242 |
+
}
|
243 |
+
};
|
244 |
+
|
245 |
v.override = function(settings) {
|
246 |
if (settings.manual) {
|
247 |
try{
|
readme.md
CHANGED
@@ -144,6 +144,12 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
144 |
5. Charts library
|
145 |
|
146 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
### 3.0.10 - 2018-07-20 ###
|
148 |
|
149 |
* Fixed problem with chart reverting to the default values
|
144 |
5. Charts library
|
145 |
|
146 |
## Changelog ##
|
147 |
+
### 3.0.11 - 2018-08-15 ###
|
148 |
+
|
149 |
+
* Fixed issue with the Series Settings options for the Table Chart
|
150 |
+
* Fixed issue with chart showing "Table has no columns" with remote sources
|
151 |
+
|
152 |
+
|
153 |
### 3.0.10 - 2018-07-20 ###
|
154 |
|
155 |
* Fixed problem with chart reverting to the default values
|
readme.txt
CHANGED
@@ -144,6 +144,12 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
144 |
5. Charts library
|
145 |
|
146 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
= 3.0.10 - 2018-07-20 =
|
148 |
|
149 |
* Fixed problem with chart reverting to the default values
|
144 |
5. Charts library
|
145 |
|
146 |
== Changelog ==
|
147 |
+
= 3.0.11 - 2018-08-15 =
|
148 |
+
|
149 |
+
* Fixed issue with the Series Settings options for the Table Chart
|
150 |
+
* Fixed issue with chart showing "Table has no columns" with remote sources
|
151 |
+
|
152 |
+
|
153 |
= 3.0.10 - 2018-07-20 =
|
154 |
|
155 |
* Fixed problem with chart reverting to the default values
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"index.php":"
|
1 |
+
{"index.php":"950c0b6641ca957472ac786e3cfc4380"}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitd198ee4c0e701e25be51275016c35046::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit9ed1aaf6782da63d272ac0758053e8fa
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit9ed1aaf6782da63d272ac0758053e8fa
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequire92519444969a8385bbf1c4c8297d0cff($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire92519444969a8385bbf1c4c8297d0cff($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit01ef84261d98349ef0cc9e02988cfe36 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInitd198ee4c0e701e25be51275016c35046 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitd198ee4c0e701e25be51275016c35046', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitd198ee4c0e701e25be51275016c35046', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|