WordPress Charts and Graphs Lite - Version 1.6.5

Version Description

Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 1.6.5
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.5

classes/Visualizer/Module/Frontend.php CHANGED
@@ -110,8 +110,10 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
110
  }
111
 
112
  $id = 'visualizer-' . $atts['id'];
 
113
  $class = apply_filters( Visualizer_Plugin::FILTER_CHART_WRAPPER_CLASS, $atts['class'], $atts['id'] );
114
- $class = !empty( $class ) ? ' class="' . $class . '"' : '';
 
115
 
116
  $type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
117
 
110
  }
111
 
112
  $id = 'visualizer-' . $atts['id'];
113
+ $defaultClass = "visualizer-front";
114
  $class = apply_filters( Visualizer_Plugin::FILTER_CHART_WRAPPER_CLASS, $atts['class'], $atts['id'] );
115
+ $class = $defaultClass . " " . $class;
116
+ $class = !empty( $class ) ? ' class="' . trim($class) . '"' : '';
117
 
118
  $type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true );
119
 
classes/Visualizer/Plugin.php CHANGED
@@ -30,7 +30,7 @@
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
- const VERSION = '1.6.0';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
30
  class Visualizer_Plugin {
31
 
32
  const NAME = 'visualizer';
33
+ const VERSION = '1.6.5';
34
 
35
  // custom post types
36
  const CPT_VISUALIZER = 'visualizer';
classes/Visualizer/Render/Sidebar/Columnar.php CHANGED
@@ -78,4 +78,39 @@ abstract class Visualizer_Render_Sidebar_Columnar extends Visualizer_Render_Side
78
  self::_renderGroupEnd();
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
78
  self::_renderGroupEnd();
79
  }
80
 
81
+
82
+ /**
83
+ * Renders general settings block for vertical axis settings.
84
+ *
85
+ * @since 1.4.0
86
+ *
87
+ * @access protected
88
+ */
89
+ protected function _renderVerticalAxisGeneralSettings() {
90
+ parent::_renderVerticalAxisGeneralSettings();
91
+ self::_renderColorPickerItem(
92
+ esc_html__( 'Axis Text Color', Visualizer_Plugin::NAME ),
93
+ 'hAxis[textStyle]',
94
+ isset( $this->hAxis['textStyle'] ) ? $this->hAxis['textStyle'] : null,
95
+ '#000'
96
+ );
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 _renderHorizontalAxisGeneralSettings() {
107
+ parent::_renderHorizontalAxisGeneralSettings();
108
+ self::_renderColorPickerItem(
109
+ esc_html__( 'Axis Text Color', Visualizer_Plugin::NAME ),
110
+ 'vAxis[textStyle]',
111
+ isset( $this->vAxis['textStyle'] ) ? $this->vAxis['textStyle'] : null,
112
+ '#000'
113
+ );
114
+ }
115
+
116
  }
classes/Visualizer/Render/Sidebar/Graph.php CHANGED
@@ -133,7 +133,7 @@ abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar
133
  *
134
  * @access protected
135
  */
