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

Add support for static zones #81

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
@rsreimer
Collaborator

rsreimer commented Sep 18, 2015

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

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

var gauge = new Gauge(canvas)
    .setOptions({
        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.

@sondrele

This comment has been minimized.

Show comment
Hide comment
@sondrele

sondrele Oct 15, 2015

Awesome, was looking after the same thing.

+1 for this

Awesome, was looking after the same thing.

+1 for this

@eblancart

This comment has been minimized.

Show comment
Hide comment
@eblancart

eblancart Dec 23, 2015

I was looking for that as well ! Perfect !

I was looking for that as well ! Perfect !

@bernii

This comment has been minimized.

Show comment
Hide comment
@bernii

bernii Dec 23, 2015

Owner

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

Owner

bernii commented Dec 23, 2015

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

@kplindegaard

This comment has been minimized.

Show comment
Hide comment
@kplindegaard

kplindegaard Jan 12, 2017

Collaborator

@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.

Collaborator

kplindegaard commented Jan 12, 2017

@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.

@kplindegaard

This comment has been minimized.

Show comment
Hide comment
@kplindegaard

kplindegaard Feb 2, 2017

Collaborator

@rsreimer I am closing your pull request. Sorry that I messed up. Your code still lives on, though 👍

Collaborator

kplindegaard commented Feb 2, 2017

@rsreimer I am closing your pull request. Sorry that I messed up. Your code still lives on, though 👍

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