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.
, this is by design so you don’t break things with recursive loops. Let me dig up a post…
I think this was for the breakpoint container width, not for the View. I think the View width is just not available (yet)
Consider using a breakpoint view to accomplish what you need to.
@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…
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.
Then select the other size and create the layout for it.
This is in feature requests, but not available at this time.
@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.
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?
The breakpoint container would need either two versions of the View, or the same View supplied with different parameters.
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.
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:
Thank you for the link. I will see what I can do to encourage the exposure of viewport dimensions.