Analog Gauge Orientation

I have a bunch of guages configured on a page.
They change orientation from vertical to horizontal as the screen size changes.
Is there a way to control the orientation of analog gauge in perspective?
I dont see any settings exposed for that.

Could you post a screenshot detailing what you’re seeing? There is no setting to control the orientation for either of the gauges because their orientation should not change.

If you’re using a Linear Scale, THAT component changes orientation based on the size of the component. To prevent the orientation from changing, you’ll need to place the component in a situation where its dimensions do not change, such as a Coordinate Container in fixed mode (as opposed to percent).


See screenshot above.
I have a view with analog guage that I am embedding to create all the gauges above.
Left box has 3 embedded views while right box has 4.
As you can see gauges on the left are all horizontal while gauges on right are vertical, probably because the aspect ratio changed.
Vision has a property exposed to control this behavior.
Can this be exposed in perspective too?
Or is there some other way to achieve the same thing here?

The Moving Analog Indicator behaves exactly the same as the Linear Scale. Just like the Linear Scale there is no property exposed to lock the orientation because the orientation is dependent on the dimensions of the component.

To prevent your components from changing their orientation, you need to lock their size so that they don’t stretch to fill a given area. I recommend copying a given component, replacing it with a coordinate container, then pasting the component into that coordinate container (don’t forget to deep-select into the coordinate container). This way, even if the View stretches in one direction or another the component will remain the same size.

Isn't locking the component sizing contrary to what we are trying to achieve in Perspective? How are we supposed to integrate this component into a Perspective application if it is going to automatically change orientation? I would like to use the moving indicator bar and linear scale to build a custom sparkline component that will scale across different screen sizes. Is there any way to achieve this?
Thanks
Dan

image

Presumably you have them all in a Flex Row component. If so, set the scale and indicator bar POSITION props as follows:
grow : 0
shrink : 0
Set the basis to whatever width you require an specify 'px' as the unit.

Meanwhile, on the sparkline set,
grow : 1
shrink : 0
and set the basis to the minimum that makes sense.

I need to use a coordinate container for the sparkline and bar indicator because:

  1. I have 2x sparklines stacked on top of each other so I can display 2 pens.
  2. I need the pen from the sprakline to line up with the left edge of the bar indicator as shown in previous image. If I use a flex container I can't have the sparkline overlap with the bar component. And the bar component can't be narrowed. It always has blank space on its sides to accommodate the process indicator arrow.

Also, by setting the grow and shrink properties to 0, the bar would not scale. I would like the entire view I am creating to shrink/grow as needed.

Thanks
Dan

OK, but that's all information that should have been in the original post.
Can you post the</> formatted JSON for the coordinate container on the forum?

Note: the bindings won't work for us since we don't have the rest of the application. Past the coordinate container into a new view, remove all the bindings (which should leave the data intact) and then copy and paste the coordinate container in here.

Are you seriously giving me a hard time for not posting every single detail of my view?

Just ask and I will provide. I chose not to provide a two-page narrative on my layout at first thinking it might not eve get looked at.

formatted JSON ??? Don't know what this is or how to get it. I am an Ignition SCADA developer.

Thanks
Dan

  • In Project Browser expand the view.
  • Select the coordinate container, right-click, copy.
  • Create a new view. Select the root and paste.
  • Select the coordinate view component and in Perspective Property Browser remove select any bindings, right-click and Remove Binding.
  • Back to the Project Browser, right-click on the coordinate container and copy.
  • In the forum, paste your code, select it all and press the </> to format it as code.

Dude. You not only hijacked an old post for your question (see the forum rules), but don't have the courtesy to provide enough information to even evaluate your question.

We are volunteers here. Please read this long-standing guidance for how to interact with a volunteer community:

http://www.catb.org/~esr/faqs/smart-questions.html

It is written with Linux in mind, but certainly fits this forum. Key point: supplicants have a responsibility to do a reasonable amount of research about their question before asking for help, and to explain the research and results already conducted.

You should:

  • Start a new topic.

  • Show us what you've tried, what you get, and explain what you want to get.

  • Follow the forum rules.

{ Or not. You may not get much help if you don't, though. }

1 Like

My name is Dan, not Dude.
No need for the snark. I found a related post and asked if anyone had any more info. Not hijacking, this one had no solution, and my question was related tot he previous posts. I also see posts with paragraphs written ad decided to make mine brief. Ask for more info, and I will provide, but don't get frustrated with me for not providing every bit of info you might need to help in my initial post.

I disagree. But hey, I'm just a volunteer. Muting your activity is easy, and is now done. You are unlikely to get any more snark from me. Or anything else.