This is a migrated thread and some comments may be shown as answers.

Stack Chart Title

4 Answers 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Meenakshi
Top achievements
Rank 1
Meenakshi asked on 07 Jan 2011, 07:41 AM
Hi,

I have a data as following:
Data1:40,10,15,20,15
Data2:1,9,10,15,15
Data3:97.56,52.6,60,57.14,50 (Where Data3 = (data1/(data1+data2))*100)

Now i have plotted a data of stackchart with the help of data1 and data2. But i want to show data3 on top of stackchart bar. how this can be acheived. Please help.

Thanks for your Help,
Meenakshi

4 Answers, 1 is accepted

Sort by
0
Manishkumar
Top achievements
Rank 1
answered on 07 Jan 2011, 01:21 PM
Hi,

I have a same issue. Please help.

Thanks and Regards,
Manish
0
Evgeni "Zammy" Petrov
Telerik team
answered on 10 Jan 2011, 08:57 AM
Hi Meenakshi,

You can include the three series in a stacked/stacked100 scenario, and following their order, the third will be positioned on top. Can you let me know how this approach meets your requirements?

Greetings,

Evgeni "Zammy" Petrov
the Telerik team

 

Browse the videos here>> to help you get started with RadControls for Silverlight
0
Manishkumar
Top achievements
Rank 1
answered on 11 Jan 2011, 07:12 AM
Hi,

I dont want to Show the data 3 stack... Just i want to show only number above the stack chart.


Thanks and Regards,
Manish
0
Evgenia
Telerik team
answered on 13 Jan 2011, 04:26 PM
Hello Meenakshi,

You can show the Data3 as a Label of the Second Series in your StackedBar chart. To achieve it  create a chart databound using  a list of business objects. In order to map to such kind of business objects, you have to create a new instance of SeriesMapping. Each SeriesMapping has ItemMapping property. For each ItemMappings the following properties are set - DataPointMember and FieldName which specifies from where the data should be taken. You can find more information about this in our help article - http://www.telerik.com/help/silverlight/radchart-populating-with-data-data-binding-with-manual-series-mapping.html
 To set the mathematical function (CustomLabel = (data1/(data1+data2))*100) to the Label property just add it in the constructor of your class:
public class Company
        {
            public double CustomLabel { get; set; }
            public double Value1 { get; set; }
            public double Value2 { get; set; }
  
            public Company(double value1, double value2)
            {
                Value1 = value1;
                Value2 = value2;
                CustomLabel = (value1/(value1+value2))*100;
            }
        }
You can find a sample project attached demonstrating the mentioned approach.

I hope this is helpful.

All the best,
Evgenia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Meenakshi
Top achievements
Rank 1
Answers by
Manishkumar
Top achievements
Rank 1
Evgeni "Zammy" Petrov
Telerik team
Evgenia
Telerik team
Share this question
or