Replies: 2 comments 2 replies
-
What is the version? |
Beta Was this translation helpful? Give feedback.
-
For those who need the same information, after searching into the source code and blindly trying many things, here is what i've found : Q2 : warning : if you call it synchronously from inside a "zoom" or "scroll" action callback, then the result is wrong. You need to wait a bit, typically using a setTimeout(xxx, 0). Q3, Q4 : calculate it from first & last visible candle indexes + chart.getDataList() Q5 : calculate the new range and call scrollToXXX, knowing that those methods set the last visible index (right side of the chart). |
Beta Was this translation helpful? Give feedback.
-
Hi,
First, thanks Liihuu your lib is really great !
I'm trying to programmatically draw a segment, then scroll and zoom at the left point of the segment. Everything is ok with the segment, I can draw it without any problem. But it's impossible to scroll and zoom around its left point. I've spent hours trying to understand how it works and make it work, and I still have no success. I don't understand the logic underneath.
Q1. What are the base rules for the 'scale' parameter in zoomAtXXX functions ?
Q2. Is there a way to know the first visible candle and the last visible candle indexes or timestamps ?
Q3. Is there a way to know the current scrolling position ?
Q4. Is there a way to know the current zooming factor ?
Q5. Basically, how can I put a candle in the middle of the chart ?
Q6. Is there somewhere examples available related to scrolling & zooming ?
Q7. How to use ConvertFromPixel & ConvertToPixel ? What is this "finder" parameter, what does it mean, how to use it ?
Q8. what's the purpose of setLeftMinVisibleBarCount() & setRightMinVisibleBarCount() ? I've tried it with different values but it has no effect
I've looked for help in the doc, in github, but didn't find anything to get an overview of all this stuff.
Currently i'm about to stop using this lib because i'm completely stuck on this. Thanks a lot to anybody that will help me.
Beta Was this translation helpful? Give feedback.
All reactions