Add support for static zones #81

wants to merge 1 commit into


None yet

5 participants


I have a customer who required static zones on the gauge as shown below:

I have added this feature and made it configurable with the staticZones option:

var gauge = new Gauge(canvas)
        staticZones: [
            {strokeStyle: "#30B32D", span: 2/3}, // Green
            {strokeStyle: "#FFDD00", span: 1/6}, // Yellow
            {strokeStyle: "#F03E3E", span: 1/6}  // Red

The order of the array matters as the zones are added from left to right.
The sum of all spans should be 1.


Awesome, was looking after the same thing.

+1 for this


I was looking for that as well ! Perfect !

bernii commented Dec 23, 2015

That's awesome. @rsreimer I've given you push access to the repo. Do you mind merging?


@rsreimer: I was very inspired by what you had done and used your fork in a small project together with a couple of other modifications. The net result of that is in the recent commit 364a42b.

Unfortunately and due to my lack of GitHub skills this pull request is now redundant. I propose to close this. Sorry about that, but thanks a bunch and kudos to you for your contibution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment