TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
johnnix
- Newbie

- Posts: 34
- Joined: Tue Sep 18, 2018 12:00 am
Post
by johnnix » Mon Apr 08, 2019 9:04 am
Hello,
I believe this question was asked many years ago but I could not retrieve anything from Search.
I need to fill the area between 2 series (e.g. Series1 and Series2) with a constraint that fill will apply only when Series1 values are smaller than Series 2 (see attached image), I tried using the available TChart tools but with no luck, any help would be mostly appreciated
Regards
-
Attachments
-

- Annotation 2019-04-08 120016.png (5.35 KiB) Viewed 19444 times
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Mon Apr 08, 2019 11:25 am
Hello,
Check the Series Band Tool. I've just run the "All features\Welcome !\Tools\Series Band" example in the New Features demo, changed the series from Line series to HorizLine series and reassigned the second series for the tool:

- Tee9new_2019-04-08_13-23-26.png (177.39 KiB) Viewed 19439 times
-
johnnix
- Newbie

- Posts: 34
- Joined: Tue Sep 18, 2018 12:00 am
Post
by johnnix » Mon Apr 08, 2019 12:35 pm
Hello,
I tried that, had to change both line series to Horizontal type however the result is not good.
Regards
-
Attachments
-

- Annotation 2019-04-08 152955.png (4.58 KiB) Viewed 19436 times
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Tue Apr 09, 2019 8:24 am
Hello,
Please, arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
-
johnnix
- Newbie

- Posts: 34
- Joined: Tue Sep 18, 2018 12:00 am
Post
by johnnix » Tue Apr 09, 2019 2:33 pm
Here is a sample app
-
Attachments
-
- test.zip
- (51.92 KiB) Downloaded 1218 times
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Apr 11, 2019 11:27 am
Hello,
I could reproduce the problem so I've added it tot he public tracker:
#2182.
Note I've already fixed it.
The fix consists on modifying the TryAddCrossPoint function in TeeSeriesBandTool.pas, from this:
Code: Select all
function TryAddCrossPoint(t:Integer; isStairs,isStairs2:Boolean):Boolean;
//...
if result then
AddPointXY(Series.CalcXPosValue(X),Series.CalcYPosValue(Y))
end
else
if IsStairs then
AddPoint(Series,IsStairs,t);
end;
To this:
Code: Select all
function TryAddCrossPoint(t:Integer; isStairs,isStairs2:Boolean):Boolean;
//...
if result then
begin
if Series.YMandatory then
AddPointXY(Series.CalcXPosValue(X),Series.CalcYPosValue(Y))
else
AddPointXY(Series.CalcXPosValue(Y),Series.CalcYPosValue(X));
end
else
if IsStairs then
AddPoint(Series,IsStairs,t);
end;
-
johnnix
- Newbie

- Posts: 34
- Joined: Tue Sep 18, 2018 12:00 am
Post
by johnnix » Thu Apr 11, 2019 1:10 pm
Hello,
Thank you, will give it a try
Regards