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

Problems with Pie Chart Legend

1 Answer 60 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 15 Jan 2011, 12:39 AM
I assumed I would be able to find a solution to this issue very easily, but unfortunately I haven't been able to.

I have a pie chart that I want to simply display only 2 pieces.  I have a sql command that uses the UNION command to join my two queries into one column for the chart.  That is working fine, however I do not know how to change the pie charts legend to show the 2 colors, and add custom text for each color.

I changed the LegendDisplayMode to show ItemLabels.  Also, I am trying to set the legend text by using:
Protected Sub RadChart1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart1.ItemDataBound
        e.SeriesItem.Name = "Purchases"
        e.SeriesItem.Name = "Returns"
    End Sub

This obviously only shows "Returns" on the legend, and does so twice for both slice colors.  How do I change both of them?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 20 Jan 2011, 09:11 AM
Hello Shawn,

To show Series Items Labels in Pie's Legend you can follow this help topic and set the LegendDisplayMode property to ItemLabels.
Use the TextBlock property of the Legend to control the default text and appearance of each Legend Item.

Best wishes,
Evgenia
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Chart (Obsolete)
Asked by
Shawn
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or