LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intesity Graph Ramp Autosize

Solved!
Go to solution

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.

 

irfanabid_1-1724386927298.png

 

 

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
0 Kudos
Message 1 of 9
(522 Views)
Solution
Accepted by topic author irfanabid

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.

Message 2 of 9
(466 Views)

Thanks for the response. I hope in the future, this can be resized.

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
0 Kudos
Message 3 of 9
(444 Views)

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...

0 Kudos
Message 4 of 9
(440 Views)

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.

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
Message 5 of 9
(410 Views)

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.

0 Kudos
Message 6 of 9
(389 Views)
Solution
Accepted by topic author irfanabid

You could use a second narrow intensity graph that only shows the y scale where you would graph a 2D ramp where z=y.

0 Kudos
Message 7 of 9
(361 Views)

@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.

0 Kudos
Message 8 of 9
(349 Views)

Thanks. It works.

Thanks & Regards,
Irfan
(CLD)
https://haliatech.com/
0 Kudos
Message 9 of 9
(310 Views)