Here is my situation.
I create a chart that has a somewhat short height and I include the TeeChart legend on the right side.
The problem is, I have too many data series on the graph for this legend. Not all of the series are shown in the legend's single column of data.
There are series missing from the legend because the graph isn't tall enough and the legend will not wrap to a 2nd column of information.
Is there any way to display a 2nd column in the legend?
When I place the legend on the bottom or top, the information will appear on multiple rows with multiple columns so that all of the series are included in the legend. But when placed on the left or right, nothing is done to ensure that all of the data series are shown in the legend.
Is there an option I am missing on the legend or the chart that would allow it to display multiple columns when placed on the left or right side?
Thanks for any help.
-Aaron Peronto
Multiple Columns in Legend?
-
- Newbie
- Posts: 8
- Joined: Wed Oct 21, 2009 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Multiple Columns in Legend?
Hi Aaron,
The only solution I can think of is using a LegendScrollBar tool, for example:
The only solution I can think of is using a LegendScrollBar tool, for example:
Code: Select all
Steema.TeeChart.Tools.LegendScrollBar legendScrollBar1 = new Steema.TeeChart.Tools.LegendScrollBar(tChart1.Chart);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Multiple Columns in Legend?
I've run into the same problem before and the suggested solution will not work if I'd like to print the graph... Any other ideas?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Multiple Columns in Legend?
Hi UserLS,
In that case the only solution I can think of is setting Legend.Alignment to Bottom or Top.
In that case the only solution I can think of is setting Legend.Alignment to Bottom or Top.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 8
- Joined: Wed Oct 21, 2009 12:00 am
- Contact:
Re: Multiple Columns in Legend?
I have the exact same problem in the fact that this graph is usually produced for the purpose of printing.
Thanks for the suggestion.
I don't think bottom or top alignment will work for us in this case. The height of the graph is already small enough that taking any more vertical real estate away from the graph in order to fit the legend above or below it will probably make it too difficult to read.
Thanks for the suggestion.
I don't think bottom or top alignment will work for us in this case. The height of the graph is already small enough that taking any more vertical real estate away from the graph in order to fit the legend above or below it will probably make it too difficult to read.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Multiple Columns in Legend?
Hello everyone,
Ok, I added this as a feature request (TF02014726) to the wish-list to be considered for inclusion in future releases.
Ok, I added this as a feature request (TF02014726) to the wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 8
- Joined: Wed Oct 21, 2009 12:00 am
- Contact:
Re: Multiple Columns in Legend?
Thanks Narcis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Multiple Columns in Legend?
Hello everyone,
After reviewing this issue we think this may be already achieved using existing TeeChart for .NET functionality, for example:
Does this fit your needs?
Thanks in advance.
After reviewing this issue we think this may be already achieved using existing TeeChart for .NET functionality, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
tChart1.Series.Add(typeof(Steema.TeeChart.Styles.Line)).FillSampleValues();
tChart1.Resize += new EventHandler(tChart1_Resize);
DoExtraLegend();
}
Steema.TeeChart.Tools.ExtraLegend extraLegend;
Steema.TeeChart.Styles.Line tmpSeries;
void tChart1_Resize(object sender, EventArgs e)
{
DoExtraLegend();
}
private void DoExtraLegend()
{
tChart1.Draw();
if (tChart1[0].Count > tChart1.Legend.Items.Count)
{
if (extraLegend == null)
{
extraLegend = new Steema.TeeChart.Tools.ExtraLegend(tChart1.Chart);
}
if (tmpSeries == null)
{
tmpSeries = new Steema.TeeChart.Styles.Line(tChart1.Chart);
tmpSeries.Visible = false;
tmpSeries.Color = tChart1[0].Color;
tmpSeries.LinePen.Color = ((Steema.TeeChart.Styles.Custom)tChart1[0]).LinePen.Color;
extraLegend.Series = tmpSeries;
}
tChart1.Tools.Add(extraLegend);
tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Values;
tmpSeries.Clear();
for (int i = tChart1.Legend.Items.Count; i < tChart1[0].Count; i++)
{
tmpSeries.Add(tChart1[0].YValues[i]);
}
extraLegend.Legend.CustomPosition = false;
extraLegend.Legend.Alignment = Steema.TeeChart.LegendAlignments.Right;
}
else
{
if (extraLegend != null)
{
tChart1.Tools.Remove(extraLegend);
}
}
}
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |