Skip to content

Commit 96b6061

Browse files
omit left and right in legend position for bubble chart
1 parent 24c415c commit 96b6061

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

classes/Visualizer/Render/Sidebar/Google.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,16 @@ public function __construct( $data = array() ) {
6767
'none' => esc_html__( 'Omit the legend', 'visualizer' ),
6868
);
6969

70-
if ( ! in_array( $this->get_chart_type( false ), array( 'Pie' ), true ) ) {
70+
$chart_type = $this->get_chart_type( false );
71+
if ( ! in_array( $chart_type, array( 'Pie' ), true ) ) {
7172
$this->_legendPositions['in'] = esc_html__( 'Inside the chart', 'visualizer' );
7273
}
7374

75+
if ( in_array( $chart_type, array( 'Bubble' ), true ) ) {
76+
unset( $this->_legendPositions['left'] );
77+
unset( $this->_legendPositions['right'] );
78+
}
79+
7480
$this->_alignments = array(
7581
'' => '',
7682
'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),

0 commit comments

Comments
 (0)