Hi
My Legends Symbols are position on the right side of the graph.
By default the Symbols TopLeftPos property is 10.
I would like my Symbols Top to aligned with the top part of the back wall (the top part of the actual graph). I found TopLeftPos == 0 is too high because the offset is from the begining of the chart title. I want the symbols top position to be aligned with the top position of the chart itself (the top position of the back wall)
Is there any way to calculate this (assuming that the chart title font size can be changed by the user)
Thanks.
Legend Positioning
Hello gcrnd,
If you want change legend Position I recomend that use CustomPosition. I make a simple example, that you could use with a similar code.
Code:
Thanks,
If you want change legend Position I recomend that use CustomPosition. I make a simple example, that you could use with a similar code.
Code:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Box box1 = new Steema.TeeChart.Styles.Box(tChart1.Chart);
Steema.TeeChart.Styles.Box box2 = new Steema.TeeChart.Styles.Box(tChart1.Chart);
Steema.TeeChart.Styles.Box box3 = new Steema.TeeChart.Styles.Box(tChart1.Chart);
box1.FillSampleValues();
box2.FillSampleValues();
box3.FillSampleValues();
box1.Position = 1;
box2.Position = 2;
box3.Position = 3;
box1.Color = Color.Blue;
box2.Color = Color.Red;
box3.Color = Color.Orange;
tChart1.Draw();
Rectangle rect = tChart1.Chart.ChartRect;
tChart1.Legend.CustomPosition = true;
tChart1.Legend.Top = rect.Top;
tChart1.Panel.MarginRight = 20;
tChart1.Axes.Bottom.SetMinMax(0.5, 3.5);
}
Best Regards,
Sandra Pazos / 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 |
Hello gcrnd,
But, this property puts the legend in the top of the Chart.
Thanks,
If you want position automatic you can use:Isnt there anything automatic. something that is aligned to the top ?
Code: Select all
Chart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Top;
Thanks,
Best Regards,
Sandra Pazos / 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 |