Hi,
Ok I will explain my problem again. I attached some video (take a look at WantedFunctionality.avi). In first half of video you can see linar bottom axis functionality. When I zoom/unzoom the grid is always fixes. Number of divisions in grid is always same, only labels change. And this is done by RedrawGrid procedure. When I switch to Log I must somehow construct bottom axis labels to represent logarithmic scale and this is in second half of video. This video represents the functionality I want to achieve with version 8. In video is used v7 and the code I sent to you is actually from version of software which uses v7. With version 7 everything works ok, the code is perfect. So when I was porting to v8 this part of code did not worked well anymore. So you told me that this is due to bug in v7. If I remark bottom axis part of code with v8 then I loose functionality of keeping fixed grid for bottom axis on zoom/unzoom (take a look at CurrentFunctionality.avi). What I want is to preserve fixed grid (like in WantedFunctionality.avi) so I must still have this part of code. But it is working only for linear scale. In version v7 I made it work for log scale with clearing labels. But I don't know what I should do in v8 to keep described functionality.
So for linear scale RedrawGrid preserve fixed grid (10 divs) in chart.
I hope I clearify the problem a little bit more.
Thanks for your help.
Best regards,
PoLabs
Video: WantedFunctionality.avi http://www.sekopt.si/temp/wantedfunctionality.rar fixed linear grid (I want it!)
Video: CurrentFunctionality.avi http://www.sekopt.si/temp/currentfunctionality.rar grid is not fixed (This is now and it is not OK!)
Logarithmic scale issue
Re: Logarithmic scale issue
I've just tried your examples. You will see the difference in your examples too. With version 8 the grid is not fixed while with version 7 the grid is fixed for linear bottom axis. What I want is that in v8 would be fixed grid for bottom axis as well.
Best regards,
PoLabs
Best regards,
PoLabs
Re: Logarithmic scale issue
Hi,
have you tried examples? You could probably see the difference I am talking about and what bothers me. When using RedrawGrid for bottom axis with TeechartV8 the problem is when you clear items from bottom axis (in llinear scale) then it is problem to contruct items back to properly show in logarithmic scale.
Thanks for your help,
PoLabs
have you tried examples? You could probably see the difference I am talking about and what bothers me. When using RedrawGrid for bottom axis with TeechartV8 the problem is when you clear items from bottom axis (in llinear scale) then it is problem to contruct items back to properly show in logarithmic scale.
Thanks for your help,
PoLabs
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Logarithmic scale issue
Hi PoLabs,
I'm sorry but couldn't get back into the issue as I was out of the office on Friday. I see your point. In that case, I think the solution in v8 is only doing the RedrawGrid work in bottom axis when labels are not logarithmic, for example:
Doing so I get almost identical behaviour in v7 and v8. Does this solve the problem at your end?
I'm sorry but couldn't get back into the issue as I was out of the office on Friday. I see your point. In that case, I think the solution in v8 is only doing the RedrawGrid work in bottom axis when labels are not logarithmic, for example:
Code: Select all
if not FLogarithmic then
with Chart.Axes.Bottom do
begin
tmpIncrement := Abs(Minimum - Maximum)/10;
Items.Clear;
tmpValue:=Minimum;
while tmpValue <= Maximum do
begin
with Items.Add(tmpValue) do
begin
Text := Format('%5.2f' ,[tmpValue]);
Font.Color := clBlack;
end;
tmpValue:=tmpValue+tmpIncrement;
end;
// if (FLogarithmic) then Items.Clear;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Logarithmic scale issue
Hi,
thanks for reply. If I do that it the grid for log is not working ok then. Take a look at that video:
http://www.sekopt.si/temp/teechartv8LogFlagFalse.avi
How can this could be fixed?
BR,
PoLabs
thanks for reply. If I do that it the grid for log is not working ok then. Take a look at that video:
http://www.sekopt.si/temp/teechartv8LogFlagFalse.avi
How can this could be fixed?
BR,
PoLabs
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Logarithmic scale issue
Hi PoLabs,
Aha, ok. In that case automatic labels for the bottom axis need to be restored. Please try replacing code I said in previous post with this:
Aha, ok. In that case automatic labels for the bottom axis need to be restored. Please try replacing code I said in previous post with this:
Code: Select all
with Chart.Axes.Bottom do
if not FLogarithmic then
begin
tmpIncrement := Abs(Minimum - Maximum)/10;
Items.Clear;
tmpValue:=Minimum;
while tmpValue <= Maximum do
begin
with Items.Add(tmpValue) do
begin
Text := Format('%5.2f' ,[tmpValue]);
Font.Color := clBlack;
end;
tmpValue:=tmpValue+tmpIncrement;
end;
// if (FLogarithmic) then Items.Clear;
end
else
Items.Automatic:=True;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Logarithmic scale issue
Thank you for your help. It works!!! I haven't knew about Items.Automatic till now. Thank you for your great support and sorry for my "killer" questions.
Best regards,
PoLabs
Best regards,
PoLabs
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Logarithmic scale issue
Hi PoLabs,
You're welcome! I'm glad to hear we finally found a satisfactory solution.
You're welcome! I'm glad to hear we finally found a satisfactory solution.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |