# Perspectives view width

**URL:** <https://forum.inductiveautomation.com/t/perspectives-view-width/29897>\
**Category:** Ignition Early Access\
**Created:** [November 12, 2019, 11:57pm UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897 "2019-11-12T23:57:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [November 12, 2019, 11:57pm UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/1 "2019-11-12T23:57:29Z")

</div>

I am probably just overlooking this, but how do I determine the view width dynamically? I just want to run a property change script to move the location of the legend on chart.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 13, 2019, 3:43am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/2 "2019-11-13T03:43:10Z")

</div>

You can’t ~~, this is by design so you don’t break things with recursive loops. Let me dig up a post…~~

Edit:  
I think this was for the breakpoint container width, not for the View. I think the View width is just not available (yet)

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 13, 2019, 3:44am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/3 "2019-11-13T03:44:38Z")

</div>

Consider using a breakpoint view to accomplish what you need to.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [November 13, 2019, 4:03am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/4 "2019-11-13T04:03:28Z")

</div>

@nminchin I am interested in your post. This would not be recursive since I am only trying to move the legend.  
@witman I thought the same but I can’t figure it out. There should be a property I can evaluate…

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 13, 2019, 4:09am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/5 "2019-11-13T04:09:03Z")

</div>

> [@weertske](#):
>
> I thought the same but I can’t figure it out.

I'm not sure if this was the issue, but when working with a breakpoint container you create separate layouts for the sizes. So on the right in the Perspective property browser, you have to tap on the size layout you want to edit, and then create the layout for it.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5ced3ef465c918ab016d31b93a84ee002d32e294.png)  
Then select the other size and create the layout for it.

> [@weertske](#):
>
> There should be a property I can evaluate.

[This is in feature requests](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/expose-viewport-dimensions-in-perspective), but not available at this time.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [November 13, 2019, 4:16am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/6 "2019-11-13T04:16:53Z")

</div>

@witman I did what you suggested but no joy. It shouldn’t be that hard to get the viewport width or an event to trigger a breakpoint event.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 13, 2019, 4:20am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/7 "2019-11-13T04:20:06Z")

</div>

> [@weertske](#):
>
> I did what you suggested but no joy.

That's no good! At what point does it not work? Were you able to create the small and large layouts in the breakpoint view with the legend in the desired location in each layout?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 13, 2019, 4:21am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/8 "2019-11-13T04:21:40Z")

</div>

The breakpoint container would need either two versions of the View, or the same View supplied with different parameters.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [November 13, 2019, 4:24am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/9 "2019-11-13T04:24:38Z")

</div>

I know how to use the breakpoint with virews. I have a version based on it. However, why do all that work when all I want is an event to trigger the change in legend location.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 13, 2019, 4:32am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/10 "2019-11-13T04:32:30Z")

</div>

> [@weertske](#):
>
> why do all that work when all I want is an event to trigger the change in legend location.

I agree exposing view dimensions would be useful for things like what you're trying to do here as well as text sizing (there is a workaround for the latter posted in a comment on the idea linked in one of my earlier posts on this thread). It sounds like we'll likely get access to these at some point in the future, but not yet:

> [@\[FEATURE-14537\] Perspective: Column Layout View Improvements](http://forum.inductiveautomation.com/t/feature-14537-perspective-column-layout-view-improvements/26786/2):
>
> Breakpoints determine only the position (row:column:span) of a component. See below See below. The problem is not that you can’t find it, the problem is that there is no such setting. See explanation below. As for row vertical alignment, you should NEVER have more than one row within a row. Make additional rows and position as needed within those. Eventually, when we provide visibility into Viewport dimensions, you’ll be able to accomplish the “width-dependent height definition” pa…

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [November 13, 2019, 4:41am UTC](https://forum.inductiveautomation.com/t/perspectives-view-width/29897/11 "2019-11-13T04:41:38Z")

</div>

Thank you for the link. I will see what I can do to encourage the exposure of viewport dimensions.
