Skip to main content
Controls (Triggers)
Karl Sjöstrand avatar
Written by Karl Sjöstrand
Updated over 6 months ago

In the Control group of the Triggers section, there are blocks that initiate the execution of the connected block stack.

When [Object name] emits [Event type] do

Initiate a blockchain execution when a button is clicked or when the mouse cursor hovers over it.

Configuration

Inputs

Description

Object name

Select a button from the workbook

Event type

  • On click - when the button is clicked the action block is executed

  • On hover - when the button is hovered with the mouse cursor the action block is executed

  • On hover exit - when the button is hovered and the mouse leave the button, action block is executed

Supports

Feature

Description

Embeds

Yes

Reporting

Not supported

Example: Toggle visibility of an object when button is clicked

Actions

Dashboards can sometimes require additional guidance for users who haven't used the application before. One way to assist these users is by adding contextual information and explanations of KPIs directly on the dashboard. Incorporating a button to show and hide this information can be an effective method to enhance user experience.

Clicking on the button with name Show/hide Information Button will show the object/group with name Information if it's hidden and hide it if it's visible. This is done with the use of the not condition operator block that will change a True to False and False to True.

Example: Clear filter in field when button is clicked

Actions

Enabling users to quickly clear specific fields can enhance the user experience in guided analytics applications.

Clicking on the button with name Clear Customer ID Filters Button will clear the filters in the field Customer ID in the table Order.

Example: Create image hover effect when button is hovered

When crafting pixel-perfect data storytelling workbooks with Astrato, enhancing user interaction responsiveness is crucial. A compelling way to do this is by displaying different images when a button is hovered over.

Layer structure

  1. Button

  2. Desaturated image (visibility is toggled based on button hover state)

  3. Image

Actions

To implement this, create these objects:

  1. Button - Character Select: A transparent button that is slightly larger than the images. Place this button on top of the images.

  2. Image - Character Select Grey: A desaturated (grayscale) image of the character with its saturation property set to 0%. Toggle the visibility of this image based on the hover state of the button.

  3. Image - Character Select: The character image that will be revealed when the grayscale version is hidden upon button hover.

Ensure that both the images and the button are centered aligned horizontally and vertically.

Set up three actions:

  • On Hover: Hide the desaturated (grey) image when the Character Select Button is hovered over.

  • On Hover Exit: Show the desaturated (grey) image when the Character Select Button is no longer hovered over.

  • On Click: Select the character by using the Set filter action block.

This setup ensures a dynamic and responsive user experience in your Astrato workbooks.

Did this answer your question?