Version Description
- 2018-10-11
Download this release
Release Info
Developer | codeinwp |
Plugin | WordPress Charts and Graphs Lite |
Version | 3.0.12 |
Comparing to | |
See all releases |
Code changes from version 3.0.11 to 3.0.12
- CHANGELOG.md +7 -0
- classes/Visualizer/Module.php +50 -0
- classes/Visualizer/Module/Admin.php +30 -10
- classes/Visualizer/Module/Chart.php +40 -12
- classes/Visualizer/Module/Frontend.php +11 -5
- classes/Visualizer/Module/Setup.php +2 -1
- classes/Visualizer/Plugin.php +1 -1
- classes/Visualizer/Render/Library.php +6 -3
- classes/Visualizer/Render/Page/Data.php +19 -10
- classes/Visualizer/Render/Sidebar.php +2 -1
- css/media.css +1 -1
- index.php +7 -5
- js/customization.js +17 -0
- js/render.js +9 -5
- readme.md +8 -0
- readme.txt +8 -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,11 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v3.0.11 - 2018-08-15
|
3 |
**Changes:**
|
4 |
* Fixed issue with the Series Settings options for the Table Chart
|
1 |
|
2 |
+
### v3.0.12 - 2018-10-11
|
3 |
+
**Changes:**
|
4 |
+
* Added filter to enable users to change schedule of charts.
|
5 |
+
* Fixed bug with line chart with timeofday column.
|
6 |
+
* Fixed bug with scheduled charts that sometimes did not show updated data.
|
7 |
+
* Javascript can be customized on a per user basis that will not be wiped out on update.
|
8 |
+
|
9 |
### v3.0.11 - 2018-08-15
|
10 |
**Changes:**
|
11 |
* Fixed issue with the Series Settings options for the Table Chart
|
classes/Visualizer/Module.php
CHANGED
@@ -395,4 +395,54 @@ class Visualizer_Module {
|
|
395 |
return reset( $array );
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
}
|
395 |
return reset( $array );
|
396 |
}
|
397 |
|
398 |
+
/**
|
399 |
+
* Gets/creates the JS where user-specific customizations can be/have been added.
|
400 |
+
*/
|
401 |
+
protected function get_user_customization_js() {
|
402 |
+
// use this as the JS file in case we are not able to create the file in uploads.
|
403 |
+
$default = VISUALIZER_ABSURL . 'js/customization.js';
|
404 |
+
|
405 |
+
$uploads = wp_get_upload_dir();
|
406 |
+
$specific = $uploads['baseurl'] . '/visualizer/customization.js';
|
407 |
+
|
408 |
+
// for testing on user sites (before we send them the correctly customized file).
|
409 |
+
if ( VISUALIZER_TEST_JS_CUSTOMIZATION ) {
|
410 |
+
return $default;
|
411 |
+
}
|
412 |
+
|
413 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
414 |
+
WP_Filesystem();
|
415 |
+
global $wp_filesystem;
|
416 |
+
|
417 |
+
$dir = $wp_filesystem->wp_content_dir() . 'uploads/visualizer';
|
418 |
+
$file = $wp_filesystem->wp_content_dir() . 'uploads/visualizer/customization.js';
|
419 |
+
|
420 |
+
if ( $wp_filesystem->is_readable( $file ) ) {
|
421 |
+
return $specific;
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( $wp_filesystem->exists( $file ) && ! $wp_filesystem->is_readable( $file ) ) {
|
425 |
+
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Unable to read file %s', $file ), 'error', __FILE__, __LINE__ );
|
426 |
+
return $default;
|
427 |
+
}
|
428 |
+
|
429 |
+
if ( ! $wp_filesystem->exists( $dir ) ) {
|
430 |
+
if ( ( $done = $wp_filesystem->mkdir( $dir ) ) === false ) {
|
431 |
+
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Unable to create directory %s', $dir ), 'error', __FILE__, __LINE__ );
|
432 |
+
return $default;
|
433 |
+
}
|
434 |
+
}
|
435 |
+
|
436 |
+
// if file does not exist, copy.
|
437 |
+
if ( ! $wp_filesystem->exists( $file ) ) {
|
438 |
+
$src = str_replace( ABSPATH, $wp_filesystem->abspath(), VISUALIZER_ABSPATH . '/js/customization.js' );
|
439 |
+
if ( ( $done = $wp_filesystem->copy( $src, $file ) ) === false ) {
|
440 |
+
do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Unable to copy file %s to %s', $src, $file ), 'error', __FILE__, __LINE__ );
|
441 |
+
return $default;
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
return $specific;
|
446 |
+
}
|
447 |
+
|
448 |
}
|
classes/Visualizer/Module/Admin.php
CHANGED
@@ -220,7 +220,9 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
220 |
wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
|
221 |
wp_enqueue_script( 'visualizer-media-view', VISUALIZER_ABSURL . 'js/media/view.js', array( 'visualizer-media-controller' ), Visualizer_Plugin::VERSION, true );
|
222 |
wp_localize_script(
|
223 |
-
'visualizer-media-view',
|
|
|
|
|
224 |
'i10n' => array(
|
225 |
'insert' => __( 'Insert', 'visualizer' ),
|
226 |
),
|
@@ -286,7 +288,8 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
286 |
}
|
287 |
|
288 |
$types = array_merge(
|
289 |
-
$additional,
|
|
|
290 |
'pie' => array(
|
291 |
'name' => esc_html__( 'Pie', 'visualizer' ),
|
292 |
'enabled' => true,
|
@@ -403,18 +406,28 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
403 |
$this->_addFilter( 'media_upload_tabs', 'setupVisualizerTab' );
|
404 |
wp_enqueue_media();
|
405 |
wp_enqueue_script(
|
406 |
-
'visualizer-library',
|
|
|
|
|
407 |
'jquery',
|
408 |
'media-views',
|
409 |
-
),
|
|
|
|
|
410 |
);
|
411 |
wp_enqueue_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
412 |
wp_enqueue_script( 'google-jsapi-old', '//www.google.com/jsapi', array( 'google-jsapi-new' ), null, true );
|
|
|
413 |
wp_enqueue_script(
|
414 |
-
'visualizer-render',
|
|
|
|
|
415 |
'google-jsapi-old',
|
416 |
'visualizer-library',
|
417 |
-
|
|
|
|
|
|
|
418 |
);
|
419 |
}
|
420 |
}
|
@@ -459,7 +472,10 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
459 |
public function renderLibraryPage() {
|
460 |
// get current page
|
461 |
$page = filter_input(
|
462 |
-
INPUT_GET,
|
|
|
|
|
|
|
463 |
'options' => array(
|
464 |
'min_range' => 1,
|
465 |
'default' => 1,
|
@@ -525,7 +541,9 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
525 |
// enqueue charts array
|
526 |
$ajaxurl = admin_url( 'admin-ajax.php' );
|
527 |
wp_localize_script(
|
528 |
-
'visualizer-library',
|
|
|
|
|
529 |
'language' => $this->get_language(),
|
530 |
'map_api_key' => get_option( 'visualizer-map-api-key' ),
|
531 |
'charts' => $charts,
|
@@ -536,13 +554,15 @@ class Visualizer_Module_Admin extends Visualizer_Module {
|
|
536 |
'action' => Visualizer_Plugin::ACTION_CREATE_CHART,
|
537 |
'library' => 'yes',
|
538 |
'type' => isset( $_GET['type'] ) ? $_GET['type'] : '',
|
539 |
-
),
|
|
|
540 |
),
|
541 |
'edit' => add_query_arg(
|
542 |
array(
|
543 |
'action' => Visualizer_Plugin::ACTION_EDIT_CHART,
|
544 |
'library' => 'yes',
|
545 |
-
),
|
|
|
546 |
),
|
547 |
),
|
548 |
)
|
220 |
wp_enqueue_script( 'visualizer-media-controller', VISUALIZER_ABSURL . 'js/media/controller.js', array( 'visualizer-media-collection' ), Visualizer_Plugin::VERSION, true );
|
221 |
wp_enqueue_script( 'visualizer-media-view', VISUALIZER_ABSURL . 'js/media/view.js', array( 'visualizer-media-controller' ), Visualizer_Plugin::VERSION, true );
|
222 |
wp_localize_script(
|
223 |
+
'visualizer-media-view',
|
224 |
+
'visualizer',
|
225 |
+
array(
|
226 |
'i10n' => array(
|
227 |
'insert' => __( 'Insert', 'visualizer' ),
|
228 |
),
|
288 |
}
|
289 |
|
290 |
$types = array_merge(
|
291 |
+
$additional,
|
292 |
+
array(
|
293 |
'pie' => array(
|
294 |
'name' => esc_html__( 'Pie', 'visualizer' ),
|
295 |
'enabled' => true,
|
406 |
$this->_addFilter( 'media_upload_tabs', 'setupVisualizerTab' );
|
407 |
wp_enqueue_media();
|
408 |
wp_enqueue_script(
|
409 |
+
'visualizer-library',
|
410 |
+
VISUALIZER_ABSURL . 'js/library.js',
|
411 |
+
array(
|
412 |
'jquery',
|
413 |
'media-views',
|
414 |
+
),
|
415 |
+
Visualizer_Plugin::VERSION,
|
416 |
+
true
|
417 |
);
|
418 |
wp_enqueue_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
419 |
wp_enqueue_script( 'google-jsapi-old', '//www.google.com/jsapi', array( 'google-jsapi-new' ), null, true );
|
420 |
+
wp_enqueue_script( 'visualizer-customization', $this->get_user_customization_js(), array(), null, true );
|
421 |
wp_enqueue_script(
|
422 |
+
'visualizer-render',
|
423 |
+
VISUALIZER_ABSURL . 'js/render.js',
|
424 |
+
array(
|
425 |
'google-jsapi-old',
|
426 |
'visualizer-library',
|
427 |
+
'visualizer-customization',
|
428 |
+
),
|
429 |
+
Visualizer_Plugin::VERSION,
|
430 |
+
true
|
431 |
);
|
432 |
}
|
433 |
}
|
472 |
public function renderLibraryPage() {
|
473 |
// get current page
|
474 |
$page = filter_input(
|
475 |
+
INPUT_GET,
|
476 |
+
'vpage',
|
477 |
+
FILTER_VALIDATE_INT,
|
478 |
+
array(
|
479 |
'options' => array(
|
480 |
'min_range' => 1,
|
481 |
'default' => 1,
|
541 |
// enqueue charts array
|
542 |
$ajaxurl = admin_url( 'admin-ajax.php' );
|
543 |
wp_localize_script(
|
544 |
+
'visualizer-library',
|
545 |
+
'visualizer',
|
546 |
+
array(
|
547 |
'language' => $this->get_language(),
|
548 |
'map_api_key' => get_option( 'visualizer-map-api-key' ),
|
549 |
'charts' => $charts,
|
554 |
'action' => Visualizer_Plugin::ACTION_CREATE_CHART,
|
555 |
'library' => 'yes',
|
556 |
'type' => isset( $_GET['type'] ) ? $_GET['type'] : '',
|
557 |
+
),
|
558 |
+
$ajaxurl
|
559 |
),
|
560 |
'edit' => add_query_arg(
|
561 |
array(
|
562 |
'action' => Visualizer_Plugin::ACTION_EDIT_CHART,
|
563 |
'library' => 'yes',
|
564 |
+
),
|
565 |
+
$ajaxurl
|
566 |
),
|
567 |
),
|
568 |
)
|
classes/Visualizer/Module/Chart.php
CHANGED
@@ -72,7 +72,10 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
72 |
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
73 |
'posts_per_page' => 9,
|
74 |
'paged' => filter_input(
|
75 |
-
INPUT_GET,
|
|
|
|
|
|
|
76 |
'options' => array(
|
77 |
'min_range' => 1,
|
78 |
'default' => 1,
|
@@ -171,7 +174,10 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
171 |
$capable = current_user_can( 'delete_posts' );
|
172 |
if ( $nonce && $capable ) {
|
173 |
$chart_id = filter_input(
|
174 |
-
$input_method,
|
|
|
|
|
|
|
175 |
'options' => array(
|
176 |
'min_range' => 1,
|
177 |
),
|
@@ -227,7 +233,9 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
227 |
add_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
228 |
add_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
229 |
add_post_meta(
|
230 |
-
$chart_id,
|
|
|
|
|
231 |
'focusTarget' => 'datum',
|
232 |
)
|
233 |
);
|
@@ -244,18 +252,28 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
244 |
wp_register_script( 'visualizer-frame', VISUALIZER_ABSURL . 'js/frame.js', array( 'visualizer-chosen' ), Visualizer_Plugin::VERSION, true );
|
245 |
wp_register_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
246 |
wp_register_script( 'google-jsapi-old', '//www.google.com/jsapi', array( 'google-jsapi-new' ), null, true );
|
|
|
247 |
wp_register_script(
|
248 |
-
'visualizer-render',
|
|
|
|
|
249 |
'google-jsapi-old',
|
250 |
'google-jsapi-new',
|
251 |
'visualizer-frame',
|
252 |
-
|
|
|
|
|
|
|
253 |
);
|
254 |
wp_register_script(
|
255 |
-
'visualizer-preview',
|
|
|
|
|
256 |
'wp-color-picker',
|
257 |
'visualizer-render',
|
258 |
-
),
|
|
|
|
|
259 |
);
|
260 |
// added by Ash/Upwork
|
261 |
if ( VISUALIZER_PRO ) {
|
@@ -344,7 +362,9 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
344 |
wp_enqueue_script( 'visualizer-preview' );
|
345 |
wp_enqueue_script( 'visualizer-render' );
|
346 |
wp_localize_script(
|
347 |
-
'visualizer-render',
|
|
|
|
|
348 |
'l10n' => array(
|
349 |
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', 'visualizer' ),
|
350 |
'loading' => esc_html__( 'Loading...', 'visualizer' ),
|
@@ -538,7 +558,10 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
538 |
$capable = current_user_can( 'edit_posts' );
|
539 |
if ( $nonce && $capable ) {
|
540 |
$chart_id = filter_input(
|
541 |
-
INPUT_GET,
|
|
|
|
|
|
|
542 |
'options' => array(
|
543 |
'min_range' => 1,
|
544 |
),
|
@@ -570,7 +593,8 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
570 |
array(
|
571 |
'page' => 'visualizer',
|
572 |
'type' => filter_input( INPUT_GET, 'type' ),
|
573 |
-
),
|
|
|
574 |
);
|
575 |
}
|
576 |
}
|
@@ -590,7 +614,9 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
590 |
$capable = current_user_can( 'edit_posts' );
|
591 |
if ( $capable ) {
|
592 |
$chart_id = isset( $_GET['chart'] ) ? filter_var(
|
593 |
-
$_GET['chart'],
|
|
|
|
|
594 |
'options' => array(
|
595 |
'min_range' => 1,
|
596 |
),
|
@@ -623,7 +649,9 @@ class Visualizer_Module_Chart extends Visualizer_Module {
|
|
623 |
wp_enqueue_style( 'visualizer-frame' );
|
624 |
wp_enqueue_script( 'visualizer-render' );
|
625 |
wp_localize_script(
|
626 |
-
'visualizer-render',
|
|
|
|
|
627 |
'l10n' => array(
|
628 |
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', 'visualizer' ),
|
629 |
'loading' => esc_html__( 'Loading...', 'visualizer' ),
|
72 |
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
73 |
'posts_per_page' => 9,
|
74 |
'paged' => filter_input(
|
75 |
+
INPUT_GET,
|
76 |
+
'page',
|
77 |
+
FILTER_VALIDATE_INT,
|
78 |
+
array(
|
79 |
'options' => array(
|
80 |
'min_range' => 1,
|
81 |
'default' => 1,
|
174 |
$capable = current_user_can( 'delete_posts' );
|
175 |
if ( $nonce && $capable ) {
|
176 |
$chart_id = filter_input(
|
177 |
+
$input_method,
|
178 |
+
'chart',
|
179 |
+
FILTER_VALIDATE_INT,
|
180 |
+
array(
|
181 |
'options' => array(
|
182 |
'min_range' => 1,
|
183 |
),
|
233 |
add_post_meta( $chart_id, Visualizer_Plugin::CF_SOURCE, $source->getSourceName() );
|
234 |
add_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
|
235 |
add_post_meta(
|
236 |
+
$chart_id,
|
237 |
+
Visualizer_Plugin::CF_SETTINGS,
|
238 |
+
array(
|
239 |
'focusTarget' => 'datum',
|
240 |
)
|
241 |
);
|
252 |
wp_register_script( 'visualizer-frame', VISUALIZER_ABSURL . 'js/frame.js', array( 'visualizer-chosen' ), Visualizer_Plugin::VERSION, true );
|
253 |
wp_register_script( 'google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
254 |
wp_register_script( 'google-jsapi-old', '//www.google.com/jsapi', array( 'google-jsapi-new' ), null, true );
|
255 |
+
wp_register_script( 'visualizer-customization', $this->get_user_customization_js(), array(), null, true );
|
256 |
wp_register_script(
|
257 |
+
'visualizer-render',
|
258 |
+
VISUALIZER_ABSURL . 'js/render.js',
|
259 |
+
array(
|
260 |
'google-jsapi-old',
|
261 |
'google-jsapi-new',
|
262 |
'visualizer-frame',
|
263 |
+
'visualizer-customization',
|
264 |
+
),
|
265 |
+
Visualizer_Plugin::VERSION,
|
266 |
+
true
|
267 |
);
|
268 |
wp_register_script(
|
269 |
+
'visualizer-preview',
|
270 |
+
VISUALIZER_ABSURL . 'js/preview.js',
|
271 |
+
array(
|
272 |
'wp-color-picker',
|
273 |
'visualizer-render',
|
274 |
+
),
|
275 |
+
Visualizer_Plugin::VERSION,
|
276 |
+
true
|
277 |
);
|
278 |
// added by Ash/Upwork
|
279 |
if ( VISUALIZER_PRO ) {
|
362 |
wp_enqueue_script( 'visualizer-preview' );
|
363 |
wp_enqueue_script( 'visualizer-render' );
|
364 |
wp_localize_script(
|
365 |
+
'visualizer-render',
|
366 |
+
'visualizer',
|
367 |
+
array(
|
368 |
'l10n' => array(
|
369 |
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', 'visualizer' ),
|
370 |
'loading' => esc_html__( 'Loading...', 'visualizer' ),
|
558 |
$capable = current_user_can( 'edit_posts' );
|
559 |
if ( $nonce && $capable ) {
|
560 |
$chart_id = filter_input(
|
561 |
+
INPUT_GET,
|
562 |
+
'chart',
|
563 |
+
FILTER_VALIDATE_INT,
|
564 |
+
array(
|
565 |
'options' => array(
|
566 |
'min_range' => 1,
|
567 |
),
|
593 |
array(
|
594 |
'page' => 'visualizer',
|
595 |
'type' => filter_input( INPUT_GET, 'type' ),
|
596 |
+
),
|
597 |
+
admin_url( 'upload.php' )
|
598 |
);
|
599 |
}
|
600 |
}
|
614 |
$capable = current_user_can( 'edit_posts' );
|
615 |
if ( $capable ) {
|
616 |
$chart_id = isset( $_GET['chart'] ) ? filter_var(
|
617 |
+
$_GET['chart'],
|
618 |
+
FILTER_VALIDATE_INT,
|
619 |
+
array(
|
620 |
'options' => array(
|
621 |
'min_range' => 1,
|
622 |
),
|
649 |
wp_enqueue_style( 'visualizer-frame' );
|
650 |
wp_enqueue_script( 'visualizer-render' );
|
651 |
wp_localize_script(
|
652 |
+
'visualizer-render',
|
653 |
+
'visualizer',
|
654 |
+
array(
|
655 |
'l10n' => array(
|
656 |
'invalid_source' => esc_html__( 'You have entered invalid URL. Please, insert proper URL.', 'visualizer' ),
|
657 |
'loading' => esc_html__( 'Loading...', 'visualizer' ),
|
classes/Visualizer/Module/Frontend.php
CHANGED
@@ -54,6 +54,7 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
54 |
parent::__construct( $plugin );
|
55 |
|
56 |
$this->_addAction( 'wp_enqueue_scripts', 'enqueueScripts' );
|
|
|
57 |
$this->_addFilter( 'visualizer_get_language', 'getLanguage' );
|
58 |
$this->_addShortcode( 'visualizer', 'renderChart' );
|
59 |
|
@@ -99,7 +100,8 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
99 |
*/
|
100 |
private function get_actions() {
|
101 |
return apply_filters(
|
102 |
-
'visualizer_action_buttons',
|
|
|
103 |
'print' => __( 'Print', 'visualizer' ),
|
104 |
'csv' => __( 'CSV', 'visualizer' ),
|
105 |
'xls' => __( 'Excel', 'visualizer' ),
|
@@ -157,7 +159,8 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
157 |
public function enqueueScripts() {
|
158 |
wp_register_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
159 |
wp_register_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array( 'visualizer-google-jsapi-new' ), null, true );
|
160 |
-
wp_register_script( 'visualizer-
|
|
|
161 |
wp_register_script( 'visualizer-clipboardjs', VISUALIZER_ABSURL . 'js/lib/clipboardjs/clipboard.min.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true );
|
162 |
wp_register_style( 'visualizer-front', VISUALIZER_ABSURL . 'css/front.css', array(), Visualizer_Plugin::VERSION );
|
163 |
do_action( 'visualizer_pro_frontend_load_resources' );
|
@@ -185,7 +188,8 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
185 |
'series' => false, // series filter hook
|
186 |
'data' => false, // data filter hook
|
187 |
'settings' => false, // data filter hook
|
188 |
-
),
|
|
|
189 |
);
|
190 |
|
191 |
// if empty id or chart does not exists, then return empty string
|
@@ -228,7 +232,7 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
228 |
}
|
229 |
|
230 |
// handle data filter hooks
|
231 |
-
$data = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, unserialize( $chart->post_content ), $chart->ID, $type );
|
232 |
if ( ! empty( $atts['data'] ) ) {
|
233 |
$data = apply_filters( $atts['data'], $data, $chart->ID, $type );
|
234 |
}
|
@@ -253,7 +257,9 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
|
|
253 |
// enqueue visualizer render and update render localizations
|
254 |
wp_enqueue_script( 'visualizer-render' );
|
255 |
wp_localize_script(
|
256 |
-
'visualizer-render',
|
|
|
|
|
257 |
'charts' => $this->_charts,
|
258 |
'language' => $this->get_language(),
|
259 |
'map_api_key' => get_option( 'visualizer-map-api-key' ),
|
54 |
parent::__construct( $plugin );
|
55 |
|
56 |
$this->_addAction( 'wp_enqueue_scripts', 'enqueueScripts' );
|
57 |
+
$this->_addAction( 'visualizer_enqueue_scripts', 'enqueueScripts' );
|
58 |
$this->_addFilter( 'visualizer_get_language', 'getLanguage' );
|
59 |
$this->_addShortcode( 'visualizer', 'renderChart' );
|
60 |
|
100 |
*/
|
101 |
private function get_actions() {
|
102 |
return apply_filters(
|
103 |
+
'visualizer_action_buttons',
|
104 |
+
array(
|
105 |
'print' => __( 'Print', 'visualizer' ),
|
106 |
'csv' => __( 'CSV', 'visualizer' ),
|
107 |
'xls' => __( 'Excel', 'visualizer' ),
|
159 |
public function enqueueScripts() {
|
160 |
wp_register_script( 'visualizer-google-jsapi-new', '//www.gstatic.com/charts/loader.js', array(), null, true );
|
161 |
wp_register_script( 'visualizer-google-jsapi-old', '//www.google.com/jsapi', array( 'visualizer-google-jsapi-new' ), null, true );
|
162 |
+
wp_register_script( 'visualizer-customization', $this->get_user_customization_js(), array(), null, true );
|
163 |
+
wp_register_script( 'visualizer-render', VISUALIZER_ABSURL . 'js/render.js', array( 'visualizer-google-jsapi-old', 'jquery', 'visualizer-customization' ), Visualizer_Plugin::VERSION, true );
|
164 |
wp_register_script( 'visualizer-clipboardjs', VISUALIZER_ABSURL . 'js/lib/clipboardjs/clipboard.min.js', array( 'jquery' ), Visualizer_Plugin::VERSION, true );
|
165 |
wp_register_style( 'visualizer-front', VISUALIZER_ABSURL . 'css/front.css', array(), Visualizer_Plugin::VERSION );
|
166 |
do_action( 'visualizer_pro_frontend_load_resources' );
|
188 |
'series' => false, // series filter hook
|
189 |
'data' => false, // data filter hook
|
190 |
'settings' => false, // data filter hook
|
191 |
+
),
|
192 |
+
$atts
|
193 |
);
|
194 |
|
195 |
// if empty id or chart does not exists, then return empty string
|
232 |
}
|
233 |
|
234 |
// handle data filter hooks
|
235 |
+
$data = apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, unserialize( html_entity_decode( $chart->post_content ) ), $chart->ID, $type );
|
236 |
if ( ! empty( $atts['data'] ) ) {
|
237 |
$data = apply_filters( $atts['data'], $data, $chart->ID, $type );
|
238 |
}
|
257 |
// enqueue visualizer render and update render localizations
|
258 |
wp_enqueue_script( 'visualizer-render' );
|
259 |
wp_localize_script(
|
260 |
+
'visualizer-render',
|
261 |
+
'visualizer',
|
262 |
+
array(
|
263 |
'charts' => $this->_charts,
|
264 |
'language' => $this->get_language(),
|
265 |
'map_api_key' => get_option( 'visualizer-map-api-key' ),
|
classes/Visualizer/Module/Setup.php
CHANGED
@@ -107,7 +107,8 @@ class Visualizer_Module_Setup extends Visualizer_Module {
|
|
107 |
*/
|
108 |
public function setupCustomPostTypes() {
|
109 |
register_post_type(
|
110 |
-
Visualizer_Plugin::CPT_VISUALIZER,
|
|
|
111 |
'label' => 'Visualizer Charts',
|
112 |
'public' => false,
|
113 |
'supports' => array( 'revisions' ),
|
107 |
*/
|
108 |
public function setupCustomPostTypes() {
|
109 |
register_post_type(
|
110 |
+
Visualizer_Plugin::CPT_VISUALIZER,
|
111 |
+
array(
|
112 |
'label' => 'Visualizer Charts',
|
113 |
'public' => false,
|
114 |
'supports' => array( 'revisions' ),
|
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.12';
|
32 |
|
33 |
// custom post types
|
34 |
const CPT_VISUALIZER = 'visualizer';
|
classes/Visualizer/Render/Library.php
CHANGED
@@ -174,7 +174,8 @@ class Visualizer_Render_Library extends Visualizer_Render {
|
|
174 |
'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
|
175 |
'nonce' => wp_create_nonce(),
|
176 |
'chart' => $chart_id,
|
177 |
-
),
|
|
|
178 |
);
|
179 |
$clone_url = add_query_arg(
|
180 |
array(
|
@@ -182,14 +183,16 @@ class Visualizer_Render_Library extends Visualizer_Render {
|
|
182 |
'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
|
183 |
'chart' => $chart_id,
|
184 |
'type' => $this->type,
|
185 |
-
),
|
|
|
186 |
);
|
187 |
$export_link = add_query_arg(
|
188 |
array(
|
189 |
'action' => Visualizer_Plugin::ACTION_EXPORT_DATA,
|
190 |
'chart' => $chart_id,
|
191 |
'security' => wp_create_nonce( Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION ),
|
192 |
-
),
|
|
|
193 |
);
|
194 |
echo '<div class="visualizer-chart"><div class="visualizer-chart-title">', esc_html( $title ), '</div>';
|
195 |
echo '<div id="', $placeholder_id, '" class="visualizer-chart-canvas">';
|
174 |
'action' => Visualizer_Plugin::ACTION_DELETE_CHART,
|
175 |
'nonce' => wp_create_nonce(),
|
176 |
'chart' => $chart_id,
|
177 |
+
),
|
178 |
+
$ajax_url
|
179 |
);
|
180 |
$clone_url = add_query_arg(
|
181 |
array(
|
183 |
'nonce' => wp_create_nonce( Visualizer_Plugin::ACTION_CLONE_CHART ),
|
184 |
'chart' => $chart_id,
|
185 |
'type' => $this->type,
|
186 |
+
),
|
187 |
+
$ajax_url
|
188 |
);
|
189 |
$export_link = add_query_arg(
|
190 |
array(
|
191 |
'action' => Visualizer_Plugin::ACTION_EXPORT_DATA,
|
192 |
'chart' => $chart_id,
|
193 |
'security' => wp_create_nonce( Visualizer_Plugin::ACTION_EXPORT_DATA . Visualizer_Plugin::VERSION ),
|
194 |
+
),
|
195 |
+
admin_url( 'admin-ajax.php' )
|
196 |
);
|
197 |
echo '<div class="visualizer-chart"><div class="visualizer-chart-title">', esc_html( $title ), '</div>';
|
198 |
echo '<div id="', $placeholder_id, '" class="visualizer-chart-canvas">';
|
classes/Visualizer/Render/Page/Data.php
CHANGED
@@ -64,7 +64,8 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
64 |
'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
|
65 |
'nonce' => wp_create_nonce(),
|
66 |
'chart' => $this->chart->ID,
|
67 |
-
),
|
|
|
68 |
);
|
69 |
?>
|
70 |
<span id="visualizer-chart-id" data-id="<?php echo $this->chart->ID; ?>"></span>
|
@@ -135,11 +136,13 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
135 |
class="visualizer-select">
|
136 |
<?php
|
137 |
$hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_SCHEDULE, true );
|
138 |
-
$schedules =
|
139 |
-
'
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
143 |
);
|
144 |
foreach ( $schedules as $num => $name ) {
|
145 |
$extra = $num == $hours ? 'selected' : '';
|
@@ -173,7 +176,8 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
173 |
array(
|
174 |
'action' => ( VISUALIZER_PRO ) ? Visualizer_Pro::ACTION_FETCH_DATA : '',
|
175 |
'nonce' => wp_create_nonce(),
|
176 |
-
),
|
|
|
177 |
);
|
178 |
$query_args_charts = array(
|
179 |
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
@@ -297,7 +301,8 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
297 |
array(
|
298 |
'nonce' => wp_create_nonce(),
|
299 |
'tab' => 'permissions',
|
300 |
-
),
|
|
|
301 |
);
|
302 |
?>
|
303 |
" method="post">
|
@@ -320,7 +325,9 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
320 |
}
|
321 |
Visualizer_Render_Sidebar::_renderGroupStart(
|
322 |
esc_html__( 'Who can see this chart?', 'visualizer' ) . '<span
|
323 |
-
class="dashicons dashicons-lock"></span>',
|
|
|
|
|
324 |
);
|
325 |
Visualizer_Render_Sidebar::_renderSectionStart();
|
326 |
Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can view the chart on the front-end.', 'visualizer' ) );
|
@@ -362,7 +369,9 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
|
|
362 |
|
363 |
Visualizer_Render_Sidebar::_renderGroupStart(
|
364 |
esc_html__( 'Who can edit this chart?', 'visualizer' ) . '<span
|
365 |
-
class="dashicons dashicons-lock"></span>',
|
|
|
|
|
366 |
);
|
367 |
Visualizer_Render_Sidebar::_renderSectionStart();
|
368 |
Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can edit the chart on the front-end.', 'visualizer' ) );
|
64 |
'action' => Visualizer_Plugin::ACTION_UPLOAD_DATA,
|
65 |
'nonce' => wp_create_nonce(),
|
66 |
'chart' => $this->chart->ID,
|
67 |
+
),
|
68 |
+
admin_url( 'admin-ajax.php' )
|
69 |
);
|
70 |
?>
|
71 |
<span id="visualizer-chart-id" data-id="<?php echo $this->chart->ID; ?>"></span>
|
136 |
class="visualizer-select">
|
137 |
<?php
|
138 |
$hours = get_post_meta( $this->chart->ID, Visualizer_Plugin::CF_CHART_SCHEDULE, true );
|
139 |
+
$schedules = apply_filters(
|
140 |
+
'visualizer_chart_schedules', array(
|
141 |
+
'1' => __( 'Each hour', 'visualizer' ),
|
142 |
+
'12' => __( 'Each 12 hours', 'visualizer' ),
|
143 |
+
'24' => __( 'Each day', 'visualizer' ),
|
144 |
+
'36' => __( 'Each 3 days', 'visualizer' ),
|
145 |
+
)
|
146 |
);
|
147 |
foreach ( $schedules as $num => $name ) {
|
148 |
$extra = $num == $hours ? 'selected' : '';
|
176 |
array(
|
177 |
'action' => ( VISUALIZER_PRO ) ? Visualizer_Pro::ACTION_FETCH_DATA : '',
|
178 |
'nonce' => wp_create_nonce(),
|
179 |
+
),
|
180 |
+
admin_url( 'admin-ajax.php' )
|
181 |
);
|
182 |
$query_args_charts = array(
|
183 |
'post_type' => Visualizer_Plugin::CPT_VISUALIZER,
|
301 |
array(
|
302 |
'nonce' => wp_create_nonce(),
|
303 |
'tab' => 'permissions',
|
304 |
+
),
|
305 |
+
remove_query_arg( 'tab', $_SERVER['REQUEST_URI'] )
|
306 |
);
|
307 |
?>
|
308 |
" method="post">
|
325 |
}
|
326 |
Visualizer_Render_Sidebar::_renderGroupStart(
|
327 |
esc_html__( 'Who can see this chart?', 'visualizer' ) . '<span
|
328 |
+
class="dashicons dashicons-lock"></span>',
|
329 |
+
'',
|
330 |
+
apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
|
331 |
);
|
332 |
Visualizer_Render_Sidebar::_renderSectionStart();
|
333 |
Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can view the chart on the front-end.', 'visualizer' ) );
|
369 |
|
370 |
Visualizer_Render_Sidebar::_renderGroupStart(
|
371 |
esc_html__( 'Who can edit this chart?', 'visualizer' ) . '<span
|
372 |
+
class="dashicons dashicons-lock"></span>',
|
373 |
+
'',
|
374 |
+
apply_filters( 'visualizer_pro_upsell_class', 'only-pro-feature', 'chart-permissions' )
|
375 |
);
|
376 |
Visualizer_Render_Sidebar::_renderSectionStart();
|
377 |
Visualizer_Render_Sidebar::_renderSectionDescription( esc_html__( 'Select who can edit the chart on the front-end.', 'visualizer' ) );
|
classes/Visualizer/Render/Sidebar.php
CHANGED
@@ -183,7 +183,8 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
|
|
183 |
'manual',
|
184 |
$this->manual,
|
185 |
sprintf(
|
186 |
-
esc_html__( 'One per line in valid JSON (key:value) format e.g. %s', 'visualizer' ),
|
|
|
187 |
),
|
188 |
'',
|
189 |
array( 'rows' => 5 )
|
183 |
'manual',
|
184 |
$this->manual,
|
185 |
sprintf(
|
186 |
+
esc_html__( 'One per line in valid JSON (key:value) format e.g. %s', 'visualizer' ),
|
187 |
+
'<br><code>' . $example . '</code>'
|
188 |
),
|
189 |
'',
|
190 |
array( 'rows' => 5 )
|
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.12
|
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
|
@@ -69,6 +69,9 @@ function visualizer_launch() {
|
|
69 |
define( 'VISUALIZER_ABSURL', plugins_url( '/', __FILE__ ) );
|
70 |
define( 'VISUALIZER_ABSPATH', dirname( __FILE__ ) );
|
71 |
define( 'VISUALIZER_REST_VERSION', 1 );
|
|
|
|
|
|
|
72 |
if ( ! defined( 'VISUALIZER_CSV_DELIMITER' ) ) {
|
73 |
define( 'VISUALIZER_CSV_DELIMITER', ',' );
|
74 |
}
|
@@ -90,10 +93,9 @@ function visualizer_launch() {
|
|
90 |
$plugin->setModule( Visualizer_Module_Admin::NAME );
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
}
|
97 |
$vendor_file = VISUALIZER_ABSPATH . '/vendor/autoload_52.php';
|
98 |
if ( is_readable( $vendor_file ) ) {
|
99 |
include_once( $vendor_file );
|
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.12
|
8 |
Author: Themeisle
|
9 |
Author URI: http://themeisle.com
|
10 |
License: GPL v2.0 or later
|
69 |
define( 'VISUALIZER_ABSURL', plugins_url( '/', __FILE__ ) );
|
70 |
define( 'VISUALIZER_ABSPATH', dirname( __FILE__ ) );
|
71 |
define( 'VISUALIZER_REST_VERSION', 1 );
|
72 |
+
// if the below is true, then the js/customization.js in the plugin folder will be used instead of the one in the uploads folder (if it exists).
|
73 |
+
define( 'VISUALIZER_TEST_JS_CUSTOMIZATION', false );
|
74 |
+
|
75 |
if ( ! defined( 'VISUALIZER_CSV_DELIMITER' ) ) {
|
76 |
define( 'VISUALIZER_CSV_DELIMITER', ',' );
|
77 |
}
|
93 |
$plugin->setModule( Visualizer_Module_Admin::NAME );
|
94 |
}
|
95 |
|
96 |
+
// set frontend modules
|
97 |
+
$plugin->setModule( Visualizer_Module_Frontend::NAME );
|
98 |
+
|
|
|
99 |
$vendor_file = VISUALIZER_ABSPATH . '/vendor/autoload_52.php';
|
100 |
if ( is_readable( $vendor_file ) ) {
|
101 |
include_once( $vendor_file );
|
js/customization.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// user specific customizations
|
2 |
+
(function ($) {
|
3 |
+
$(document).ready(function(){
|
4 |
+
$('body').on('visualizer:format:chart', function(event, data){
|
5 |
+
customize_format(data.id, data.data, data.column);
|
6 |
+
});
|
7 |
+
});
|
8 |
+
|
9 |
+
function customize_format($id, $data, $column) {
|
10 |
+
/* example add green/red arrows to the specified column of the specified chart
|
11 |
+
if($id === 359 && $column === 1) {
|
12 |
+
var formatter = new google.visualization.ArrowFormat();
|
13 |
+
formatter.format($data, $column);
|
14 |
+
}
|
15 |
+
*/
|
16 |
+
}
|
17 |
+
})(jQuery);
|
js/render.js
CHANGED
@@ -118,7 +118,7 @@ var __visualizer_chart_images = [];
|
|
118 |
return;
|
119 |
}
|
120 |
|
121 |
-
if (series[0] && (series[0].type === 'date' || series[0].type === 'datetime')) {
|
122 |
axis = false;
|
123 |
switch (chart.type) {
|
124 |
case 'line':
|
@@ -189,7 +189,7 @@ var __visualizer_chart_images = [];
|
|
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:
|
@@ -197,12 +197,12 @@ var __visualizer_chart_images = [];
|
|
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 |
|
@@ -220,7 +220,7 @@ var __visualizer_chart_images = [];
|
|
220 |
render.draw(table, settings);
|
221 |
};
|
222 |
|
223 |
-
v.format_data = function(table, type, format, index) {
|
224 |
if (!format || format === '') {
|
225 |
return;
|
226 |
}
|
@@ -240,6 +240,10 @@ var __visualizer_chart_images = [];
|
|
240 |
if (formatter) {
|
241 |
formatter.format(table, index);
|
242 |
}
|
|
|
|
|
|
|
|
|
243 |
};
|
244 |
|
245 |
v.override = function(settings) {
|
118 |
return;
|
119 |
}
|
120 |
|
121 |
+
if (series[0] && (series[0].type === 'date' || series[0].type === 'datetime' || series[0].type === 'timeofday')) {
|
122 |
axis = false;
|
123 |
switch (chart.type) {
|
124 |
case 'line':
|
189 |
if (!series[i + 1]) {
|
190 |
continue;
|
191 |
}
|
192 |
+
v.format_data(id, table, series[i + 1].type, settings.series[i].format, i + 1);
|
193 |
}
|
194 |
break;
|
195 |
default:
|
197 |
if (!series[i + 1]) {
|
198 |
continue;
|
199 |
}
|
200 |
+
v.format_data(id, 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(id, table, 'number', settings.format, 1);
|
206 |
}
|
207 |
v.override(settings);
|
208 |
|
220 |
render.draw(table, settings);
|
221 |
};
|
222 |
|
223 |
+
v.format_data = function(id, table, type, format, index) {
|
224 |
if (!format || format === '') {
|
225 |
return;
|
226 |
}
|
240 |
if (formatter) {
|
241 |
formatter.format(table, index);
|
242 |
}
|
243 |
+
|
244 |
+
var arr = id.split('-');
|
245 |
+
jQuery('body').trigger('visualizer:format:chart', {id: parseInt(arr[1]), data: table, column: index});
|
246 |
+
|
247 |
};
|
248 |
|
249 |
v.override = function(settings) {
|
readme.md
CHANGED
@@ -144,6 +144,14 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
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
|
144 |
5. Charts library
|
145 |
|
146 |
## Changelog ##
|
147 |
+
### 3.0.12 - 2018-10-11 ###
|
148 |
+
|
149 |
+
* Added filter to enable users to change schedule of charts.
|
150 |
+
* Fixed bug with line chart with timeofday column.
|
151 |
+
* Fixed bug with scheduled charts that sometimes did not show updated data.
|
152 |
+
* Javascript can be customized on a per user basis that will not be wiped out on update.
|
153 |
+
|
154 |
+
|
155 |
### 3.0.11 - 2018-08-15 ###
|
156 |
|
157 |
* Fixed issue with the Series Settings options for the Table Chart
|
readme.txt
CHANGED
@@ -144,6 +144,14 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
|
|
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
|
144 |
5. Charts library
|
145 |
|
146 |
== Changelog ==
|
147 |
+
= 3.0.12 - 2018-10-11 =
|
148 |
+
|
149 |
+
* Added filter to enable users to change schedule of charts.
|
150 |
+
* Fixed bug with line chart with timeofday column.
|
151 |
+
* Fixed bug with scheduled charts that sometimes did not show updated data.
|
152 |
+
* Javascript can be customized on a per user basis that will not be wiped out on update.
|
153 |
+
|
154 |
+
|
155 |
= 3.0.11 - 2018-08-15 =
|
156 |
|
157 |
* Fixed issue with the Series Settings options for the Table Chart
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"index.php":"
|
1 |
+
{"index.php":"aa14efd8b347685777b18d03bbba0841"}
|
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 ComposerAutoloaderInit1aa1015938bfb5c04d32addf339f1913::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 ComposerAutoloaderInit8ef3241944c44e047e0c772ea9f4d455::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 ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff
|
|
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 ComposerAutoloaderInit92519444969a8385bbf1c4c8297d0cff
|
|
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 ComposerAutoloaderInit1aa1015938bfb5c04d32addf339f1913
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit1aa1015938bfb5c04d32addf339f1913', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit1aa1015938bfb5c04d32addf339f1913', '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 |
+
composerRequire1aa1015938bfb5c04d32addf339f1913($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire1aa1015938bfb5c04d32addf339f1913($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 ComposerAutoloaderInitd198ee4c0e701e25be51275016c35046 {
|
|
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 ComposerAutoloaderInit8ef3241944c44e047e0c772ea9f4d455 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit8ef3241944c44e047e0c772ea9f4d455', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit8ef3241944c44e047e0c772ea9f4d455', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|