add Ox.Theme.formatColorPercent
This commit is contained in:
parent
dc03bb506a
commit
86a3e50ed6
1 changed files with 10 additions and 0 deletions
|
@ -139,6 +139,16 @@ Ox.Theme = (function() {
|
|||
.html(values[+index]);
|
||||
};
|
||||
|
||||
/*@
|
||||
formatColorPercent <f> Returns a themed colored element
|
||||
@*/
|
||||
that.formatColorPercent = function(value, decimals, sqrt) {
|
||||
var hue = (sqrt ? Math.sqrt(value) * 10 : value) * 1.2;
|
||||
return renderElement(hue, 'gradient')
|
||||
.css({textAlign: 'center'})
|
||||
.html(Ox.formatNumber(value, decimals) + '%')
|
||||
};
|
||||
|
||||
/*@
|
||||
getColorImage <f> Returns a themed colored image
|
||||
@*/
|
||||
|
|
Loading…
Reference in a new issue