How to create multiple row/ column of legend with single series of chart

hi all,
Herewith attached a sample chart that create by using delphi.How can syncfusion create a chart as in example (graph_Delphi.JPG) as i found that with only 1 series i can't create multiple row / column of data for my legend (graph_Syncfusion.JPG).

thanks..

Hwee Hoon

sample graph.zip

1 Reply

MW Melba Winshia Syncfusion Team September 20, 2007 05:20 AM UTC

Hi,

Sorry for the delay in responding.

If your intention is to create a chart with multiple legends, it can be achieved by using the FilterItems event.

private void Legend_FilterItems(object sender, ChartLegendFilterItemsEventArgs e)
{

e.Items.Clear();
Syncfusion.Windows.Forms.Chart.ChartLegendItem s0 = new ChartLegendItem();
e.Items.Insert(0, s0);
e.Items[0].Type = ChartLegendItemType.Rectangle;
e.Items[0].Text = "-Best-In-Class";
e.Items[0].Interior = new Syncfusion.Drawing.BrushInfo(Color.Green);

Syncfusion.Windows.Forms.Chart.ChartLegendItem s1 = new ChartLegendItem();
e.Items.Insert(1, s1);
e.Items[1].Type = ChartLegendItemType.Rectangle;
e.Items[1].Text = "-Your Organization";
e.Items[1].Interior = new Syncfusion.Drawing.BrushInfo(Color.Yellow);

Syncfusion.Windows.Forms.Chart.ChartLegendItem s2 = new ChartLegendItem();
e.Items.Insert(2, s2);
e.Items[2].Type = ChartLegendItemType.Rectangle;
e.Items[2].Text = "-Average";
e.Items[2].Interior = new Syncfusion.Drawing.BrushInfo(Color.Lavender);

}

Please refer the sample in the below link which illustrates the above.

http://websamples.syncfusion.com/samples/Chart.Web/5.2.0.25/68294/main.htm

If I have misunderstood your requirement, could you please explain me in detail, so that I can work in depth and try to send a better solution?

Thanks,
Melba

Loader.
Up arrow icon