TeeChart Editor issues

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

TeeChart Editor issues

Post by bairog » Sat Dec 29, 2018 6:23 am

Hello.
I'm using TeeChart Pro 4.2018.12.17 and facing the following issues with TeeChart Editor (ringh click on chart and then "Edit"):
  1. If I open any "Text" settings block (for example for "Titles"):
    Image
    and change "Font quality" to, for example, AntiAlias - then the following line is added

    Code: Select all

    this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
    But if I open the same setting in TeeChart Editor again - "Font quality" is automatically dropped to initial value (ClearTypeGridFit) and that line of code is automatically removed
  2. If I open TeeChart Editor while Visual Studio is debugging my application (to see some settings only, not to change them of course) and the I click "Close" button - my IDE hangs for a while and then crashes. Looks like TeeChart Editor tries to save some settings and fails. But why does it do this - I did not change any settings?

    That is relevant for both Visual Studio 2010 SP1 and Visual Studio 2017.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: TeeChart Editor issues

Post by Christopher » Mon Dec 31, 2018 8:18 am

bairog wrote:
Sat Dec 29, 2018 6:23 am
But if I open the same setting in TeeChart Editor again - "Font quality" is automatically dropped to initial value (ClearTypeGridFit) and that line of code is automatically removed
This is expected behavior. The TextRenderingHint property of the Aspect class is independent of the Quality property of the Font class even though the two properties are of the same type (System.Drawing.Text.TextRenderingHint). This was designed to enable each instance of the Font class to use a particular value of System.Drawing.Text.TextRenderingHint over and above the more universal TextRenderingHint property of the Aspect class.
bairog wrote:
Sat Dec 29, 2018 6:23 am
[*] If I open TeeChart Editor while Visual Studio is debugging my application (to see some settings only, not to change them of course) and the I click "Close" button - my IDE hangs for a while and then crashes. Looks like TeeChart Editor tries to save some settings and fails. But why does it do this - I did not change any settings?
Every time the Chart Editor is opened and closed the ITypeDescriptorContext.ComponentChanged event is called which will attempt to write out the Chart properties to the InitializeComponent() section of the Windows Form. This is standard behavior for a component with a 'custom' editor.

We recommend you use alternative methods to check the values of Chart properties at debug time such as the Console.WriteLine method.
Best Regards,
Christopher Ireland / 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

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: TeeChart Editor issues

Post by bairog » Wed Jan 02, 2019 5:04 pm

Christopher wrote:
Mon Dec 31, 2018 8:18 am
This is expected behavior. The TextRenderingHint property of the Aspect class is independent of the Quality property of the Font class even though the two properties are of the same type (System.Drawing.Text.TextRenderingHint). This was designed to enable each instance of the Font class to use a particular value of System.Drawing.Text.TextRenderingHint over and above the more universal TextRenderingHint property of the Aspect class.
You mean that I can for example set Font Quality for titles separately from Font Quality for left axis labels, right?
Ok, let's assume I want to have AntiAlias for titles and AntiAliasGridFit for left axis labels. I'm doing the following:
  1. Opening TeeChart Editor and see that for titles current value is ClearTypeGridFit
    Image
  2. I'm setting AntiAlias for titles
    Image
    As the result the folowing line is added automatically

    Code: Select all

    this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
  3. Moving to axes settings and see that for labels current value is ClearTypeGridFit
    Image
    A this moment the folowing line is removed automatically

    Code: Select all

    this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
    Than is NOT expected behaviour! AntiAlias for titles that I've set before will be ignored in the next build.
  4. I'm settingAntiAliasGridFit for labels
    Image
    As the result the folowing line is added automatically

    Code: Select all

    this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
    Than is NOT expected behaviour! AntiAliasGridFit will be applied for titles as well the next build.
So I'm trying to say that TeeChart Editor is working incorrectly now: it always overwriting Aspect.TextRenderingHint property. It never sets Font.Quality property as you declared above.

So for me there are two possible options of how TeeChart Editor should behave:
  1. Easy way: If tChart1.Aspect was already set somewhere to SomeValue - current value for any Font Quality in TeeChart Editor shouldn't bу dropped to ClearTypeGridFit, it should be SomeValue.
  2. More complex way: setting Font Quality anywhere should affect corresponding Font.Quality property

Post Reply