If your lines seem too thick in a TeeChart

… you might not be used to anti-aliasing. Recent (#1) versions of TeeChart switched to GDI+ as their default drawing engine which also switched on anti-aliasing by default. The difference looks like this:

(Apparently this wasn’t obvious: These screen shots have been magnified to show the cause of the “thick line” effect.)

It’s a matter of personal taste (and the use case) which one looks “better”. Some of my users started to complain about thick and blurry lines. So, how do you turn off this feature, once you know that it exists? There is nothing about anti-aliasing in the chart’s properties. Of course it’s somewhere in the complex setup dialog, but where? It’s here:

But it’s more complex than that: There is no property for this in the TChart control. Instead this property editor adds a new component of the type TTeeGDIPlus to the form. And there we can find that setting:

I guess it’s yet another case of RTFM, but you know how they say “If everything else fails, read the docs!”

As Daniela Osterhagen commented on my Google+ post, it can also be done in code only:

procedure TForm1.FormCreate(Sender: TObject);
var
  Renderer: TTeeGDIPlus;
begin
  Renderer := TTeeGDIPlus.Create(Self);
  Renderer.TeePanel := TheChart;
  Renderer.Antialias := False;
end;

(No need to keep that instance around, it will automatically be freed with the form.)

(#1: Where recent means something like 5 years ago. We just recently moved some of our projects to use the latest version)