mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
feat: add statistics chart export button (#3662)
This commit is contained in:
@@ -318,6 +318,18 @@ export default class StatisticsWidget extends DashboardWidget {
|
||||
</>
|
||||
|
||||
{this.noData && <Placeholder text={app.translator.trans(`flarum-statistics.admin.statistics.no_data`)} />}
|
||||
|
||||
{!this.noData && !!this.chart && (
|
||||
<Button
|
||||
className="StatisticsWidget-chartExport Button"
|
||||
icon="fas fa-file-export"
|
||||
onclick={() => {
|
||||
this.chart.export();
|
||||
}}
|
||||
>
|
||||
{app.translator.trans('flarum-statistics.admin.statistics.export_chart_button')}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user