Stack Chart Title

5 posts, 0 answers
  1. Meenakshi
    Meenakshi avatar
    8 posts
    Member since:
    Dec 2010

    Posted 07 Jan 2011 Link to this post

    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
  2. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 07 Jan 2011 Link to this post

    Hi,

    I have a same issue. Please help.

    Thanks and Regards,
    Manish
  3. Evgeni "Zammy" Petrov
    Admin
    Evgeni "Zammy" Petrov avatar
    168 posts

    Posted 10 Jan 2011 Link to this post

    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
  4. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 11 Jan 2011 Link to this post

    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
  5. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 13 Jan 2011 Link to this post

    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>>
Back to Top