I need Help on pie chart..Please

Thread is closed for posting
2 posts, 0 answers
  1. john
    john avatar
    4 posts
    Member since:
    Aug 2011

    Posted 05 Sep 2011 Link to this post

    I need to change the colors on pie chart.code is here.if success then green color, for failure red,for Not applicable fill with gray color.
    And I have attached the screen shot.please reply me.

    Protected Sub GetLatestBackup()
                'To bind the Latest Backup Chart
                Dim dbNutBackupModel As New NutBackupModel
                Dim dashlist As List(Of DashBoardList)
                dashlist = (From objdashboardlist In dbNutBackupModel.Getbackupstatus _
                           Select New DashBoardlist With {.CntSuccessful = (CInt(objdashboardlist(4))), .CntFailure = (CInt(objdashboardlist(5))), .CntNA = (CInt(objdashboardlist(6)))}).ToList()
                ' Dim intSuccessful As Integer = dashlist.IndexO
                Dim dtList As New DataTable("StatusList")
                dtList.Columns.Add("Count", GetType(Integer))
                dtList.Columns.Add("Status", GetType(String))
                Dim drowSuccess As DataRow = dtList.NewRow()
                Dim drowFailed As DataRow = dtList.NewRow()
                Dim drowNA As DataRow = dtList.NewRow()
                drowSuccess("Count") = dashlist.Item(0).CntSuccessful
                drowSuccess("Status") = "Successful"
                drowFailed("Count") = dashlist.Item(0).CntFailure
                drowFailed("Status") = "Failed"
                drowNA("Count") = dashlist.Item(0).CntNA
                drowNA("Status") = "N/A"
                rcLatestBackup.DataSource = dtList
                rcLatestBackup.IntelligentLabelsEnabled = True
                rcLatestBackup.DataManager.LabelsColumn = "Status"
                rcLatestBackup.Series(0).Name = "Status"
                rcLatestBackup.Series(0).Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.ItemLabels
                rcLatestBackup.Series(0).ActiveRegionToolTip = "#ITEM: #%"
                rcLatestBackup.ChartTitle.TextBlock.Text = " Latest backup status- " & " Success : " & dashlist.Item(0).CntSuccessful & "  " & " Failure : " & dashlist.Item(0).CntFailure
                rcLatestBackup.Series(0).Appearance.LabelAppearance.Visible = True
            Catch ex As Exception
                CommonFunctions.ErrorLog("Dashboard.aspx.vb", "GetLatestBackup", ex)
            End Try
        End Sub
    <telerik:RadChart ID="rcLatestBackup" runat="server" DefaultType="Pie" AutoTextWrap="true" SeriesOrientation="Vertical">
                                       <Appearance Dimensions-Width="710px" ImageQuality="HighQuality">
                                   <telerik:ChartSeries Name="Series 1" Type="Pie" DataYColumn="">
                                   <Appearance LegendDisplayMode="SeriesName">
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 05 Sep 2011 Link to this post




    ChartSeries chartSeries = radChart.CreateSeries("Count",

    Jayesh Goyani
  3. DevCraft R3 2016 release webinar banner
Back to Top