Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 3.5 KB

File metadata and controls

46 lines (39 loc) · 3.5 KB

Template Variables

Currently, there are two places you can use template variables. First is the template parameter under output type summary. The second one is the value parameter under output type bullet. For each template variable, the plugin will do calculations based on the collected dataset refereed, and render the output with variables replaced by calculated results.

The following table shows all the template variables available for now. The "N" in the table is the ID (the order of a target in searchTarget parameter starting from zero) or the name (specified by the parameter datasetName) of a dataset.

Examples using template variables could be found here.

List of Template Variables

Template variable Description
{{min}}
{{min(Dataset(N))}}
Minimum value of the dataset
{{minDate}}
{{minDate(Dataset(N))}}
Latest date of minimum value
{{max}}
{{max(Dataset(N))}}
Maximum value of the dataset
{{maxDate}}
{{maxDate(Dataset(N))}}
Latest date of maximum value
{{startDate}}
{{startDate(Dataset(N))}}
Start date of the dataset
{{endDate}}
{{endDate(Dataset(N))}}
End date of the dataset
{{sum}}
{{sum(Dataset(N))}}
Summation of values of the dataset
{{numTargets}}
{{numTargets(Dataset(N))}}
Total counts of targets
{{numDays}}
{{numDays(Dataset(N))}}
Days from startDate to endDate
{{numDaysHavingData}}
{{numDaysHavingData(Dataset(N))}}
Number of days having data
{{maxStreak}}
{{maxStreak(Dataset(N))}}
Maximum continuous days without breaks
{{maxStreakStart}}
{{maxStreakStart(Dataset(N))}}
Start date of the max streak
{{maxStreakEnd}}
{{maxStreakEnd(Dataset(N))}}
End date of the max streak
{{maxBreaks}}
{{maxBreaks(Dataset(N))}}
Maximum break days
{{maxBreaksStart}}
{{maxBreaksStart(Dataset(N))}}
Start date of the maximum break days
{{maxBreaksEnd}}
{{maxBreaksEnd(Dataset(N))}}
End date of the maximum break days
{{currentStreak}}
{{currentStreak(Dataset(N))}}
Current continuous days
{{currentStreakStart}}
{{currentStreakStart(Dataset(N))}}
Start date of current streak
{{currentStreakEnd}}
{{currentStreakEnd(Dataset(N))}}
End date of current streak
{{currentBreaks}}
{{currentBreaks(Dataset(N))}}
Current break days
{{currentBreaksStart}}
{{currentBreaksStart(Dataset(N))}}
Start date of current breaks
{{currentBreaksEnd}}
{{currentBreaksEnd(Dataset(N))}}
End date of current breaks
{{average}}
{{average(Dataset(N))}}
Average value of the dataset
{{median}}
{{median(Dataset(N))}}
Median value of the dataset
{{variance}}
{{variance(Dataset(N))}}
Variance value of the dataset

List of Deprecated Template Variables

Template variable Description
{{count}}
{{count(Dataset(N))}}
Use numTargets instead
{{days}}
{{days(Dataset(N))}}
Use numDays instead
{{lastStreak}}
{{lastStreak(Dataset(N))}}
Use currentSteak instead

Notice when doing calculations like sum or average, the missing values are ignored. You can set those missing values to zero by setting the value of key penalty to zero. Moreover, if the key ignoreZeroValue is assigned true, zero value will be ignored too. You can check these parameters here