-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small 10-point data breaks uplot #200
Comments
i can't reproduce this :( everything works okay for me when zooming down to 1 point, or even 0 points. |
Maybe some kind of cache error? It works for me now as well. Try this one please: |
where? the code looks identical to the first jsbin. |
My fault, didn't save the right snapshot. This one should work: |
ok, this was not a regression. the minimal repro is this: const data = [
[
1576713600.736,
1576713601.727,
1576713602.726,
1576713603.727,
1576713604.73,
1576713605.73,
1576713606.73,
1576713607.73,
1576713608.732,
1576713609.731
],
[
3.38625,
3.3866,
3.38684,
3.38697,
3.38716,
3.38741,
3.38771,
3.38744,
3.38675,
3.38649
]
];
const opts = {
width: 400,
height: 300,
series: [{},{}],
};
let u = new uPlot(opts, data, document.body); the cause of this was that uPlot found only 1 tick for the given to reduce some redundancy in arguments, should be fixed. |
the value formatting config you provided only goes down to 1s, so it will still error out if you try to zoom in too much since it lacks sub-second rules. but i assume that you'll avoid this by limiting zoom-in (#187) or something. |
actually, rather than limiting zoom-in, you should just limit the max split resolution by restricting the bottom end of axes: [
{
incrs: [
1,
5,
10,
15,
30,
// ...
],
values: [
[3600 * 24 * 365, "{YYYY}", 7, "{YYYY}" ],
[3600 * 24 * 28, "{MMM}", 7, "{MMM}\n{YYYY}" ],
[3600 * 24, "{MMM}/{D}", 7, "{MMM}/{D}\n{YYYY}" ],
[3600, "{HH}:{mm}", 4, "{HH}:{mm}\n{MMM}/{D}" ],
[60, "{HH}:{mm}", 4, "{HH}:{mm}\n{MMM}/{D}" ],
[1, "{HH}:{mm}:{ss}", 4, "{HH}:{mm}:{ss}\n{MMM}/{D}"]
]
},
] |
https://jsbin.com/vuxizorupu/edit?html,js,console,output
Try zooming into an area with 6 samples or less, breaking in my Chrome.
Note that this error didn't happen in a previous version (not sure which one exactly)
The text was updated successfully, but these errors were encountered: