@@ -208,15 +208,15 @@ protected function _renderGeneralSettings() {
208
208
self ::_renderSelectItem (
209
209
esc_html__ ( 'Position ' , 'visualizer ' ),
210
210
'legend[position] ' ,
211
- $ this ->legend ['position ' ],
211
+ isset ( $ this ->legend ['position ' ] ) ? $ this -> legend [ ' position ' ] : '' ,
212
212
$ this ->_legendPositions ,
213
213
esc_html__ ( 'Determines where to place the legend, compared to the chart area. ' , 'visualizer ' )
214
214
);
215
215
216
216
self ::_renderSelectItem (
217
217
esc_html__ ( 'Alignment ' , 'visualizer ' ),
218
218
'legend[alignment] ' ,
219
- $ this ->legend ['alignment ' ],
219
+ isset ( $ this ->legend ['alignment ' ] ) ? $ this -> legend [ ' alignment ' ] : '' ,
220
220
$ this ->_alignments ,
221
221
esc_html__ ( 'Determines the alignment of the legend. ' , 'visualizer ' )
222
222
);
@@ -393,10 +393,12 @@ protected function _renderViewSettings() {
393
393
echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0"> ' ;
394
394
echo '<tr> ' ;
395
395
echo '<td class="viz-section-table-column"> ' ;
396
- 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%"> ' ;
396
+ $ chartarea_left = isset ( $ this ->chartArea ['left ' ] ) ? $ this ->chartArea ['left ' ] : '' ;
397
+ echo '<input type="text" name="chartArea[left]" class="control-text" value=" ' , $ chartarea_left || '0 ' === $ chartarea_left ? esc_attr ( $ chartarea_left ) : '' , '" placeholder="20%"> ' ;
397
398
echo '</td> ' ;
398
399
echo '<td class="viz-section-table-column"> ' ;
399
- 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%"> ' ;
400
+ $ chartarea_top = isset ( $ this ->chartArea ['top ' ] ) ? $ this ->chartArea ['top ' ] : '' ;
401
+ echo '<input type="text" name="chartArea[top]" class="control-text" value=" ' , $ chartarea_top || '0 ' === $ chartarea_top ? esc_attr ( $ chartarea_top ) : '' , '" placeholder="20%"> ' ;
400
402
echo '</td> ' ;
401
403
echo '</tr> ' ;
402
404
echo '</table> ' ;
0 commit comments