Issue
So I've been trying to display percent values but ngx-gauge only displays float values.
Documentation on ngx-gauge
https://www.npmjs.com/package/ngx-gauge
What I want
What I get
Trying to have "%" at the end of my value.
HTML
<ngx-gauge style="color:rgba(0,0,0,100); font-size:100px;"type="semi" cap="semi" thick="12" size="100" [foregroundColor]="color"
backgroundColor="rgba(176, 242, 206, 0.54)"
value="{{value}}"
[label]="label"
max="1"
[append]="sleep.gaugeAppendText">
</ngx-gauge>
.TS
value = 0.64
label = "Pepper"
Solution
<ngx-gauge style="color:white; font-size:100px;"
type="arch"
thick="5"
size="200"
foregroundColor='gold'
[value]="value"
[label]="label"
[max]="max"
[min]="min"
[append]="gaugeAppendText">
</ngx-gauge>
in ts
gaugeAppendText="%"
Answered By - pc_coder
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.