Skip to content

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