Merge pull request #9592 from Dmitriymush/bug-fix/value-and-chart-card
Fixed value and chart card crash on empty colorProcessor type
This commit is contained in:
commit
07eb8218fd
@ -65,7 +65,7 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit
|
||||
ngOnInit(): void {
|
||||
this.colorSettingsFormGroup = this.fb.group(
|
||||
{
|
||||
type: [this.colorSettings?.type, []],
|
||||
type: [this.colorSettings?.type || ColorType.constant, []],
|
||||
color: [this.colorSettings?.color, []],
|
||||
rangeList: [this.colorSettings?.rangeList, []],
|
||||
colorFunction: [this.colorSettings?.colorFunction, []]
|
||||
|
||||
@ -161,6 +161,8 @@ export abstract class ColorProcessor {
|
||||
return new RangeColorProcessor(settings);
|
||||
case ColorType.function:
|
||||
return new FunctionColorProcessor(settings);
|
||||
default:
|
||||
return new ConstantColorProcessor(settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user