[Lazarus] TAchart multiple reticules and vertical series alignment

Rick rick at sloservers.com
Fri Jun 4 15:02:35 CEST 2010


Alexander Klenin wrote:
> Are you sure it is not a problem on your side?
> I do not seem to notice a large delays for mails in other threads.
>   
I just sifted through the mail headers of a message I received from the 
list.
It looks like the message queues on the list server in Austria at the 
appropriate time,
but it then takes 8 hours before my local mail server sees it.  Maybe 
messages are
getting stuck in the queue because of a bad route or DNS record.  All my 
other mail
is getting through OK.

> Thanks for the patch.
> One problem with your code is that it does not take into account
> other properties -- for example, it will not work for 3D-look series.
> Also, TLineSeries already has a LineType property,
> which can be used to encode stepped in addition to existing values.
> Finally, there are two kinds of steps possible -- "X, then Y" and "Y, then X".
>   
Of course, but the real reason I sent you the patch was....
> Stepped series were on my TODO list anyway, so I implemented them in r25889.
> Also, I added a new linedemo to simplify testing of various property
> combinations.
> Please test.
>   
We both knew you'd get around to doing a better implementation with just 
a little bit of prodding
}:-)

I tried out the demo and it works great.  It does what I needed and it 
will do what the next
guy needs too.  Good stuff, as usual!
>   
>> I'm having a little bit of trouble with my axis labels.  TAChart seems to
>> only want to display even numbers on the horizontal axis, for example.
>> Even when I use a custom source and set it to X values, it only shows
>> the even numbers.  What am I missing?
>>     
>
> I am not sure, seems to work for me.
> Can you post a project demonstrating the problem?
>   
Well since we're talking about it, let's take the line demo, for example.
The horizontal axis displays 0, 5, 10, ... 
What would I have to do to make it display 0,1,2,3,4,5,6,7,8,9,10... ?
I've tried everything I can think of including giving the axis its own 
source
and changing the values, but it seems that something else is deciding what
numbers to actually print.
> How many points per serie do you have?
>   
Well this is what seems to make the difference.  I have 10,240 points 
per series.
I tried it with the line demo, as well.  Throw a vertical line and drag 
tool on the chart, then
drag the line around.  Then click the button to add a bunch of series 
and try dragging
the line.  It starts to slow even at 1000 points per series, but panning 
and dragging become
unacceptable at 10,000 points per series. 
(I just got your other email and tried resizing the window.  The 
slowdown is barely noticeable
at 1000pts per series, but quite obvious at 10,000 points)

I did implement a user-defined series that manually retrieves the data 
and draws the lines.
That works much better, but it's a lot wasted/duplicate effort. 

It seems like data access might be at the heart of the issue, since the 
problem scales with the
number of data points in the series.  I wonder if a sorted data source 
that does a binary search
would be the ticket. 




More information about the Lazarus mailing list