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

noGradient not working #270

Closed
byedma opened this issue Jan 9, 2017 · 2 comments
Closed

noGradient not working #270

byedma opened this issue Jan 9, 2017 · 2 comments

Comments

@byedma
Copy link

byedma commented Jan 9, 2017

Hello,

I want static colors, no gradient, i have it as follows in controller.
$scope.noGradient = true; $scope.customSectorsBMI= { ranges: [ { color: '#fff600', lo: 0, hi: 18.5 }, { color: '#00ff00', lo: 18.5, hi: 25 }, { color: '#ff0000', lo: 25, hi: 50 }] };

in HTML, I have

<div justgage title="BMI" value="{{bmi}}" min="0" max="50" label="BMI" no-gradient="{{noGradient}}" custom-sectors="{{customSectorsBMI}}" decimals="0" humanFriendlyDecimal="2" humanFriendly="true"></div>

In this example, for value 23, it should show color, #00ff00. It shows orange.

@Bandit-PsyH
Copy link

Find "function getColor(val,..." in justgage.js and replace
from
if (custSec.length > 0)
to
(custSec.ranges.length > 0)

@robertsLando
Copy link
Collaborator

Fixed

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

3 participants