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

Change label in pie chart for bound SqlDataSource

1 Answer 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chad Steinhauser
Top achievements
Rank 1
Chad Steinhauser asked on 16 Nov 2010, 10:54 PM
I am using a Pie Chart from Telerik Reporting Q2 2010 and would like to change the numeric values it used to create the pie slice with a percentage concatenated with an identifier.  The datasource is a SqlDataSource and I'm using the ItemDataBound event to set various items.

There are two columns in the datasource a TotalCost and Product column.  

I've tried setting a variety of different properties but to no avail.

Chad
Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


       Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
    Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
    Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
    Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
    Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    E

Private
 Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"
Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Su
Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub
Private Sub Chart1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.ItemDataBound


        Chart1.Series(0).DataYColumn = "TOTALCOST"
        Chart1.Series(0).DataXColumn = "PRODUCT"
        Chart1.Series(0).DataLabelsColumn = "PRODUCT"


    End Sub

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Nov 2010, 06:06 PM
Hi Chad Steinhauser,

Our suggestion is to add Calculated Fields to your SqlDataSource to return a percentage concatenated with an identifier. Then you can set the calculated field to the Series.DataLabelsCoumn property.

Greetings,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Chad Steinhauser
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or