[SOLVED] Troubles with TDataPointDragTool lazarus / 55-TAChart ---------------------------------------------------------------------- CM630 · 2020-10-02 18:40 I am trying to fix a bug in a component that I have started to write... 6 or 7 years ago, I have stopped woring on it 5 years ago, at least. Well, I tried to create a snippet, but I cannot make TDataPointDragTool work in a standalone component. I tried the ..\lazarus\components\tachart\demo\tools. Dragging works for the two vertical bars, but it does not work for the Chart1FuncSeries1 (I expect that should be able to move its points). I have set the AffectedSered of ChartToolset1DataPointDragTool1 to 0,1,2,3 (it was 2,3). What else should I do? ---------------------------------------------------------------------- wp · 2020-10-02 19:58 ChartFuncSeries1? No, you cannot drag its points, in fact, it does not even have points, it is defined by a function defined by an event handler. ---------------------------------------------------------------------- CM630 · 2020-10-04 08:34 Okay, I did: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormCreate(Sender: TObject);begin  myLineSeries:= TLineSeries.Create(Chart1) ;  myLineSeries.ShowPoints := True;  myLineSeries.AddXY (0,-0.5);  chart1.AddSeries(myLineSeries);  ChartToolset1DataPointDragTool1.AffectedSeries := ChartToolset1DataPointDragTool1.AffectedSeries + '0,1,2,3,4,5';end;   Now I can move the quadrangle, drawn and teh single point of MySeries. But besides that, sth. seems wrong- I have tried to add a LineSeries in the GUI mode- the series was shown, but when I run the app it is gone. (Laz ver etc are in my signature)/. ---------------------------------------------------------------------- wp · 2020-10-04 16:55 Did you add data points to the series? Normally you must do this at runtime (even if the series is created at designtime -- ok, you could use a TListChartSource where you can enter values in the DataPoints property at designtime). ---------------------------------------------------------------------- CM630 · 2020-10-07 08:29 Maybe the image will expain it better than words: On the left: what is shown in the IDE. On the right : what happens when the app is executed. Edit: I have just found sth. odd: When I save and close the project and reload it- the values in the DataPoints are lost! No surprise that they are not shown if the compiler does not see them them saved. ---------------------------------------------------------------------- wp · 2020-10-07 15:42 In fact, I never used the interal listchartsource of a series for this purpose. I guess the built-in source is not prepared for it, or maybe there is a Clear somewhere. Debugging designtime code is always hard stuff, so I am not very much motivated to begin... What you can do is to add a separate TListChartSource to the form, attach it to the LineSeries.Source, and add values to the DataPoints property like you did with the internal ListChartSource. This works, for sure -- see attachment. ---------------------------------------------------------------------- CM630 · 2020-10-09 12:26 Generally I do not use the design time editor for TAChart, I just wanted to execute some simple snippet for sth. more complex, which I have succeeded to fix. But since you confirm that this is a bug, I will try to create a report for it, in case that its time comes, or rather to know that this is not working. ---------------------------------------------------------------------- wp · 2020-10-09 13:54 Quote from: CM630 on October 09, 2020, 02:26:01 pmBut since you confirm that this is a bug, I will try to create a report for it, in case that its time comes, or rather to know that this is not working. Good idea. Assign it to me. Add a demo project and link also to this discussion. ---------------------------------------------------------------------- CM630 · 2020-10-09 21:32 https://bugs.freepascal.org/view.php?id=37904 I am not sure, that I can assign bugs, currently it is unassigned.