private void PopulateChart(QuandlInfoData newValue)
        {
            lineChart.Series[0].ItemsSource = newValue;
            var axis = lineChart.Axes.OfType <CategoryXAxis>().First();

            axis.ItemsSource = newValue;
        }
Beispiel #2
0
        public static async Task <QuandlInfoData> GetData(string countryCode, string indicator,
                                                          string transformation = null, string collapse = null)
        {
            var data = await GetQuandlDataAsync(authkey, countryCode, indicator, transformation, collapse);

            if (data == null)
            {
                return(null);
            }
            var quandlInfoData = new QuandlInfoData {
                Country = data.Name, DataName = data.Name
            };

            quandlInfoData.AddRange(data.Data.Select(item => new QuandlInfoDataItem()
            {
                Date = Convert.ToDateTime(item[0].ToString()), Value = item[1].ToString().ToDouble()
            }));
            return(quandlInfoData);
        }
 public void OnDataChanged(QuandlInfoData oldValue, QuandlInfoData newValue)
 {
     PopulateChart(newValue);
 }
 private static void OnDataChanged(BindableObject bindable, QuandlInfoData oldvalue, QuandlInfoData newvalue)
 {
     ((ChartView)bindable).OnDataChanged(oldvalue, newvalue);
 }