Mark Vertical Line at the Beginning of the Current Year

Hi,

The following script draws vertical lines at the beginning of every year using the Show Bar tool:

Line1 = YEARNUM() IsUp ;
Line2 = Line1[-1] ;
Line2

Is it possible with a script to draw a vertical line only at the beginning of the current year using the Show Bar tool?

The script should automatically change the vertical line when a new year begins. So, there is no need to make any manual changes at the beginning of a new year.

I have tried a lot of settings using YEARNUM() and YEAR() but all failed.

Many thanks,
Thomas

Hi,

Iā€™d use the following script to make only the latest year:

Line1 = YEARNUM() IsUp ;
Line2 = Line1[-1] ;
V1 = YEARNUM() == LAST(YEARNUM()) - 1;
IF(V1 == 1,Line2,0)

This would change automatically when a new year started.

2 Likes