Need help in ExtraLeged & LegendScrollBar

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
vivek
Newbie
Newbie
Posts: 40
Joined: Thu Jul 19, 2007 12:00 am

Need help in ExtraLeged & LegendScrollBar

Post by vivek » Wed Aug 05, 2009 3:25 pm

Hi,

I have added multiple Point series in TChart control. Now i have to show Legend for all Point series in/out side of the TChart control. I have tried with ExtraLegend tool for each Point series. Its working fine. But when i add more Point series inside the tchart, i am facing prblem with space to show the ExtraLeged. So if i can add ExtraLeged tool inside other container control(Windows.Panel/GroupBos or other controls...) with scroll bar then i can show all Legend.

How to add ExtraLegend/Legend inside windows/other container controls?

I want to add LegendScrollBar for each ExtraLegend tool. But I am not able to do.

How to add LegendScrollBar in ExtraLegend tool?

With Regards,
Vivek.J

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Need help in ExtraLeged & LegendScrollBar

Post by Sandra » Thu Aug 06, 2009 11:29 am

Hello vivek,

I recomend that see TeeChartFor .Net Demos project, specifically see All Features\Welcome !\Miscellaneous\Legend\Multiple Legends or All Features\Welcome !\Miscellaneous\Legend\Legend ScrollBar Tool. Also you can see All Features\Welcome !\Tools\Extra Legend.


I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

vivek
Newbie
Newbie
Posts: 40
Joined: Thu Jul 19, 2007 12:00 am

Re: Need help in ExtraLeged & LegendScrollBar

Post by vivek » Thu Aug 06, 2009 3:40 pm

Hi Sandra,

I have tried with those example.

My first problem is i am not able to add LegendScrollBar for each Legend/ExtraLeged.
My second problem is if i add more than 10 Point/Bar chart then not able to show all Legend/ExtraLeged at a time. Its hiding one another. If i can add those Legend/ExtraLeged in Panel control then i can show with scroll bar. But i am not able to add Legend inside Panel control.

Is there any solution/ other ways to solve these problem.

with regards,
Vivek.J

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Need help in ExtraLeged & LegendScrollBar

Post by Christopher » Fri Aug 07, 2009 11:16 am

Hello,
vivek wrote: Is there any solution/ other ways to solve these problem.
You could try displaying the extralegend tools in a second chart which would give you more space. There's some code below as an example. As for displaying the legendscrollbar in an extralegendtool, then this is not presently possible. However, this will be possible in the next maintenance release due out in the next 10 days or so, and I've included an example of how this will be able to be used in the code below as well.

Code: Select all

    private Points points1, points2, clonePoints;
    private ExtraLegend extraLegend;
    private LegendScrollBar scrollBar;

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(points1 = new Points());
      tChart1.Series.Add(points2 = new Points());

      points1.FillSampleValues();
      points2.FillSampleValues();

      tChart1.Legend.LegendStyle = LegendStyles.Values;

      HideAll(tChart2);

      tChart2.Tools.Add(extraLegend = new ExtraLegend());
      clonePoints = points2.Clone() as Points;
      clonePoints.Chart = tChart2.Chart;
      clonePoints.Active = false;
      extraLegend.Series = clonePoints;
      extraLegend.Legend.Left = 200;

      //will be available in the next maintenance release
      //tChart2.Tools.Add(scrollBar = new LegendScrollBar());
      //scrollBar.Legend = extraLegend.Legend;
    }

    private void HideAll(TChart tChart)
    {
      tChart.Header.Visible = false;
      tChart.Axes.Visible = false;
      tChart.Walls.Visible = false;
      tChart.Legend.Visible = false;
      tChart.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart.Panel.Gradient.Visible = false;
      tChart.Panel.Color = Color.White;
    }
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply