08-22-2024 11:22 PM
Hi all,
I am using intensity graph, and I want the ramp to be automatically resize (during run time) when the graph is resized. Is there a way to do that programmatically?
I checked bound (ZScale.Area.Height) but it is read only property.
Solved! Go to Solution.
08-26-2024 07:00 AM
Short answer: NO.
Slightly longer answer (spoiler: probably not what you want to hear):
The resize dialog can resize the colored part of the Z-Scale. It uses a VI (\resource\dialog\Resize.llb\PosDims.PasteToTargets.vi) to do this. The VI is locked, but using it is pretty straightforward... IFF, you have a reference to the scale's colored part.
The (only?) way to get it (it's not the ref returned by the property) is to get the UID from the selection (obtained from the graph while the VI is idle) and then use yet another LV API call to get the reference from the UID... And even then, you'd only be able to scale the colored part and hope the scale behaves and scales with it.
So possible: yes. Easy: NO.
08-27-2024 05:38 AM
Thanks for the response. I hope in the future, this can be resized.
08-27-2024 06:06 AM
Maybe some day.
Note that even the graph control itself can't be scaled through properties (you can with the VI mentioned earlier). With properties have to scale the graph area and calculate the size of the control from that...
08-28-2024 10:43 AM
Yes, but for graph, I can use splitter and set scale object with Pane, so it can resize when the window resized.
For intensity graph/chart, only the graph portion that can resize, using the above method, but not the ramp.
08-29-2024 03:23 AM
Absolutely right.
I was just stipulating that the scaling of FP objects is a big inconsistent mess.
I labored over this before. See (the links mentioned in) GitHub - Dynamic-Scaling: Dynamic UI Scaling Toolkit for LabVIEW for inspiration. It won't help with the Z-Scale though, as there's no way to refer to the FP's object.
08-29-2024 04:10 PM
You could use a second narrow intensity graph that only shows the y scale where you would graph a 2D ramp where z=y.
08-30-2024 02:56 AM
@altenbach wrote:
You could use a second narrow intensity graph that only shows the y scale where you would graph a 2D ramp where z=y.
I've done that a few times.
Basically a DIY Z Scale in a separate control.
09-02-2024 09:07 AM
Thanks. It works.