Narcís wrote:The easiest solution I can think of is not drawing every second mark
The situation is more difficult than you suppose. Let me show you:

In this situation I should remove all labels except
second in each duplicate labels sequence (second label is correct one)

In this situation I should remove all labels except
third in each duplicate labels sequence (third label is correct one). Notice that last sequence (the sequence of -10000's) is shorter than all others.
Well in that case the algorithm of finding the correct label which will work
in both situations to my mind is:
Code: Select all
int CorretLabelIndex = MinDuplicateLabelIndex + (MaxDuplicateLabelIndex - MinDuplicateLabelIndex) / 2
All other duplicate labels except correct one should be set to empty string (or not visible).
BUT:
1) I'm not sure that this algorithm will work correctly
in all othes situations
2) Programming GetAxisLabel event to find all duplicate labels sequences, calculating correct label index and removing all others for each sequence in not short and trivial. I'm looking for the easiest way.
3) I supposed that such powerfull component like TeeChart has automatic mechanisms to remove duplicate labels.
BTW
Notice (if you didn't already) that I'm using "0" FormatValue for left axis labels (so they become 0, 10, 100, etc. after my manual recalculatting on step 3)
So what can you suggest me in such case?
Thank you.