This question is locked. New answers and comments are not allowed.
Hi there,
I'm having some issues with basic number formatting in chart item labels and tooltips. For example, in the following code, I would expect the values in labels/tooltips to have 2 decimal places:
Unfortunately, that doesn't seem to work. Am I missing something here? I'm working with version 2010.3.1110.1040.
Thank you,
Petr
I'm having some issues with basic number formatting in chart item labels and tooltips. For example, in the following code, I would expect the values in labels/tooltips to have 2 decimal places:
public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); SeriesMapping sm = new SeriesMapping() { SeriesDefinition = new BarSeriesDefinition() }; sm.ItemMappings.Add(new ItemMapping("X", DataPointMember.XValue)); sm.ItemMappings.Add(new ItemMapping("Y", DataPointMember.YValue)); sm.ItemMappings.Add(new ItemMapping("Y", DataPointMember.Label)); sm.ItemMappings.Add(new ItemMapping("Y", DataPointMember.Tooltip)); sm.SeriesDefinition.ShowItemLabels = true; sm.SeriesDefinition.ItemLabelFormat = "0.00"; sm.SeriesDefinition.ShowItemToolTips = true; sm.SeriesDefinition.ItemToolTipFormat = "0.00"; radChart1.SeriesMappings.Add(sm); List<Data> data = new List<Data>(); Random r = new Random(); for (int i = 0; i < 12; i++) { data.Add(new Data() { X = i, Y = r.NextDouble() * 100 }); } radChart1.ItemsSource = data; } } public class Data { public double X { get; set; } public double Y { get; set; } }Unfortunately, that doesn't seem to work. Am I missing something here? I'm working with version 2010.3.1110.1040.
Thank you,
Petr