Labels and Panning

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MrI
Newbie
Newbie
Posts: 10
Joined: Fri Apr 21, 2017 12:00 am

Labels and Panning

Post by MrI » Thu May 11, 2017 5:59 am

Hi there.

I have a large series of data (17 series with 85 000 points in each). Load it in to Teechart (Standard) with AddXY function. Just using the X and Y pos.
The X was directly inserted as TDateTime in this case. Change the X-axis format to TDateTime to present the data properly.

When I'm panning in TeeChart it responds without any issue.

For reasons I want to use labels instead and keep X-axis as default. As element position in the array and put a label on them instead. The label is the corresponding TDateTime.
When I do so TeeChart becomes slow. Too slow to be used. Now I am considering to use pages to downsize number of points on the screen or go back to the previous method and solve that problem.

I'm curious if there are something I'm missing here or doing incorrect.
What could be the reason for this?
Only thing I can think of is that there are 3 elements to process instead of two if I use a label.

Cheers,
MrI

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Labels and Panning

Post by Yeray » Thu May 11, 2017 9:49 am

Hello,

The problem is when you work with labels you must loop almost all them to check the widths of the strings to avoid overlapping; and this has to be done at each repaint.

The workaround would be to set your labels manually.
See the "Custom Labels" checkbox in the attached example:
testLabelsSpeed.zip
(2.21 KiB) Downloaded 663 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

MrI
Newbie
Newbie
Posts: 10
Joined: Fri Apr 21, 2017 12:00 am

Re: Labels and Panning

Post by MrI » Fri May 12, 2017 7:28 am

Hi Mr Yeray

This looks very promising, will get back to you when I have implemented it in my software.

Until then,
Cheers!

MrI
Newbie
Newbie
Posts: 10
Joined: Fri Apr 21, 2017 12:00 am

Re: Labels and Panning

Post by MrI » Mon May 22, 2017 1:10 am

Hi again, very nice example.

Works much better now.

Thank you!

Post Reply