public object Convert(object value, Type targetType, object parameter, string language) { if (value != null && (value is ChartAdornment)) { ChartAdornment pieAdornment = value as ChartAdornment; int index = pieAdornment.Series.Adornments.IndexOf(pieAdornment); SolidColorBrush brush = pieAdornment.Series.ColorModel.GetBrush(index) as SolidColorBrush; return(ApplyLight(brush.Color)); } else if (value != null && (value is string)) { string sampleStatus = value.ToString(); if (sampleStatus == "NEW") { return(new SolidColorBrush(Color.FromArgb(255, 20, 168, 142))); } else if (sampleStatus == "PREVIEW") { return(new SolidColorBrush(Color.FromArgb(255, 246, 141, 56))); } else if (sampleStatus == "UPDATED") { return(new SolidColorBrush(Color.FromArgb(255, 38, 139, 181))); } } return(new SolidColorBrush(Colors.Transparent)); }
public object Convert(object value, Type targetType, object parameter, string language) { ChartAdornment pieAdornment = value as ChartAdornment; if (pieAdornment == null) { return(value); } var model = pieAdornment.Item as Populations; if (model != null) { return(String.Format(model.Countries + " : " + pieAdornment.YData)); } else { var list = pieAdornment.Item as List <object>; string labelData = ""; for (int i = 0; i < list.Count; i++) { var item = list[i] as Populations; labelData = labelData + String.Format(item.Countries + " : " + item.Count); if (i + 1 != list.Count) { labelData = labelData + Environment.NewLine; } } return(labelData); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; int index = pieAdornment.Series.Adornments.IndexOf(pieAdornment); CategoryDataViewModel view = pieAdornment.Series.DataContext as CategoryDataViewModel; var path = (pieAdornment.Series as XyDataSeries3D).YBindingPath; var yValue = ""; if (path == "Plastic") { yValue = view.CategoricalDatas[index].Plastic.ToString(); } else if (path == "Iron") { yValue = view.CategoricalDatas[index].Iron.ToString(); } else if (path == "Metal") { yValue = view.CategoricalDatas[index].Metal.ToString(); } return(path.ToUpper() + " : " + yValue); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; var model = pieAdornment.Item as Model; if (model != null) { return(String.Format(model.Country + " : " + pieAdornment.YData)); } else { var list = pieAdornment.Item as List <object>; string labelData = ""; for (int i = 0; i < list.Count; i++) { var item = list[i] as Model; labelData = labelData + String.Format(item.Country + " : " + item.Count); if (i + 1 != list.Count) { labelData = labelData + Environment.NewLine; } } return(labelData); } }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is ChartAdornment) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format((pieAdornment.Item as ClusterDetails).ID + "\nsize : " + pieAdornment.YData)); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value is ChartAdornment) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format((pieAdornment.Item as CompanyExpense).Expense + " : $ " + pieAdornment.YData)); } return(value); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; if (pieAdornment != null) { return(string.Format((pieAdornment.Item as AccountFA).Capex + " : " + pieAdornment.YData.ToString() + " шт.")); } return(null); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { ChartAdornment pieAdornment = value as ChartAdornment; var seriesInterior = pieAdornment.Series.Interior as SolidColorBrush; seriesInterior = seriesInterior ?? pieAdornment.Series.ColorModel.GetMetroBrushes()[0] as SolidColorBrush; return(ApplyLight(seriesInterior.Color)); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value != null && (value is ChartAdornment)) { ChartAdornment pieAdornment = value as ChartAdornment; int index = pieAdornment.Series.Adornments.IndexOf(pieAdornment); SolidColorBrush brush = pieAdornment.Series.ColorModel.GetBrush(index) as SolidColorBrush; return(ApplyLight(brush.Color)); } return(value); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { ChartAdornment pieAdornment = value as ChartAdornment; int index = pieAdornment.Series.Adornments.IndexOf(pieAdornment); SolidColorBrush brush = pieAdornment.Series.ColorModel.CustomBrushes[index] as SolidColorBrush; return(ApplyLight(brush.Color)); } return(value); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment adornment = value as ChartAdornment; if (adornment != null) { var cultureInfo = new CultureInfo("ru-RU"); var numberFormatInfo = (NumberFormatInfo)cultureInfo.NumberFormat.Clone(); numberFormatInfo.CurrencySymbol = "₽"; return(string.Format("Сумма : " + adornment.YData.ToString("C", numberFormatInfo) + "\n" + "Кол-во ресторанов: " + (adornment.Item as MonthExp).StoreCount)); } return(null); }
public object Convert(object value, Type targetType, object parameter, string language) { ChartAdornment pieAdornment = value as ChartAdornment; if ((pieAdornment.Item as Populations).Countries != null) { return(String.Format((pieAdornment.Item as Populations).Countries)); } else { return(null); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; if (pieAdornment != null) { var cultureInfo = new CultureInfo("ru-RU"); var numberFormatInfo = (NumberFormatInfo)cultureInfo.NumberFormat.Clone(); numberFormatInfo.CurrencySymbol = "₽"; return(string.Format((pieAdornment.Item as StatusSum).Status + " : " + pieAdornment.YData.ToString("C", numberFormatInfo))); } return(null); }
public object Convert(object value, Type targetType, object parameter, string language) { if (value != null) { ChartAdornment pieAdornment = value as ChartAdornment; int index = pieAdornment.Series.Adornments.IndexOf(pieAdornment); var seriesInterior = pieAdornment.Series.Interior as SolidColorBrush; var brushes = pieAdornment.Series.ColorModel.CustomBrushes; seriesInterior = seriesInterior == null ? brushes == null?pieAdornment.Series.ColorModel.GetMetroBrushes()[index] as SolidColorBrush : brushes[index] as SolidColorBrush : seriesInterior; return(ApplyLight(seriesInterior.Color)); } return(value); }
public object Convert(object value, Type targetType, object parameter, string language) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format((pieAdornment.Item as Populations).States)); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format("{0} %", pieAdornment.YData)); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format((pieAdornment.Item as Model).Country + " : " + pieAdornment.YData)); }
public object Convert(object value, Type targetType, object parameter, string language) { ChartAdornment pieAdornment = value as ChartAdornment; return(String.Format("{0} %", pieAdornment.YData)); }