UI: Improve time series chart legend configuration - added font/color settings for legend value and column title.
This commit is contained in:
parent
02648dd4a5
commit
94da3da2ff
@ -199,6 +199,7 @@
|
|||||||
<div>{{ 'legend.label' | translate }}</div>
|
<div>{{ 'legend.label' | translate }}</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
<tb-font-settings formControlName="legendLabelFont"
|
<tb-font-settings formControlName="legendLabelFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetConfigForm.get('legendLabelColor').value}"
|
||||||
previewText="Temperature">
|
previewText="Temperature">
|
||||||
</tb-font-settings>
|
</tb-font-settings>
|
||||||
<tb-color-input asBoxInput
|
<tb-color-input asBoxInput
|
||||||
@ -207,6 +208,32 @@
|
|||||||
</tb-color-input>
|
</tb-color-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tb-form-row space-between">
|
||||||
|
<div>{{ 'legend.value' | translate }}</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
|
<tb-font-settings formControlName="legendValueFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetConfigForm.get('legendValueColor').value}"
|
||||||
|
previewText="22 °C">
|
||||||
|
</tb-font-settings>
|
||||||
|
<tb-color-input asBoxInput
|
||||||
|
colorClearButton
|
||||||
|
formControlName="legendValueColor">
|
||||||
|
</tb-color-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tb-form-row space-between">
|
||||||
|
<div>{{ 'legend.column-title' | translate }}</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
|
<tb-font-settings formControlName="legendColumnTitleFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetConfigForm.get('legendColumnTitleColor').value}"
|
||||||
|
previewText="{{ 'legend.Avg' | translate }}">
|
||||||
|
</tb-font-settings>
|
||||||
|
<tb-color-input asBoxInput
|
||||||
|
colorClearButton
|
||||||
|
formControlName="legendColumnTitleColor">
|
||||||
|
</tb-color-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<tb-legend-config hideDirection
|
<tb-legend-config hideDirection
|
||||||
formControlName="legendConfig">
|
formControlName="legendConfig">
|
||||||
</tb-legend-config>
|
</tb-legend-config>
|
||||||
|
|||||||
@ -168,8 +168,12 @@ export class TimeSeriesChartBasicConfigComponent extends BasicWidgetConfigCompon
|
|||||||
noAggregationBarWidthSettings: [settings.noAggregationBarWidthSettings, []],
|
noAggregationBarWidthSettings: [settings.noAggregationBarWidthSettings, []],
|
||||||
|
|
||||||
showLegend: [settings.showLegend, []],
|
showLegend: [settings.showLegend, []],
|
||||||
|
legendColumnTitleFont: [settings.legendColumnTitleFont, []],
|
||||||
|
legendColumnTitleColor: [settings.legendColumnTitleColor, []],
|
||||||
legendLabelFont: [settings.legendLabelFont, []],
|
legendLabelFont: [settings.legendLabelFont, []],
|
||||||
legendLabelColor: [settings.legendLabelColor, []],
|
legendLabelColor: [settings.legendLabelColor, []],
|
||||||
|
legendValueFont: [settings.legendValueFont, []],
|
||||||
|
legendValueColor: [settings.legendValueColor, []],
|
||||||
legendConfig: [settings.legendConfig, []],
|
legendConfig: [settings.legendConfig, []],
|
||||||
|
|
||||||
showTooltip: [settings.showTooltip, []],
|
showTooltip: [settings.showTooltip, []],
|
||||||
@ -236,8 +240,12 @@ export class TimeSeriesChartBasicConfigComponent extends BasicWidgetConfigCompon
|
|||||||
this.widgetConfig.config.settings.noAggregationBarWidthSettings = config.noAggregationBarWidthSettings;
|
this.widgetConfig.config.settings.noAggregationBarWidthSettings = config.noAggregationBarWidthSettings;
|
||||||
|
|
||||||
this.widgetConfig.config.settings.showLegend = config.showLegend;
|
this.widgetConfig.config.settings.showLegend = config.showLegend;
|
||||||
|
this.widgetConfig.config.settings.legendColumnTitleFont = config.legendColumnTitleFont;
|
||||||
|
this.widgetConfig.config.settings.legendColumnTitleColor = config.legendColumnTitleColor;
|
||||||
this.widgetConfig.config.settings.legendLabelFont = config.legendLabelFont;
|
this.widgetConfig.config.settings.legendLabelFont = config.legendLabelFont;
|
||||||
this.widgetConfig.config.settings.legendLabelColor = config.legendLabelColor;
|
this.widgetConfig.config.settings.legendLabelColor = config.legendLabelColor;
|
||||||
|
this.widgetConfig.config.settings.legendValueFont = config.legendValueFont;
|
||||||
|
this.widgetConfig.config.settings.legendValueColor = config.legendValueColor;
|
||||||
this.widgetConfig.config.settings.legendConfig = config.legendConfig;
|
this.widgetConfig.config.settings.legendConfig = config.legendConfig;
|
||||||
|
|
||||||
this.widgetConfig.config.settings.showTooltip = config.showTooltip;
|
this.widgetConfig.config.settings.showTooltip = config.showTooltip;
|
||||||
@ -318,12 +326,20 @@ export class TimeSeriesChartBasicConfigComponent extends BasicWidgetConfigCompon
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (showLegend) {
|
if (showLegend) {
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendColumnTitleFont').enable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendColumnTitleColor').enable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendLabelFont').enable();
|
this.timeSeriesChartWidgetConfigForm.get('legendLabelFont').enable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendLabelColor').enable();
|
this.timeSeriesChartWidgetConfigForm.get('legendLabelColor').enable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendValueFont').enable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendValueColor').enable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendConfig').enable();
|
this.timeSeriesChartWidgetConfigForm.get('legendConfig').enable();
|
||||||
} else {
|
} else {
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendColumnTitleFont').disable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendColumnTitleColor').disable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendLabelFont').disable();
|
this.timeSeriesChartWidgetConfigForm.get('legendLabelFont').disable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendLabelColor').disable();
|
this.timeSeriesChartWidgetConfigForm.get('legendLabelColor').disable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendValueFont').disable();
|
||||||
|
this.timeSeriesChartWidgetConfigForm.get('legendValueColor').disable();
|
||||||
this.timeSeriesChartWidgetConfigForm.get('legendConfig').disable();
|
this.timeSeriesChartWidgetConfigForm.get('legendConfig').disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,11 +63,11 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="tb-time-series-chart-legend-type-label right" *ngIf="legendConfig.showMin === true">{{ 'legend.Min' | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label right" [style]="legendColumnTitleStyle" *ngIf="legendConfig.showMin === true">{{ 'legend.Min' | translate }}</th>
|
||||||
<th class="tb-time-series-chart-legend-type-label right" *ngIf="legendConfig.showMax === true">{{ 'legend.Max' | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label right" [style]="legendColumnTitleStyle" *ngIf="legendConfig.showMax === true">{{ 'legend.Max' | translate }}</th>
|
||||||
<th class="tb-time-series-chart-legend-type-label right" *ngIf="legendConfig.showAvg === true">{{ 'legend.Avg' | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label right" [style]="legendColumnTitleStyle" *ngIf="legendConfig.showAvg === true">{{ 'legend.Avg' | translate }}</th>
|
||||||
<th class="tb-time-series-chart-legend-type-label right" *ngIf="legendConfig.showTotal === true">{{ 'legend.Total' | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label right" [style]="legendColumnTitleStyle" *ngIf="legendConfig.showTotal === true">{{ 'legend.Total' | translate }}</th>
|
||||||
<th class="tb-time-series-chart-legend-type-label right" *ngIf="legendConfig.showLatest === true">{{ 'legend.Latest' | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label right" [style]="legendColumnTitleStyle" *ngIf="legendConfig.showLatest === true">{{ 'legend.Latest' | translate }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -75,19 +75,19 @@
|
|||||||
<th>
|
<th>
|
||||||
<ng-container *ngTemplateOutlet="legendItem; context:{legendKey: legendKey, left: true}"></ng-container>
|
<ng-container *ngTemplateOutlet="legendItem; context:{legendKey: legendKey, left: true}"></ng-container>
|
||||||
</th>
|
</th>
|
||||||
<td *ngIf="legendConfig.showMin === true" class="tb-time-series-chart-legend-value">
|
<td *ngIf="legendConfig.showMin === true" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex].min }}
|
{{ legendData.data[legendKey.dataIndex].min }}
|
||||||
</td>
|
</td>
|
||||||
<td *ngIf="legendConfig.showMax === true" class="tb-time-series-chart-legend-value">
|
<td *ngIf="legendConfig.showMax === true" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex].max }}
|
{{ legendData.data[legendKey.dataIndex].max }}
|
||||||
</td>
|
</td>
|
||||||
<td *ngIf="legendConfig.showAvg === true" class="tb-time-series-chart-legend-value">
|
<td *ngIf="legendConfig.showAvg === true" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex].avg }}
|
{{ legendData.data[legendKey.dataIndex].avg }}
|
||||||
</td>
|
</td>
|
||||||
<td *ngIf="legendConfig.showTotal === true" class="tb-time-series-chart-legend-value">
|
<td *ngIf="legendConfig.showTotal === true" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex].total }}
|
{{ legendData.data[legendKey.dataIndex].total }}
|
||||||
</td>
|
</td>
|
||||||
<td *ngIf="legendConfig.showLatest === true" class="tb-time-series-chart-legend-value">
|
<td *ngIf="legendConfig.showLatest === true" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex].latest }}
|
{{ legendData.data[legendKey.dataIndex].latest }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -113,8 +113,8 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #legendDataRow let-label="label" let-type="type">
|
<ng-template #legendDataRow let-label="label" let-type="type">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="tb-time-series-chart-legend-type-label">{{ label | translate }}</th>
|
<th class="tb-time-series-chart-legend-type-label" [style]="legendColumnTitleStyle">{{ label | translate }}</th>
|
||||||
<td *ngFor="let legendKey of legendKeys" class="tb-time-series-chart-legend-value">
|
<td *ngFor="let legendKey of legendKeys" class="tb-time-series-chart-legend-value" [style]="legendValueStyle">
|
||||||
{{ legendData.data[legendKey.dataIndex][type] }}
|
{{ legendData.data[legendKey.dataIndex][type] }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -147,11 +147,6 @@ $maxLegendHeight: 35%;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tb-time-series-chart-legend-type-label {
|
.tb-time-series-chart-legend-type-label {
|
||||||
font-size: 12px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 16px;
|
|
||||||
color: rgba(0, 0, 0, 0.38);
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
&.right {
|
&.right {
|
||||||
@ -159,11 +154,6 @@ $maxLegendHeight: 35%;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tb-time-series-chart-legend-value {
|
.tb-time-series-chart-legend-value {
|
||||||
font-size: 12px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 16px;
|
|
||||||
color: rgba(0, 0, 0, 0.87);
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,8 +73,10 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
|
|||||||
overlayEnabled: boolean;
|
overlayEnabled: boolean;
|
||||||
padding: string;
|
padding: string;
|
||||||
|
|
||||||
|
legendColumnTitleStyle: ComponentStyle;
|
||||||
legendLabelStyle: ComponentStyle;
|
legendLabelStyle: ComponentStyle;
|
||||||
disabledLegendLabelStyle: ComponentStyle;
|
disabledLegendLabelStyle: ComponentStyle;
|
||||||
|
legendValueStyle: ComponentStyle;
|
||||||
|
|
||||||
displayLegendValues = false;
|
displayLegendValues = false;
|
||||||
|
|
||||||
@ -117,9 +119,13 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
|
|||||||
if (this.showLegend) {
|
if (this.showLegend) {
|
||||||
this.horizontalLegendPosition = [LegendPosition.left, LegendPosition.right].includes(this.legendConfig.position);
|
this.horizontalLegendPosition = [LegendPosition.left, LegendPosition.right].includes(this.legendConfig.position);
|
||||||
this.legendClass = `legend-${this.legendConfig.position}`;
|
this.legendClass = `legend-${this.legendConfig.position}`;
|
||||||
|
this.legendColumnTitleStyle = textStyle(this.settings.legendColumnTitleFont);
|
||||||
|
this.legendColumnTitleStyle.color = this.settings.legendColumnTitleColor;
|
||||||
this.legendLabelStyle = textStyle(this.settings.legendLabelFont);
|
this.legendLabelStyle = textStyle(this.settings.legendLabelFont);
|
||||||
this.disabledLegendLabelStyle = textStyle(this.settings.legendLabelFont);
|
this.disabledLegendLabelStyle = textStyle(this.settings.legendLabelFont);
|
||||||
this.legendLabelStyle.color = this.settings.legendLabelColor;
|
this.legendLabelStyle.color = this.settings.legendLabelColor;
|
||||||
|
this.legendValueStyle = textStyle(this.settings.legendValueFont);
|
||||||
|
this.legendValueStyle.color = this.settings.legendValueColor;
|
||||||
this.displayLegendValues = this.legendConfig.showMin || this.legendConfig.showMax ||
|
this.displayLegendValues = this.legendConfig.showMin || this.legendConfig.showMax ||
|
||||||
this.legendConfig.showAvg || this.legendConfig.showTotal || this.legendConfig.showLatest;
|
this.legendConfig.showAvg || this.legendConfig.showTotal || this.legendConfig.showLatest;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,8 +21,12 @@ import { mergeDeep } from '@core/utils';
|
|||||||
|
|
||||||
export interface TimeSeriesChartWidgetSettings extends TimeSeriesChartSettings {
|
export interface TimeSeriesChartWidgetSettings extends TimeSeriesChartSettings {
|
||||||
showLegend: boolean;
|
showLegend: boolean;
|
||||||
|
legendColumnTitleFont: Font;
|
||||||
|
legendColumnTitleColor: string;
|
||||||
legendLabelFont: Font;
|
legendLabelFont: Font;
|
||||||
legendLabelColor: string;
|
legendLabelColor: string;
|
||||||
|
legendValueFont: Font;
|
||||||
|
legendValueColor: string;
|
||||||
legendConfig: LegendConfig;
|
legendConfig: LegendConfig;
|
||||||
background: BackgroundSettings;
|
background: BackgroundSettings;
|
||||||
padding: string;
|
padding: string;
|
||||||
@ -31,6 +35,15 @@ export interface TimeSeriesChartWidgetSettings extends TimeSeriesChartSettings {
|
|||||||
export const timeSeriesChartWidgetDefaultSettings: TimeSeriesChartWidgetSettings =
|
export const timeSeriesChartWidgetDefaultSettings: TimeSeriesChartWidgetSettings =
|
||||||
mergeDeep({} as TimeSeriesChartWidgetSettings, timeSeriesChartDefaultSettings as TimeSeriesChartWidgetSettings, {
|
mergeDeep({} as TimeSeriesChartWidgetSettings, timeSeriesChartDefaultSettings as TimeSeriesChartWidgetSettings, {
|
||||||
showLegend: true,
|
showLegend: true,
|
||||||
|
legendColumnTitleFont: {
|
||||||
|
family: 'Roboto',
|
||||||
|
size: 12,
|
||||||
|
sizeUnit: 'px',
|
||||||
|
style: 'normal',
|
||||||
|
weight: '400',
|
||||||
|
lineHeight: '16px'
|
||||||
|
},
|
||||||
|
legendColumnTitleColor: 'rgba(0, 0, 0, 0.38)',
|
||||||
legendLabelFont: {
|
legendLabelFont: {
|
||||||
family: 'Roboto',
|
family: 'Roboto',
|
||||||
size: 12,
|
size: 12,
|
||||||
@ -40,6 +53,15 @@ export const timeSeriesChartWidgetDefaultSettings: TimeSeriesChartWidgetSettings
|
|||||||
lineHeight: '16px'
|
lineHeight: '16px'
|
||||||
},
|
},
|
||||||
legendLabelColor: 'rgba(0, 0, 0, 0.76)',
|
legendLabelColor: 'rgba(0, 0, 0, 0.76)',
|
||||||
|
legendValueFont: {
|
||||||
|
family: 'Roboto',
|
||||||
|
size: 12,
|
||||||
|
sizeUnit: 'px',
|
||||||
|
style: 'normal',
|
||||||
|
weight: '500',
|
||||||
|
lineHeight: '16px'
|
||||||
|
},
|
||||||
|
legendValueColor: 'rgba(0, 0, 0, 0.87)',
|
||||||
legendConfig: {...defaultLegendConfig(widgetType.timeseries), position: LegendPosition.top},
|
legendConfig: {...defaultLegendConfig(widgetType.timeseries), position: LegendPosition.top},
|
||||||
background: {
|
background: {
|
||||||
type: BackgroundType.color,
|
type: BackgroundType.color,
|
||||||
|
|||||||
@ -118,6 +118,7 @@
|
|||||||
<div>{{ 'legend.label' | translate }}</div>
|
<div>{{ 'legend.label' | translate }}</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
<tb-font-settings formControlName="legendLabelFont"
|
<tb-font-settings formControlName="legendLabelFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetSettingsForm.get('legendLabelColor').value}"
|
||||||
previewText="Temperature">
|
previewText="Temperature">
|
||||||
</tb-font-settings>
|
</tb-font-settings>
|
||||||
<tb-color-input asBoxInput
|
<tb-color-input asBoxInput
|
||||||
@ -126,6 +127,32 @@
|
|||||||
</tb-color-input>
|
</tb-color-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tb-form-row space-between">
|
||||||
|
<div>{{ 'legend.value' | translate }}</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
|
<tb-font-settings formControlName="legendValueFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetSettingsForm.get('legendValueColor').value}"
|
||||||
|
previewText="22 °C">
|
||||||
|
</tb-font-settings>
|
||||||
|
<tb-color-input asBoxInput
|
||||||
|
colorClearButton
|
||||||
|
formControlName="legendValueColor">
|
||||||
|
</tb-color-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tb-form-row space-between">
|
||||||
|
<div>{{ 'legend.column-title' | translate }}</div>
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
|
||||||
|
<tb-font-settings formControlName="legendColumnTitleFont"
|
||||||
|
[initialPreviewStyle]="{color: timeSeriesChartWidgetSettingsForm.get('legendColumnTitleColor').value}"
|
||||||
|
previewText="{{ 'legend.Avg' | translate }}">
|
||||||
|
</tb-font-settings>
|
||||||
|
<tb-color-input asBoxInput
|
||||||
|
colorClearButton
|
||||||
|
formControlName="legendColumnTitleColor">
|
||||||
|
</tb-color-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<tb-legend-config hideDirection
|
<tb-legend-config hideDirection
|
||||||
formControlName="legendConfig">
|
formControlName="legendConfig">
|
||||||
</tb-legend-config>
|
</tb-legend-config>
|
||||||
|
|||||||
@ -133,8 +133,12 @@ export class TimeSeriesChartWidgetSettingsComponent extends WidgetSettingsCompon
|
|||||||
noAggregationBarWidthSettings: [settings.noAggregationBarWidthSettings, []],
|
noAggregationBarWidthSettings: [settings.noAggregationBarWidthSettings, []],
|
||||||
|
|
||||||
showLegend: [settings.showLegend, []],
|
showLegend: [settings.showLegend, []],
|
||||||
|
legendColumnTitleFont: [settings.legendColumnTitleFont, []],
|
||||||
|
legendColumnTitleColor: [settings.legendColumnTitleColor, []],
|
||||||
legendLabelFont: [settings.legendLabelFont, []],
|
legendLabelFont: [settings.legendLabelFont, []],
|
||||||
legendLabelColor: [settings.legendLabelColor, []],
|
legendLabelColor: [settings.legendLabelColor, []],
|
||||||
|
legendValueFont: [settings.legendValueFont, []],
|
||||||
|
legendValueColor: [settings.legendValueColor, []],
|
||||||
legendConfig: [settings.legendConfig, []],
|
legendConfig: [settings.legendConfig, []],
|
||||||
|
|
||||||
showTooltip: [settings.showTooltip, []],
|
showTooltip: [settings.showTooltip, []],
|
||||||
@ -182,12 +186,20 @@ export class TimeSeriesChartWidgetSettingsComponent extends WidgetSettingsCompon
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (showLegend) {
|
if (showLegend) {
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendColumnTitleFont').enable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendColumnTitleColor').enable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendLabelFont').enable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendLabelFont').enable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendLabelColor').enable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendLabelColor').enable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendValueFont').enable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendValueColor').enable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendConfig').enable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendConfig').enable();
|
||||||
} else {
|
} else {
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendColumnTitleFont').disable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendColumnTitleColor').disable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendLabelFont').disable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendLabelFont').disable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendLabelColor').disable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendLabelColor').disable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendValueFont').disable();
|
||||||
|
this.timeSeriesChartWidgetSettingsForm.get('legendValueColor').disable();
|
||||||
this.timeSeriesChartWidgetSettingsForm.get('legendConfig').disable();
|
this.timeSeriesChartWidgetSettingsForm.get('legendConfig').disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3292,6 +3292,7 @@
|
|||||||
"months": "(month ago)",
|
"months": "(month ago)",
|
||||||
"years": "(year ago)"
|
"years": "(year ago)"
|
||||||
},
|
},
|
||||||
|
"column-title": "Column title",
|
||||||
"label": "Label",
|
"label": "Label",
|
||||||
"value": "Value"
|
"value": "Value"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user