示例#1
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value != null)
     {
         if (value is InteractiveCursorLabelContent)
         {
             InteractiveCursorLabelContent v1 = (InteractiveCursorLabelContent)value;
             if (v1.DataPoint != null)
             {
                 double ab = (double)v1.DataPoint.Y;
                 return(Math.Round(ab).ToString());
             }
         }
     }
     return(value);
 }
示例#2
0
 public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
 {
     if (value != null)
     {
         if (value is InteractiveCursorLabelContent)
         {
             InteractiveCursorLabelContent v1 = (InteractiveCursorLabelContent)value;
             if (v1.DataPoint != null)
             {
                 double ab       = (double)v1.DataPoint.Y;
                 string mystring = ab.ToString().Substring(0, 3);
                 return(mystring);
             }
             //else
             //{
             //    return v1.Y.ToString().Substring(0, 5);
             //}
         }
     }
     return(value);
 }
示例#3
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value != null)
            {
                if (value is InteractiveCursorLabelContent)
                {
                    InteractiveCursorLabelContent v1 = (InteractiveCursorLabelContent)value;
                    if (v1.DataPoint != null)
                    {
                        DateTime ab = DateTime.FromOADate(v1.DataPoint.X);

                        return(String.Format("{0:dd/MM/yyyy}", ab));           //(v1.ToString("#0.00"));
                    }
                    else
                    {
                        return(v1);
                    }
                }
            }
            return(value);
        }