Open kitty7c6 opened 7 months ago
range defined with a static array is designed to be static (not zoomable). if it does zoom then it is a bug :)
btw, you can define the scale range as a callback, which gives you full control over what happens.
what behavior are you trying to achieve? an initial range? a max range? can you make a jsfiddle that demonstrates this? e.g. https://jsfiddle.net/esdpugqx/
Hello! What do I want to achieve: finally I want to have two charts with x-sync and a specified scale, and scroll. By scroll I want to move data into the window like in "Dynamic data update / streaming" - Fixed length / sliding data slices. I thought, that range can be that specified scale (but it not)). Than I tried to work with function setScale(), and found that setScale(x) calls resetYseries (and libs code it confirmed). Is it possible to use setScale to x and y in one function: setScale(x{ , }, y{ , })?
Now I think about:
Or
please make a jsfiddle with your two charts and simulate data streaming (1Hz). then i will help you with zooming / scaling.
Is it possible to use setScale to x and y in one function: setScale(x{ , }, y{ , })?
setScale() is batched, you can set both at same time with 2 calls.
https://jsfiddle.net/Napster7c6/egLd24sv/6/ without scroll, but I can to add it (scroll is another div with resizeble div inside)
thanks.
your demo looks like example 2 (only push), but you said "Fixed length / sliding data slices". which is example 1.
https://leeoniya.github.io/uPlot/demos/stream-data.html
is your demo the correct type?
without scroll, but I can to add it (scroll is another div with resizeble div inside)
let's get it working without scroll first :)
my bad, I updated renderer.js. It has data_chart() for all data (for saving) and data_view() for data on charts
Hello, I find strange behavior of zooming X scale. When X scale из without range (auto) - it zooms, but if it has range[ x1, x2] zoom on X doesn't work. Zooming by mouse. But! on Y scale zoom works in both situations. What I do wrong? or is this normal behavior og is it bug?
I have two uPlots with syncro on X, uPlot options: