# Sparkline Aspect Ratio

**URL:** <https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 24, 2024, 2:42pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283 "2024-06-24T14:42:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Hensley](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Andrew\_Hensley](https://forum.inductiveautomation.com/u/Andrew_Hensley)\
**Post date:** [June 24, 2024, 2:42pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/1 "2024-06-24T14:42:27Z")

</div>

Hello community! I've been having difficulties with the aspect ratio or positioning on some of my Sparklines in my project. I have a Sparkline overlayed on a Cylindrical Tank. I'm having issues with it displaying appropriately on screens with difference aspect ratios and/or resolutions. It looks good in Perspective with the Ignition Designer, but when checking on a difference device its skewed some direction. Is there a setting to help this maintain consistent across devices? Other components and text appear to scale appropriately, just the Sparkline doesn't

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2e53d0c1b4018033588a6f9f05a1c0279e908ab7.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23709c2863c396cc4bf1144f3702a19368f1b653.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/555990210051315f2ea44e6d64eedfdec0183208.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 24, 2024, 3:26pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/2 "2024-06-24T15:26:26Z")

</div>

Is the tank outline here + sparkline a single view, or are they just two components nested inside a larger view?

---

<div class="post-metadata">

**Author:** ![Andrew\_Hensley](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Andrew\_Hensley](https://forum.inductiveautomation.com/u/Andrew_Hensley)\
**Post date:** [June 24, 2024, 3:57pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/3 "2024-06-24T15:57:45Z")

</div>

They are 2 components nested inside of a larger view.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 24, 2024, 5:06pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/4 "2024-06-24T17:06:53Z")

</div>

So, step 1 in your recipe for success would probably be to stop doing that.

If you use an embedded view that's just a coordinate container with a fixed aspect ratio to lay these components out the way you want, it's guaranteed to scale consistently. You _might_ get the same result by locking the aspect ratio of your current coordinate container that contains these two components as well as everything else you've got, but that's a much more restrictive option.

Step 2 in your recipe for success in Perspective is to skip using coordinate containers almost entirely. Use them in basically exactly two scenarios:

1. You have two components you need to overlap (as in this example, but again - via an embedded view, so that the combined components together act as one single component on whatever outer container).
2. P&ID layouts. These are, generally, a nightmare to design and maintain in _any_ HMI/SCADA system, and Perspective is approximately middle of the pack here. Piping helps, to a degree, but has some significant limitations.

---

<div class="post-metadata">

**Author:** ![Andrew\_Hensley](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Andrew\_Hensley](https://forum.inductiveautomation.com/u/Andrew_Hensley)\
**Post date:** [June 24, 2024, 8:03pm UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/5 "2024-06-24T20:03:41Z")

</div>

I think I mispoke. I have a Coordinate Container & then that container is Embedded inside of a Tab Container. Is that how you are saying that it should be?

When you mentioned the Aspect Ratio you got me thinking & I noticed that the Aspect Ratio of the Coordinate Container was blank, which disables it, I read. I set the Aspect Ratio to 16:9 which matches the platform Ignition Designer is being used with & it looks like it's scaling as desired on an iPad & a laptop.

---

<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:** [June 25, 2024, 5:22am UTC](https://forum.inductiveautomation.com/t/sparkline-aspect-ratio/92283/6 "2024-06-25T05:22:49Z")

</div>

You should bind the aspect ratio to the view's defaultSize instead of a magic number in case the view size is changed.

> [@paul-griffith](#):
>
> skip using coordinate containers almost entirely

For p&ids I would recommend to never use anything _but_ coord containers since their components won't scale with the coord container
