Time series with plotly and R

Hi,

I’m using plotly in Power BI and I want to create simple time series.

I have 2 columns in my dataset: DateTime (the data type is DateTime here) and Measure:

this is my code:

g = plot_ly(dataset, x = ~Date, y = ~Measure, type = 'scatter', mode = 'lines')

When I create the chart the labels on x axis don’t look like dates (or formatting is incorrect).

Do you know how to fix it?

I want to achieve x labels like here: https://plot.ly/r/time-series/?_ga=2.255651969.885776380.1565709993-395250019.1564058199