PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.1.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.1.1
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/Graph.php +42 -97 4.0.52.1.1 View file →
@@ -28,9 +28,9 @@
28 28 *
29 29 * @since 1.0.0
30 30 * @abstract
31 31 */
32 -abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar_Google {
32 +abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar {
33 33
34 34 /**
35 35 * Determines whether we need to render vertical gridlines options or not.
36 36 *
@@ -112,9 +112,9 @@
112 112 isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
113 113 '#000'
114 114 );
115 115
116 - echo '<div class="viz-section-delimiter"></div>';
116 + echo '<div class="section-delimiter"></div>';
117 117
118 118 self::_renderSelectItem(
119 119 esc_html__( 'Axes Titles Position', 'visualizer' ),
120 120 'axisTitlesPosition',
@@ -121,22 +121,8 @@
121 121 $this->axisTitlesPosition,
122 122 $this->_positions,
123 123 esc_html__( 'Determines where to place the axis titles, compared to the chart area.', 'visualizer' )
124 124 );
125 -
126 - echo '<div class="viz-section-delimiter"></div>';
127 -
128 - self::_renderTextAreaItem(
129 - esc_html__( 'Chart Description', 'visualizer' ),
130 - 'description',
131 - $this->description,
132 - sprintf(
133 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
134 - esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ),
135 - '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">',
136 - '</a>'
137 - )
138 - );
139 125 }
140 126
141 127 /**
142 128 * Renders general settings block for horizontal axis settings.
@@ -153,36 +139,11 @@
153 139 esc_html__( 'The title of the horizontal axis.', 'visualizer' )
154 140 );
155 141
156 142 self::_renderSelectItem(
157 - esc_html__( 'Slanted Text', 'visualizer' ),
158 - 'hAxis[slantedText]',
159 - isset( $this->hAxis['slantedText'] ) ? $this->hAxis['slantedText'] : false,
160 - array(
161 - false => 'False',
162 - true => 'True',
163 - ),
164 - '',
165 - false
166 - );
167 -
168 - self::_renderTextItem(
169 - esc_html__( 'Slanted Text Angle', 'visualizer' ),
170 - 'hAxis[slantedTextAngle]',
171 - isset( $this->hAxis['slantedTextAngle'] ) ? $this->hAxis['slantedTextAngle'] : 45,
172 - '',
173 - 45,
174 - 'number',
175 - array(
176 - 'min' => 1,
177 - 'step' => 15,
178 - )
179 - );
180 -
181 - self::_renderSelectItem(
182 143 esc_html__( 'Text Position', 'visualizer' ),
183 - 'hAxis[textPosition]',
184 - isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
144 + 'vAxis[textPosition]',
145 + isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
185 146 $this->_positions,
186 147 esc_html__( 'Position of the horizontal axis text, relative to the chart area.', 'visualizer' )
187 148 );
188 149
@@ -191,9 +152,9 @@
191 152 'hAxis[direction]',
192 153 isset( $this->hAxis['direction'] ) ? $this->hAxis['direction'] : '',
193 154 array(
194 155 '' => '',
195 - '1' => esc_html__( 'Default Direction', 'visualizer' ),
156 + '1' => esc_html__( 'Identical Direction', 'visualizer' ),
196 157 '-1' => esc_html__( 'Reverse Direction', 'visualizer' ),
197 158 ),
198 159 esc_html__( 'The direction in which the values along the horizontal axis grow.', 'visualizer' )
199 160 );
@@ -217,24 +178,23 @@
217 178 self::_renderGroupStart( esc_html__( 'Horizontal Axis Settings', 'visualizer' ) );
218 179 self::_renderSectionStart( esc_html__( 'General Settings', 'visualizer' ), false );
219 180 $this->_renderHorizontalAxisGeneralSettings();
220 181 self::_renderSectionEnd();
182 +
221 183 if ( $this->_horizontalGridLines ) {
222 184 self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false );
223 185 self::_renderTextItem(
224 186 esc_html__( 'Count', 'visualizer' ),
225 - 'hAxis[gridlines][count]',
226 - isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '',
227 - esc_html__( 'The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines.', 'visualizer' ),
228 - 5,
229 - 'number',
230 - array( 'min' => -1, 'max' => 1000, 'step' => 1 )
187 + 'vAxis[gridlines][count]',
188 + isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '',
189 + esc_html__( 'The number of horizontal gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', 'visualizer' ),
190 + 5
231 191 );
232 192
233 193 self::_renderColorPickerItem(
234 194 esc_html__( 'Color', 'visualizer' ),
235 - 'hAxis[gridlines][color]',
236 - isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
195 + 'vAxis[gridlines][color]',
196 + isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
237 197 '#ccc'
238 198 );
239 199 self::_renderSectionEnd();
240 200
@@ -240,26 +200,24 @@
240 200
241 201 self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false );
242 202 self::_renderTextItem(
243 203 esc_html__( 'Count', 'visualizer' ),
244 - 'hAxis[minorGridlines][count]',
245 - isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '',
246 - esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ),
247 - 0,
248 - 'number',
249 - array( 'min' => 0, 'step' => 1 )
204 + 'vAxis[minorGridlines][count]',
205 + isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '',
206 + esc_html__( 'The number of horizontal minor gridlines between two regular gridlines.', 'visualizer' ),
207 + 0
250 208 );
251 209
252 210 self::_renderColorPickerItem(
253 211 esc_html__( 'Color', 'visualizer' ),
254 - 'hAxis[minorGridlines][color]',
255 - isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null,
212 + 'vAxis[minorGridlines][color]',
213 + isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null,
256 214 null
257 215 );
258 216 self::_renderSectionEnd();
259 217 }
260 218
261 - if ( $this->_horizontalGridLines ) {
219 + if ( $this->_verticalGridLines ) {
262 220 self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false );
263 221 self::_renderTextItem(
264 222 esc_html__( 'Maximum Value', 'visualizer' ),
265 223 'hAxis[viewWindow][max]',
@@ -294,10 +252,10 @@
294 252 );
295 253
296 254 self::_renderSelectItem(
297 255 esc_html__( 'Text Position', 'visualizer' ),
298 - 'vAxis[textPosition]',
299 - isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
256 + 'hAxis[textPosition]',
257 + isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
300 258 $this->_positions,
301 259 esc_html__( 'Position of the vertical axis text, relative to the chart area.', 'visualizer' )
302 260 );
303 261
@@ -306,9 +264,9 @@
306 264 'vAxis[direction]',
307 265 isset( $this->vAxis['direction'] ) ? $this->vAxis['direction'] : '',
308 266 array(
309 267 '' => '',
310 - '1' => esc_html__( 'Default Direction', 'visualizer' ),
268 + '1' => esc_html__( 'Identical Direction', 'visualizer' ),
311 269 '-1' => esc_html__( 'Reverse Direction', 'visualizer' ),
312 270 ),
313 271 esc_html__( 'The direction in which the values along the vertical axis grow.', 'visualizer' )
314 272 );
@@ -337,20 +295,18 @@
337 295 if ( $this->_verticalGridLines ) {
338 296 self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false );
339 297 self::_renderTextItem(
340 298 esc_html__( 'Count', 'visualizer' ),
341 - 'vAxis[gridlines][count]',
342 - isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '',
343 - esc_html__( 'The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines.', 'visualizer' ),
344 - 5,
345 - 'number',
346 - array( 'min' => -1, 'max' => 1000, 'step' => 1 )
299 + 'hAxis[gridlines][count]',
300 + isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '',
301 + esc_html__( 'The number of vertical gridlines inside the chart area. Minimum value is 2. Specify -1 to automatically compute the number of gridlines.', 'visualizer' ),
302 + 5
347 303 );
348 304
349 305 self::_renderColorPickerItem(
350 306 esc_html__( 'Color', 'visualizer' ),
351 - 'vAxis[gridlines][color]',
352 - isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
307 + 'hAxis[gridlines][color]',
308 + isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
353 309 '#ccc'
354 310 );
355 311 self::_renderSectionEnd();
356 312
@@ -356,26 +312,24 @@
356 312
357 313 self::_renderSectionStart( esc_html__( 'Minor Grid Lines', 'visualizer' ), false );
358 314 self::_renderTextItem(
359 315 esc_html__( 'Count', 'visualizer' ),
360 - 'vAxis[minorGridlines][count]',
361 - isset( $this->vAxis['minorGridlines']['count'] ) ? $this->vAxis['minorGridlines']['count'] : '',
362 - esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ),
363 - 0,
364 - 'number',
365 - array( 'min' => 0, 'step' => 1 )
316 + 'hAxis[minorGridlines][count]',
317 + isset( $this->hAxis['minorGridlines']['count'] ) ? $this->hAxis['minorGridlines']['count'] : '',
318 + esc_html__( 'The number of vertical minor gridlines between two regular gridlines.', 'visualizer' ),
319 + 0
366 320 );
367 321
368 322 self::_renderColorPickerItem(
369 323 esc_html__( 'Color', 'visualizer' ),
370 - 'vAxis[minorGridlines][color]',
371 - isset( $this->vAxis['minorGridlines']['color'] ) ? $this->vAxis['minorGridlines']['color'] : null,
324 + 'hAxis[minorGridlines][color]',
325 + isset( $this->hAxis['minorGridlines']['color'] ) ? $this->hAxis['minorGridlines']['color'] : null,
372 326 null
373 327 );
374 328 self::_renderSectionEnd();
375 329 }
376 330
377 - if ( $this->_verticalGridLines ) {
331 + if ( $this->_horizontalGridLines ) {
378 332 self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false );
379 333 self::_renderTextItem(
380 334 esc_html__( 'Maximum Value', 'visualizer' ),
381 335 'vAxis[viewWindow][max]',
@@ -414,12 +368,8 @@
414 368 * @access protected
415 369 */
416 370 protected function _renderSeriesSettings() {
417 371 self::_renderGroupStart( esc_html__( 'Series Settings', 'visualizer' ) );
418 - self::_renderSectionStart();
419 - self::_renderSectionDescription( esc_html__( 'If you have just updated/modified the chart data, you may need to save it before the new data reflects in the settings.', 'visualizer' ), 'viz-info-msg' );
420 - self::_renderSectionEnd();
421 -
422 372 for ( $i = 1, $cnt = count( $this->__series ); $i < $cnt; $i++ ) {
423 373 if ( ! empty( $this->__series[ $i ]['label'] ) ) {
424 374 self::_renderSectionStart( esc_html( $this->__series[ $i ]['label'] ), false );
425 375 $this->_renderSeries( $i - 1 );
@@ -457,10 +407,8 @@
457 407 'series[' . $index . '][color]',
458 408 isset( $this->series[ $index ]['color'] ) ? $this->series[ $index ]['color'] : null,
459 409 null
460 410 );
461 -
462 - $this->_renderRoleField( $index );
463 411 }
464 412
465 413 /**
466 414 * Renders format field for horizontal axis.
@@ -477,17 +425,15 @@
477 425 sprintf(
478 426 '%s<br><br>%s<br><br>%s',
479 427 esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', 'visualizer' ),
480 428 sprintf(
481 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
482 - esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #&#37;&#37; percentage format will multiply your values by 100.', 'visualizer' ),
429 + esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #&#37;&#37; percentage format then your values will be multiplied by 100.','visualizer' ),
483 430 '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
484 431 '</a>'
485 432 ),
486 433 sprintf(
487 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
488 - esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ),
489 - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">',
434 + esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.','visualizer' ),
435 + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
490 436 '</a>'
491 437 )
492 438 )
493 439 );
@@ -508,19 +454,18 @@
508 454 sprintf(
509 455 '%s<br><br>%s<br><br>%s',
510 456 esc_html__( 'Enter custom format pattern to apply to vertical axis labels.', 'visualizer' ),
511 457 sprintf(
512 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
513 - esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Note: Using the #&#37;&#37; percentage format will multiply your values by 100.', 'visualizer' ),
458 + esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #&#37;&#37; percentage format then your values will be multiplied by 100.','visualizer' ),
514 459 '<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
515 460 '</a>'
516 461 ),
517 462 sprintf(
518 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
519 - esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ),
520 - '<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">',
463 + esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.','visualizer' ),
464 + '<a href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax" target="_blank">',
521 465 '</a>'
522 466 )
523 467 )
524 468 );
525 469 }
470 +
526 471 }