mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-17 02:51:39 -05:00
Add chart exporting
This commit is contained in:
@@ -6,6 +6,10 @@ import { WeatherReadingGrouped } from '../../../models/weather/weather-reading-g
|
|||||||
import { ActivatedRoute, ParamMap } from '@angular/router';
|
import { ActivatedRoute, ParamMap } from '@angular/router';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
|
||||||
|
import * as Highcharts from 'highcharts';
|
||||||
|
import HC_exporting from 'highcharts/modules/exporting';
|
||||||
|
HC_exporting(Highcharts);
|
||||||
|
|
||||||
enum TimeSpan {
|
enum TimeSpan {
|
||||||
Last24Hours,
|
Last24Hours,
|
||||||
Day,
|
Day,
|
||||||
@@ -113,7 +117,7 @@ export class WeatherChartsComponent implements OnInit {
|
|||||||
type: 'line'
|
type: 'line'
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text: ''
|
text: this.timeSpanItems[TimeSpan.Last24Hours]
|
||||||
},
|
},
|
||||||
credits: {
|
credits: {
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -175,6 +179,9 @@ export class WeatherChartsComponent implements OnInit {
|
|||||||
series: seriesData,
|
series: seriesData,
|
||||||
legend: {
|
legend: {
|
||||||
enabled: true
|
enabled: true
|
||||||
|
},
|
||||||
|
exporting: {
|
||||||
|
enabled: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user