I’m using an easy chart and I’m doing the trend of some production probes plus the phase and recipe that are currently running (both stored as Integer).
I want to convert the values readed by the position along the X axis, to a string where I can put the recipe name and the fase description.
I get the selectedXValue but then I don’t understand how to use it to catch the values of those 2 pens?
It is annoyingly difficult to do, as you have to convert back to a proper date value, convert it to UTC milliseconds as a
double, then use that to locate the index of that timestamp in the raw x-axis chart values (possibly two indices if not an exact match), then looking up the same index (or indices) in the raw value axis of interest.
The easy solution is to replace your EasyChart with an EasyNoteChart from my NoteChart module. It’s X-Trace mode was completely rewritten. In addition to many other features, it delivers the X-Trace timestamp as a proper UTC value, and delivers all pen values for the current X-Trace as a single-row dataset. (See “Pen Value Samples” under “Data Properties”.)
Thank you for the answer but I need to do it without extra module.
You can create some custom properties and then test and assign the needed Y values to the custom properties like so:
Is that what you’re looking for?