Recent

Author Topic: [SOLVED] How to insert a series in a chart during runtime?  (Read 3203 times)

CM630

  • Hero Member
  • *****
  • Posts: 1675
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
I have several series in a chart, they are of different types.
I need to insert a series.
There is a method .AddSeries, but there is no insert. Series have an .index property but haw am I to swap the indexes of two series?
I did  Chart1.Series[2].Index:=X; but it occurs that .Index is now writeable and Chart1.Series[2].Index:=X; did nothing.
« Last Edit: July 19, 2013, 03:07:22 pm by paskal »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

wp

  • Hero Member
  • *****
  • Posts: 13485
Re: How to insert a series in a chart during runtime?
« Reply #1 on: May 22, 2013, 10:09:01 am »
"AddSeries" first, then set the Index of the new series to the position where you want it to be. (http://www.lazarus.freepascal.org/index.php/topic,18257.msg102982.html#msg102982)

 

TinyPortal © 2005-2018