@@ -153,7 +153,15 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
153
153
/** @scratch /panels/histogram/3
154
154
* legend:: Display the legond
155
155
*/
156
- legend : true ,
156
+ legend : {
157
+ show : true , // disable/enable legend
158
+ values : false , // disable/enable legend values
159
+ min : false ,
160
+ max : false ,
161
+ current : false ,
162
+ total : false ,
163
+ avg : false
164
+ } ,
157
165
/** @scratch /panels/histogram/3
158
166
* ==== Transformations
159
167
/** @scratch /panels/histogram/3
@@ -182,11 +190,16 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
182
190
} ;
183
191
184
192
_ . defaults ( $scope . panel , _d ) ;
185
- _ . defaults ( $scope . panel . tooltip , _d . tooltip ) ;
186
- _ . defaults ( $scope . panel . annotate , _d . annotate ) ;
187
- _ . defaults ( $scope . panel . grid , _d . grid ) ;
193
+ _ . defaults ( $scope . panel . tooltip , _d . tooltip ) ;
194
+ _ . defaults ( $scope . panel . annotate , _d . annotate ) ;
195
+ _ . defaults ( $scope . panel . grid , _d . grid ) ;
188
196
189
197
// backward compatible stuff
198
+ if ( _ . isBoolean ( $scope . panel . legend ) ) {
199
+ $scope . panel . legend = { show : $scope . panel . legend } ;
200
+ _ . defaults ( $scope . panel . legend , _d . legend ) ;
201
+ }
202
+
190
203
if ( $scope . panel . y_format ) {
191
204
$scope . panel . y_formats [ 0 ] = $scope . panel . y_format ;
192
205
delete $scope . panel . y_format ;
0 commit comments