TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
Chris.CHWU
- Newbie
- Posts: 57
- Joined: Wed Jan 30, 2008 12:00 am
Post
by Chris.CHWU » Wed Aug 20, 2008 2:33 am
Hi,
When I using the following code
Code: Select all
Dim lines As New Steema.TeeChart.Styles.Line
TChart1.Series.Add(lines)
lines.Add(0, 3)
lines.Add(1, 4)
lines.Add(2, 5)
lines.Add(3, 6)
TChart1.Legend.CustomPosition = True
TChart1.Legend.Left = 10
TChart1.Legend.Top = 10
TChart1.Legend.CheckBoxes = True
TChart1.Legend.Height = 50
TChart1.Legend.Width = 50
TChart1.Legend.AutoSize = False
When I clicked the check button twice on legend, the legend will increase the width.
How to fixed the legend width?
-
Pep
- Site Admin
- Posts: 3295
- Joined: Fri Nov 14, 2003 5:00 am
-
Contact:
Post
by Pep » Wed Aug 20, 2008 12:02 pm
Hello Chris,
yes, you're correct, it's a bug. It has been added on our defect list (TF02013331) and a fix for it will be considered to inclusion in one of the next maintenance releases. In meantime , a workaround would be to paint the legend shape manually into the Chart using similar code to the following one :
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
tChart1.Legend.Transparent = true;
tChart1.Graphics3D.Rectangle(10, 10, 250, 250);
tChart1.Legend.Paint();
}