@@ -171,7 +171,7 @@ export class CartesianWidgetModel<TInterval> {
171
171
this . mapToBaseline ( bands [ index ] . bandModel , b )
172
172
)
173
173
] ,
174
- bands : result . bands . map ( ( b : MetricBand < TInterval > ) => this . mapToBand ( b ) )
174
+ bands : result . bands . map ( ( b : MetricBand < TInterval > , index : number ) => this . mapToBand ( bands [ index ] . bandModel , b ) )
175
175
} ) )
176
176
) ;
177
177
}
@@ -202,18 +202,18 @@ export class CartesianWidgetModel<TInterval> {
202
202
return {
203
203
data : metricBand . intervals ,
204
204
units : metricBand . units ,
205
- color : BandModel . BASELINE_COLOR ,
206
- name : BandModel . BASELINE_NAME ,
205
+ color : model . color ,
206
+ name : model . name ,
207
207
type : CartesianSeriesVisualizationType . DashedLine ,
208
208
hide : model . hide
209
209
} ;
210
210
}
211
211
212
- private mapToBand ( metricSeries : MetricSeries < TInterval > ) : Band < TInterval > {
212
+ private mapToBand ( model : BandModel < TInterval > , metricSeries : MetricSeries < TInterval > ) : Band < TInterval > {
213
213
return {
214
214
name : '' ,
215
- color : BandModel . BAND_COLOR ,
216
- opacity : BandModel . DEFAULT_OPACITY ,
215
+ color : model . bandColor ,
216
+ opacity : model . opacity ,
217
217
upper : {
218
218
data : metricSeries . intervals
219
219
. map ( ( interval : unknown ) => interval as MetricTimeseriesBandInterval )
@@ -226,8 +226,8 @@ export class CartesianWidgetModel<TInterval> {
226
226
)
227
227
. map ( interval => interval as TInterval ) ,
228
228
type : CartesianSeriesVisualizationType . DashedLine ,
229
- color : BandModel . BAND_COLOR ,
230
- name : BandModel . UPPER_BOUND_NAME
229
+ color : model . bandColor ,
230
+ name : model . upperBoundName
231
231
} ,
232
232
lower : {
233
233
data : metricSeries . intervals
@@ -241,8 +241,8 @@ export class CartesianWidgetModel<TInterval> {
241
241
)
242
242
. map ( interval => interval as TInterval ) ,
243
243
type : CartesianSeriesVisualizationType . DashedLine ,
244
- color : BandModel . BAND_COLOR ,
245
- name : BandModel . LOWER_BOUND_NAME
244
+ color : model . bandColor ,
245
+ name : model . lowerBoundName
246
246
}
247
247
} ;
248
248
}
0 commit comments