|
|
@ -47,7 +47,7 @@ const DEFAULT_GAUGE_OPTIONS: GaugeOptions = { |
|
|
|
innerRadius: DEFAULT_INNER_RADIUS, |
|
|
|
innerRadius: DEFAULT_INNER_RADIUS, |
|
|
|
outerRadius: DEFAULT_OUTER_RADIUS, |
|
|
|
outerRadius: DEFAULT_OUTER_RADIUS, |
|
|
|
icons: [], |
|
|
|
icons: [], |
|
|
|
valueSize: VALUE_TEXT_FONT_SIZE, |
|
|
|
valueFontSize: VALUE_TEXT_FONT_SIZE, |
|
|
|
valueArcBackgroundColor: BACKGROUND_COLOR |
|
|
|
valueArcBackgroundColor: BACKGROUND_COLOR |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -291,13 +291,13 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions |
|
|
|
private get _valueTextFontSize(): number { |
|
|
|
private get _valueTextFontSize(): number { |
|
|
|
let font; |
|
|
|
let font; |
|
|
|
if(this._valueText.length <= 6) { |
|
|
|
if(this._valueText.length <= 6) { |
|
|
|
font = this._valueSize; |
|
|
|
font = this._valueFontSize; |
|
|
|
} else if(this._valueText.length > 6 && this._valueText.length <= 10) { |
|
|
|
} else if(this._valueText.length > 6 && this._valueText.length <= 10) { |
|
|
|
font = this._valueSize - 2; |
|
|
|
font = this._valueFontSize - 2; |
|
|
|
} else if(this._valueText.length > 10 && this._valueText.length <= 12) { |
|
|
|
} else if(this._valueText.length > 10 && this._valueText.length <= 12) { |
|
|
|
font = this._valueSize - 4; |
|
|
|
font = this._valueFontSize - 4; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
font = this._valueSize - 6; |
|
|
|
font = this._valueFontSize - 6; |
|
|
|
} |
|
|
|
} |
|
|
|
return this.rescaleValueFont(font); |
|
|
|
return this.rescaleValueFont(font); |
|
|
|
} |
|
|
|
} |
|
|
@ -306,8 +306,8 @@ export class ChartwerkGaugePod extends ChartwerkPod<GaugeTimeSerie, GaugeOptions |
|
|
|
return this.options.stat; |
|
|
|
return this.options.stat; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private get _valueSize(): number { |
|
|
|
private get _valueFontSize(): number { |
|
|
|
return this.options.valueSize; |
|
|
|
return this.options.valueFontSize; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private get _valueArcBackgroundColor(): string { |
|
|
|
private get _valueArcBackgroundColor(): string { |
|
|
|