Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foregroundColor attribute changes don't refresh the view #97

Open
Sephy42 opened this issue Apr 22, 2021 · 3 comments
Open

foregroundColor attribute changes don't refresh the view #97

Sephy42 opened this issue Apr 22, 2021 · 3 comments

Comments

@Sephy42
Copy link

Sephy42 commented Apr 22, 2021

Hello,
I need to refresh all the page to reload the display of the gauge when there are changes on the foregroundColor attribute. Do I miss something ?

Minimal example here : https://stackblitz.com/edit/ngx-gauge-issu?file=src%2Fapp%2Fapp.component.html

@Sephy42 Sephy42 changed the title foregroundColor attribute changes does'nt refresh the view foregroundColor attribute changes doesn't refresh the view Apr 22, 2021
@Sephy42 Sephy42 changed the title foregroundColor attribute changes doesn't refresh the view foregroundColor attribute changes don't refresh the view Apr 26, 2021
@ElliottSimmonds
Copy link

ElliottSimmonds commented Dec 29, 2022

I have the same issue. The display is only updated when the gauge value is changed.

@vitorfiler
Copy link

the purpose of this graph is basically to have more or less 3 fixed colors that change dynamically based on the value,
for that try using:

HTML property - [thresholds]="thresholdConfig"
ts variable - thresholdConfig = {
'1': { color: 'red' },
'41': { color: 'yellow' },
'91': { color: 'green' }
};

this variable determines the color by checking if its value is within any of the ranges

@ElliottSimmonds
Copy link

ElliottSimmonds commented Dec 29, 2022

Thanks, thresholds don't apply to my admittedly specific use case. I'm trying to set the gauge foreground and background colours red when the link between my client and server is down, nothing to do with the gauge value.
I have found a hacky way to update the colours but would like a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants