Area series Draw style problem (TeeChart2019.ocx)

TeeChart for ActiveX, COM and ASP
Post Reply
Tero
Newbie
Newbie
Posts: 10
Joined: Wed Mar 27, 2019 12:00 am
Contact:

Area series Draw style problem (TeeChart2019.ocx)

Post by Tero » Thu Oct 10, 2019 8:15 am

TeeChart 2019 area series has a new option "Draw style" and is as default "Segments". We do not want area drawn as boxes but like it was drawn when using older TeeChart versions so we tried to change "Draw style" to "All" which at first looked like the solution we want. However we found out that if "Draw style" is set to "All" then "Treat Nulls" option is ignored.

Is this a bug or works as intended? Is there a way to get area series drawn as it was using older TeeChart versions?

Also TeeChartDefines.h seems to miss area series draw style values.
Attachments
AllAreaSeriesWithNulls.png
AllAreaSeriesWithNulls.png (42.48 KiB) Viewed 35032 times
SegmentsAreaSeriesWithNulls.png
SegmentsAreaSeriesWithNulls.png (44.19 KiB) Viewed 35032 times

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Fri Oct 11, 2019 11:30 am

Hello,

I'm afraid the "All" "Style" doesn't support null points.
Have you tried to hide AreaLinesPen to avoid drawing the area "as boxes"?
By code:

Code: Select all

tChart1.Series(0).asArea.AreaPen.Hide
By editor:
2019-10-11_13-28-01.png
2019-10-11_13-28-01.png (17.24 KiB) Viewed 35012 times
If this is not what you are trying to achieve, please detail what result were you getting with previous versions.
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

Tero
Newbie
Newbie
Posts: 10
Joined: Wed Mar 27, 2019 12:00 am
Contact:

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Tero » Mon Oct 14, 2019 6:23 am

Area lines pen is not visible in those examples. I have tried to enable them and set transparency to 100% - no change, tried to set line width to zero - no change. Those lines always appear if area series transparency is not 0%. We need to set area series transparency to other than 0% (at least 20%) so that other series can be seen through it.

As I see it area lines is not a problem but segments are drawn a little overlapped and if transparency is not 0% overlapped areas become darker creating "area lines" of their own.

In older versions area series was drawn like "All" does now but did not ignore null points i.e. same as "Segments" now but without "area lines" of their own.
Attachments
Overlaps.png
Overlaps.png (12.3 KiB) Viewed 34985 times
Last edited by Tero on Mon Oct 14, 2019 7:39 am, edited 1 time in total.

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Mon Oct 14, 2019 7:39 am

Hello,

I can't reproduce the problem here. This is what I'm getting with the code below:
area.png
area.png (22.32 KiB) Viewed 34985 times

Code: Select all

  With TChart1
    .Aspect.View3D = False
    .Legend.Visible = False

    .AddSeries scArea
    .Series(0).FillSampleValues 20
    .Series(0).SetNull 10
    .Series(0).asArea.AreaPen.Visible = False
    .Series(0).Transparency = 20
  End With
If you still find problems with it, please 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

Tero
Newbie
Newbie
Posts: 10
Joined: Wed Mar 27, 2019 12:00 am
Contact:

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Tero » Mon Oct 14, 2019 8:05 am

Try your example with "Area": Stairs like in my example and report back. You should see same behaviour. If I disable "Stairs" in our code extra vertical lines are not drawn like in your example code above.

My guess is area is drawn as polygon vs. rectangles (No Stairs vs. Stairs).

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Tue Oct 15, 2019 12:07 pm

Hello,

The lines aren't being drawn. However, the rectangles are being drawn so close that it looks like there was a darker line being drawn between them:
gdiplus.png
gdiplus.png (10.29 KiB) Viewed 34971 times
If you change the Canvas to use GDI instead of GDIPlus, this effect disappears:

Code: Select all

  TChart1.Aspect.GDIPlus.Active = False
gdi.png
gdi.png (6.43 KiB) Viewed 34971 times
Note the default Canvas changed a few years ago from GDI to GDIPlus.
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

Tero
Newbie
Newbie
Posts: 10
Joined: Wed Mar 27, 2019 12:00 am
Contact:

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Tero » Wed Oct 16, 2019 6:28 am

Sorry, but we do not want this effect. Other series are almost impossible to see through area series (depending on the data frequency) when those darker areas are visible.

Also we really (I mean really) do not want to change back to GDI because we just recently changed from GDI to GDI+ because of GDI+ shutdown problems and asian locale crash problems which we finally hoped to be over by switching to GDI+ rendering.

Please, provide a GDI+ solution to the problem if possible f.ex. changing "Segments" draw code to use polygons instead of rectangles. It seems to me that if drawn as polygons there is not this problem with GDI+. I would also check that there really is not a slight overlap drawing those rectangles when GDI+ rendering is enabled.

As another solution you should consider changing "All" draw style to honor "Treat Nulls" setting. Ignoring "Treat Nulls" setting does not make any sense at least to me. Whole "Draw Style" & "Treat Nulls" thing is very confusing. I get it if "Segments" means "I want boxes" (but then why I do not get boxes when using GDI?) but then I do not understand why "All" ignores "Treat Nulls".

We have a release deadline in three weeks so need a solution ASAP.

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Thu Oct 17, 2019 7:52 am

Hello,

We are studying what alternatives we have to move a pixel to the right so the rectangles don't overlap.
We'll also consider the option of drawing polygons instead of rectangles.
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

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Mon Oct 21, 2019 1:50 pm

Hello,

I've added this to the public tracker (#2256). We have a fix on the works.
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

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

Re: Area series Draw style problem (TeeChart2019.ocx)

Post by Yeray » Mon Dec 16, 2019 11:59 am

Hello Tero,

Excuse me for the delay here.
I've just sent you a mail with a link to a TeeChart2019.ocx so you can test if it solves the issue for you.
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