Page 1 of 1

TeeChart Editor issues

Posted: Sat Dec 29, 2018 6:23 am
by 15685014
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.

Re: TeeChart Editor issues

Posted: Mon Dec 31, 2018 8:18 am
by Christopher
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.

Re: TeeChart Editor issues

Posted: Wed Jan 02, 2019 5:04 pm
by 15685014
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