Page 1 of 1
Need help in ExtraLeged & LegendScrollBar
Posted: Wed Aug 05, 2009 3:25 pm
by 13046152
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
Re: Need help in ExtraLeged & LegendScrollBar
Posted: Thu Aug 06, 2009 11:29 am
by 10050769
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,
Re: Need help in ExtraLeged & LegendScrollBar
Posted: Thu Aug 06, 2009 3:40 pm
by 13046152
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
Re: Need help in ExtraLeged & LegendScrollBar
Posted: Fri Aug 07, 2009 11:16 am
by Chris
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;
}