/** * WordPress dependencies */ const { __ } = wp.i18n; const { Component, Fragment } = wp.element; const { ColorPalette } = wp.blockEditor || wp.editor; const { BaseControl, ExternalLink, PanelBody, SelectControl, TextControl } = wp.components; class VerticalAxisSettings extends Component { constructor() { super( ...arguments ); } render() { const type = this.props.chart['visualizer-chart-type']; const settings = this.props.chart['visualizer-settings']; return ( { settings.vAxis.title = e; this.props.edit( settings ); } } /> { settings.vAxis.textPosition = e; this.props.edit( settings ); } } /> { settings.vAxis.direction = e; this.props.edit( settings ); } } /> { settings.vAxis.baselineColor = e; this.props.edit( settings ); } } /> { settings.vAxis.textStyle = {}; settings.vAxis.textStyle.color = e; this.props.edit( settings ); } } /> { ( -1 >= [ 'bar' ].indexOf( type ) ) && ( { settings.vAxis.format = e; this.props.edit( settings ); } } />

{ __( 'For number axis labels, this is a subset of the formatting ' ) } { __( 'ICU pattern set.' ) } { __( ' For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.' ) }

{ __( 'For date axis labels, this is a subset of the date formatting ' ) } { __( 'ICU date and time format.' ) }

) }
{ ( -1 >= [ 'bar' ].indexOf( type ) ) && ( { if ( ! settings.vAxis.gridlines ) { settings.vAxis.gridlines = {}; } settings.vAxis.gridlines.count = e; this.props.edit( settings ); } } /> { if ( ! settings.vAxis.gridlines ) { settings.vAxis.gridlines = {}; } settings.vAxis.gridlines.color = e; this.props.edit( settings ); } } /> { if ( ! settings.vAxis.minorGridlines ) { settings.vAxis.minorGridlines = {}; } settings.vAxis.minorGridlines.count = e; this.props.edit( settings ); } } /> { if ( ! settings.vAxis.minorGridlines ) { settings.vAxis.minorGridlines = {}; } settings.vAxis.minorGridlines.color = e; this.props.edit( settings ); } } /> { if ( ! settings.vAxis.viewWindow ) { settings.vAxis.viewWindow = {}; } settings.vAxis.viewWindow.max = e; this.props.edit( settings ); } } /> { if ( ! settings.vAxis.viewWindow ) { settings.vAxis.viewWindow = {}; } settings.vAxis.viewWindow.min = e; this.props.edit( settings ); } } /> )}
); } } export default VerticalAxisSettings;