Page 1 of 1

Gradient not working in area chart series

Posted: Wed Feb 23, 2011 1:49 pm
by 16558438
Hi there!

I updated to the latest release of TeeChart 2010 and now my area chart isn't showing the defined gradient anymore. I also tried out a brand new application on which I added a TeeChart with an area series. (See attached screenshot). When I add a gradient (see second screenshot) the area keeps the same colour but the markers in the legend show the gradient. Is that a bug or am I doing something wrong?

Maybe it has to do with the fact that I updated from version 8.0 to 2010 recently.

It would be great if someone can answer rather quickly since we can't release our application with this problem.

Regards,

Dirk.

Re: Gradient not working in area chart series

Posted: Wed Feb 23, 2011 4:15 pm
by 10050769
Hello Dirk,

You are right. I could reproduce your problem here and I have added your request to bug list with number [TV52015411]. We try to fix it for next maintenance releases of TeeChartVCL.

Thanks,

Re: Gradient not working in area chart series

Posted: Thu Feb 24, 2011 2:43 pm
by 16558438
Hi Sandra,

that's great news. Can you give me an estimation when this is going to happen? I reckon that many people will have this problem.

Is there a workaround?

What version can I install in the meantime that doesn't have this problem?

Best regards,

Dirk.

Re: Gradient not working in area chart series

Posted: Fri Feb 25, 2011 2:36 pm
by 10050769
Hello dirkil,
that's great news. Can you give me an estimation when this is going to happen? I reckon that many people will have this problem.
I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Is there a workaround?
What version can I install in the meantime that doesn't have this problem?
I have found a workaround that you can use for the moment:

Code: Select all

uses Series;
var Series1:TAreaSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Align:=alClient;
Chart1.Legend.CustomPosition:=True;
Series1 := TAreaSeries.Create(self);
Chart1.AddSeries(Series1);
Series1.FillSampleValues();
Series1.AreaChartBrush.Gradient.Visible:=True;
Series1.AreaChartBrush.Gradient.StartColor:=clBlue;
Series1.AreaChartBrush.Gradient.EndColor:=clred;
Series1.Gradient.Visible:=True;
Series1.Gradient.StartColor :=clBlue;
Series1.Gradient.EndColor := clred;
end;
Could you confirm that if previous code solve your problem for now?

I hope will helps.

Thanks,

Re: Gradient not working in area chart series

Posted: Mon Feb 28, 2011 8:34 pm
by 16558438
Hi Sandra,

yes, the workaround solves the problem. Thank you very much.

But still we are looking forward getting this bug resolved properly since we have gradients all over the place.

Regards,
Dirk.

Re: Gradient not working in area chart series

Posted: Thu Mar 31, 2011 11:51 am
by narcis
Hi Dirk,

TV52015411 has been fixed now. This was broken due to some gradient rework that had been done. Now you can use the code snippet below or the editor as in the screenshots you posted. Since you are a source code customer I'm going to send you the fixed units so you can test them at your end. You'll just need to backup/replace them with new ones and use TeeRecompile tool to build packages and install them to your IDEs.

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TAreaSeries;
begin
  Series1:=TAreaSeries.Create(Self);
  Series1.FillSampleValues;
  Series1.Gradient.Visible:=True; //Area gradient.
  Series1.Brush.Gradient.Visible:=True; //3D only: Top line gradient.

  Chart1.AddSeries(Series1);
end;

Re: Gradient not working in area chart series

Posted: Fri Apr 01, 2011 5:46 am
by 16558438
Hi NarcĂ­s,

thanks for informing me about the solution. Unfortunately, I cannot test it. We are source code customers but we had difficulty installing the source code so we used the binary installer instead.

When will you publish the next maintenance release?

Regards,
Dirk.

Re: Gradient not working in area chart series

Posted: Fri Apr 01, 2011 7:10 am
by narcis
Hi Dirk,

Ok, if you want to give source code another chance I will help you through it. We expect to have the next release ready in about two weeks.