| @@ -1,114 +1,81 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -// +----------------------------------------------------------------------+ | |
| 4 | -// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) | | |
| 5 | -// +----------------------------------------------------------------------+ | |
| 6 | -// | This program is free software; you can redistribute it and/or modify | | |
| 7 | -// | it under the terms of the GNU General Public License, version 2, as | | |
| 8 | -// | published by the Free Software Foundation. | | |
| 9 | -// | | | |
| 10 | -// | This program is distributed in the hope that it will be useful, | | |
| 11 | -// | but WITHOUT ANY WARRANTY; without even the implied warranty of | | |
| 12 | -// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | |
| 13 | -// | GNU General Public License for more details. | | |
| 14 | -// | | | |
| 15 | -// | You should have received a copy of the GNU General Public License | | |
| 16 | -// | along with this program; if not, write to the Free Software | | |
| 17 | -// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | | |
| 18 | -// | MA 02110-1301 USA | | |
| 19 | -// +----------------------------------------------------------------------+ | |
| 20 | -// | Author: Eugene Manuilov <eugene@manuilov.org> | | |
| 21 | -// +----------------------------------------------------------------------+ | |
| 22 | -/** | |
| 23 | - * Base class for sidebar settings of columnar based charts. | |
| 24 | - * | |
| 25 | - * @category Visualizer | |
| 26 | - * @package Render | |
| 27 | - * @subpackage Sidebar | |
| 28 | - * | |
| 29 | - * @since 1.0.0 | |
| 30 | - * @abstract | |
| 31 | - */ | |
| 32 | -abstract class Visualizer_Render_Sidebar_Columnar extends Visualizer_Render_Sidebar_Graph { | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * Renders columnar settings group. | |
| 36 | - * | |
| 37 | - * @since 1.0.0 | |
| 38 | - * | |
| 39 | - * @access protected | |
| 40 | - */ | |
| 41 | - protected function _renderColumnarSettings() { | |
| 42 | - self::_renderGroupStart( esc_html__( 'Bars Settings', 'visualizer' ) ); | |
| 43 | - self::_renderSectionStart(); | |
| 44 | - self::_renderSelectItem( | |
| 45 | - esc_html__( 'Focus Target', 'visualizer' ), | |
| 46 | - 'focusTarget', | |
| 47 | - $this->focusTarget, | |
| 48 | - array( | |
| 49 | - '' => '', | |
| 50 | - 'datum' => esc_html__( 'Focus on a single data point.', 'visualizer' ), | |
| 51 | - 'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', 'visualizer' ), | |
| 52 | - ), | |
| 53 | - esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', 'visualizer' ) | |
| 54 | - ); | |
| 55 | - | |
| 56 | - echo '<div class="viz-section-delimiter"></div>'; | |
| 57 | - | |
| 58 | - self::_renderSelectItem( | |
| 59 | - esc_html__( 'Is Stacked', 'visualizer' ), | |
| 60 | - 'isStacked', | |
| 61 | - $this->isStacked, | |
| 62 | - $this->_yesno, | |
| 63 | - esc_html__( 'If set to yes, series elements are stacked.', 'visualizer' ) | |
| 64 | - ); | |
| 65 | - | |
| 66 | - echo '<div class="viz-section-delimiter"></div>'; | |
| 67 | - | |
| 68 | - self::_renderTextItem( | |
| 69 | - esc_html__( 'Bars Opacity', 'visualizer' ), | |
| 70 | - 'dataOpacity', | |
| 71 | - $this->dataOpacity, | |
| 72 | - esc_html__( 'Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent.', 'visualizer' ), | |
| 73 | - '1.0' | |
| 74 | - ); | |
| 75 | - self::_renderSectionEnd(); | |
| 76 | - self::_renderGroupEnd(); | |
| 77 | - } | |
| 78 | - | |
| 79 | - | |
| 80 | - /** | |
| 81 | - * Renders general settings block for vertical axis settings. | |
| 82 | - * | |
| 83 | - * @since 1.4.0 | |
| 84 | - * | |
| 85 | - * @access protected | |
| 86 | - */ | |
| 87 | - protected function _renderVerticalAxisGeneralSettings() { | |
| 88 | - parent::_renderVerticalAxisGeneralSettings(); | |
| 89 | - self::_renderColorPickerItem( | |
| 90 | - esc_html__( 'Axis Text Color', 'visualizer' ), | |
| 91 | - 'hAxis[textStyle]', | |
| 92 | - isset( $this->hAxis['textStyle'] ) ? $this->hAxis['textStyle'] : null, | |
| 93 | - '#000' | |
| 94 | - ); | |
| 95 | - } | |
| 96 | - | |
| 97 | - /** | |
| 98 | - * Renders general settings block for vertical axis settings. | |
| 99 | - * | |
| 100 | - * @since 1.4.0 | |
| 101 | - * | |
| 102 | - * @access protected | |
| 103 | - */ | |
| 104 | - protected function _renderHorizontalAxisGeneralSettings() { | |
| 105 | - parent::_renderHorizontalAxisGeneralSettings(); | |
| 106 | - self::_renderColorPickerItem( | |
| 107 | - esc_html__( 'Axis Text Color', 'visualizer' ), | |
| 108 | - 'vAxis[textStyle]', | |
| 109 | - isset( $this->vAxis['textStyle'] ) ? $this->vAxis['textStyle'] : null, | |
| 110 | - '#000' | |
| 111 | - ); | |
| 112 | - } | |
| 113 | - | |
| 114 | -} | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +// +----------------------------------------------------------------------+ | |
| 4 | +// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) | | |
| 5 | +// +----------------------------------------------------------------------+ | |
| 6 | +// | This program is free software; you can redistribute it and/or modify | | |
| 7 | +// | it under the terms of the GNU General Public License, version 2, as | | |
| 8 | +// | published by the Free Software Foundation. | | |
| 9 | +// | | | |
| 10 | +// | This program is distributed in the hope that it will be useful, | | |
| 11 | +// | but WITHOUT ANY WARRANTY; without even the implied warranty of | | |
| 12 | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | |
| 13 | +// | GNU General Public License for more details. | | |
| 14 | +// | | | |
| 15 | +// | You should have received a copy of the GNU General Public License | | |
| 16 | +// | along with this program; if not, write to the Free Software | | |
| 17 | +// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | | |
| 18 | +// | MA 02110-1301 USA | | |
| 19 | +// +----------------------------------------------------------------------+ | |
| 20 | +// | Author: Eugene Manuilov <eugene@manuilov.org> | | |
| 21 | +// +----------------------------------------------------------------------+ | |
| 22 | + | |
| 23 | + | |
| 24 | +/** | |
| 25 | + * Base class for sidebar settings of columnar based charts. | |
| 26 | + * | |
| 27 | + * @category Visualizer | |
| 28 | + * @package Render | |
| 29 | + * @subpackage Sidebar | |
| 30 | + * | |
| 31 | + * @since 1.0.0 | |
| 32 | + * @abstract | |
| 33 | + */ | |
| 34 | +abstract class Visualizer_Render_Sidebar_Columnar extends Visualizer_Render_Sidebar_Graph { | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * Renders columnar settings group. | |
| 38 | + * | |
| 39 | + * @since 1.0.0 | |
| 40 | + * | |
| 41 | + * @access protected | |
| 42 | + */ | |
| 43 | + protected function _renderColumnarSettings() { | |
| 44 | + self::_renderGroupStart( esc_html__( 'Bars Settings', Visualizer_Plugin::NAME ) ); | |
| 45 | + self::_renderSectionStart(); | |
| 46 | + self::_renderSelectItem( | |
| 47 | + esc_html__( 'Focus Target', Visualizer_Plugin::NAME ), | |
| 48 | + 'focusTarget', | |
| 49 | + $this->focusTarget, | |
| 50 | + array( | |
| 51 | + '' => '', | |
| 52 | + 'datum' => esc_html__( 'Focus on a single data point.', Visualizer_Plugin::NAME ), | |
| 53 | + 'category' => esc_html__( 'Focus on a grouping of all data points along the major axis.', Visualizer_Plugin::NAME ), | |
| 54 | + ), | |
| 55 | + esc_html__( 'The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click.', Visualizer_Plugin::NAME ) | |
| 56 | + ); | |
| 57 | + | |
| 58 | + echo '<div class="section-delimiter"></div>'; | |
| 59 | + | |
| 60 | + self::_renderSelectItem( | |
| 61 | + esc_html__( 'Is Stacked', Visualizer_Plugin::NAME ), | |
| 62 | + 'isStacked', | |
| 63 | + $this->isStacked, | |
| 64 | + $this->_yesno, | |
| 65 | + esc_html__( 'If set to yes, series elements are stacked.', Visualizer_Plugin::NAME ) | |
| 66 | + ); | |
| 67 | + | |
| 68 | + echo '<div class="section-delimiter"></div>'; | |
| 69 | + | |
| 70 | + self::_renderTextItem( | |
| 71 | + esc_html__( 'Bars Opacity', Visualizer_Plugin::NAME ), | |
| 72 | + 'dataOpacity', | |
| 73 | + $this->dataOpacity, | |
| 74 | + esc_html__( 'Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent.', Visualizer_Plugin::NAME ), | |
| 75 | + '1.0' | |
| 76 | + ); | |
| 77 | + self::_renderSectionEnd(); | |
| 78 | + self::_renderGroupEnd(); | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | |