Page 1 of 1
Header text border too small
Posted: Wed Apr 13, 2011 5:56 am
by 16658606
I have a chart, with a predefined heading.
After changing the heading programatically, then the border around the heading is too small for it.
(See header_text1.png).
If I go into the chart properties, and click the "Text" tab (header_text2.png), then the header refreshes itself correctly.
This defect is new in TChart 2010.
As a workaround in the code, how do I do the equivalent of pressing the "Text" tab?
Does it make a difference if I change the heading programmatically via
axTChart1.Header.Text[0] = "Heading that goes over the required area";
or
axTChart1.Header.Text.Clear();
axTChart1.Header.Text.Add("Heading that goes over the required area");
If I compare the two .tee files in text format, then the difference is whether "Title.Font.Height" is -17 or -16. (see header_tee.png)
Re: Header text border too small
Posted: Wed Apr 13, 2011 3:28 pm
by yeray
Hello Arieh,
I'm trying to reproduce it with the following code but I can't. Could you please check it?
Code: Select all
private uint ColorToUint(Color c)
{
return (UInt32)(System.Drawing.ColorTranslator.ToWin32(c));
}
private void InitializeChart()
{
axTChart1.Aspect.View3D = false;
axTChart1.AddSeries(TeeChart.ESeriesClass.scLine);
axTChart1.Series(0).FillSampleValues();
axTChart1.Header.Text = "Heading that goes over the required area";
axTChart1.Header.Font.Size = 12;
axTChart1.Header.Font.Name = "Times New Roman";
axTChart1.Header.Font.Bold = true;
axTChart1.Header.Frame.Color = ColorToUint(Color.Blue);
axTChart1.Header.ShapeStyle = TeeChart.EChartObjectShapeStyle.fosRoundRectangle;
axTChart1.Header.Transparent = false;
}
If you still have problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
Arieh wrote:Does it make a difference if I change the heading programmatically via axTChart1.Header.Text[0] = "Heading that goes over the required area";or axTChart1.Header.Text.Clear(); axTChart1.Header.Text.Add("Heading that goes over the required area");
I don't think so. Have you found any difference?
Re: Header text border too small
Posted: Wed Apr 13, 2011 8:16 pm
by 16658606
I can send a .tee file for you to look at, however the upload attachment mechanism doesn't allow uploading .tee files.
How I email it to you?
Re: Header text border too small
Posted: Thu Apr 14, 2011 7:21 am
by narcis
Hi Arieh,
Please try compressing the *.tee file in a zip package and upload it again here. Alternatively you can post it at our
upload page.
Thanks in advance.
Re: Header text border too small
Posted: Thu May 12, 2011 10:04 am
by 16658606
I tried to reproduce this scenario on multiple machines.
It occurs specifically when the operating system of the client browser with the TeeChart2010.ocx is Windows7.
(It works if the operating system of the client browser with the TeeChart2010.ocx is XPSP3, or Windows 2008 Server).
The following factors did not effect the defect:
Target machine operating system (XP vs Win2008Server), client browser (IE7 vs IE8)
Re: Header text border too small
Posted: Fri May 13, 2011 1:33 pm
by yeray
Hello Arieh,
We've tried the attached example in Windows 7 both as server&client (localhost) and in Windows 7 as client with Windows XP SP3 as server.
Could you please try it?
If it works fine for you but not your application, the problem might be caused by some particular setting in your application. If that's the case, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Re: Header text border too small
Posted: Mon May 16, 2011 8:16 am
by 16658606
Hi,
The problem occurs when the operating system hosting the browser is 64 bit.
It shows the header correctly in Windows 7 (32 bit), but incorrectly in Windows 7 (64 bit).
The example with test_header.zip shows the header correctly even within 64 bit.
Attached is a zip of a tee file that shows the header incorrectly when using a browser with a 64 bit operating system.
Re: Header text border too small
Posted: Mon May 16, 2011 11:30 am
by yeray
Hello Arieh,
I'm afraid I can't reproduce the problem here with a Windows 7 x64 machine. I've ran your example both from localhost in that Win7 x64 machine and using it as client and a WinXP SP3 as server. I always get a good title.
Are you sure you are using the latest TeeChart AX version available (v2010.0.0.3)?
Re: Header text border too small
Posted: Mon May 16, 2011 12:19 pm
by 16658606
The issue occurs on a Windows 7 64 bit browser with 2010.0.0.3 of the ocx installed.
I tried with a different machine with the similar specs and it worked fine, so I'm not sure it is 64 bit related.
However the following line of code refreshes the font size, and causes the border with to be displayed correctly, and is therefore a workaround to the problem:
TChart2.Header.Font.Size = TChart2.Header.Font.Size
Re: Header text border too small
Posted: Tue May 17, 2011 11:07 am
by yeray
Hi Arieh,
Well, I'm happy to hear you've found a workaround. But if you find a consistent way to reproduce the problem, don't hesitate to let us know.