Change infinity value to min value and change color to corect default color
This commit is contained in:
		
							parent
							
								
									a83f328092
								
							
						
					
					
						commit
						b96dd3e78b
					
				@ -190,7 +190,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      fixedLevelColors: {
 | 
			
		||||
        title: 'The colors for the indicator using boundary values in percents',
 | 
			
		||||
        title: 'The colors for the indicator using boundary values',
 | 
			
		||||
        type: 'array',
 | 
			
		||||
        items: {
 | 
			
		||||
          title: 'levelColor',
 | 
			
		||||
@ -214,7 +214,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
 | 
			
		||||
                  type: 'string'
 | 
			
		||||
                },
 | 
			
		||||
                value: {
 | 
			
		||||
                  title: '[From] Value, % (if predefined value is selected)',
 | 
			
		||||
                  title: '[From] Value (if predefined value is selected)',
 | 
			
		||||
                  type: 'number',
 | 
			
		||||
                  default: 0
 | 
			
		||||
                }
 | 
			
		||||
@ -238,7 +238,7 @@ export const digitalGaugeSettingsSchema: JsonSettingsSchema = {
 | 
			
		||||
                  type: 'string'
 | 
			
		||||
                },
 | 
			
		||||
                value: {
 | 
			
		||||
                  title: '[To] Value, % (if predefined value is selected)',
 | 
			
		||||
                  title: '[To] Value (if predefined value is selected)',
 | 
			
		||||
                  type: 'number',
 | 
			
		||||
                  default: 100
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
@ -285,8 +285,8 @@ export class TbCanvasDigitalGauge {
 | 
			
		||||
    const predefineLevelColors: ColorLevelSetting[] = [];
 | 
			
		||||
 | 
			
		||||
    predefineLevelColors.push({
 | 
			
		||||
      value: -Infinity,
 | 
			
		||||
      color: this.ctx.data[0].dataKey.color
 | 
			
		||||
      value: this.localSettings.minValue,
 | 
			
		||||
      color: this.localSettings.gaugeColor
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    function setLevelColor(levelSetting: AttributeSourceProperty, color: string) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user