Hi,
How can I implement gradient in legends of a piechart?
Regards,
Suvigya
You can try using:
this.UltraChart1.ChartDrawItem += new ChartDrawItemEventHandler(UltraChart1_ChartDrawItem);
…
private void UltraChart1_ChartDrawItem(object sender, ChartDrawItemEventArgs e)
{
Box box = e.Primitive as Box;
if (box == null)
return;
}
if (string.IsNullOrEmpty(box.Path))
if (box.Path.EndsWith("Legend") == false)
// this is the external legend box
if (box.Column == -1)
// you can use "box.Column" and "box.Row" to determine which series the box belongs to
Color currentFill = box.PE.Fill;
box.PE = new PaintElement(Color.White, currentFill, Infragistics.UltraChart.Shared.Styles.GradientStyle.Vertical);