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

Is there a way to add a GOAL setting to the chart? #7

Closed
bpawlak opened this issue Jan 11, 2013 · 1 comment
Closed

Is there a way to add a GOAL setting to the chart? #7

bpawlak opened this issue Jan 11, 2013 · 1 comment

Comments

@bpawlak
Copy link

bpawlak commented Jan 11, 2013

Enhancement suggestion: Would like to be able to show current percentage (e.g. 40%) with a target/goal of 60%. When the current value = goal, change the color of the bar (to be green), otherwise the bar is red. Something like the below...
goals

@rendro
Copy link
Owner

rendro commented Jan 14, 2013

You can configure the chart with a callback function as barColor option to handle the different colors:

$('.chart').easyPieChart({
    barColor: function(percent) {
        return (percent > 67) ? 'green' : 'red';
    },
    animate: 1000
});

The line you drew it is not implemented and I won't add it to the repository because this is a very special case and I want the plugin to be as universal as possible. But feel free to add it by your self, this is one of the advantages of open source code ;)

@rendro rendro closed this as completed Jan 14, 2013
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

2 participants