title: $:/plugins/linonetwo/visualization-dashboard/language/en-GB/Readme

\define lingo-base() $:/plugins/linonetwo/visualization-dashboard/language/

! <<lingo Name>>

<<lingo Description>>

!! Usage

# Tiddlers with tags `$:/Tags/VisualizationDashboard/Gauge` are recognized by the statistical chart plugin and put into the dashboard.
## This plugin comes with several such tiddlers, just fill in the tags to be tracked in the settings to use them. They will also remind you to fill them in the dashboard if you forget to do so.
## You can also disable these preset tiddlers in the settings. To disable, either put the `enabled: no` field on the tiddler, or click the `disable` button below the tiddler.
# Clicking on the Add button ({{$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/Modal/ButtonOpenCreateGaugeModal}}) in the Calendar Dashboard layout opens a modal to quickly create a new visual dashboard.
## The gauges available in the modal are from the plugin's pre-built templates, and more gauge templates will be available as the plugin is updated.
## Each gauge created via the modal is a note tiddler in your wiki, and you can open the tiddler later to freely modify its content.
### Double-click the title to open the gauge tiddler in standard layout
### Through `{{ gauge tiddler title }}` transclusion syntax, you can embed gauge tiddlers in your other notes as gauges
### When used as gauges, you need to manually provide date variables. See "Available Variables in Dashboard" below. Outside the dashboard, these variables are not automatically provided, and you need to use `\procedure xxx() yyy` syntax to define procedures that provide these variables.

!! Available Variables in Dashboard

In gauge templates, you can use the following predefined variables:

|!Variable Name |!Description |!Example Content |
|`currentDateWeekOffset` |Current week offset (from dashboard's "Previous Week"/"Next Week" buttons) |`0` (current week), `-1` (last week), `2` (week after next) |
|`currentDate` |Current date calculated based on offset in dashboard (needs manual provision when using gauges outside dashboard) |`20241201` |
|`weekStartDate` |Start date of current week |`20241125` (Monday) |
|`weekEndDate` |End date of current week |`20241201` (Sunday) |
|`currentTag` |Tag for data statistics |`work`, `study`, `exercise` |

These variables can be used in filter expressions, for example:
* `[get[startDate]compare:date:gteq<weekStartDate>]` - Filter tiddlers with start date greater than or equal to the beginning of this week
* `[in-tagtree-of:inclusive<currentTag>]` - Filter tiddlers containing the current tag

!! Use as Widget

!!! Setting Height

Gauges default to 100% height of their container, but if container is not provided they will shrink to a small size. You need to provide a `div` container and set its height.

```tid
<div style="height:350px">
{{Weekly Statistics}}
</div>
```

!!! Manually Define Variables When Used Outside Dashboard

When you want to embed gauge in other notes outside the dashboard, you need to manually provide the required "Available Variables in Dashboard". You can use `\procedure` syntax to define them:

```tid
\procedure weekStartDate() 20241125
\procedure weekEndDate() 20241201
\procedure currentDate() 20241201
\procedure currentTag() work

{{ Your gauge tiddler title }}
```

Or use filters from [[$:/plugins/linonetwo/date-filters]] to calculate dynamically:

```
\procedure weekStartDate() [weekstart[20241201]]
\procedure weekEndDate() [weekend[20241201]]

{{ Your gauge tiddler title }}
```

!! Developing new gauges

## Refer to the [[Calendar Plugin Official Wiki|https://tiddly-gittly.github.io/tiddlywiki-calendar/]] for fields related to the Calendar Plugin.
# See [[ECharts Plugin Official Wiki|https://tiddly-gittly.github.io/tw-echarts/]] for ECharts visualization-related Widgets.
