Ghost/ghost/admin/app/components/dashboard/v5/chart-paid-members.hbs
Simon Backx a41785ae95 Added async loading to dashboard 5 prototype charts
refs https://github.com/TryGhost/Team/issues/1443

- Also moved loading of charts outside of constructors to avoid infinite update loops in Ember
- Random loading delay when using fake states
2022-03-24 15:40:48 +01:00

16 lines
449 B
Handlebars

<h4
class="gh-dashboard5-metric is-main"
{{did-insert this.loadCharts}}
{{did-update this.loadCharts @days}}
>
Paid members
</h4>
{{#if this.loading}}
<div class="gh-dashboard5-loading" style={{html-safe (concat "height: " this.chartHeight "px;")}}/>
{{else}}
<EmberChart
@type={{this.chartType}}
@data={{this.chartData}}
@options={{this.chartOptions}}
@height={{this.chartHeight}} />
{{/if}}