Skip to content

Commit edc445d

Browse files
Merge branch 'development' of https://github.com/codeinwp/visualizer into issue-709
2 parents b011d55 + 3fb9ff4 commit edc445d

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

classes/Visualizer/Gutenberg/build/block.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/src/Components/Sidebar/GeneralSettings.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ class GeneralSettings extends Component {
3434

3535
tooltipTriggers[2] = { label: __( 'The tooltip will not be displayed' ), value: 'none' };
3636

37+
let positions = [
38+
{ label: __( 'Left of the chart' ), value: 'left' },
39+
{ label: __( 'Right of the chart' ), value: 'right' },
40+
{ label: __( 'Above the chart' ), value: 'top' },
41+
{ label: __( 'Below the chart' ), value: 'bottom' },
42+
{ label: __( 'Omit the legend' ), value: 'none' }
43+
];
44+
45+
if ( 'pie' !== type ) {
46+
positions.push({ label: __( 'Inside the chart' ), value: 'in' });
47+
}
48+
3749
return (
3850
<PanelBody
3951
title={ __( 'General Settings' ) }
@@ -178,14 +190,7 @@ class GeneralSettings extends Component {
178190
label={ __( 'Position' ) }
179191
help={ __( 'Determines where to place the legend, compared to the chart area.' ) }
180192
value={ settings.legend.position ? settings.legend.position : 'right' }
181-
options={ [
182-
{ label: __( 'Left of the chart' ), value: 'left' },
183-
{ label: __( 'Right of the chart' ), value: 'right' },
184-
{ label: __( 'Above the chart' ), value: 'top' },
185-
{ label: __( 'Below the chart' ), value: 'bottom' },
186-
{ label: __( 'Inside the chart' ), value: 'in' },
187-
{ label: __( 'Omit the legend' ), value: 'none' }
188-
] }
193+
options={ positions }
189194
onChange={ e => {
190195
if ( 'pie' !== type ) {
191196
let axis = 'left' === e ? 1 : 0;

classes/Visualizer/Render/Layout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ public static function _renderTabHelp( $args ) {
599599
$chart_id = $args[1];
600600
$type = get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true );
601601
switch ( $type ) {
602-
case 'dataTable':
602+
case 'tabular':
603603
$type = 'table';
604604
break;
605605
case 'polarArea':

0 commit comments

Comments
 (0)