plotly joins points in wrong order

Viewed 27

I have the following df (part)

"Date" 
"2022-09-01" "2022-09-02" "2022-09-05" "2022-09-06" "2022-09-07" "2022-09-08" ....
"LogClose"
8.285728     8.274933     8.274933     8.270830     8.289004     8.295593     ....
"wielkoscDD"
0.00000000   -0.01073648  -0.01073648  -0.01478755  0.00000000   0.00000000   ....

I use:

p <- plot_ly(
    df, 
    x = ~Date, 
    y = ~LogClose, 
    name = 'zamknięcie', 
    type = 'scatter', 
    mode = 'lines',
    text = ~paste("zamknięcie :", Zamkniecie),
    width = obrazek_szer,
    height = obrazek_wyso)

here i receive wrong order of points (not in line with Date

but the second draw is correct

 p <- plot_ly(
    df, 
    x = ~Date, 
    y = ~wielkoscDD, 
    name = 'drawdown', 
    type = 'scatter', 
    mode = 'lines',
    text = ~paste("drawdown : ", wielkoscDD), 
    width = obrazek_szer, 
    height = obrazek_wyso)

enter image description here

Additionaly on my Mac it works ok - on Windows there is chaos with the 1st chart. rgds Grzegorz

0 Answers
Related