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/Graph.php +48 -23 3.0.73.4.8 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 {
32 +abstract class Visualizer_Render_Sidebar_Graph extends Visualizer_Render_Sidebar_Google {
33 33
34 34 /**
35 35 * Determines whether we need to render vertical gridlines options or not.
36 36 *
@@ -121,8 +121,18 @@
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( esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', '</a>' )
133 + );
134 +
125 135 }
126 136
127 137 /**
128 138 * Renders general settings block for horizontal axis settings.
@@ -140,10 +150,10 @@
140 150 );
141 151
142 152 self::_renderSelectItem(
143 153 esc_html__( 'Text Position', 'visualizer' ),
144 - 'vAxis[textPosition]',
145 - isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
154 + 'hAxis[textPosition]',
155 + isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
146 156 $this->_positions,
147 157 esc_html__( 'Position of the horizontal axis text, relative to the chart area.', 'visualizer' )
148 158 );
149 159
@@ -183,18 +193,20 @@
183 193 if ( $this->_horizontalGridLines ) {
184 194 self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false );
185 195 self::_renderTextItem(
186 196 esc_html__( 'Count', 'visualizer' ),
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
197 + 'hAxis[gridlines][count]',
198 + isset( $this->hAxis['gridlines']['count'] ) ? $this->hAxis['gridlines']['count'] : '',
199 + 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' ),
200 + 5,
201 + 'number',
202 + array( 'min' => -1, 'max' => 1000, 'step' => 1 )
191 203 );
192 204
193 205 self::_renderColorPickerItem(
194 206 esc_html__( 'Color', 'visualizer' ),
195 - 'vAxis[gridlines][color]',
196 - isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
207 + 'hAxis[gridlines][color]',
208 + isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
197 209 '#ccc'
198 210 );
199 211 self::_renderSectionEnd();
200 212
@@ -202,10 +214,12 @@
202 214 self::_renderTextItem(
203 215 esc_html__( 'Count', 'visualizer' ),
204 216 'vAxis[minorGridlines][count]',
205 217 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
218 + esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ),
219 + 0,
220 + 'number',
221 + array( 'min' => 0, 'max' => 1, 'step' => 1 )
208 222 );
209 223
210 224 self::_renderColorPickerItem(
211 225 esc_html__( 'Color', 'visualizer' ),
@@ -215,9 +229,9 @@
215 229 );
216 230 self::_renderSectionEnd();
217 231 }
218 232
219 - if ( $this->_verticalGridLines ) {
233 + if ( $this->_horizontalGridLines ) {
220 234 self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false );
221 235 self::_renderTextItem(
222 236 esc_html__( 'Maximum Value', 'visualizer' ),
223 237 'hAxis[viewWindow][max]',
@@ -252,10 +266,10 @@
252 266 );
253 267
254 268 self::_renderSelectItem(
255 269 esc_html__( 'Text Position', 'visualizer' ),
256 - 'hAxis[textPosition]',
257 - isset( $this->hAxis['textPosition'] ) ? $this->hAxis['textPosition'] : '',
270 + 'vAxis[textPosition]',
271 + isset( $this->vAxis['textPosition'] ) ? $this->vAxis['textPosition'] : '',
258 272 $this->_positions,
259 273 esc_html__( 'Position of the vertical axis text, relative to the chart area.', 'visualizer' )
260 274 );
261 275
@@ -295,18 +309,20 @@
295 309 if ( $this->_verticalGridLines ) {
296 310 self::_renderSectionStart( esc_html__( 'Grid Lines', 'visualizer' ), false );
297 311 self::_renderTextItem(
298 312 esc_html__( 'Count', 'visualizer' ),
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
313 + 'vAxis[gridlines][count]',
314 + isset( $this->vAxis['gridlines']['count'] ) ? $this->vAxis['gridlines']['count'] : '',
315 + 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' ),
316 + 5,
317 + 'number',
318 + array( 'min' => -1, 'max' => 1000, 'step' => 1 )
303 319 );
304 320
305 321 self::_renderColorPickerItem(
306 322 esc_html__( 'Color', 'visualizer' ),
307 - 'hAxis[gridlines][color]',
308 - isset( $this->hAxis['gridlines']['color'] ) ? $this->hAxis['gridlines']['color'] : null,
323 + 'vAxis[gridlines][color]',
324 + isset( $this->vAxis['gridlines']['color'] ) ? $this->vAxis['gridlines']['color'] : null,
309 325 '#ccc'
310 326 );
311 327 self::_renderSectionEnd();
312 328
@@ -314,10 +330,12 @@
314 330 self::_renderTextItem(
315 331 esc_html__( 'Count', 'visualizer' ),
316 332 'hAxis[minorGridlines][count]',
317 333 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
334 + esc_html__( 'Specify 0 to disable the minor gridlines.', 'visualizer' ),
335 + 0,
336 + 'number',
337 + array( 'min' => 0, 'max' => 1, 'step' => 1 )
320 338 );
321 339
322 340 self::_renderColorPickerItem(
323 341 esc_html__( 'Color', 'visualizer' ),
@@ -327,9 +345,9 @@
327 345 );
328 346 self::_renderSectionEnd();
329 347 }
330 348
331 - if ( $this->_horizontalGridLines ) {
349 + if ( $this->_verticalGridLines ) {
332 350 self::_renderSectionStart( esc_html__( 'View Window', 'visualizer' ), false );
333 351 self::_renderTextItem(
334 352 esc_html__( 'Maximum Value', 'visualizer' ),
335 353 'vAxis[viewWindow][max]',
@@ -368,8 +386,12 @@
368 386 * @access protected
369 387 */
370 388 protected function _renderSeriesSettings() {
371 389 self::_renderGroupStart( esc_html__( 'Series Settings', 'visualizer' ) );
390 + self::_renderSectionStart();
391 + 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' );
392 + self::_renderSectionEnd();
393 +
372 394 for ( $i = 1, $cnt = count( $this->__series ); $i < $cnt; $i++ ) {
373 395 if ( ! empty( $this->__series[ $i ]['label'] ) ) {
374 396 self::_renderSectionStart( esc_html( $this->__series[ $i ]['label'] ), false );
375 397 $this->_renderSeries( $i - 1 );
@@ -407,8 +429,11 @@
407 429 'series[' . $index . '][color]',
408 430 isset( $this->series[ $index ]['color'] ) ? $this->series[ $index ]['color'] : null,
409 431 null
410 432 );
433 +
434 + $this->_renderRoleField( $index );
435 +
411 436 }
412 437
413 438 /**
414 439 * Renders format field for horizontal axis.