leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.48k stars 370 forks source link

Secondary sync demos not working #934

Closed lucianbaciu closed 1 month ago

lucianbaciu commented 1 month ago

Founding a bug in the latest versions of uPlot, I was trying to see how they work on the demos. Both secondary sync (time-ranger) demos are not working.

leeoniya commented 1 month ago

yep, thanks. will take a look today.

dmccuskey commented 1 month ago

i want to add 3 other demos not working - all are giving same error as OP:

thanks !

mariusk commented 1 month ago

Can confirm that lots of the demos (candlestick/OHLC charts and more as mentioned already) are not working.

mariusk commented 1 month ago

I dug into it a bit, and it is this construct (which inside a lot/all of the failing demos) that is to blame:

                        uPlot.assign(opts, {
                            cursor: {
                                points: {
                                    show: false,
                                }
                            }
                        });

If you remove/comment out the line show: false in the candlestick demo for instance, it works fine.

leeoniya commented 1 month ago

it's a bug if the demos don't work as-is.

it's related to new cursor.points.one setting. (not in any release yet).

i'll look at fixing it in the next couple days.

leeoniya commented 1 month ago

fixed