private async void ShowMetrics(string duration)
        {
            if (ChangedMetricsDisplay)
            {
                HideChart.Begin();
            }

            ChangedMetricsDisplay = true;
            var metrics = await StatusPage.GetMetrics(duration);

            if (metrics != null && metrics.Metrics != null && metrics.Metrics.Length > 0)
            {
                var metric = metrics.Metrics[0];
                int pos    = 0;
                _data.Clear();
                datavalues.Clear();
                _max = 0;
                _min = 0;
                for (var i = 0; i < metric.Data.Length; i++)
                {
                    datavalues.Add(i, metric.Data[i]);
                    _data.Add(metric.Data[i].Value);
                    if (metric.Data[i].Value > _max)
                    {
                        _max = metric.Data[i].Value;
                    }
                    if (metric.Data[i].Value < _min || _min == 0)
                    {
                        _min = metric.Data[i].Value;
                    }
                }
                chartCanvas.Invalidate();
                if (HideChart.GetCurrentState() != ClockState.Stopped)
                {
                    HideChart.Stop();
                }
                ShowChart.Begin();
            }
        }