/** * 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 HorizontalAxisSettings extends Component { constructor() { super( ...arguments ); } render() { const type = this.props.chart['visualizer-chart-type']; const settings = this.props.chart['visualizer-settings']; return ( { settings.hAxis.title = e; this.props.edit( settings ); } } /> { settings.hAxis.textPosition = e; this.props.edit( settings ); } } /> { settings.hAxis.direction = e; this.props.edit( settings ); } } /> { settings.hAxis.baselineColor = e; this.props.edit( settings ); } } /> { settings.hAxis.textStyle = {}; settings.hAxis.textStyle.color = e; this.props.edit( settings ); } } /> { ( -1 >= [ 'column' ].indexOf( type ) ) && ( { settings.hAxis.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 >= [ 'column' ].indexOf( type ) ) && ( { if ( ! settings.hAxis.gridlines ) { settings.hAxis.gridlines = {}; } settings.hAxis.gridlines.count = e; this.props.edit( settings ); } } /> { if ( ! settings.hAxis.gridlines ) { settings.hAxis.gridlines = {}; } settings.hAxis.gridlines.color = e; this.props.edit( settings ); } } /> { if ( ! settings.hAxis.minorGridlines ) { settings.hAxis.minorGridlines = {}; } settings.hAxis.minorGridlines.count = e; this.props.edit( settings ); } } /> { if ( ! settings.hAxis.minorGridlines ) { settings.hAxis.minorGridlines = {}; } settings.hAxis.minorGridlines.color = e; this.props.edit( settings ); } } /> { if ( ! settings.hAxis.viewWindow ) { settings.hAxis.viewWindow = {}; } settings.hAxis.viewWindow.max = e; this.props.edit( settings ); } } /> { if ( ! settings.hAxis.viewWindow ) { settings.hAxis.viewWindow = {}; } settings.hAxis.viewWindow.min = e; this.props.edit( settings ); } } /> )}
); } } export default HorizontalAxisSettings;