Jump to content
Software FX Community

X-Axis Labeling:Slow to process mega datapoints!

User (Legacy)

Recommended Posts


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


for i := 1 to 3600 do


Label_[i] := MilesS[i];




End of Code

I hope ya'll can help me...



Link to comment
Share on other sites


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



Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...