open-nomad/ui/app/templates/components/gauge-chart.hbs

20 lines
850 B
Handlebars
Raw Normal View History

<svg data-test-gauge-svg role="img" height={{this.height}} title="gauge chart">
2020-05-09 00:26:18 +00:00
<defs>
<linearGradient x1="0" x2="1" y1="0" y2="0" class="{{this.chartClass}}" id="{{this.fillId}}">
2020-05-09 00:26:18 +00:00
<stop class="start" offset="0%" />
<stop class="end" offset="100%" />
</linearGradient>
<clipPath id="{{this.maskId}}">
<path class="fill" d="{{this.valueArc}}" />
2020-05-09 00:26:18 +00:00
</clipPath>
</defs>
<g class="canvas {{this.chartClass}}">
<path class="background" d="{{this.backgroundArc}}" />
<rect class="area" x="0" y="0" width="100%" height="100%" fill="url(#{{this.fillId}})" clip-path="url(#{{this.maskId}})" />
2020-05-09 00:26:18 +00:00
</g>
</svg>
<div class="metric">
<h3 data-test-label class="label">{{this.label}}</h3>
<p data-test-percentage class="value">{{format-percentage this.value total=this.total complement=this.complement}}</p>
2020-05-09 00:26:18 +00:00
</div>