How Can I add Dynamic values in X-axis

Hi Team,
How Can I add Dynamic values in X-axis?
I have a graph like this.

I need to achieve the below goals.
please help me How Can I do that?
(1) The year of the baseline is fixed, and I want to display the remaining 10 years from the latest year to 10 years ago.

Example 1 If the current year is 2022

Xaxis: 2020, 2021, 2022

Example 2 If the current year is 2030

Xaxis: 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030

Example 3 If the current year is 2031

Xaxis: 2020, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031

hmm I would do a rank and then filter only to that rank that is less than 10, and you can make it customized.

rank_field (checks if year is 2020 and will make it number 1) =
rank([ifelse(extract(‘YYYY’,{date})=2020,9999999999,extract(‘YYYY’,{date})) DESC])

Then filter to the lowest 10 based on this rank.