Commit 21fe2147 by Ooh-Ao

config

parent 49e784c7
...@@ -38,6 +38,9 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent { ...@@ -38,6 +38,9 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
public trendValue: string = ''; public trendValue: string = '';
public trendType: string = 'percentage'; public trendType: string = 'percentage';
public trendColor: string = '#28a745'; public trendColor: string = '#28a745';
public trendField: string = '';
public trendPeriod: string = '30';
public trendThreshold: number = 5;
// Style properties // Style properties
public fontSize: number = 16; public fontSize: number = 16;
...@@ -60,7 +63,9 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent { ...@@ -60,7 +63,9 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
public animationType: string = 'fade'; public animationType: string = 'fade';
public animationDuration: number = 300; public animationDuration: number = 300;
public animationDelay: number = 0; public animationDelay: number = 0;
public animationEasing: string = 'ease';
public hoverEffects: boolean = true; public hoverEffects: boolean = true;
public autoRefresh: boolean = false;
// Interaction properties // Interaction properties
public enableTooltip: boolean = true; public enableTooltip: boolean = true;
...@@ -159,13 +164,18 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent { ...@@ -159,13 +164,18 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
this.showTrend = this.configObj.showTrend || false; this.showTrend = this.configObj.showTrend || false;
this.trendType = this.configObj.trendType || 'percentage'; this.trendType = this.configObj.trendType || 'percentage';
this.trendColor = this.configObj.trendColor || '#28a745'; this.trendColor = this.configObj.trendColor || '#28a745';
this.trendField = this.configObj.trendField || '';
this.trendPeriod = this.configObj.trendPeriod || '30';
this.trendThreshold = this.configObj.trendThreshold || 5;
// Animation configuration // Animation configuration
this.enableAnimations = this.configObj.enableAnimations !== undefined ? this.configObj.enableAnimations : true; this.enableAnimations = this.configObj.enableAnimations !== undefined ? this.configObj.enableAnimations : true;
this.animationType = this.configObj.animationType || 'fade'; this.animationType = this.configObj.animationType || 'fade';
this.animationDuration = this.configObj.animationDuration || 300; this.animationDuration = this.configObj.animationDuration || 300;
this.animationDelay = this.configObj.animationDelay || 0; this.animationDelay = this.configObj.animationDelay || 0;
this.animationEasing = this.configObj.animationEasing || 'ease';
this.hoverEffects = this.configObj.hoverEffects !== undefined ? this.configObj.hoverEffects : true; this.hoverEffects = this.configObj.hoverEffects !== undefined ? this.configObj.hoverEffects : true;
this.autoRefresh = this.configObj.autoRefresh !== undefined ? this.configObj.autoRefresh : false;
// Interaction configuration // Interaction configuration
this.enableTooltip = this.configObj.enableTooltip !== undefined ? this.configObj.enableTooltip : true; this.enableTooltip = this.configObj.enableTooltip !== undefined ? this.configObj.enableTooltip : true;
...@@ -387,13 +397,18 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent { ...@@ -387,13 +397,18 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
this.trendValue = ''; this.trendValue = '';
this.trendType = 'percentage'; this.trendType = 'percentage';
this.trendColor = '#28a745'; this.trendColor = '#28a745';
this.trendField = '';
this.trendPeriod = '30';
this.trendThreshold = 5;
// Animation reset // Animation reset
this.enableAnimations = true; this.enableAnimations = true;
this.animationType = 'fade'; this.animationType = 'fade';
this.animationDuration = 300; this.animationDuration = 300;
this.animationDelay = 0; this.animationDelay = 0;
this.animationEasing = 'ease';
this.hoverEffects = true; this.hoverEffects = true;
this.autoRefresh = false;
// Interaction reset // Interaction reset
this.enableTooltip = true; this.enableTooltip = true;
...@@ -484,7 +499,7 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent { ...@@ -484,7 +499,7 @@ export class SimpleKpiWidgetComponent extends BaseWidgetComponent {
}; };
return { return {
'animation': `${animationMap[this.animationType]} ${this.animationDuration}ms ease-in-out`, 'animation': `${animationMap[this.animationType]} ${this.animationDuration}ms ${this.animationEasing}`,
'animation-delay': `${this.animationDelay}ms`, 'animation-delay': `${this.animationDelay}ms`,
'animation-fill-mode': 'both' 'animation-fill-mode': 'both'
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment