0

I have put a tchart on a delphi form (XE4) and make the width 65535 pixels (the maximum). I have set the scale of the bottom axis to fixed values (minimum 0, maximum 65534) and then I add values using something like:

  for i := 0 to 60000 do
chart1.series[0].addXY(i, 10 + (i mod 80));

The result is some strange behaviour with additional lines being plotted on locations where they shouldn't be, while any point beyond 32767 is missing. The same thing happens when setting the maximum of the bottom axis to for example 5000 and fill the whole thing with 'only' 100 samples between 0 and 5000. Remarkable is the fact that some combinations of adding values close to the maximum value of the bottom axis do seem to work (even beyond 32767 pixels from the left).

Does anyone has some insight into the reasons of this behaviour? Is there any way to solve this problem aside from not using tcharts with a width over 32767 pixels?

8
  • Are you really using 65K-pixel wide chart? Is it possible to make a window with such size?
    – MBo
    Commented Apr 23, 2014 at 8:42
  • I put the chart inside a TScrollbox, which works fine
    – Spifff
    Commented Apr 23, 2014 at 9:09
  • What type of chart are you using? FastLine, etc? Sounds like a DrawAllPoints issue - try setting it to True. Also experiment with the different DrawAllPointsStyles.
    – J...
    Commented Apr 23, 2014 at 9:21
  • 1
    I think you are going about this the wrong way. I would do it like this. Put a chart and two scrollbars inside a panel. Scroll bars with alRight and alBottom alignment, chart with alClient. When the user scrolls, change the data shown on the chart. If you want to put all the data in up front, then use the scroll bars to modify the axis ranges. Or you could just re-populate the data on demand if there's a lot of it. Of course, I'm fairly sure the chart will have scrolling functionality. Commented Apr 23, 2014 at 9:31
  • Agreed that this is not a sensible solution to any real-world problem. TChart has a lot of optimizations that you are likely short-circuiting with such a ridiculously non-physical chart size. Put the chart on (ie: within) the screen and let the chart do the work like @DavidHeffernan suggests.
    – J...
    Commented Apr 23, 2014 at 9:38

1 Answer 1

3

TFastLineSeries is not available in TeeChart Lite for FMX, but it is in TeeChart Standard for VCL. See the feature matrix here.

I've been able to reproduce the problem in a VCL project using a TLineSeries, so I've added it to the public tracker. In the meanwhile, if you are in VCL you can change to a TFastLineSeries.

2
  • It is good to know TFastLineSeries works fine, however, it is not visible in my version of Delphi (see teechart.net/support//…). Moreover, I have the same problems with TPointSeries
    – Spifff
    Commented Apr 23, 2014 at 13:20
  • I have installed the patch, which enabled TFastLineSeries which I have been using successfully.
    – Spifff
    Commented Dec 11, 2015 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.