Jump to content

Dynamic Series in TUniChart

Recommended Posts



I'm trying to add series in a chart by the result of an query. But it will not work.

I tried something like that


    while not dm.qTemp.Eof do
        TmpSeries := tUniLineSeries.Create(Ch_Quoten);
        TmpSeries.Name := 'Series' + dm.qTempKennung.AsString;
        TmpSeries.Title := 'LC' + dm.qTempKennung.AsString;


Can anyone tell me, what I have to do, to make this work?





Link to comment
Share on other sites

  • 7 months later...



Please try this code as it has worked for me successfully:


     icount := InterlockedIncrement( iNamesCounter );
     HorizBarSeries := TUniHorizBarSeries.Create( Chart );
     HorizBarSeries.Parent := Chart;
     HorizBarSeries.Name := 'Horizbar' + IntToStr(icount);


This can be in a loop, but notice that the PARENT and NAME properties are critical to the objects being freed.


NOTE: DO NOT alter the CHART.SERIESLIST list, as the PARENT property will do that for you.



Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...