Insights Canvas: Conditional Styles

Conditional Styles allow you to perform a number of dynamic changes to your Insights Canvas elements based on data associated with any Question Chart elements that have already been added to your canvas.

Some of the changes that you can make include:

  • Dynamically replace an image on your canvas
  • Change element colors
  • Hide elements

Explore the Effect options listed below to learn more about what's possible.

Setup

1. Edit the element for which you wish to create Conditional Styles and navigate to the element's Logic tab.

2. Under Conditional Styles, click the green Add State button.

3. Provide a State Name for your state and create a rule under the Change Condition that will serve as the trigger for the below specified effect.

Only Question Chart elements that have already been added to your canvas can be used as a source via the Select a Condition drop-down menu.

The type of Question Chart that is selected above will determine what operators are available.

  • NPS questions will allow you to target the NPS Score as a number, as well as Promoters, Passives, and Detractors as either a percentage of all respondents or a count.

  • Single and multi-select questions will allow you to target a single answer option as a count or percentage. For example, if you have a 5-point Satisfaction Likert Scale question, you can execute an effect if "Very Satisfied" is more than 50% of the selected answer options.

4. Select your desired Effect type. The following options are available (explained in greater detail below):

  • Default Styles - these will be different depending on the element type i.e. you replace an image (Image element) when your change condition is met.
  • Custom CSS - Use custom CSS code to modify an element's look and feel.
  • Custom JavaScript - Use custom JavaScript code to add visual effects or make other customization.
  • Hide Element - When you condition is met, the selected element will be hidden from your canvas.

Note: Multiple types of effects can be used together. Each effect is described in greater detail below.

Available Effects

As mentioned above, there are several available effects that can be triggered when your Change Condition has been met.

Default Styles

The Default Styles effect will vary slightly depending on the element that you are working with and will allow you to make changes to the layout settings described within the Layout & Options tutorial. This is a great option for dynamically making minor visual adjustments to your canvas (i.e. changing a shape's color based on an NPS score).

Setup

1. After you have created your Change Condition, check the Default Styles checkbox and make the necessary updates to the Display Options.

Important: When conditionally updating Default Styles, any fields that are left blank will override the default value. For example, if your original element width is 200px and the Width value is left blank within your Default Style Effect, your new element width will be 0px. If you do not want to change the element width as part of the default style effect, input your element's original width value into the Default Style Effect.

2. Click Update State once you are finished and your element will be set to dynamically update once your change condition is met.

Custom CSS

The Custom CSS effect will allow you to target the element with your own CSS code to make visual updates above and beyond what is available via the Default Styles.

Setup

1. After you have created your Change Condition, check the Custom CSS checkbox.

2. Write your custom CSS code in the space provided. Note that the CSS selector of your element has been included by default.

3. Click Update State once you are finished and your element will be set to dynamically update once your change condition is met.

Custom JavaScript

The Custom JavaScript effect will allow you to target the element with your own custom JavaScript to create visual effects or other customizations above and beyond what is available via the Default Styles.

Setup

1. After you have created your Change Condition, check the Custom JavaScript checkbox.

2. Write your custom JavaScript in the space provided. Note that the ID of your canvas element has been included by default.3. Click Update State once you are finished and your element will be set to dynamically update once your change condition is met.

Hide Element

Select the Hide Element option if you want to remove an element from view once your Change Condition has been met. Perhaps you have added a Text element or a Shape that does not make sense once a data threshold has been met. Using this option, you can dynamically remove an item from your canvas.

Setup

1. After you have created your Change Condition, check the Custom Hide Element checkbox.

2. Click Update State once you are finished and your element will be set to dynamically hide once your change condition is met.

Note: Hidden Elements are removed from the canvas, but can be accessed via the Hidden Elements section below your canvas:

Replace Image

The Replace Image effect is available only via Image elements and allows you to dynamically replace your image when your Change Condition is met.

Setup

1. After you have created a Change Condition for your Image element, check the Custom Replace Image checkbox.

2. Use the Add Image link to provide a new image for the element. The new image can be one that was previously uploaded to your File Library, can be uploaded here, or can be imported from a URL (if externally hosted).

3. Click Update State once you are finished and your image will be set to be dynamically replaced once your change condition is met.

Editing, Copying & Deleting States

If you need to update, copy, or delete a previously created state for a given element, you can do so by editing that element and accessing the Logic tab.

Once there, you can use the edit, copy, and delete icons associated with the state.

Basic Standard Market Research HR Professional Full Access Reporting
Free Individual Team & Enterprise
Feature Included In