discourse/app/assets/javascripts/admin/templates/components/dashboard-mini-chart.hbs
Joffrey JAFFEUX 9fabf2543b
dashboard next: activity metrics and new contributors
This commit also introduces a better grouping of data points.
2018-04-26 14:49:41 +02:00

29 lines
666 B
Handlebars

{{#conditional-loading-spinner condition=isLoading}}
<div class="chart-title">
<h3>{{title}}</h3>
{{#if description}}
<span title={{description}}>
{{d-icon "question-circle"}}
</span>
{{/if}}
</div>
<div class="chart-container">
{{#if oneDataPoint}}
<span class="data-point">
{{number chartData.lastObject.y}}
</span>
{{else}}
<div class="chart-trend {{trend}}">
<span>{{number prev30Days}}</span>
{{#if trendIcon}}
{{d-icon trendIcon}}
{{/if}}
</div>
<canvas class="chart-canvas"></canvas>
{{/if}}
</div>
{{/conditional-loading-spinner}}