Replies: 3 comments 1 reply
-
Personally I have real-time data working using updateData. I generate candle data on my server as trades come in (in the ohlc format) and pass the current candle across a websocket to the frontend which redirects it into updateData. Works great, |
Beta Was this translation helpful? Give feedback.
0 replies
-
updateData replaces the entire bar, so are you saying that you manually
manage the full time frame candle on the server using each ticks data and
then pass that full candle down to the client each tick?
…On Wed, Aug 31, 2022 at 11:41 AM mercior ***@***.***> wrote:
Personally I have real-time data working using updateData. I generate
candle data on my server as trades come in (in the ohlc format) and pass
the current candle across a websocket to the frontend which redirects it
into updateDate. Works great,
—
Reply to this email directly, view it on GitHub
<#295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALJESO4DMARFSPGJA3VXZTV36RMFANCNFSM56JXQWMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Right. Need to format the correct timestamp according to the period and then stuff it into the chart. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do we update the chart with real-time tick data without redrawing the entire chart?
I only have a new datetime, new price and tick volume. (I do not have o,h,l).
Also, what happens when a new tick with a different minute time comes in? How do we create that new bar?
There was a discussion on this in #165 and a PR to add the functionality (doesn't seem the PR is valid any more)
@liihuu suggested it should not be part of the core library itself and should instead be added manually.
Can someone please show an example of how we can add real-time tick data manually?
updateData() only accepts all of the bar data (date, o, h, l, c, v) at once and trying to implement it seems confusing. Like I have to add reverse the arrays or something to get it to update? I can't get it to work at all.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions