File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
projects/observability/src/shared/dashboard/widgets/charts/cartesian-widget Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
10
10
STRING_PROPERTY
11
11
} from '@hypertrace/hyperdash' ;
12
12
import { ModelInject , MODEL_API } from '@hypertrace/hyperdash-angular' ;
13
- import { Observable } from 'rxjs' ;
13
+ import { Observable , of } from 'rxjs' ;
14
14
import { map } from 'rxjs/operators' ;
15
15
import { Band , CartesianSeriesVisualizationType , Series } from '../../../../components/cartesian/chart' ;
16
16
import { LegendPosition } from '../../../../components/legend/legend.component' ;
@@ -48,6 +48,12 @@ export class CartesianWidgetModel<TInterval> {
48
48
} )
49
49
public bands : BandModel < TInterval > [ ] = [ ] ;
50
50
51
+ @ModelProperty ( {
52
+ key : 'show-bands' ,
53
+ type : BOOLEAN_PROPERTY . type
54
+ } )
55
+ public showBands : boolean = true ;
56
+
51
57
@ModelProperty ( {
52
58
key : 'color-palette' ,
53
59
displayName : 'Color Palette' ,
@@ -258,7 +264,7 @@ export class CartesianWidgetModel<TInterval> {
258
264
bands : DecoratedBandDataFetcher < TInterval > [ ] ,
259
265
interval : TimeDuration
260
266
) : Observable < MetricBand < TInterval > [ ] > {
261
- return forkJoinSafeEmpty ( bands . map ( fetcher => fetcher . getData ( interval ) ) ) ;
267
+ return this . showBands ? forkJoinSafeEmpty ( bands . map ( fetcher => fetcher . getData ( interval ) ) ) : of ( [ ] ) ;
262
268
}
263
269
264
270
private getDecoratedSeriesDataFetchers ( ) : Observable < DecoratedSeriesDataFetcher < TInterval > [ ] > {
You can’t perform that action at this time.
0 commit comments