I want to plot time series in plotly. Dataframe has two columns, date in Date format and number of odrers as integer, for example:
order_created margin
2017-01-01 7004
2017-02-01 4424
2017-03-01 3792
2017-04-01 6031
2017-05-01 7561
2017-06-01 6903
2017-07-01 6687
2017-08-01 3283
2017-09-01 6683
2017-10-01 4781
2017-11-01 6960
When I am plot data using type = "scatter" & fill = 'tozeroy' I get complete mess:
plot_ly(somedata,
x = ~order_created,
y = ~margin,
name = 'Total margin',
type = 'scatter',
mode = 'none',
fill = 'tozeroy')
When I use the same data and code, but change type to "bar" it creates proper plot:
plot_ly(somedata,
x = ~order_created,
y = ~margin,
name = 'Total margin',
type = 'bar',
mode = 'none',
fill = 'tozeroy')
Any suggestions how to produce proper line (filled area) chart?
Thanks