PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.9
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.9
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/ChartJS.php +15 -29 4.0.53.7.9 View file →
@@ -34,11 +34,10 @@
34 34 'left' => esc_html__( 'Left of the chart', 'visualizer' ),
35 35 'right' => esc_html__( 'Right of the chart', 'visualizer' ),
36 36 'top' => esc_html__( 'Above the chart', 'visualizer' ),
37 37 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
38 - 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
39 - 'none' => esc_html__( 'Omit the legend', 'visualizer' ),
40 38 );
39 +
41 40 }
42 41
43 42 /**
44 43 * Renders concrete series settings for the Bar chart.
@@ -76,9 +75,9 @@
76 75
77 76 /**
78 77 * Loads the assets.
79 78 */
80 - public function load_chartjs_assets( $deps, $is_frontend ) {
79 + function load_chartjs_assets( $deps, $is_frontend ) {
81 80 $this->load_dependent_assets( array( 'moment', 'numeral' ) );
82 81
83 82 wp_register_script( 'chartjs', VISUALIZER_ABSURL . 'js/lib/chartjs.min.js', array( 'numeral', 'moment' ), null, true );
84 83 wp_register_script(
@@ -94,8 +93,9 @@
94 93 return array_merge(
95 94 $deps,
96 95 array( 'visualizer-render-chartjs-lib' )
97 96 );
97 +
98 98 }
99 99
100 100 /**
101 101 * Renders series settings group.
@@ -130,8 +130,9 @@
130 130 */
131 131 protected function _renderSeries( $index ) {
132 132 $this->_renderFormatField( $index );
133 133 $this->_renderChartTypeSeries( $index );
134 +
134 135 }
135 136
136 137 /**
137 138 * Renders template.
@@ -176,15 +177,11 @@
176 177 self::_renderTextAreaItem(
177 178 esc_html__( 'Chart Description', 'visualizer' ),
178 179 'description',
179 180 $this->description,
180 - sprintf(
181 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag.
182 - esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ),
183 - '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">',
184 - '</a>'
185 - )
181 + 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>' )
186 182 );
183 +
187 184 }
188 185
189 186 /**
190 187 * Renders chart general settings group.
@@ -205,9 +202,9 @@
205 202
206 203 self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
207 204 echo '<div class="viz-section-item">';
208 205 echo '<a class="more-info" href="javascript:;">[?]</a>';
209 - echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
206 + echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
210 207
211 208 echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
212 209 echo '<tr>';
213 210 echo '<td class="viz-section-table-column">';
@@ -243,9 +240,9 @@
243 240 'legend[position]',
244 241 // let's have a default otherwise the chart behaves weird when hovering in edit mode
245 242 isset( $this->legend['position'] ) ? $this->legend['position'] : 'top',
246 243 $this->_legendPositions,
247 - esc_html__( 'Sets the legend position relative to the chart.', 'visualizer' )
244 + esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
248 245 );
249 246
250 247 self::_renderCheckboxItem(
251 248 esc_html__( 'Show datasets in reverse order', 'visualizer' ),
@@ -256,9 +253,9 @@
256 253 );
257 254
258 255 echo '<div class="viz-section-item">';
259 256 echo '<a class="more-info" href="javascript:;">[?]</a>';
260 - echo '<b>', esc_html__( 'Font Family And Size', 'visualizer' ), '</b>';
257 + echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
261 258
262 259 echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
263 260 echo '<tr>';
264 261 echo '<td class="viz-section-table-column">';
@@ -362,8 +359,9 @@
362 359 esc_html__( 'The easing function applied to the animation.', 'visualizer' )
363 360 );
364 361
365 362 self::_renderSectionEnd();
363 +
366 364 }
367 365
368 366 /**
369 367 * Renders tooltip settings section.
@@ -386,18 +384,9 @@
386 384 * Add the correct description for the manual configuration box.
387 385 */
388 386 protected function _renderManualConfigDescription() {
389 387 self::_renderSectionStart();
390 - self::_renderSectionDescription(
391 - '<span class="viz-gvlink">' . sprintf(
392 - // translators: %1$s - HTML link tag, %2$s - HTML closing link tag, %3$s - HTML link tag, %4$s - HTML closing link tag.
393 - __( 'Configure the graph by providing configuration variables right from the %1$sChartJS API%2$s. You can refer to %3$sCommon Snippets%4$s for examples.', 'visualizer' ),
394 - '<a href="https://www.chartjs.org/docs/latest/configuration/" target="_blank">',
395 - '</a>',
396 - '<a href="https://docs.themeisle.com/article/728-manual-configuration" target="_blank">',
397 - '</a>'
398 - ) . '</span>'
399 - );
388 + self::_renderSectionDescription( '<span class="viz-gvlink">' . sprintf( __( 'Configure the graph by providing configuration variables right from the %1$sChartJS API%2$s. You can refer to to some examples %3$shere%4$s.', 'visualizer' ), '<a href="https://www.chartjs.org/docs/latest/configuration/" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/728-manual-configuration" target="_blank">', '</a>' ) . '</span>' );
400 389 }
401 390
402 391 /**
403 392 * Add the correct example for the manual configuration box.
@@ -402,15 +391,12 @@
402 391 /**
403 392 * Add the correct example for the manual configuration box.
404 393 */
405 394 protected function _renderManualConfigExample() {
406 - return json_encode(
407 - array(
408 - 'cutoutPercentage' => 5,
409 - 'rotation' => 60,
410 - ),
411 - JSON_PRETTY_PRINT
412 - );
395 + return '{
396 + "cutoutPercentage": 5,
397 + "rotation": 60
398 + }';
413 399 }
414 400
415 401 /**
416 402 * Renders chart view settings group.