This question is locked. New answers and comments are not allowed.
Hi
Ive created a Horizontal Stacked Bar Chart and it looks fine whn I follow the example and only use and array of double.
The problem is when I want to use a y axis value and Id like the Z axis to be a string.
I created a Class ChartResults to hold the values
When I try to fill the sample data. Ive only put one SeriesMapping in the below example to make it easier to read
.............................................
I get the follwoing error
unhandled exception in Silverlight Application
System.FormatException:Input string was not in a correct format
Can you let me know what I am doing wrong?
Regards,
Joe
Ive created a Horizontal Stacked Bar Chart and it looks fine whn I follow the example and only use and array of double.
The problem is when I want to use a y axis value and Id like the Z axis to be a string.
I created a Class ChartResults to hold the values
public ChartResults(double total, string typeValue){ this.Total = total; this.TypeValue = typeValue;}When I try to fill the sample data. Ive only put one SeriesMapping in the below example to make it easier to read
private void FillSampleChartData() { SeriesMapping sm1 = new SeriesMapping(); StackedBarSeriesDefinition d1 = new HorizontalStackedBarSeriesDefinition(); d1.StackGroupName = "Stack1"; sm1.SeriesDefinition = d1; sm1.LegendLabel = "One"; sm1.CollectionIndex = 0;.............................................
ItemMapping im1a = new ItemMapping("TypeValue", DataPointMember.YValue); ItemMapping im1b = new ItemMapping("Total", DataPointMember.XValue); sm1.ItemMappings.Add(im1a); sm1.ItemMappings.Add(im1b); RadChart1.SeriesMappings.Add(sm1); ..........................................................
List<ChartResults[]> itemsSource = new List<ChartResults[]>(); ChartResults[] one= new ChartResults[] { new ChartResults(83, "a"), new ChartResults(75, "a"), new ChartResults(80, "a") }; itemsSource.Add(one); RadChart1.ItemsSource = itemsSource; }I get the follwoing error
unhandled exception in Silverlight Application
System.FormatException:Input string was not in a correct format
Can you let me know what I am doing wrong?
Regards,
Joe