We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

custom legend

Thread ID:





68310 Sep 17,2007 07:12 PM UTC Oct 6,2007 08:44 AM UTC WinForms 5
Tags: Chart
Kamen Yotov
Asked On September 17, 2007 07:12 PM UTC

what is the easiest way for me to render a completely custom legend, hopefully reusing some elements of the existing one where necessary... (e.g. the icon/representation).


Administrator [Syncfusion]
Replied On September 24, 2007 09:10 AM UTC

Hi Kamen,

Thank you for using Syncfusion products.

Please refer the following customizations available for chart legend.

1) The appearance of the Chart Legend in Essential Chart can be customized through various properties exposed by the ChartControl’s ChartLegend object.

2) The symbol of the legend can also be easily customized to have any shape of the user’s choice using the RepresentationType property of the ChartLegend class.

this.chartControl1.Legend.RepresentationType = ChartLegendRepresentationType.Circle;

3) The series-legend that is being displayed next to each data point in a series, can be customized with respect to Size, Style, Color etc. using the various properties supported by corresponding ChartSeries Style.

foreach (ChartSeriesLegendItem item in this.chartControl1.Legend.Items)
item.Series.Style.Font.Facename = fontname;

4) ChartLegendFilterItems Event handler is used to change the collection of Legend Items that the legend renders.

5) The chart legend can be positioned easily anywhere in the ChartControl. The position of the chart legend can be changed by using Position property of the ChartLegend class.

this.chartControl1.LegendPosition = ChartDock.Left;

6) The items of chart legend can be displayed in multiple rows and columns by adjusting the RowsCount/ColumnsCount properties of the ChartLegend class.

this.chartControl1.Legend.RowsCount = 1; this.chartControl1.Legend.ColumnsCount = 2;

Please refer sample for above said features in the below location.

[Install drive]:\Documents and Settings\USERNAME\My documents\ Syncfusion \..\Chart.Windows\Samples\2.0\Chart Legend\ChartLegend

Can you please elaborate on reuse mechanism in customizing the chart legend?

Also please let me know if you have any other queries.


Kamen Yotov
Replied On September 25, 2007 01:37 PM UTC

Thanks for replying.

I need to render a completely custom legend, as I believe what I need is not supported in the ChartLegend properties...

For example, I need to render the legened as a table, where the columns represent different statistics for the series... see attached mock-up.

I am close to deciding to tell the chart not to show a legend and then use essential grid to render a custom legend below the chart, but i wanted to ping your opinion.



Administrator [Syncfusion]
Replied On October 2, 2007 05:58 PM UTC

Hi Kamen,

Thanks for the update.

To achieve your requirement you can embed Essential Grid on the Chartcontrol since ChartLegend is rendered as an image, you cannot display statistics information in ChartLegend.

Please let me know if you have any other queries.


Kamen Yotov
Replied On October 5, 2007 04:14 PM UTC

I did exactly that -- used a grid, but I did not embed it in the chart control... I just put it below the chart as a separate control. What do you mean by embed? Is there a way to integrate it more tightly, so that e.g. I can drag it around like the original legend?

Administrator [Syncfusion]
Replied On October 6, 2007 08:44 AM UTC

Hi Kamen,

Thanks for the update.

You can place GridControl over the ChartControl. But you cannot integrate tightly with GridControl. Sorry if I was not clear to you.

Please let us know if you require any further assistance.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon