PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.8
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Render/Sidebar/Google.php +7 -33 3.10.143.4.8 View file →
@@ -58,9 +58,9 @@
58 58 $this->_library = 'google';
59 59 parent::__construct( $data );
60 60
61 61 $this->_legendPositions = array(
62 - '' => esc_html__( 'Default', 'visualizer' ),
62 + '' => '',
63 63 'left' => esc_html__( 'Left of the chart', 'visualizer' ),
64 64 'right' => esc_html__( 'Right of the chart', 'visualizer' ),
65 65 'top' => esc_html__( 'Above the chart', 'visualizer' ),
66 66 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
@@ -66,17 +66,12 @@
66 66 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
67 67 'none' => esc_html__( 'Omit the legend', 'visualizer' ),
68 68 );
69 69
70 - $chart_type = $this->get_chart_type( false );
71 - if ( ! in_array( $chart_type, array( 'Pie' ), true ) ) {
70 + if ( ! in_array( $this->get_chart_type( false ), array( 'Pie' ), true ) ) {
72 71 $this->_legendPositions['in'] = esc_html__( 'Inside the chart', 'visualizer' );
73 72 }
74 73
75 - if ( in_array( $chart_type, array( 'Bubble' ), true ) ) {
76 - unset( $this->_legendPositions['left'] );
77 - }
78 -
79 74 $this->_alignments = array(
80 75 '' => '',
81 76 'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
82 77 'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
@@ -100,15 +95,13 @@
100 95 * Loads the assets.
101 96 */
102 97 function load_google_assets( $deps, $is_frontend ) {
103 98 wp_register_script( 'google-jsapi', '//www.gstatic.com/charts/loader.js', array(), null, true );
104 - wp_register_script( 'dom-to-image', VISUALIZER_ABSURL . 'js/lib/dom-to-image.min.js', array(), null, true );
105 99 wp_register_script(
106 100 'visualizer-render-google-lib',
107 101 VISUALIZER_ABSURL . 'js/render-google.js',
108 102 array(
109 103 'google-jsapi',
110 - 'dom-to-image',
111 104 ),
112 105 Visualizer_Plugin::VERSION,
113 106 true
114 107 );
@@ -149,9 +142,8 @@
149 142 'emphasis' => esc_html__( 'Emphasis', 'visualizer' ),
150 143 'scope' => esc_html__( 'Scope', 'visualizer' ),
151 144 'style' => esc_html__( 'Style', 'visualizer' ),
152 145 'tooltip' => esc_html__( 'Tooltip', 'visualizer' ),
153 - 'interval' => esc_html__( 'Interval', 'visualizer' ),
154 146 ),
155 147 sprintf( esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">', '</a>' )
156 148 );
157 149 }
@@ -210,9 +202,9 @@
210 202 self::_renderSectionStart( esc_html__( 'Legend', 'visualizer' ), false );
211 203 self::_renderSelectItem(
212 204 esc_html__( 'Position', 'visualizer' ),
213 205 'legend[position]',
214 - isset( $this->legend['position'] ) ? $this->legend['position'] : '',
206 + $this->legend['position'],
215 207 $this->_legendPositions,
216 208 esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
217 209 );
218 210
@@ -218,9 +210,9 @@
218 210
219 211 self::_renderSelectItem(
220 212 esc_html__( 'Alignment', 'visualizer' ),
221 213 'legend[alignment]',
222 - isset( $this->legend['alignment'] ) ? $this->legend['alignment'] : '',
214 + $this->legend['alignment'],
223 215 $this->_alignments,
224 216 esc_html__( 'Determines the alignment of the legend.', 'visualizer' )
225 217 );
226 218
@@ -236,25 +228,9 @@
236 228 $this->_renderTooltipSettigns();
237 229 self::_renderSectionEnd();
238 230
239 231 $this->_renderAnimationSettings();
240 - self::_renderSectionStart( esc_html__( 'License & Creator', 'visualizer' ), false );
241 - self::_renderTextItem(
242 - esc_html__( 'License', 'visualizer' ),
243 - 'license',
244 - $this->license,
245 - ''
246 - );
247 - self::_renderTextItem(
248 - esc_html__( 'Creator', 'visualizer' ),
249 - 'creator',
250 - $this->creator,
251 - ''
252 - );
253 - self::_renderSectionEnd();
254 232
255 - self::_renderChartImageSettings();
256 -
257 233 do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
258 234
259 235 self::_renderGroupEnd();
260 236 }
@@ -317,9 +293,9 @@
317 293 esc_html__( 'Trigger', 'visualizer' ),
318 294 'tooltip[trigger]',
319 295 isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
320 296 array(
321 - '' => esc_html__( 'Default', 'visualizer' ),
297 + '' => '',
322 298 'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
323 299 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
324 300 'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
325 301 ),
@@ -411,14 +387,12 @@
411 387
412 388 echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
413 389 echo '<tr>';
414 390 echo '<td class="viz-section-table-column">';
415 - $chartarea_left = isset( $this->chartArea['left'] ) ? $this->chartArea['left'] : '';
416 - echo '<input type="text" name="chartArea[left]" class="control-text" value="', $chartarea_left || '0' === $chartarea_left ? esc_attr( $chartarea_left ) : '', '" placeholder="20%">';
391 + echo '<input type="text" name="chartArea[left]" class="control-text" value="', $this->chartArea['left'] || $this->chartArea['left'] === '0' ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
417 392 echo '</td>';
418 393 echo '<td class="viz-section-table-column">';
419 - $chartarea_top = isset( $this->chartArea['top'] ) ? $this->chartArea['top'] : '';
420 - echo '<input type="text" name="chartArea[top]" class="control-text" value="', $chartarea_top || '0' === $chartarea_top ? esc_attr( $chartarea_top ) : '', '" placeholder="20%">';
394 + echo '<input type="text" name="chartArea[top]" class="control-text" value="', $this->chartArea['top'] || $this->chartArea['top'] === '0' ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
421 395 echo '</td>';
422 396 echo '</tr>';
423 397 echo '</table>';
424 398