Hi,
Im using Promethus RAD chart. In my user control, I have three charts which are dynamically binding and im having different legend for different charts.
In my ascx, i have this much code and im doing all the things in code behind.
<telerik:radchart ID="RadChart1" SkinsOverrideStyles="false" runat="server" Width="600px" Height="430px" seriespalette="" visible="false" >
<PlotArea>
<Appearance dimensions-width="470" > </Appearance>
</PlotArea>
</telerik:radchart>
Legend Creation in code behind:
Dim lbl1 As New LabelItem
With RadChart1.Legend.Items(0)
.TextBlock.Text =
"81 to 100% - Appraisal criteria fully met"
.Marker.Appearance.FillStyle.MainColor = Drawing.Color.Green
.Marker.Appearance.FillStyle.SecondColor = Drawing.Color.GreenYellow
.TextBlock.Appearance.TextProperties.Color = Color.Black
End With
Dim lbl2 As New LabelItem
With RadChart1.Legend.Items(1)
.TextBlock.Text =
"41 to 80% - Appraisal criteria partially met"
.Marker.Appearance.FillStyle.MainColor = Drawing.Color.Yellow
.Marker.Appearance.FillStyle.SecondColor = Drawing.Color.Silver
End With
With RadChart1.Legend
.AddLabel(lbl1)
.AddLabel(lbl2)
.Appearance.Position.AlignedPosition = Styles.AlignedPositions.BottomLeft
.Appearance.Location = Styles.LabelLocation.OutsidePlotArea
RadChart1.Legend.Visible =
True
End With
IN the ascx control, i have combo box with the chart types... when the user changes the chart type and click refresh , then the next chart is loaded. but when the user just changes the chart type alone, then nothing should happen.
actual result : when the user changes the chart type, chart remains the same..but legend text and marker diasppears completely leaving blank white space. but when i click refresh, then legend comes properly.
Is there a way to keep the legend as it is when the user changes the chart type in combo box.
Could you pls.
Thanks