# Analog Gauge Orientation

**URL:** <https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 14, 2019, 6:15pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075 "2019-10-14T18:15:07Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [October 14, 2019, 6:15pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/1 "2019-10-14T18:15:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 14, 2019, 7:11pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/2 "2019-10-14T19:11:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [October 14, 2019, 9:09pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/3 "2019-10-14T21:09:04Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e889fb22e7430ccfe008162619ec0fba1e1f73a1.png)  
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?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 14, 2019, 9:17pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/4 "2019-10-14T21:17:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dberry](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@dberry](https://forum.inductiveautomation.com/u/dberry)\
**Post date:** [January 22, 2024, 3:54pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/5 "2024-01-22T15:54:54Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/41112964e742806b651b40159c38f8dabc1ea730.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 22, 2024, 10:42pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/6 "2024-01-22T22:42:43Z")

</div>

> [@dberry](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![dberry](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@dberry](https://forum.inductiveautomation.com/u/dberry)\
**Post date:** [January 29, 2024, 3:37pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/7 "2024-01-29T15:37:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 29, 2024, 3:43pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/8 "2024-01-29T15:43:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dberry](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@dberry](https://forum.inductiveautomation.com/u/dberry)\
**Post date:** [January 29, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/9 "2024-01-29T15:51:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 29, 2024, 4:20pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/10 "2024-01-29T16:20:55Z")

</div>

- 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](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 29, 2024, 4:52pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/11 "2024-01-29T16:52:51Z")

</div>

> [@dberry](#):
>
> seriously giving me a hard time

Dude. You not only hijacked an old post for your question (see the [forum rules](https://forum.inductiveautomation.com/faq)), 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](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. }

---

<div class="post-metadata">

**Author:** ![dberry](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@dberry](https://forum.inductiveautomation.com/u/dberry)\
**Post date:** [January 29, 2024, 5:31pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/12 "2024-01-29T17:31:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 29, 2024, 5:47pm UTC](https://forum.inductiveautomation.com/t/analog-gauge-orientation/29075/13 "2024-01-29T17:47:14Z")

</div>

> [@dberry](#):
>
> No need for the snark.

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.
