Skip to content

Commit 487635d

Browse files
author
Eugene Manuilov
committed
Reworked general settings section by moving title and font settings into separate groups
1 parent c64660f commit 487635d

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

classes/Visualizer/Render/Sidebar.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,17 @@ protected function _renderChartTitleSettings() {
152152
protected function _renderGeneralSettings() {
153153
self::_renderGroupStart( esc_html__( 'General Settings', Visualizer_Plugin::NAME ) );
154154
self::_renderSectionStart();
155-
self::_renderSectionDescription( esc_html__( 'Configure title, font styles and legend positioning settings for the chart.', Visualizer_Plugin::NAME ) );
155+
self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', Visualizer_Plugin::NAME ) );
156+
self::_renderSectionEnd();
156157

158+
self::_renderSectionStart( esc_html__( 'Title', Visualizer_Plugin::NAME ), false );
157159
$this->_renderChartTitleSettings();
160+
self::_renderSectionEnd();
158161

162+
self::_renderSectionStart( esc_html__( 'Font Styles' ), false );
159163
echo '<div class="section-item">';
160164
echo '<a class="more-info" href="javascript:;">[?]</a>';
161-
echo '<b>', esc_html__( 'Font Family And Size', Visualizer_Plugin::NAME ), '</b>';
165+
echo '<b>', esc_html__( 'Family And Size', Visualizer_Plugin::NAME ), '</b>';
162166

163167
echo '<table class="section-table" cellspacing="0" cellpadding="0" border="0">';
164168
echo '<tr>';

classes/Visualizer/Render/Sidebar/Graph.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ public function __construct( $data = array() ) {
9393
* @access protected
9494
*/
9595
protected function _renderChartTitleSettings() {
96-
parent::_renderChartTitleSettings();
96+
self::_renderTextItem(
97+
esc_html__( 'Chart Title', Visualizer_Plugin::NAME ),
98+
'title',
99+
$this->title,
100+
esc_html__( 'Text to display above the chart.', Visualizer_Plugin::NAME )
101+
);
97102

98103
self::_renderSelectItem(
99104
esc_html__( 'Chart Title Position', Visualizer_Plugin::NAME ),
@@ -103,6 +108,13 @@ protected function _renderChartTitleSettings() {
103108
esc_html__( 'Where to place the chart title, compared to the chart area.', Visualizer_Plugin::NAME )
104109
);
105110

111+
self::_renderColorPickerItem(
112+
esc_html__( 'Chart Title Color', Visualizer_Plugin::NAME ),
113+
'titleTextStyle[color]',
114+
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
115+
'#000'
116+
);
117+
106118
echo '<div class="section-delimiter"></div>';
107119

108120
self::_renderSelectItem(
@@ -112,8 +124,6 @@ protected function _renderChartTitleSettings() {
112124
$this->_positions,
113125
esc_html__( 'Determines where to place the axis titles, compared to the chart area.', Visualizer_Plugin::NAME )
114126
);
115-
116-
echo '<div class="section-delimiter"></div>';
117127
}
118128

119129
/**

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
6565
* Implemented new settings for pie chart like pie hole, start angle and slice offset
6666
* Implemented ability to select a color for chart title and legend items
6767
* Fixed number formatting settings for linear charts, from now it works only for axis labels
68+
* Reworked general settings section by moving title and font settings into separate groups
6869

6970
= 1.3.0.2 =
7071
* Replaced links to github wiki

0 commit comments

Comments
 (0)