Skip to content
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

Added functionaly to update markers along with ohlc data without manual page reload #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ImamAbdullahKhan
Copy link

As mentioned in #9, how to add markers at the time of preparing the chart, but I was unable to update marker data after referring \data endpoint which is mentoined in https://colab.research.google.com/drive/1w1T2erRjyz3xLkentuIffI75z9kUkN6_?usp=sharing.

I have updated the update function in pytvlwcharts.py and now by passing markers like:
data={
"ohlc": ndf[["time", "open", "high", "low", "close", "position", "color", "shape", "text"]].tail(1)
.replace('', np.nan).dropna(axis=1,how='any')
.to_dict(orient="records"),
"markers": ndf[["time", "position", "color", "shape", "text"]].replace('', np.nan).dropna().tail(1)
.to_dict(orient="records")[:1],
"volume": ndf[["time", "volume", "volColor"]].tail(1)
.rename(columns={"volume": "value", "volColor": "color"})
.to_dict(orient="records")
}
Chart can easily update markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant