Page 1 of 1
follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Thu Mar 01, 2012 11:34 am
by 16560658
Hello,
I were having a support session with Yeray Alonso 03 Nov 2011 12:45.
Yeray made a bugtracker ID (TV52015812).
I wondered where I can retrieve a fix for this issue? As I see the last time you released something for VCL was november last year.
Best regards Christian
I attach here the previous post:
(I have renewed my subscription and I received a new License number. So now im not authorized to post new messages to the original thread, that had another License number.)
Bug: Shape Series with DateTime Axis Periodicly disappears
Post a reply
2 posts • Page 1 of 1
Bug: Shape Series with DateTime Axis Periodicly disappears
by pch-chj » 02 Nov 2011 22:46
Version: TeeChart Pro v2011.03.30407 Win 32
We have a graph with an Rectangular Shape Series.
The X-axis is set to DateTime format.
The Shape ranges from year 1870's to 2100
The Axis is set to narrow range of 1 minute.
The Shape is only shown "sometimes" depending on the width.
The Timer1 changes the Width of the Chart2, showing how the
Shape disappears and re-appears by setting the width.
ATTACHMENTS
SteemaRectDisappears.zip
Example of the Bug.
(1.97 KiB) Downloaded 11 times
pch-chj
Newbie
Posts: 1
Joined: 16 Nov 2010 00:00
Top
Re: Bug: Shape Series with DateTime Axis Periodicly disappears
by Yeray » 03 Nov 2011 12:45
Hello,
You are right. However, it seems to be related to the axis range and the chart size, independently of setting the axis as DateTime or not.
Here it is the code to reproduce it. You just have to resize the chart to see how the series appears and disappears.
CODE: SELECT ALL
uses TeeShape;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
with Chart1.AddSeries(TChartShape) as TChartShape do
Style:=chasRectangle;
Chart1.Axes.Bottom.SetMinMax(99.99999, 100);
end;
I've added it to the defect list to be revised for future releases (TV52015812).
Thanks for reporting it.
Best Regards
Yeray Alonso
Steema Support Central
Steema Support Forums
Follow us in Twitter and Facebook
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Fri Mar 02, 2012 3:05 pm
by yeray
Hi Christian,
pch-chj wrote:I were having a support session with Yeray Alonso 03 Nov 2011 12:45.
Yeray made a bugtracker ID (TV52015812).
I wondered where I can retrieve a fix for this issue? As I see the last time you released something for VCL was november last year.
I'm afraid the TV52015812 hasn't been fixed yet.
I recommend you to be aware at the following channels for new release announcements and what's implemented on them:
-
Support forum.
-
RSS news feed
-
Twitter
-
Facebook
pch-chj wrote:I have renewed my subscription and I received a new License number. So now im not authorized to post new messages to the original thread, that had another License number.
You can't post a reply in the
original thread, but you can open a new one?
I've tried to login with your
new license and password, and it seems to work fine for me here. I can see the "Post a reply" button, and it seems to work.
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Mon Mar 05, 2012 8:59 am
by 16560658
Hi Yeray,
1.
Is there a work around at this moment I could use? (I have the Tee source code)
2.
Can you say when an update is available? (Im receiving your RSS feeds)
Best regards Christian
ps:
Yes I can work with my "new license number".
But its a bit strange that my posting made with "previous license number" is now unavailable.
It means I loose easy access to my previous postings each time I renew the subscription (every year).
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Tue Mar 06, 2012 3:39 pm
by yeray
Hi Christian,
pch-chj wrote:1.
Is there a work around at this moment I could use? (I have the Tee source code)
I've taken a look at it but I'm afraid I can't think on a workaround for it.
pch-chj wrote:2.
Can you say when an update is available? (Im receiving your RSS feeds)
I'm afraid not. I hope it could be soon.
pch-chj wrote:ps:
Yes I can work with my "new license number".
But its a bit strange that my posting made with "previous license number" is now unavailable.
It means I loose easy access to my previous postings each time I renew the subscription (every year).
Right. We'll study if it's possible to allow posting with the old license info to those who have renewed the subscription.
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Wed Mar 07, 2012 9:47 am
by 16560658
Hi Yeray,
Ok.
We have purchased the chart products since 2009.
And now we have all our 3rd party components on XE2.
However it is impossible for us to make the upgrade to XE2, because we need this fix (our product is useless without this fix).
Now we waited since november for the fix, almost half a year.
I think at least a work-around should be made, that we can use temporarily until your next release.
Alternatively, the optimal would be that you could make an official release very very soon.
Best regards Christian
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Wed Mar 07, 2012 3:05 pm
by narcis
Hi Christian,
The smallest code snippet Yeray found to reproduce the issue here is this:
Code: Select all
uses TeeShape;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
with Chart1.AddSeries(TChartShape) as TChartShape do
Style:=chasRectangle;
Chart1.Axes.Bottom.SetMinMax(99.99999, 100);
end;
This seems to be an internal rounding issue and found that setting bottom axis minimum value to 99.9999 (one decimal digit less than the snippet above) works fine for us. Considering you came across this issue with DateTime values this would leave you with an accuracy of a 1/10000 of a day. This is almost 1/7h of a minute, about 8.5 seconds, 9 for good measure. Would this accuracy be acceptable for you? Can you please check if this solves the problem for you?
Code: Select all
uses TeeShape;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
with Chart1.AddSeries(TChartShape) as TChartShape do
Style:=chasRectangle;
Chart1.Axes.Bottom.SetMinMax(99.9999, 100);
end;
Thanks in advance.
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Fri Mar 09, 2012 2:06 pm
by 16560658
Hi Narcís,
We need 4 horizontal filled shapes on-top-of-each other "ranging for all times" (this is the only way we know to implement it in TeeChart), maybe there is a better way?
I attach my original example.
Here we have 1 filled shape ranging from 1870's to 2100.
Now we may zoom to 1 second of information. So a big range, compared to very small zoomed range.
When you run it, you will see it flickers.
What is the max date range we can have while we can zoom to 1 second?
Best regards Christian
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Fri Mar 09, 2012 3:58 pm
by narcis
Hello Christian,
Thanks for your feedback. I think I have found the problem using your example. At TeEngine.pas, in the
TChartAxis.XPosValueCheck, when the first point in the shape is being painted,
IStartPos+Round(tmp) exceeds the lower range of
Integer values in Delphi and hence
result is absolutely wrong. Implementing
XPosValueCheck as shown below solves the issue. I don't think this is the right solution considering TeEngine.pas is on of the core units in TeeChart. We will need to investigate the issue further to find the proper solution. In the meantime, can you please check if this works fine at your end?
Code: Select all
Function TChartAxis.XPosValueCheck(Const Value:TChartValue):Integer;
var tmp : Double;
tmp2: Int64;
begin
if IRangeZero then result:=ICenterPos
else
begin
tmp:=(Value-IMinimum)*IAxisSizeRange;
if IUseTeeMaxPixelPos then
begin
if FInverted then tmp:=IEndPos-tmp
else tmp:=IStartPos+tmp;
if tmp> TeeMaxPixelPos then result:=TeeMaxPixelPos
else
if tmp<-TeeMaxPixelPos then result:=-TeeMaxPixelPos
else
result:=Round(tmp);
end
else
if FInverted then result:=IEndPos-Round(tmp)
else
begin
tmp2:=IStartPos+Round(tmp);
result:=Max(tmp2,Low(Integer));
end;
end;
end;
I'll get back to you when we have further news.
Thanks in advance.
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Fri Mar 09, 2012 4:58 pm
by 16560658
Hi Narcís,
ok now we are moving forward
1.
Your fix has solved the problem I gave you.
But now I attach a small extension to the test program that shows there are still flickering.
2.
I hope you can hunt it down pretty much yourself now, because it is very time consuming to first uninstall my working "v. 8.06" then install "v. 2011".
Actually have you tried it yourself? It is impossible to do with your installers to first uninstall v. 8.06 and then install v. 2011 (I get some error message "AUTO" Failed).
It is required by me to go and find the v. 2011 bpl's myself and add DclTeePro914.bpl manually in Delphi 2010!! And then it is also required by me to Add Search paths!!!
I use Windows 7, 64bit.
Best regards Christian
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Mon Mar 12, 2012 10:25 am
by narcis
Hi Christian,
1.
Your fix has solved the problem I gave you.
But now I attach a small extension to the test program that shows there are still flickering.
Ok, implementing the mentioned method as shown below works fine for both cases
Code: Select all
Function TChartAxis.XPosValueCheck(Const Value:TChartValue):Integer;
var tmp : Double;
tmp2: Int64;
begin
if IRangeZero then result:=ICenterPos
else
begin
tmp:=(Value-IMinimum)*IAxisSizeRange;
if IUseTeeMaxPixelPos then
begin
if FInverted then tmp:=IEndPos-tmp
else tmp:=IStartPos+tmp;
if tmp> TeeMaxPixelPos then result:=TeeMaxPixelPos
else
if tmp<-TeeMaxPixelPos then result:=-TeeMaxPixelPos
else
result:=Round(tmp);
end
else
if FInverted then result:=IEndPos-Round(tmp)
else
begin
tmp2:=IStartPos+Round(tmp);
if tmp2 > High(Integer) then
result:=High(Integer)
else
result:=Max(tmp2,Low(Integer));
end;
end;
end;
Can you please check it at your end?
2.
I hope you can hunt it down pretty much yourself now, because it is very time consuming to first uninstall my working "v. 8.06" then install "v. 2011".
Actually have you tried it yourself? It is impossible to do with your installers to first uninstall v. 8.06 and then install v. 2011 (I get some error message "AUTO" Failed).
It is required by me to go and find the v. 2011 bpl's myself and add DclTeePro914.bpl manually in Delphi 2010!! And then it is also required by me to Add Search paths!!!
I use Windows 7, 64bit.
Are you using TeeInstall.exe shipped with the binary installers? Actually, being a source code customer, probably the easier solution is using the Recompile tool included with the source code installers.
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Mon Mar 12, 2012 12:28 pm
by narcis
Hi Christian,
After some more investigation we think the solution to such corner cases is a TeeChart built-in mechanism:
Code: Select all
type
TAxisAccess=class(TChartAxis);
procedure TForm1.FormCreate(Sender: TObject);
begin
TAxisAccess(Chart2.Axes.Bottom).IUseTeeMaxPixelPos:=True;
end;
Find attached your first project with those changes. I tested it works fine for both projects you sent. Can you please check if this solves the problem at your end?
It's important to leave TeEngine.pas as it is as Calc* methods are crucial for good performance when having lots of data in a chart. We will consider moving this mechanism to a public property, for example:
Code: Select all
Chart2.Axes.Bottom.CheckLimits:=True;
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Mon Mar 12, 2012 3:01 pm
by 16560658
Hi Narcís ,
1.
yes!
Now it seems to work with this very nice simple change.
The switch we set to True, does it mean that the chart will be slower for large datasets?
2.
Also: Is there a nice switch or similar that can let the TChartShape paint behind the chart Grid?
3.
In regards to installation of your TeeChart components: I imagine it will be most optimal for all parties if I can run the installer TeeChart2011Delphi2010.exe and
TeeChart2010SourceCode.exe
and also I can un-install the components by the installers.
When I start Delphi the next time "it just works". (this is what Developer Express and EurekaLog does and even NexusDB )
Best regards Christian
Re: follow up on TV52015812, Series with DateTime Axis Periodi
Posted: Mon Mar 12, 2012 4:04 pm
by narcis
Hi Christian,
1.
yes!
Now it seems to work with this very nice simple change.
The switch we set to True, does it mean that the chart will be slower for large datasets?
Excellent! It may slow down your application a little bit but if I'm not wrong that switch was to prevent Win 95/98 16-bit GDI related issues. You should test with your projects if data is big enough to notice any difference.
2.
Also: Is there a nice switch or similar that can let the TChartShape paint behind the chart Grid?
Yes, you can use Axes.Behind property:
3.
In regards to installation of your TeeChart components: I imagine it will be most optimal for all parties if I can run the installer TeeChart2011Delphi2010.exe and
TeeChart2010SourceCode.exe
and also I can un-install the components by the installers.
When I start Delphi the next time "it just works". (this is what Developer Express and EurekaLog does and even NexusDB )
Aha, I see. Other users like to keep old version installed and switch across version. This could be something to choose during the installation process. I'll add it to the wish-list to be considered for inclusion in future releases.