Files
redash/client/app/visualizations/counter/counter.html
Ralphilius be377b5f59 Add Counter label (#2900)
* Add Counter label

* Update index.js

* Added visualization name as placeholder

* Backward-compatible for visualization name as label
2018-10-14 11:23:20 +03:00

18 lines
760 B
HTML

<counter
ng-class="{'positive': targetValue && trendPositive, 'negative': targetValue && !trendPositive}"
resize-event="handleResize()"
>
<div ng-style="{
'-o-transform': 'scale(' + scale + ')',
'-ms-transform': 'scale(' + scale + ')',
'-moz-transform': 'scale(' + scale + ')',
'-webkit-transform': 'scale(' + scale + ')',
'transform': 'scale(' + scale + ')'
}">
<value ng-if="isNumber">{{stringPrefix}}{{counterValue | number}}{{stringSuffix}}</value>
<value ng-if="!isNumber">{{stringPrefix}}{{counterValue}}{{stringSuffix}}</value>
<counter-target ng-if="targetValue" title="({{targetValue | number}})">({{targetValue | number}})</counter-target>
<counter-name>{{counterLabel}}</counter-name>
</div>
</counter>