Time Series Decomposition- X-axis date format and point label required

I am new to R. I am trying to create a time series plot in powerbi using R. The below code I used in powerbi R visualization and got the time series visualization which I have attached with the title "Decomposition of additive time series".

dataset <- as.Date(dataset$Date) 
data.ts = ts(dataset, frequency=12 , start=c(2016,1), end=c(2019,1))
data.tsdeco<- decompose(data.ts)
data2 = window(data.ts, frequency =12,start=c(2016,1), end=c(2019,1))
data2deco <- decompose(data2)
plot(data2deco, col = "red", lwd =4)
rect(xleft=2017,xright=2018,ybottom=range(data2deco$random),ytop=range(data2deco$random),density =10, col="red")![forum%20ts|690x320](upload://c2T7qAJEHfNifXlB3CDU7iMQSlM.png) 

The .csv source file has the below sample data. It has 100's of Item Number for different date from 2016 till 2019 with date format first of every month.

|Item |Date |Qty |

If I run the .csv file in R and see the structure of the data. It gives the structure for the 3 columns. It shows Item Number as Factor, Date as Factor,Qty as Int.

My desired result requirement:

  1. In the time series decomposition I need date in the format "01/01/2016, 02/01/2016..." in the x-axis and the Quantity in the Y-axis.(Currently it is showing "2016,2016.5.." int the x-axis)
    2)If I move over any points on the line in time series,it should show the data label value for the current time period.

Please note, since this is my first post I am not able to attach more than 1 picture for reference.
Thank you in advance. :+1:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.