@@ -208,15 +208,15 @@ protected function _renderGeneralSettings() {
208208 self ::_renderSelectItem (
209209 esc_html__ ( 'Position ' , 'visualizer ' ),
210210 'legend[position] ' ,
211- $ this ->legend ['position ' ],
211+ isset ( $ this ->legend ['position ' ] ) ? $ this -> legend [ ' position ' ] : '' ,
212212 $ this ->_legendPositions ,
213213 esc_html__ ( 'Determines where to place the legend, compared to the chart area. ' , 'visualizer ' )
214214 );
215215
216216 self ::_renderSelectItem (
217217 esc_html__ ( 'Alignment ' , 'visualizer ' ),
218218 'legend[alignment] ' ,
219- $ this ->legend ['alignment ' ],
219+ isset ( $ this ->legend ['alignment ' ] ) ? $ this -> legend [ ' alignment ' ] : '' ,
220220 $ this ->_alignments ,
221221 esc_html__ ( 'Determines the alignment of the legend. ' , 'visualizer ' )
222222 );
@@ -393,10 +393,12 @@ protected function _renderViewSettings() {
393393 echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0"> ' ;
394394 echo '<tr> ' ;
395395 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%"> ' ;
397398 echo '</td> ' ;
398399 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%"> ' ;
400402 echo '</td> ' ;
401403 echo '</tr> ' ;
402404 echo '</table> ' ;
0 commit comments