Forum > TAChart

[possible bug] adding a mark always changes axis range min/max

<< < (2/3) > >>

wp:

--- Quote from: Muso on July 18, 2022, 03:03:49 pm ---- being able to set a short text for the mark and by hovering the mouse over the mark, one gets the full text. This would be cool, because sometimes one need more text but don't wand to clutter the chart with large text

--- End quote ---
You have everything needed. The series has an OnGetMark event in which you can decide what will be shown as data point label finally. And you can add a TDataPointHintTool which displays a popup hint window and has an OnHint event, again to determine which text will be in the popup. The basic idea is to merge both kinds of information into the Text field of the datapoint: simply separate them by an unused character, e.g. a "|". Both events must read tha datapoint Text string, split it at the "|" - the first part goes to the series marks, the second part goes to the hint tool (or reverse). See attached demo.


--- Quote from: Muso on July 18, 2022, 03:03:49 pm ---- easier selection of existing marks, so that one can e.g. double-click on a mark to alter it

--- End quote ---
Isn't the datapoint click tool enough?

Muso:

--- Quote from: wp on July 18, 2022, 04:47:43 pm ---You have everything needed. The series has an OnGetMark event in which you can decide what will be shown as data point label finally.
--- End quote ---
It is not about the data point but the area of the mark. For my application, the DataPointHintTool shows the value of the data as popup. This is fine. For a mark however, I need a popup when hovering with the mouse over the mark area (so not above the data point).I attached a screencast to demonstrate what I mean.

I am not the only user of the program and the feedback I got is that people expect they can either hover with the mouse over the mark's area or click into it.I add the the program description that they need to zoom in, select the data point and first then can change the mark. But who reads docs  ;) ? So I cot complaints once per user that the marks cannot be changed. Looking at other laboratory software one can directly click on a mark to change. So people are used to that.

However, as I wrote, this is something for the future. As it is, it is fine in my opinion. I think people will understand that every program is a bit different and I am also no service provider to please my colleagues  :) .


--- Quote from: wp on July 18, 2022, 04:47:43 pm ---Isn't the datapoint click tool enough?

--- End quote ---
No, because one first has to zoom in a lot to pick the data point that holds the mark. (There is a datapoint every 3 seconds and the measurements take usually weeks.)

wp:
The problem with a "TMarksClickTool" is that all marks border polygons should be stored somewhere, and the ChartSources are not prepared for that. Or the marks rectangles should be recalculated at real time whenever the tool is active (in the worst case: whenever the mouse is moved), and I am afraid that the chart could become quite slow this way in case of many marks. As already said marks borders are polygons rather than rectangles which even can be rotated; their calculation is quite complex.

wp:
Added an experimental TDatapointMarksClickTool. It was not as difficult as expected; the code is not very intelligent, though, mostly copy and paste of existing fragments with minor adjustments. But anyway, it seems to work, also with rotated labels and with an elliptic shapes. See attached test program (IMPORTANT: requires the TAChart version of Laz/Main!)

Please do not yet consider the current code as stable, there may still be some code-breaking changes in the next days after some more testing.

Muso:

--- Quote from: wp on July 23, 2022, 07:42:52 pm ---(IMPORTANT: requires the TAChart version of Laz/Main!)
Please do not yet consider the current code as stable, there may still be some code-breaking changes in the next days after some more testing.

--- End quote ---
Many thanks!
As I wrote, these were just ideas. I feel that I set you under pressure but that was not my intention. Sorry.

However, of course I will test  :) . However, I cannot do this this week, but next weekend I should have some time and have then access to FPCupDeluxe and thus to Main. So please tell me what I should/could test on Friday.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version