Legend Appearance and series item Position

Thread is closed for posting
7 posts, 1 answers
  1. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 03 Apr 2011 Link to this post

    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
  2. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 03 Apr 2011 Link to this post

    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;

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 06 Apr 2011 Link to this post

    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
  5. Rabeek Ahamed
    Rabeek Ahamed avatar
    20 posts
    Member since:
    Sep 2012

    Posted 06 Apr 2011 Link to this post

    Hi Vladimir Milev

    I applied that IntelligentLabel property. It is working fine.

    Still i could not find solution for my first question.

    Regards
    Arima

  6. Answer
    Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 11 Apr 2011 Link to this post

    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
  7. Stephen
    Stephen avatar
    1 posts
    Member since:
    Oct 2013

    Posted 16 Oct 2013 Link to this post

    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).
  8. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 21 Oct 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017