Header text border too small

TeeChart for ActiveX, COM and ASP
Post Reply
Arieh
Newbie
Newbie
Posts: 28
Joined: Mon Feb 21, 2011 12:00 am

Header text border too small

Post by Arieh » Wed Apr 13, 2011 5:56 am

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)
Attachments
header_tee.png
header_tee.png (10.09 KiB) Viewed 13933 times
header_text2.png
Header text with correct border
header_text2.png (41.92 KiB) Viewed 13948 times
header_text1.png
Header text with border too small
header_text1.png (38.57 KiB) Viewed 13954 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Header text border too small

Post by Yeray » Wed Apr 13, 2011 3:28 pm

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?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Arieh
Newbie
Newbie
Posts: 28
Joined: Mon Feb 21, 2011 12:00 am

Re: Header text border too small

Post by Arieh » Wed Apr 13, 2011 8:16 pm

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Header text border too small

Post by Narcís » Thu Apr 14, 2011 7:21 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Arieh
Newbie
Newbie
Posts: 28
Joined: Mon Feb 21, 2011 12:00 am

Re: Header text border too small

Post by Arieh » Thu May 12, 2011 10:04 am

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)

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Header text border too small

Post by Yeray » Fri May 13, 2011 1:33 pm

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?
test_header.zip
(990 Bytes) Downloaded 690 times
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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Arieh
Newbie
Newbie
Posts: 28
Joined: Mon Feb 21, 2011 12:00 am

Re: Header text border too small

Post by Arieh » Mon May 16, 2011 8:16 am

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.
Attachments
HeadingOverBorder.zip
(2.4 KiB) Downloaded 762 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Header text border too small

Post by Yeray » Mon May 16, 2011 11:30 am

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)?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Arieh
Newbie
Newbie
Posts: 28
Joined: Mon Feb 21, 2011 12:00 am

Re: Header text border too small

Post by Arieh » Mon May 16, 2011 12:19 pm

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

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Header text border too small

Post by Yeray » Tue May 17, 2011 11:07 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply