Skip to content

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

Open
ImamAbdullahKhan wants to merge 1 commit intoTechfaneTechnologies:mainfrom
ImamAbdullahKhan:main
Open

Added functionaly to update markers along with ohlc data without manual page reload#18
ImamAbdullahKhan wants to merge 1 commit intoTechfaneTechnologies:mainfrom
ImamAbdullahKhan:main

Conversation

@ImamAbdullahKhan
Copy link
Copy Markdown

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