Add chart exporting

This commit is contained in:
2019-10-01 20:26:44 -04:00
parent 25eca0e078
commit 37263488f0

View File

@@ -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
} }
}); });