[Lazarus] TAchart multiple reticules and vertical series alignment

Rick rick at sloservers.com
Fri Jun 4 21:27:15 CEST 2010


Alexander Klenin wrote:
> With linedemo:
> 1) Add TListChartSource component
> 2) Edit its DataPoints property, enter 1,2,...,10 on a separate lines
> 3) Set Marks.Source for bottom axis to that source
> 4) Set Marks.Style to smsXValue
> Of course, you can use UserDefinedSource instead for better efficiency.
>   
OK, that's working  :)  
>
> On the one hand, that is ridiculously large dataset -- averaging more than
> five data points per x-axis pixel (!).
> On the other hand, you are not the first user who does this,
> so I guess there is some reason for such datatsets ;-)
>   
Well of course I don't look at the entire graph at once.  I zoom in to 
maybe 10 or 20 points at
a time and use a scroll bar the pan the chart.  It's a run of data that 
I captured from a
logic analyzer.  So when I'm zoomed-in, there's an appreciable distance 
between data points :)

> I have added simple time measurement to linedemo and
> performed some experiments. It turned out that the most expensive call
> is ACanvas.Line itself. 
This seems counter to what I observed.  I can take a data set of 100 
points and zoom
in so I'm displaying only 10 points and drag a vertical line around just 
fine.  Expand the data
set to 10k points and look at the same 10-point window, but now the line 
lags and the draw
event seems to be much slower.  The calls to ACanvas.Line should be the 
same in both cases,
shouldn't they?  In other words, the time to draw should be unchanged.  
I mostly cut and pasted
the code from the draw routine for my user-defined series.  What was 
different/what I think
was faster was the mapping between the chart's logical extent and my 
data set. 
>
> So before we go there, please test the current version -- maybe
> it is already good enough?
>   

I tried the latest version but there's really no change as compared to 
before.  The draw
routine still takes a significant amount of time with 32x10240 series, 
zoomed in to a window
of just 10 points.  I attached a screenshot so you can see.  
Graphically, this should not be difficult
at all to draw.  Most of the lines are even straight.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Clipboard01.png
Type: image/png
Size: 35160 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20100604/a36b9d19/attachment-0004.png>


More information about the Lazarus mailing list