using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Input;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;


using C1.Xaml.Chart;

namespace ChartSamples
{
    //[System.ComponentModel.Description("Labels and tooltips for data points")]
    public partial class Labels : UserControl
    {
        public Labels()
        {
            InitializeComponent();

            c1ChartStatic.Data.ItemNames = "Q1 Q2 Q3 Q4";
        }

    }

    public class DoubleFormatter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            double d = (double)value;
            return d.ToString(parameter.ToString());
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            string strValue = value as string;
            double resultValue;
            if (double.TryParse(strValue, out resultValue))
            {
                return resultValue;
            }
            return double.NaN;
        }
    }
}
