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

possible pyecharts compatibility sulotion for all python versions #182

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"scipy",
"matplotlib",
"requests",
"pyecharts==1.7.1", # broken api between 0.x and 1.x
"pyecharts==1.7.1;python_version<='3.9'", # broken api between 0.x and 1.x
"pyecharts==1.9.1;python_version>'3.9'",
"beautifulsoup4>=4.9.0",
"sqlalchemy<2.0",
"pysocks", # sock5 proxy support
Expand Down
4 changes: 2 additions & 2 deletions xalpha/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ def plot_kline(
.add_js_funcs("var barData = {}".format(list(df["close"] - df["open"])))
.add_xaxis(xaxis_data=list(df["date"]))
.add_yaxis(
series_name="",
yaxis_data=vl,
"",
vl,
label_opts=opts.LabelOpts(is_show=False),
itemstyle_opts=opts.ItemStyleOpts(
color=JsCode(
Expand Down
4 changes: 2 additions & 2 deletions xalpha/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def vtradevolume(cftable, freq="D", rendered=True):
datedata = list(datedata)
bar.add_xaxis(xaxis_data=datedata)
# buydata should before selldata, since emptylist in the first line would make the output fig empty: may be bug in pyecharts
bar.add_yaxis(series_name="买入", yaxis_data=buydata)
bar.add_yaxis(series_name="卖出", yaxis_data=selldata)
bar.add_yaxis("买入", buydata)
bar.add_yaxis("卖出", selldata)
bar.set_global_opts(
tooltip_opts=opts.TooltipOpts(
is_show=True,
Expand Down