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

生成的render.html文件的<title>参数能不能添加呢? #160

Closed
ly1102 opened this issue Sep 5, 2017 · 15 comments
Closed

生成的render.html文件的<title>参数能不能添加呢? #160

ly1102 opened this issue Sep 5, 2017 · 15 comments

Comments

@ly1102
Copy link

ly1102 commented Sep 5, 2017

因为画太多图了,打开了很多,然后在浏览器上,看到的title全是ECharts,不容易区分,不知道是否可以在render函数加个page_title的参数。。。

@chenjiandongx
Copy link
Member

你指的是使用 Page 的时候吗?

@chfw
Copy link
Member

chfw commented Sep 5, 2017

<head><title>"my super cool echarts"</title></head>

@chenjiandongx
Copy link
Member

不过把 render 重新命名不就一个意思吗,也可以区分。都支持传入参数修改

@ly1102
Copy link
Author

ly1102 commented Sep 5, 2017

image
像这样,虽然html的文件名不一样,但是在浏览器的标签栏,就全是ECharts。如果要修改title标签,应该用什么参数呢?我在Grid和bar等画图的render函数的参数没有看到设置page title的参数。

@sooluck
Copy link

sooluck commented Sep 5, 2017

这个在生成的html代码当中是在头部的
`

<title>ECharts</title>` 如果pyecharts没有提供title参数修改的话,可以暂时用替换头部的方法来解决。

@chenjiandongx
Copy link
Member

@ly1102
那后续版本可以考虑增加个 page_title 或者 chart_title 参数。

@ly1102
Copy link
Author

ly1102 commented Sep 5, 2017

@chenjiandongx 恩恩,非常感谢~

@chenjiandongx
Copy link
Member

attr = ["{}月".format(i) for i in range(1, 8)]
v1 = [0, 100, 200, 300, 400, 220, 250]
v2 = [1000, 800, 600, 500, 450, 400, 300]
bar = Bar("瀑布图示例", page_title='my awesome charts')
bar.add("", attr, v1, label_color=['rgba(0,0,0,0)'], is_stack=True)
bar.add("月份", attr, v2, is_label_show=True, is_stack=True, label_pos='inside')
bar.render()

image

image

@ly1102
如何?

@nejinn
Copy link

nejinn commented Sep 6, 2017

这个可以有

@nejinn
Copy link

nejinn commented Sep 6, 2017

@chenjiandongx
我发现现在就能改title

_20170906155342

@chenjiandongx
Copy link
Member

@nejinn
当然可以,上面都已经有人说到了。只是提供参数的话方便一点。

@chfw
Copy link
Member

chfw commented Sep 6, 2017

@chenjiandongx , Page needs title too. Do you want a PR?

@chenjiandongx
Copy link
Member

@chfw
see the latest commit, i support it for Page too

@chenjiandongx
Copy link
Member

新版本 v0.2.4 已发布

@ly1102
Copy link
Author

ly1102 commented Sep 8, 2017

@chenjiandongx 不好意思之前你的回复没有收到邮件,刚刚才看到你的回复。辛苦啦,更新得这么快~

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

No branches or pull requests

5 participants