PieChart data binding and culture problem

3 posts, 1 answers
  1. Hubert
    Hubert avatar
    19 posts
    Member since:
    Feb 2012

    Posted 22 Aug 2012 Link to this post

    Hi telerik team,

    i have a problem setting the pie chart data via data binding correctly.

    This is my class for binding:
    internal class AssetsItemData
            public double Value { get; set; }
            public string Color { get; set; }
            public bool IsExploded { get; set; }
            public string Text { get; set; }

    1. The pie chart explodes all parts. I tried bool and string representation for IsExploded.
    How is the ExplodeField set correctly?

    2. There's no TextField field.
    Where can i set the text which is shown in the legend?

    3. Tooltips and label data aren't rendered correctly, because i can not attach a culture to the chart.
    How can i set the culture for a chart?

  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    5925 posts

    Posted 23 Aug 2012 Link to this post

    Hello Hubert,

    We are currently working on adding a field that will allow databinding the series name. You can monitor its progress in this PITS item. It is currently planned for the Q3 2012 release.

    Regarding the ExplodeField functionality  - if you want to have a sector exploded use the string "true", otherwise use and empty string, e.g.:
    protected DataTable GetData()
        DataTable tbl = new DataTable();
        tbl.Columns.Add(new DataColumn("data", typeof(decimal)));
        tbl.Columns.Add(new DataColumn("color", typeof(string)));
        tbl.Columns.Add(new DataColumn("name", typeof(string)));
        tbl.Columns.Add(new DataColumn("exploded", typeof(string)));
        tbl.Rows.Add(new object[] { 100, "#66FFCC", "First", "" });
        tbl.Rows.Add(new object[] { 200, "#FF66FF", "Second", "true" });
        tbl.Rows.Add(new object[] { 300, "#0099FF", "Third", "" });
        tbl.Rows.Add(new object[] { 400, "#BBBBBB", "Fourth", "" });
        return tbl;
    I have logged the idea that you should be able to use the true/false boolean values in the PITS and you can vote, comment and follow it in this PITS item. I have also updated your Telerik points for this report.

    Regarding localization - the chart basically shows data you have entered, it is not a localizable control that has its own tooltips or buttons that require localization. We are working on adding templates for the labels and tooltips which will enable you to show data from your datasource with the desired formats and from the desired columnds. The PITS item related to this is here. For the labels - the LbelsAppearance inner tag offers the DataField that you can use to get a column from the datasource with your desired content.

    All the best,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Hubert
    Hubert avatar
    19 posts
    Member since:
    Feb 2012

    Posted 24 Aug 2012 Link to this post

    Hello Marin,

    thank you for your feedback.
    I voted for all three PITS and looking forward for the Q3 release.

Back to Top