Strikeout not shown for font less than 8pt

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Strikeout not shown for font less than 8pt

Post by imd-soft » Thu Apr 06, 2017 12:16 pm

Hi,
We are working with WPF Tchart objects that have strikeout (TchartObject.Graphics3D.Font.Strikeout whereasTchartObject is of type Steema.TeeChart.WPF.TChart ).
The strikeout disappears when the font is less than 8pt.
Is it a known issue? Is there a workaround for strikeout?

Thanks,
Daniel

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

Re: Strikeout not shown for font less than 8pt

Post by Christopher » Thu Apr 06, 2017 1:58 pm

Hello Daniel,

Which version of TeeChart.WPF.dll are you using? The latest public version using this code:

Code: Select all

    private void InitializeChart()
    {
      tChart1.AfterDraw += TChart1_AfterDraw;
    }

    private void TChart1_AfterDraw(object sender, Steema.TeeChart.WPF.Drawing.Graphics3D g)
    {
      g.Font.Size = 6;
      g.Font.Strikeout = true;
      g.TextOut(100, 100, "Text Strike Out");
    }
gives me this:
strike_out.PNG
strike_out.PNG (2.81 KiB) Viewed 24877 times
is this the same as what you get at your end?
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

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Sun Apr 09, 2017 5:19 am

Thanks Christopher,
It looks like the functionality we are missing.
We are using Teechart version from 2015, so we we'll download the new version and see if it fixes the issue.
I'll update you.

Thanks,
Daniel

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Sun Apr 09, 2017 7:29 am

When trying to install TeeChartNET2015_4.1.2015.12160.exe I get the following error:
"Unable to download component WPF, Store and UWP: Component file version does not match"
What could be the issue? Is there a workaround?

All i want is to get the new version of TeeChart.WPF.dll

Btw, when installing the version I chose VS 2015. Why is it related? If we upgrade to VS2017 or work with VS2013 we won't be able to use this dll that specifically was downloaded for VS 2015?

Thanks,
Daniel

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

Re: Strikeout not shown for font less than 8pt

Post by Christopher » Wed Apr 12, 2017 8:48 am

Hello Daniel,
imd-soft wrote:When trying to install TeeChartNET2015_4.1.2015.12160.exe I get the following error:
"Unable to download component WPF, Store and UWP: Component file version does not match"
What could be the issue? Is there a workaround?
I've just downloaded TeeChartNET2015_4.1.2015.12160.exe from steema.com and this installer successfully installed all the available components. If you experience further problems with this installer, please contact sales@steema.com who will be able to provide you with an alternative installer.
imd-soft wrote: Btw, when installing the version I chose VS 2015. Why is it related? If we upgrade to VS2017 or work with VS2013 we won't be able to use this dll that specifically was downloaded for VS 2015?
It is related because the installer performs operations which are specific to different VS versions, such as installing components into the ToolBox and installing Help files into the VS Help system. The TeeChart assemblies as such (TeeChart.dll, TeeChart.WPF.dll etc.) are of course compatible with all VS versions.
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

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Thu Apr 13, 2017 6:34 am

I'm sorry, I didn't write the version name correctly - I'm trying to install the latest version of course - TeeChartNET2017_4.1.2017.03140.exe
Getting the same error again.
I'll contact sales@steema.com regarding this issue.

Thanks,
Daniel

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Tue Apr 18, 2017 6:26 am

Hi,
I still can't verify the strikeout fix because I can't install TeeChartNET2017_4.1.2017.03140.exe properly.
I sent an email to sales@steema.com last week but didn't get any answer yet.
Who can help me with the issue?

Regards,
Daniel

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

Re: Strikeout not shown for font less than 8pt

Post by Christopher » Tue Apr 18, 2017 9:28 am

imd-soft wrote: I sent an email to sales@steema.com last week but didn't get any answer yet.
Who can help me with the issue?
Last Friday and yesterday were national holidays here (see "Office Hours and Holidays" here) which probably affected the speed of response - have you received a satisfactory reply now?
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

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Tue Apr 18, 2017 12:24 pm

Hi,
I've received a reply and got the dll today. Thanks!

But, unfortunately when testing out product with the updated TeeChart.WPF.dll (4.1.2017.2143) for 4.5 .Net, x86, I see the same strikeout issue:
When font is smaller than 8pt the strikeout is hidden. Can you please check this issue?

Regards,
Daniel

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

Re: Strikeout not shown for font less than 8pt

Post by Christopher » Tue Apr 18, 2017 12:56 pm

Hello,
imd-soft wrote: When font is smaller than 8pt the strikeout is hidden. Can you please check this issue?
I checked this issue earlier in the thread and confirmed that the code I posted worked. Here is a screenvideo of the same code working with the .NET 4.5 version of TeeChart.WPF.dll:

https://www.screencast.com/t/lcTGUeND
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

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Tue Apr 18, 2017 1:53 pm

Thanks Christofer,
I created a POC project and saw that that strikeout is visible for fonts smaller than 8pt, although in our product
we don't get the strikeout drawn.
We'll have to investigate this issue and update you with the results.

Thanks again,
Daniel

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Thu Apr 20, 2017 3:23 pm

Hi Christopher,
We''ve succeeded reproducing the issue with your code by adding the following lines:

tChart.Aspect.TextFormattingMode = TextFormattingMode.Display;

This way you won't get the strikeout for fonts smaller than 8pt.
The issue is related to TextFormattingMode.Display.
If we change the TextFormattingMode to TextFormattingMode.Ideal the strikeout will be visible.
For different font families we get a similar issue, though for Verdana , the strikeout is invisible from 7pt and lower.
For "Segoe UI" the issue is reproduced starting from 8pt and lower.

Is there a way to show the strikeout for TextFormattingMode.Display for smaller fonts?

Regards,
Daniel

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

Re: Strikeout not shown for font less than 8pt

Post by Christopher » Thu Apr 20, 2017 9:44 pm

Hello Daniel,

I
imd-soft wrote: Is there a way to show the strikeout for TextFormattingMode.Display for smaller fonts?
I'm not sure. It does seem the problem is with WPF and not TeeChart. Here's a UserControl you can test to see what I mean:

Code: Select all

  public partial class UserControl1 : UserControl
  {
    public UserControl1()
    {
      InitializeComponent();
    }

    protected override void OnRender(DrawingContext drawingContext)
    {
      Rect clientRect = new Rect(RenderSize);

      if (clientRect.Height == 0) clientRect.Height = 300;
      if (clientRect.Width == 0) clientRect.Width = 400;

      drawingContext.DrawRectangle(Brushes.LightBlue, null, clientRect);

      Typeface font = new Typeface(new FontFamily("Verdana"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal);

      FormattedText text = new FormattedText("Hello World", CultureInfo.CurrentCulture, FlowDirection.LeftToRight,
        font, 6 * 1.4, Brushes.Black, null, TextFormattingMode.Display);

      text.SetTextDecorations(TextDecorations.Strikethrough);

      drawingContext.DrawText(text, new Point(20, 20));

      base.OnRender(drawingContext);
    }
  }
and this is what it gives me:
strikeout.PNG
strikeout.PNG (2.44 KiB) Viewed 24783 times
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

imd-soft
Newbie
Newbie
Posts: 11
Joined: Tue Mar 29, 2016 12:00 am

Re: Strikeout not shown for font less than 8pt

Post by imd-soft » Sun Apr 23, 2017 2:56 pm

Hi,
Could you open a call regarding this issue to Microsoft .Net framework support?

Regards,
Daniel

Post Reply