Jump to content
Software FX Community

X-Axis Labeling:Slow to process mega datapoints!


User (Legacy)

Recommended Posts

Posted

Hello,

I'm programming in Delphi 4 and here is the chart I am referencing:

There are thousands of datapoints here. The x-axis represents miles. When I loop through hundreds sometimes thousands of datapoints to assign the 'miles' to the x-axis, it takes a *really long time* to process this task...that's my first problem. On the graph above you can see 0 to 3.52 miles. Most of the time the datapoints won't calculate right on even mileage like: 0, 0.5, 1.0, 1.5, 2.0, etc...that is the way I would like it to be. A label every 1/2 mile or every 1/4 mile would be cool.

My questions:

1) This example is approx. 3600 points and takes about 30 seconds to process. Some files I do can have as much as 45,000 points in it and takes 3 or 4 minutes to process! It works but it takes a really long time...can I get around that and how come so long?

2)How hard would it be to show even mileage on the x-axis? Like every 1/4 mile or 1/2 mile.

(I do want every tick-mark to show a mileage)

Here is the Delphi 4.0 code I've used to assign values to my x-axis.

(MilesS[i] is an increasing mileage string):

===========================

with Axis.Item[Axis_X] do

begin

for i := 1 to 3600 do

begin

Label_[i] := MilesS[i];

end;

end;

=============

End of Code

I hope ya'll can help me...

al

abremer@henryetta.net

Posted

Hi,

There is a few things you can do to improve this performance:

1) When you are going to reset the labels, call ClearLabel first, this will improve the performance dramatically.

2) For more improvements look at the CSE_FASTLEGENDS flag in the StyleEx property. It maximizes the performance of setting labels but it has some drawbacks.

3) Check out the following KB article: Q1341134. Improving Chart FX performance

--

FP

Software FX, Inc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...