@@ -38,16 +38,31 @@ class Visualizer_Render_Sidebar_Type_Gauge extends Visualizer_Render_Sidebar {
38
38
* @access protected
39
39
*/
40
40
protected function _toHTML () {
41
+ $ this ->_supportsAnimation = false ;
41
42
$ this ->_renderGeneralSettings ();
42
- $ this ->_renderGreenColorSettings ();
43
- $ this ->_renderYellowColorSettings ();
44
- $ this ->_renderRedColorSettings ();
43
+ $ this ->_renderGaugeSettings ();
45
44
$ this ->_renderViewSettings ();
46
45
$ this ->_renderAdvancedSettings ();
47
46
}
48
47
49
48
/**
50
- * Renders chart general settings group.
49
+ * Renders Gauge settings group.
50
+ *
51
+ * @since 1.0.0
52
+ *
53
+ * @access protected
54
+ */
55
+ protected function _renderGaugeSettings () {
56
+ self ::_renderGroupStart ( esc_html__ ( 'Gauge Settings ' , 'visualizer ' ) );
57
+ $ this ->_renderTickSettings ();
58
+ $ this ->_renderGreenColorSettings ();
59
+ $ this ->_renderYellowColorSettings ();
60
+ $ this ->_renderRedColorSettings ();
61
+ self ::_renderGroupEnd ();
62
+ }
63
+
64
+ /**
65
+ * Renders general settings group.
51
66
*
52
67
* @since 1.0.0
53
68
*
@@ -66,39 +81,49 @@ protected function _renderGeneralSettings() {
66
81
self ::_renderSectionEnd ();
67
82
68
83
self ::_renderSectionStart ( esc_html__ ( 'Gauge Settings ' , 'visualizer ' ), false );
84
+ }
69
85
70
- echo '<div class="viz-section-item"> ' ;
71
- echo '<a class="more-info" href="javascript:;">[?]</a> ' ;
72
- echo '<b> ' , esc_html__ ( 'Min And Max Values ' , 'visualizer ' ), '</b> ' ;
86
+ /**
87
+ * Renders tick settings group.
88
+ *
89
+ * @since 1.0.0
90
+ *
91
+ * @access protected
92
+ */
93
+ protected function _renderTickSettings () {
94
+ self ::_renderSectionStart ( esc_html__ ( 'Tick Settings ' , 'visualizer ' ), false );
73
95
74
- echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0"> ' ;
75
- echo '<tr> ' ;
76
- echo '<td class="viz-section-table-column"> ' ;
77
- echo '<input type="text" name="min" class="control-text" value=" ' , esc_attr ( $ this ->min ), '" placeholder="0"> ' ;
78
- echo '</td> ' ;
79
- echo '<td class="viz-section-table-column"> ' ;
80
- echo '<input type="text" name="max" class="control-text" value=" ' , esc_attr ( $ this ->max ), '" placeholder="100"> ' ;
81
- echo '</td> ' ;
82
- echo '</tr> ' ;
83
- echo '</table> ' ;
96
+ echo '<div class="viz-section-item"> ' ;
97
+ echo '<a class="more-info" href="javascript:;">[?]</a> ' ;
98
+ echo '<b> ' , esc_html__ ( 'Min And Max Values ' , 'visualizer ' ), '</b> ' ;
84
99
85
- echo '<p class="viz-section-description"> ' ;
86
- esc_html_e ( 'The maximal and minimal values of the gauge. ' , 'visualizer ' );
87
- echo '</p> ' ;
88
- echo '</div> ' ;
100
+ echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0"> ' ;
101
+ echo '<tr> ' ;
102
+ echo '<td class="viz-section-table-column"> ' ;
103
+ echo '<input type="text" name="min" class="control-text" value=" ' , esc_attr ( $ this ->min ), '" placeholder="0"> ' ;
104
+ echo '</td> ' ;
105
+ echo '<td class="viz-section-table-column"> ' ;
106
+ echo '<input type="text" name="max" class="control-text" value=" ' , esc_attr ( $ this ->max ), '" placeholder="100"> ' ;
107
+ echo '</td> ' ;
108
+ echo '</tr> ' ;
109
+ echo '</table> ' ;
89
110
90
- self ::_renderTextItem (
91
- esc_html__ ( 'Minor Ticks ' , 'visualizer ' ),
92
- 'minorTicks ' ,
93
- $ this ->minorTicks ,
94
- esc_html__ ( 'The number of minor tick section in each major tick section. ' , 'visualizer ' ),
95
- 2
96
- );
111
+ echo '<p class="viz-section-description"> ' ;
112
+ esc_html_e ( 'The maximal and minimal values of the gauge. ' , 'visualizer ' );
113
+ echo '</p> ' ;
114
+ echo '</div> ' ;
97
115
98
- $ this ->_renderFormatField ();
116
+ self ::_renderTextItem (
117
+ esc_html__ ( 'Minor Ticks ' , 'visualizer ' ),
118
+ 'minorTicks ' ,
119
+ $ this ->minorTicks ,
120
+ esc_html__ ( 'The number of minor tick section in each major tick section. ' , 'visualizer ' ),
121
+ 2
122
+ );
99
123
100
- self ::_renderSectionEnd ();
101
- self ::_renderGroupEnd ();
124
+ $ this ->_renderFormatField ();
125
+
126
+ self ::_renderSectionEnd ();
102
127
}
103
128
104
129
/**
@@ -109,8 +134,7 @@ protected function _renderGeneralSettings() {
109
134
* @access protected
110
135
*/
111
136
protected function _renderGreenColorSettings () {
112
- self ::_renderGroupStart ( esc_html__ ( 'Green Color ' , 'visualizer ' ) );
113
- self ::_renderSectionStart ();
137
+ self ::_renderSectionStart ( esc_html__ ( 'Green Color ' , 'visualizer ' ), false );
114
138
self ::_renderSectionDescription ( esc_html__ ( 'Configure the green section of the gauge chart. ' , 'visualizer ' ) );
115
139
116
140
echo '<div class="viz-section-item"> ' ;
@@ -140,7 +164,6 @@ protected function _renderGreenColorSettings() {
140
164
'#109618 '
141
165
);
142
166
self ::_renderSectionEnd ();
143
- self ::_renderGroupEnd ();
144
167
}
145
168
146
169
/**
@@ -151,8 +174,7 @@ protected function _renderGreenColorSettings() {
151
174
* @access protected
152
175
*/
153
176
protected function _renderYellowColorSettings () {
154
- self ::_renderGroupStart ( esc_html__ ( 'Yellow Color ' , 'visualizer ' ) );
155
- self ::_renderSectionStart ();
177
+ self ::_renderSectionStart ( esc_html__ ( 'Yellow Color ' , 'visualizer ' ), false );
156
178
self ::_renderSectionDescription ( esc_html__ ( 'Configure the yellow section of the gauge chart. ' , 'visualizer ' ) );
157
179
158
180
echo '<div class="viz-section-item"> ' ;
@@ -182,7 +204,6 @@ protected function _renderYellowColorSettings() {
182
204
'#FF9900 '
183
205
);
184
206
self ::_renderSectionEnd ();
185
- self ::_renderGroupEnd ();
186
207
}
187
208
188
209
/**
@@ -193,8 +214,7 @@ protected function _renderYellowColorSettings() {
193
214
* @access protected
194
215
*/
195
216
protected function _renderRedColorSettings () {
196
- self ::_renderGroupStart ( esc_html__ ( 'Red Color ' , 'visualizer ' ) );
197
- self ::_renderSectionStart ();
217
+ self ::_renderSectionStart ( esc_html__ ( 'Red Color ' , 'visualizer ' ), false );
198
218
self ::_renderSectionDescription ( esc_html__ ( 'Configure the red section of the gauge chart. ' , 'visualizer ' ) );
199
219
200
220
echo '<div class="viz-section-item"> ' ;
@@ -224,7 +244,6 @@ protected function _renderRedColorSettings() {
224
244
'#DC3912 '
225
245
);
226
246
self ::_renderSectionEnd ();
227
- self ::_renderGroupEnd ();
228
247
}
229
248
230
249
/**
0 commit comments