-
Notifications
You must be signed in to change notification settings - Fork 74
Description
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:

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.

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.