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

In the Control group of the Triggers section, there are blocks that initiate the execution of the connected block stack. Supported controls/objects are Maps, Buttons and Filter bar custom buttons

When [Button] 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 control 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.

When [Map] emits [Event type] do

Initiate a blockchain execution when a point on a Map is clicked or when the mouse cursor hovers over it.

Event parameter block contains additional parameter information from the emitted event. Needs to be placed inside the When block.

Configuration

Inputs

Description

Object name

Select a Map visualisation from the workbook

Event type

  • On click - when the point on a Map is clicked the action block is executed

  • On hover - when the point on a Map is hovered with the mouse cursor the action block is executed

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

Event parameters

Parameter

Description

Dimension id

The id of the dimension of the data point

Dimension Value

The value of the dimension of the data point

Measure id

The id of the measure of the data point

Measure Value

The value of the measure of the data point

Left Position

The left postion on screen of the the data point. The position is given as a relative value between 0 and 100, indicating its relative location to the left of the sheet

Top Position

The top postion on screen of the the data point. The position is given as a relative value between 0 and 100, indicating its relative location to the top of the sheet

Layer name

The layer name of the data point

Latitude

The latitude position of the data point

Longitude

The longitude position of the data point

Supports

Feature

Description

Embeds

Yes

Reporting

Not supported

When [Filter bar] emits [Event type] do

Initiate a blockchain execution when a point on a custom button in the Filter bar is clicked or when the mouse cursor hovers over it.

Event parameter block contains additional parameter information from the emitted event. Needs to be placed inside the When block.

Configuration

Inputs

Description

Object name

Select the Filter bar from the workbook

Event type

  • On click - when a custom button in the Filter bar is clicked the action block is executed

  • On hover - when a custom button in the Filter bar is hovered with the mouse cursor the action block is executed

  • On hover exit - when a custom button in the Filter bar is hovered and the mouse leave the button, action block is executed

Event parameters

Parameter

Description

Custom button name

The name of the custom button that is being clicked or hovered.

Supports

Feature

Description

Embeds

Yes

Reporting

Not supported

Did this answer your question?