Skip to content

Markers are not being drawn properly. #141

@Mforcen

Description

@Mforcen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions