LogoLogo
FeaturesHelp & ResourcesShowcasePricingLogin
Learn Section
Learn Section
  • Introduction
  • Getting Started
    • Finding your way around
    • Core concepts
      • Data Binding
      • Data Insertion
      • Dynamic Visibility
    • Creating and managing projects
      • Creating a Project
      • Saving a Project
      • Opening a Project
      • Version History
    • Templates
  • Components
    • Overview
    • Layout & Positioning
    • Charts
      • Line Chart
      • Column Chart
      • Bar Chart
      • Pie Chart
      • Combination Chart
      • Area Chart
      • Spline Chart
      • Step Chart
    • DataViz
      • Gauge
      • Word Cloud
      • Chord Diagram
      • Sankey Diagram
      • Schedule (Gantt)
      • Metric Tile
      • Progress Bar
      • Trend Icon
      • Mapbox
      • Loading Animation
    • Tables
      • Scorecard
      • Data Table
    • Controls
      • Push Button
      • Dropdown
      • Multi Select Dropdown
      • Listbox
      • Label Based Menu
      • Checkbox
      • Radio Button
      • Slider
      • Value Input
      • Print Button
      • URL Button
      • Screenshot
      • Hotspot
      • Date Picker
      • Toggle Switch
      • Scenario
    • Text
      • Text Label
      • Text Input
      • Text Area
    • Shapes
      • Rectangle
      • Ellipse
      • Line
    • Media
      • Image
      • Icon
    • Containers
      • Container
      • Web View
      • Repeat Container
      • Row Layout
      • Column Layout
  • Functions
    • Overview
    • Data Mover
    • External Parameters
    • Export to Excel
    • Export to PDF
    • Timer
    • Tableau Parameters
    • Browser Info
    • TextJoin
    • Unique List
  • Connections
    • Overview
    • Excel One Drive
      • Excel One Drive Read
      • Excel One Drive Writeback
    • Google Sheets
      • Google Sheets Read
      • Google Sheets Writeback
    • Ninox Connections
    • Smartsheets
    • CSV Connector
    • SAP Webi Connector
    • XDC Connections
    • Database Connections
    • Zapier Trigger
  • Spreadsheet
    • Overview
    • Spreadsheet functionality
    • Supported Spreadsheet Functions
    • Spreadsheet performance
  • Best practices for the Squirrel spreadsheet
  • Publishing & Sharing
    • Overview
    • Project Settings
    • Publishing to Squirrel Cloud
    • Publishing Locally
    • Using the Project Manager
    • Adding projects to PowerPoint
    • Adding projects to Tableau
    • Progressive Web Apps (PWA)
  • SETTINGS
    • Image Library
    • Custom Fonts
  • Account Management
    • Manage your account Profile
    • Understanding your Squirrel plan usage
    • Changing your Plan
    • Billing
    • How do I delete my account?
  • Frequent Questions
    • What data do you keep and for how long?
  • How-Tos
    • Overview
    • Add-ons
      • Add-on Documentation
      • Window Size – Add responsive behavior to your components
      • Window Size - Getting responsive behavior in the canvas
    • Adding your own Google Fonts
    • Chart title and Checkbox label text case formatting
    • Deleting functions and connections
    • Find & Replace Fonts
    • Getting a Mapbox API access token
    • Renaming a component, function or connection
    • Seeing Data from a Connector at Design time
    • Troubleshooting Projects in the Console
    • Using colors and color values
  • Tutorials
    • Create a temperature conversion app
    • Create a revenue growth app from an existing spreadsheet
    • Whack-A-Squirrel Game
    • Filtered Rows Insertion: Building a Filtered Selection
Powered by GitBook
LogoLogo

Explore

  • Home
  • Features
  • Pricing
  • Download Squirrel

Help

  • Learn
  • Community
  • Support
  • FAQ's

Updates

  • Blog
  • Events
  • Release Notes

Company

  • Contact Us
  • Privacy Policy
  • Terms of Use

Copyright © 2019 - 2024 InfoSol Ltd. All rights reserved.

On this page
  • Add responsive behavior to the canvas with the Window Size add-on
  • What does ‘responsive’ mean?
  • Setting up the Window Size add-on
  • Interacting with components on the canvas.

Was this helpful?

  1. How-Tos
  2. Add-ons

Window Size - Getting responsive behavior in the canvas

PreviousWindow Size – Add responsive behavior to your componentsNextAdding your own Google Fonts

Last updated 11 months ago

Was this helpful?

The Window-Size function is an add-on that can be downloaded from the Squirrel365 Marketplace.

Find more details about other available add-ons on the page.

Add responsive behavior to the canvas with the Window Size add-on

With the function, you can connect the width and height of the browser to your displayed project. By binding these values to the spreadsheet, you can then bind the width and height of the main canvas to them. This gives the canvas size to be responsive to the size of the browser window, resizing as the window resizes.

Additionally, you can use these values to calculate the size and positions of onscreen components in the spreadsheet and bind their respective properties to those cells. This allows for dynamic sizing and positioning of onscreen components.

What does ‘responsive’ mean?

The way the add-on works is by reading the pixel width and height of the browser after the project has been published. This then feeds back to the project via the Window Size function, and so when the browser window is resized, the canvas size of the project responds to match the resized window.

Setting up the Window Size add-on

You want to begin by binding the width and Height properties of the canvas to the spreadsheet. Make sure to clearly label and highlight the bound cells so it’s easier to keep track of where they are.

Locate and place the Window Size function

Under the functions drawer, you will want to locate the Window Size function and press the “+” button to add it to the Object Browser. Once added, you will see that the function is simple in that it only has a Width and Height input box in its properties panel.

You are only able to bind these properties, so you will want to go ahead and bind the corresponding inputs to the same cells that you bound the canvas height and width to in the spreadsheet.

Now these are bound to the same cells, they essentially become connected. The Window Size function will read the width and height of the browser of the published project, feed this back to the ‘behind-the-scenes’ spreadsheet, and dynamically update the canvas size to match.

We can see this in the example below.

As the browser’s size is adjusted, as seen by dragging the border of the window or switching between the ‘Fullscreen’ and ‘Windowed’ modes, we can observe the values that have been bound to the canvas width and height are also adjusting.

Interacting with components on the canvas.

Now we have the Window Size add-on wired up to the canvas size properties, we can begin to place our components and calculate their positions based on the size of the canvas.

The process of wiring up the components to adjust for the updating canvas size can be quite complex, containing various conditional calculations, but once you have a grasp of the concepts, it all starts to fall into place.

Check out this article to

add responsive behavior to your components.
Squirrel365 Marketplace
Window Size