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
Is the tank outline here + sparkline a single view, or are they just two components nested inside a larger view?
They are 2 components nested inside of a larger view.
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:
- 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).
- 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.
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.
You should bind the aspect ratio to the view's defaultSize instead of a magic number in case the view size is changed.
For p&ids I would recommend to never use anything but coord containers since their components won't scale with the coord container