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

Markers are not being drawn properly. #141

Open
Mforcen opened this issue Feb 9, 2023 · 2 comments
Open

Markers are not being drawn properly. #141

Mforcen opened this issue Feb 9, 2023 · 2 comments

Comments

@Mforcen
Copy link

Mforcen commented Feb 9, 2023

Hi all, I'm using this piece of software for a data visualization project, but I think I've stumbled upon a bug in the marker drawing algorithm.

To demonstrate it quickly, I've taken a screenshot from the playground:
imagen

Here, we can see that the markers are set as by default, and they do not react to changes in the min parameter of the gauge. This is not right, since the value 30 is not located into that position.

Nevertheless, marker position is affected by the max parameter of the gauge. This can be seen here.
imagen

I think the offending code could be located near this line: https://github.com/ashish-chopra/ngx-gauge/blob/master/projects/ngx-gauge/src/gauge/gauge.ts#L542
If the variable perD is what I think it is, it should take in account the minimum by doing something like this:

perD = (degrees-this.min)/(this.max-this.min).

I'm not used to Angular development, so I cannot try the patch by myself.

Awesome job by the way, this module is pretty nice.

@cocaybica
Copy link

I'm getting the same issue. Marks are not consistent with the chosen Max and Min values. I need to represent values from 250 to 450 but the marks are not in the right position:

Captura desde 2023-03-29 14-25-43

@guptarenu240489
Copy link

I am also facing same issue. Any updates on this?

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