-
Notifications
You must be signed in to change notification settings - Fork 569
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
[4][fletcher914] When zooming on the chart, fix the right side to the right edge #315
Comments
No, it centers on your cursor. |
k, updated the issue to reflect that. |
I don't think this is worth changing, the current behaviour makes perfect sense to me. It's also defined by the plotting library used (react-stockcharts), so changing it would not be straightforward. |
I'll leave it up as a bounty. The right axis of the chart should represent now. It doesn't make a lot of sense to display a future with no data when zooming out. Since you've indicated the issue may be more difficult due a charting limitation, I'm going to increase the bounty by 1 hour. |
I'll claim this one. Doing a little research leads me to believe this is optional functionality in react-stockcharts. |
Many traders (including myself) like to extend channel lines, fib time sequences etc into the future because the chart is used to try to predict future price. So this change would shut off the use of the chart for me. Sure the right flush chart will always look pretty on the screen this way but sadly it will no longer be actually usable for me as a trader. |
Why don’t we make it optional then? We could have a button/radio to “lock/unlock” the graph? |
Actually, I just checked out bitcoinwisdom.com and they seem to handle it in a pretty decent way. If you need to shift the graph left, you can click and drag to the left. If you zoom in an out, it re-locks the graph to the right edge and performs the zoom operation. |
I like that functionality @wmbutler. I can check and see how much more work it would take for react-stockcharts to do that. |
Hello everyone, author of react-stockcharts here. It is currently not possible to zoom by anchoring the right edge, it can certainly be changed and I can take a look at it to see how complex it might be. Just out of curiosity, why do folks believe that is superior compared to the zoom with mouse as center? If you move the mouse over the last candle on the right and zoom in/out it anchors that candle and and it stays in its place. It seems to me the current behavior is more flexible the user can choose the candle which has to be anchored and zoom in/out from there. |
Hey @rrag! Isn't that what the clamp functionality is intended for? It seems to work like that when clamp was set to true (It locks the right edge and prevents future charts). Anyone correct me if i'm wrong, but I think what we are going after now is ability to set clamp to false on pan and true on zoom, as this would allow us to drag the charts to the left to expose the future but snap it back when zooming out. That's from my assumption based off of how bitcoinwisdom charts work as mentioned above. |
clamp locks the right and left extremes, for e.g when clamp is true, the right candle will have to the right extreme point, meaning there cannot be empty space after the right most candle. Additionally when you enable clamp, and zoom out, it would anchor the right most candle, but when you zoom in the candle closest to mouse position is the anchor. so if you zoom out twice and zoom in twice you will not end up where you started. check it out here - http://rrag.github.io/react-stockcharts/documentation.html#/zoom_and_pan
in the case of bitcoin wisdom, the right most visible candle is always the anchor for zoom in/out, irrespective of weather there are more candles available right of the visible area Hope that helps |
With bitcoinwisdom, it's true that the right edge is clamped, however, the user can chose to click and drag to break the right edge free. As I ran through your demo, it appears that only the zoom action breaks the right edge free and that's sort of what we are trying to get away from. |
So what kind of functionality are we wanting then? Basically what bitcoinwisdom has? |
My hope was that the right edge of the chart would be fixed unless the user explicitly detached it and that the user would have a simple way to reattach it without having to carefully place it in the right spot. When I first suggested this issue, I didn't realize the user case for detaching to predict future trends but that's a perfectly reasonable use case. What if we add a checkbox that is active by default that clamps to the right edge. Advanced users can then uncheck the box to shift the chart left for analysis.
We could add it under the gear: |
There are a 4 different ways to zoom from my research
When using any of the above 3 types of zoom, you could zoom out 2 times and then zoom in 2 times, you will end up with what you started, irrespective of the initial pan position I have made a change to the library (not published to npm yet, just sharing here to better show the difference) http://rrag.github.io/react-stockcharts/documentation.html#/zoom_and_pan and finally I have not implemented 4 in react-stockcharts. I don't plan to implement it (at least for now) as I consider this less than desirable I want to share a final note about charting with Highstock or google finance these did not allow for a mouse position based zoom, you had to move the edges of a view finder below and right/left anchor was the only option with that interaction. I suppose the preference for 2,3,4 came from being used this type of interface. I recommend keeping the current behavior, but should you want to change it I will be publishing a Thank you |
@fletchertyler914 do you think you can implement the approach I suggested by adding a check box to the settings control so the user can decide whether they want it fixed in place or not? If so, can you finish it tonight? If not, I'll need to move this to 170914. |
Thanks for the input @rrag! I'll be updating to 0.7 as soon as it leaves beta, for now I think the simple solution outlined by Bill above is fine. |
@svk31 @fletchertyler914 @wmbutler And I thank you too @rrag for your timely input and the 0.7 upgrade. |
@fletchertyler914 do you need more bounty on this or is it fair? |
Sorry, got a little busy lately. I got to look at it a bit more and it seems like it should be fairly straightforward implementing the new item in the tools drop down, I will just need to read up a little on react to get everything together. I think 2 hours should be fine, but may need to increase it as I work on it. |
Keep me in the loop. Happy to increase it as needed. |
Upgraded to 4 hours based on unexpected difficulty. |
Not sure if this is part of this issue, but, for me, the rightmost candle starts half off the screen when switching timeframes... should i create a new issue? I can't tell if it is the same issue. Happy to provide a screenshot. |
@landry314, it seems like that is happening on load as well, not just on timeframe switches. This wouldn't be part of this issue though. I think this may be an issue with react-stockcharts, but I will try and confirm that. |
Just confirmed this is an issue with react-stockcharts as it is doing the same thing on the documentation page as well: @rrag, is this suppose to be happening? |
The center of the first and last candle matches the edges of the chart. This is the intended behavior, there are a few ways to show the whole candle Option 1
Option 2
|
@wmbutler, should this be included as well? |
I'm not sure I follow your question. |
@fletchertyler914 as long as you keep the right side of the chart pinned when the settings checkbox is checked, I'd call this complete. |
It's currently
center justifiedcentered on the user's cursor and this makes no sense in the context of the chart.https://v.usetapes.com/99mFY4AKDq
The text was updated successfully, but these errors were encountered: