Show the last year available on X Axis

Hello I have a time-series panel and would like to know if it’s possible to show the last year on X-Axis because right now it shows me 2019 and I have data until 2022

My query

SELECT STR_TO_DATE(CONCAT(year, '-01-01'), '%Y-%m-%d') AS time, other_industry as 'Other Industry'
FROM mydb.my_table
WHERE party = 'pt'
ORDER BY time;