136
- protected function _renderHorizontalAxisGeneratSettings() {
137
  self::_renderTextItem(
138
  esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
139
  'hAxis[title]',
@@ -179,7 +179,7 @@ abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar
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 ) {
133
  *
134
  * @access protected
135
  */
136
+ protected function _renderHorizontalAxisGeneralSettings() {
137
  self::_renderTextItem(
138
  esc_html__( 'Axis Title', Visualizer_Plugin::NAME ),
139
  'hAxis[title]',
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->_renderHorizontalAxisGeneralSettings();
183
  self::_renderSectionEnd();
184
 
185
  if ( $this->_horizontalGridLines ) {
classes/Visualizer/Render/Sidebar/Linear.php CHANGED
@@ -91,8 +91,16 @@ abstract class Visualizer_Render_Sidebar_Linear extends Visualizer_Render_Sideba
91
  *
92
  * @access protected
93
  */
94
- protected function _renderHorizontalAxisGeneratSettings() {
95
- parent::_renderHorizontalAxisGeneratSettings();
 
 
 
 
 
 
 
 
96
  $this->_renderHorizontalAxisFormatField();
97
  }
98
 
@@ -105,6 +113,14 @@ abstract class Visualizer_Render_Sidebar_Linear extends Visualizer_Render_Sideba
105
  */
106
  protected function _renderVerticalAxisGeneralSettings() {
107
  parent::_renderVerticalAxisGeneralSettings();
 
 
 
 
 
 
 
 
108
  $this->_renderVerticalAxisFormatField();
109
  }
110
 
91
  *
92
  * @access protected
93
  */
94
+ protected function _renderHorizontalAxisGeneralSettings() {
95
+ parent::_renderHorizontalAxisGeneralSettings();
96
+
97
+ self::_renderColorPickerItem(
98
+ esc_html__( 'Axis Text Color', Visualizer_Plugin::NAME ),
99
+ 'vAxis[textStyle]',
100
+ isset( $this->vAxis['textStyle'] ) ? $this->vAxis['textStyle'] : null,
101
+ '#000'
102
+ );
103
+
104
  $this->_renderHorizontalAxisFormatField();
105
  }
106
 
113
  */
114
  protected function _renderVerticalAxisGeneralSettings() {
115
  parent::_renderVerticalAxisGeneralSettings();
116
+
117
+ self::_renderColorPickerItem(
118
+ esc_html__( 'Axis Text Color', Visualizer_Plugin::NAME ),
119
+ 'hAxis[textStyle]',
120
+ isset( $this->hAxis['textStyle'] ) ? $this->hAxis['textStyle'] : null,
121
+ '#000'
122
+ );
123
+
124
  $this->_renderVerticalAxisFormatField();
125
  }
126
 
classes/Visualizer/Render/Sidebar/Type/Bar.php CHANGED
@@ -54,8 +54,8 @@ class Visualizer_Render_Sidebar_Type_Bar extends Visualizer_Render_Sidebar_Colum
54
  *
55
  * @access protected
56
  */
57
- protected function _renderHorizontalAxisGeneratSettings() {
58
- parent::_renderHorizontalAxisGeneratSettings();
59
  $this->_renderHorizontalAxisFormatField();
60
  }
61
 
54
  *
55
  * @access protected
56
  */
57
+ protected function _renderHorizontalAxisGeneralSettings() {
58
+ parent::_renderHorizontalAxisGeneralSettings();
59
  $this->_renderHorizontalAxisFormatField();
60
  }
61
 
css/media.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 1.5.6
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
1
  /*
2
+ Version: 1.6.5
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Visualizer: Charts and Graphs Lite
4
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
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.6.0
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
3
  Plugin Name: Visualizer: Charts and Graphs Lite
4
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
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.6.5
7
  Author: Themeisle
8
  Author URI: http://themeisle.com
9
  License: GPL v2.0 or later
js/library.js CHANGED
@@ -98,7 +98,9 @@
98
  a.href = url;
99
  a.download = data.data.name;
100
  a.click();
101
- window.URL.revokeObjectURL(url);
 
 
102
  }
103
  });
104
  return false;
98
  a.href = url;
99
  a.download = data.data.name;
100
  a.click();
101
+ setTimeout(function(){
102
+ window.URL.revokeObjectURL(url);
103
+ }, 100);
104
  }
105
  });
106
  return false;
js/render.js CHANGED
@@ -132,6 +132,18 @@
132
  }
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  for (i = 0; i < data.length; i++) {
136
  row = [];
137
  for (j = 0; j < series.length; j++) {
@@ -198,5 +210,31 @@
198
  clearTimeout(resizeTimeout);
199
  resizeTimeout = setTimeout(v.render, 100);
200
  });
201
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  })(jQuery, visualizer);
132
  }
133
  }
134
 
135
+ if(settings.hAxis){
136
+ if(settings.hAxis.textStyle && settings.hAxis.textStyle != ''){
137
+ settings.hAxis.textStyle = {color: settings.hAxis.textStyle};
138
+ }
139
+ }
140
+
141
+ if(settings.vAxis){
142
+ if(settings.vAxis.textStyle && settings.vAxis.textStyle != ''){
143
+ settings.vAxis.textStyle = {color: settings.vAxis.textStyle};
144
+ }
145
+ }
146
+
147
  for (i = 0; i < data.length; i++) {
148
  row = [];
149
  for (j = 0; j < series.length; j++) {
210
  clearTimeout(resizeTimeout);
211
  resizeTimeout = setTimeout(v.render, 100);
212
  });
213
+
214
+ resizeHiddenContainers();
215
+ });
216
+
217
+ function resizeHiddenContainers(){
218
+ $(".visualizer-front").parents().each(function(){
219
+ if(!$(this).is(":visible")){
220
+ $(this).addClass("visualizer-hidden-container");
221
+ }
222
+ });
223
+
224
+ var mutateObserver = new MutationObserver(function(records) {
225
+ records.forEach(function(record) {
226
+ if(record.attributeName == "style"){
227
+ var element = $(record.target);
228
+ var displayStyle = window.getComputedStyle(element[0]).getPropertyValue("display");
229
+ if(element.hasClass("visualizer-hidden-container-resized") || displayStyle == "none") return;
230
+ element.addClass("visualizer-hidden-container-resized").find(".visualizer-front").resize();
231
+ }
232
+ });
233
+ });
234
+
235
+ $('.visualizer-hidden-container').each(function(){
236
+ mutateObserver.observe($(this)[0], {attributes: true});
237
+ });
238
+ }
239
+
240
  })(jQuery, visualizer);
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.6
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -11,7 +11,7 @@ A simple and quite powerful WordPress chart plugin to create, manage and embed i
11
 
12
  == Description ==
13
 
14
- <a href="http://themeisle.com/plugins/visualizer-charts-and-graphs-lite/" 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
 
@@ -37,7 +37,7 @@ Charts are rendered using HTML5/SVG technology to provide cross-browser compatib
37
 
38
  *above descriptions were partially taken from Google Visualization API site*
39
 
40
- 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>
41
 
42
  ### Knowledge Base ###
43
 
@@ -70,6 +70,11 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
73
  = 1.6.0 =
74
  * Fixed security issue when importing charts
75
  * Removed pointer for the pro version
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.6.1
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
11
 
12
  == Description ==
13
 
14
+ <a href="http://themeisle.com/plugins/visualizer-charts-and-graphs-lite/" rel="nofollow">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
 
37
 
38
  *above descriptions were partially taken from Google Visualization API site*
39
 
40
+ The plugins works perfectly with the all <a href="http://justfreethemes.com" rel="nofollow">free</a> or <a href="http://www.codeinwp.com/blog/best-wordpress-themes/" rel="nofollow">premium WordPress themes</a>
41
 
42
  ### Knowledge Base ###
43
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.6.5=
74
+ * Fixed responsive issue
75
+ * Fixed no axis text color for line and bar charts
76
+
77
+
78
  = 1.6.0 =
79
  * Fixed security issue when importing charts
80
  * Removed pointer for the pro version