The [sgsr-updown criteria="0"]
shortcode allows you to visually represent changes in values by displaying them with up or down arrows, based on a specified criterion. This is particularly useful for displaying stock price changes, performance metrics, or any data where a visual indicator of increase or decrease is needed.
Attribute |
Description |
Accepted Values |
Example |
criteria="0" |
Defines the breakpoint between up and down values. If set to 0 , negative values will be shown with a down arrow, and positive values with an up arrow.
If set to another value, such as 10 , values greater than 10 will be displayed with an up arrow, and those below 10 with a down arrow. |
Any numerical value |
criteria="0" |
Dynamic Arrows: The shortcode dynamically assigns up or down arrows to values based on the criteria you define. This allows you to quickly and easily identify trends or changes in your data.
Custom Breakpoints: You can customize the threshold for what constitutes an "up" or "down" value. For example, setting
criteria="10"
would mean any value above
10
is shown with an up arrow, while any value below
10
is shown with a down arrow.
Example Usage:
Add this shortcode to the header of a column in your Google Sheets. The shortcode will then automatically apply the up or down arrows to the values in that column based on the specified criteria, making it easy to visualize changes at a glance.
See Live Examples
Showing trends with images:
The
[sgsr-image]
tag can also be used in the column header to display images. You can dynamically set
if
or
else
conditions to place URLs in the column based on the value in another cell. This allows you to show trend indicators, such as arrows, badges, or other symbols, that reflect changes or specific conditions in your data.
For example, you might display a green upward arrow image if a stock's price has increased, and a red downward arrow image if it has decreased, based on the values in another column. This dynamic approach helps in visually communicating data trends and statuses more effectively.
See Live Examples