Bug 462560

Summary: Info Element does not connect to second curve
Product: [Applications] LabPlot2 Reporter: RG <robgruebler>
Component: generalAssignee: Alexander Semke <alexander.semke>
Status: RESOLVED FIXED    
Severity: normal CC: martin.marmsoler
Priority: NOR    
Version First Reported In: 2.9.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot "IS02_LPIE01.png"
LabPlot Project "Labplot_IssueInfoEle.lml"
Infoelement variable usage

Description RG 2022-12-02 21:01:03 UTC
Created attachment 154240 [details]
Screenshot "IS02_LPIE01.png"

SUMMARY
The info element always shows the values of curve 1, even if it is connected to curve 2.

STEPS TO REPRODUCE
1.	Start LabPlot
2.	Open project IssueInfoEle.lml
3.	Add an Info Element to the plot
4.	In Settings Info Element: 
        select both curves and connect to "Relative Humidity in%".


OBSERVED RESULT
Info element always shows the values of curve 1. See IS02_LPIE01.png

EXPECTED RESULT
Info element shows the values of curve 2 and possibly the values of curve 1.

SOFTWARE/OS VERSIONS
Win10 Pro 64 bit, German
LabPlot V 2.9.0,  Release build Dec 1 2022, 17:22:55; Language=English


ADDITIONAL INFORMATION
Comment 1 RG 2022-12-02 21:03:41 UTC
Created attachment 154241 [details]
LabPlot Project "Labplot_IssueInfoEle.lml"

Test case Info Element with 2 curves
Comment 2 Martin 2022-12-02 22:34:05 UTC
Created attachment 154244 [details]
Infoelement variable usage

Hi,

this is a bit confusing with the Infoelement, but it makes it really flexible. Check out my attachment. The idea is to use variables in the "Title" of the InfoElement to show the values of the desired curves. The scheme of a variable is: "&(<curvename>)". Now just replace <curvename> by a name of one of the curves and you will see the variable is replaced by its value.

For example to show the x value you have to use &(x)
Use "&(Temperatur in °C)" to show the temperature in degree celcius curve and use "&(Relative Luftfeuchtigkeit in %)" to show the value of the humidity.

Let me know if you have any trouble with it
Comment 3 RG 2022-12-03 00:09:39 UTC
(In reply to Martin from comment #2)

> this is a bit confusing with the Infoelement, but it makes it really
> flexible.

That's right, I was a little confused by the behaviour ... your suggested solution works brilliantly. Many thanks for the help.
Comment 4 Martin 2022-12-03 09:19:39 UTC
You are welcome. If you have any other question, you can also ask in the Matrix chat: https://matrix.to/#/!jDLqWTaTGNKnenBSNA:kde.org?via=kde.org&via=matrix.org