Browse Source

Change infinity value to min value and change color to corect default color

pull/5275/head
ArtemDzhereleiko 5 years ago
parent
commit
b96dd3e78b
  1. 6
      ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.models.ts
  2. 4
      ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts

6
ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.models.ts

@ -190,7 +190,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
} }
}, },
fixedLevelColors: { fixedLevelColors: {
title: 'The colors for the indicator using boundary values in percents', title: 'The colors for the indicator using boundary values',
type: 'array', type: 'array',
items: { items: {
title: 'levelColor', title: 'levelColor',
@ -214,7 +214,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
type: 'string' type: 'string'
}, },
value: { value: {
title: '[From] Value, % (if predefined value is selected)', title: '[From] Value (if predefined value is selected)',
type: 'number', type: 'number',
default: 0 default: 0
} }
@ -238,7 +238,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
type: 'string' type: 'string'
}, },
value: { value: {
title: '[To] Value, % (if predefined value is selected)', title: '[To] Value (if predefined value is selected)',
type: 'number', type: 'number',
default: 100 default: 100
} }

4
ui-ngx/src/app/modules/home/components/widget/lib/digital-gauge.ts

@ -285,8 +285,8 @@ export class TbCanvasDigitalGauge {
const predefineLevelColors: ColorLevelSetting[] = []; const predefineLevelColors: ColorLevelSetting[] = [];
predefineLevelColors.push({ predefineLevelColors.push({
value: -Infinity, value: this.localSettings.minValue,
color: this.ctx.data[0].dataKey.color color: this.localSettings.gaugeColor
}); });
function setLevelColor(levelSetting: AttributeSourceProperty, color: string) { function setLevelColor(levelSetting: AttributeSourceProperty, color: string) {

Loading…
Cancel
Save