Completed
Last Updated: 16 Jun 2016 06:03 by ADMIN
ADMIN
Dimitar
Created on: 03 Jun 2016 10:38
Category: ChartView
Type: Bug Report
0
FIX. RadChartView - custom LegendItems do not have text.
To reproduce:
LegendItem item = new LegendItem();
item.Element.BorderColor = Color.Black;
item.Element.BackColor = Color.Yellow;
item.Title = "Custom item";
this.radChartView1.ChartElement.LegendElement.Items.Add(item);

Workaround:
class MyLegendItem : LegendItem
{
    string title = "";
    protected override void SetLegendTitle(string title)
    {
        base.SetLegendTitle(title);
         
        if (this.Element is LegendItemStyleElement)
        {
            this.title = title;
        }
    }
    protected override string GetLegendTitle()
    {
        if (this.Element is LegendItemStyleElement)
        {
           return title;
        }
        return base.GetLegendTitle();

    }
}
0 comments