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
Drag zoom loosing data points #52
Comments
I think the flattening is coming from how the bezier control points are calculated. We'll need to do some investigation to figure out why the points are lost. My likely theory is that the zoom is incorrectly calculated and the first point is now outside the new axis minimum |
hey. You have any progress on this? is there somewhere you may need help? My team has this bug as well and if we could we would like to help it be solved asap |
Hey, i haven't looked into this more yet. Do you have an example that reproduces for debugging? |
I think the original post was made with an example from the demo, still, if
you want I can provide a new one
…On Fri, 6 Jan 2017, 13:09 Evert Timberg, ***@***.***> wrote:
Hey, i haven't looked into this more yet. Do you have an example that
reproduces for debugging?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADlMQ7qA9rCx5akFRa1Wxwppc9dB4Bl-ks5rPj0hgaJpZM4KmudQ>
.
|
do you need any help moving this forward? |
any progress on this? |
Same issue here. |
Noticing this issue as well. |
I have put together a fiddle to illustrate this issue: https://jsfiddle.net/opr9rgo6/ In my case it occurs within a time chart - not sure if the issue is specific to time or not, but I see the first cited example is also a time chart. To see the issue dragover a section which includes the first 2 data points like so: You will see the zoomed content does not include the first data point: Also, for this fiddle I used chart bundle 2.5, since zoom doesn't work at all with more recent versions. |
Any progress on this? I tried looking into it awhile back but had no luck. |
Have you tried again with the latest version 0.6.2 which has many fixes included? |
@benmccann Just tried the latest version and the issue is still there, unchanged. The issue is that the zoomed scale it calculates from the selection is incorrect unless the center of the selection is at the center of the chart. The farther away the center of the selection is from the center of the chart, the more inaccurate the zoomed scale becomes. |
Ok. I've been trying to merge PRs with fixes, but there's no one actively fixing bugs in this library. So really anyone who wants this fixed will have to send a PR |
The usage of the zoom functions when using the drag selection is pretty stupid, there is already a good function to get the value at a pixel. I refactored the mouse up handler, and it works perfectly now with a time graph. I haven't tested it with non-time graphs, but it should work exactly the same.
If someone wants to submit a PR or fix it better, feel free to do so. |
I'm only using time graphs for drag-zoom, and @chriser-'s solution works great! |
Hi
I am working on an implementation of the zoom plugin using the drag feature. I am following the
samples/zoom-time.html
example. When i drag a zoom area, the resulting line chart looses data points. This happens in both my chart and the example chart.Drag:
Result:
As you can see the first data point is gone and the resulting chart is off too. The result in mine is even more extreme with more of a flattening line. It kind of looks like the chart data is averaged instead of zoomed.
Here is the zoom config I am using:
limits was in the example but I do not see in in chart.zoom.js
I'd love some help here :)
Thanks,
Jordan
The text was updated successfully, but these errors were encountered: