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.
And I have attached the screen shot.please reply me.
Protected Sub GetLatestBackup() Try 'To bind the Latest Backup Chart rcLatestBackup.Series.Clear() 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" dtList.Rows.Add(drowSuccess) dtList.AcceptChanges() drowFailed("Count") = dashlist.Item(0).CntFailure drowFailed("Status") = "Failed" dtList.Rows.Add(drowFailed) drowNA("Count") = dashlist.Item(0).CntNA drowNA("Status") = "N/A" dtList.Rows.Add(drowNA) dtList.AcceptChanges() rcLatestBackup.DataSource = dtList rcLatestBackup.IntelligentLabelsEnabled = True rcLatestBackup.DataManager.LabelsColumn = "Status" rcLatestBackup.DataBind() 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">
</Appearance>
<Series>
<telerik:ChartSeries Name="Series 1" Type="Pie" DataYColumn="">
<Appearance LegendDisplayMode="SeriesName">
</Appearance>
</telerik:ChartSeries>
</Series>
</telerik:RadChart>