Skip to content

Commit 1dd2b58

Browse files
Google Pie charts should not show Inside the Chart option for legend position
1 parent 41ed38b commit 1dd2b58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

classes/Visualizer/Render/Sidebar/Google.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@ public function __construct( $data = array() ) {
6464
'right' => esc_html__( 'Right of the chart', 'visualizer' ),
6565
'top' => esc_html__( 'Above the chart', 'visualizer' ),
6666
'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
67-
'in' => esc_html__( 'Inside the chart', 'visualizer' ),
6867
'none' => esc_html__( 'Omit the legend', 'visualizer' ),
6968
);
7069

70+
if ( ! in_array( $this->get_chart_type( false ), array( 'Pie' ), true ) ) {
71+
$this->_legendPositions['in'] = esc_html__( 'Inside the chart', 'visualizer' );
72+
}
73+
7174
$this->_alignments = array(
7275
'' => '',
7376
'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),

0 commit comments

Comments
 (0)