marius kramer Posted November 4, 2013 Share Posted November 4, 2013 hi, 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 begin TmpSeries := tUniLineSeries.Create(Ch_Quoten); TmpSeries.Name := 'Series' + dm.qTempKennung.AsString; TmpSeries.Title := 'LC' + dm.qTempKennung.AsString; Ch_Quoten.SeriesList.Add(TmpSeries); dm.qTemp.Next; end; Can anyone tell me, what I have to do, to make this work? Regards Marius Link to comment Share on other sites More sharing options...
stiaan Posted June 11, 2014 Share Posted June 11, 2014 Hi 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. Stiaan Link to comment Share on other sites More sharing options...
ricardolb Posted November 30, 2016 Share Posted November 30, 2016 Hi, I am trying to add series dynamically to a chart, but can't make it work, Tried the code as above but still dont work, does anyone know a way? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now