This is a migrated thread and some comments may be shown as answers.

Legend Appearance and series item Position

6 Answers 214 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Arima
Top achievements
Rank 1
Arima asked on 03 Apr 2011, 12:32 PM
Hi All

I am having two questions.

1.  I am developing line charts. I have two chart series items. One of the chart series style is Line another one is Dashed line. I want  the legend appearance exactly like how the series item is appeared in the chart. (like ----------- and -  -  - -  - - )

2. Chart series labeltext values are overlapping. I want to keep the labeltext value at the end of series item. I have marked in the attached image.


Regards
Arima

6 Answers, 1 is accepted

Sort by
0
Arima
Top achievements
Rank 1
answered on 03 Apr 2011, 02:02 PM
Hi All

For my second query, i applied below code. it is working fine as expected. but both the series having similar values, it is overlapping.

csi.Label.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.

AlignedPositions.Right;

 

 

csi.Label.Appearance.LabelLocation = Telerik.Charting.Styles.

StyleSeriesItemLabel.ItemLabelLocation.Outside;

 

0
Vladimir Milev
Telerik team
answered on 06 Apr 2011, 02:52 PM
Hello Arima,

You can try to use the IntelligentLabels feature of RadChart.

Kind regards,
Vladimir Milev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rabeek Ahamed
Top achievements
Rank 1
answered on 06 Apr 2011, 03:03 PM
Hi Vladimir Milev

I applied that IntelligentLabel property. It is working fine.

Still i could not find solution for my first question.

Regards
Arima

0
Accepted
Evgenia
Telerik team
answered on 11 Apr 2011, 08:40 AM
Hi Rabeek,

You can handle the BeforeLayout or PrePaint events of RadChart and customize the Marker.Appearance.Figure of the legend items to any of the predefined figures (unfortunately there is no predefined dashed line figure):
  • Cross
  • Diamond
  • Ellipse
  • Circle
  • Rectangle
  • Star3
  • Star4
  • Star5
  • Star6

What I can suggest you is to set the Figure of the LegendItem Marker to Rectangle and set custom Height  and Width for it so that it looks like a Line:

Copy Code
protected void RadChart1_BeforeLayout(object sender, EventArgs e)
   {
           RadChart1.Legend.Items[1].Marker.Appearance.Figure = "Rectangle";
           RadChart1.Legend.Items[1].Marker.Appearance.Dimensions.AutoSize = false;
           RadChart1.Legend.Items[1].Marker.Appearance.Dimensions.Width = 6;            
           RadChart1.Legend.Items[1].Marker.Appearance.Dimensions.Height = 2;
   }
You can find more information on customizing the legend appearance here.

Best wishes,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stephen
Top achievements
Rank 1
answered on 16 Oct 2013, 05:50 PM
Have there been any recent changes to add the functionality for dashed/dotted legend markers?

I currently have a graph that is displaying a number of series from different publishers and different data sources. I am formatting each publisher to be a different line style (solid, dot, dash-dot), while each line is a different color. I can format the legend markers to look like solid lines with the rectangle, but am not able to show the dashed or dash-dot styles. The only way I can currently think to solve this is to upload a picture for each line style and color and add that to the image fill style (which would be a lot of work on the front and not maintainable when I need to change the color scheme).
0
Petar Kirov
Telerik team
answered on 21 Oct 2013, 05:48 PM
Hi Stephen,

I am afraid that the feature you require hasn't been implemented yet. Since the majority of our development efforts moved to our newer charting solution (RadHtmlChart) I would recommend submitting a new feature request for the newer control as it is more likely to be implemented in the foreseeable future.

Regards,
Petar Kirov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (Obsolete)
Asked by
Arima
Top achievements
Rank 1
Answers by
Arima
Top achievements
Rank 1
Vladimir Milev
Telerik team
Rabeek Ahamed
Top achievements
Rank 1
Evgenia
Telerik team
Stephen
Top achievements
Rank 1
Petar Kirov
Telerik team
Share this question
or