/// <summary>
/// create the chart legend
/// </summary>
/// <param name="node"></param>
/// <returns></returns>
private IContent CreateChartLegend(XmlNode node)
{
try
{
ChartLegend legend = new ChartLegend(this.Chart.Document, node);
legend.Chart = this.Chart;
//legend.Node = node;
this.Chart.ChartLegend = legend;
ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart);
XmlNode nodeStyle = csp.ReadStyleNode(legend.StyleName);
IStyle style = csp.ReadStyle(nodeStyle, "legend");
if (style != null)
{
legend.Style = style;
this.Chart.Styles.Add(style);
}
return(legend);
}
catch (Exception ex)
{
throw new AODLException("Exception while creating the chart legend!", ex);
}
}