1

I’ve got a very simple chart which displays one or more X Y line series.

The X Axis is an integer representing the relative time at which a value (sample) was read from a piece of hardware (for example, 10 samples at a 250 mS sampling rate represents 2.5 seconds). The Y Axis represents a percentage from 0 to 100.

I’m trying to get the X axis to display grid lines, ticks and labels at reasonable intervals. By reasonable I mean I’d like nicely rounded numbers (no more 0.42, 0.48, 0.54 – I want 0.40, 0.45, 0.50).

The label’s width should be taken into consideration when deciding when to fire a GetAxisLabel event (and thus where to place a label).

Finally, when the user zooms the chart, I need the above to adjust to again show reasonable labels at reasonable intervals. I’ve used other charting components that handle this stuff automatically – I hope TeeChart can as well!

I’m using the version of TeeChart that comes with Rad Studio XE3.

TIA!

Yeray
  • 5,009
  • 1
  • 13
  • 25
casterle
  • 1,037
  • 2
  • 12
  • 27

1 Answers1

0

The options I see here are:

  1. Use an appropriate ´Interval´ for the Bottom Axis. However, depending on what X values are actually being shown at a moment, the labels can start at rounded values or not and still use the Interval you set.

  2. Use custom axis labels. Of course in this case you should clean an recalculate what labels to draw each time you zoom/unzoom the chart.

A simple example project to reproduce the problem would be helpful to see what's the exact situation for your case.

Yeray
  • 5,009
  • 1
  • 13
  • 25