echarts-python
echarts-python copied to clipboard
Add IPython notebook inline plot
It will be great if we add a inline plot in IPython notebook, by returning HTML page in cell's output area.
has this issue finished?
Still not finished, I'm too busy recently 😂 , plans to be completed next month.
If you have implemented, welcome to pull request, 😃
突然发觉英文配表情看起来好奇怪 😂😂😂
新手,请教下我想用这来做图,但不知道有哪些图可以来用,有没有这样简单的demo啊。。。:joy::joy::joy:
i am new in echarts, is there any simple demo? i want to find suitable chart for me...
Thanks
3q
2017-02-21 15:49 GMT+08:00 X.Y. Hu [email protected]:
@crazychengmm https://github.com/crazychengmm 看看 echart 的官网吧:官方示例 http://echarts.baidu.com/examples.html 和 Gallery http://gallery.echartsjs.com/explore.html#sort=star%7Etimeframe=all%7Eauthor=all
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yufeiminds/echarts-python/issues/9#issuecomment-281268999, or mute the thread https://github.com/notifications/unsubscribe-auth/AWbZZoaqHZ5hx0i-9rck9PVYVXZX_Gmoks5repbygaJpZM4KduH6 .
any progress on this issue? thx
已经完成了中国map。效果很不错。。。 十分感谢回复。
2017-05-17 15:58 GMT+08:00 Wang Cheng-Jun [email protected]:
any progress on this issue? thx
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yufeiminds/echarts-python/issues/9#issuecomment-302015502, or mute the thread https://github.com/notifications/unsubscribe-auth/AWbZZjaNJMYIw5tJkthdZHpzHIcDD72Bks5r6qixgaJpZM4KduH6 .
我在jupyter notebook
上面用IPython
自带的HTML
方法,可以将echarts
返回的json
传入到<script>
标签中,可以在当前页面做图而不是打开新页面:
# coding:utf-8
from echarts import Echart, Legend, Bar, Axis
from IPython.display import HTML
chart = Echart('月份GDP', '测试文本')
chart.use(Bar('China', [2, 3, 4, 5]))
chart.use(Legend(['GDP']))
chart.use(Axis('category', 'bottom', data=['Nov', 'Dec', 'Jan', 'Feb']))
# chart.plot()
htmlStr = """
<div id="chart" style="width:600px; height:300px;"></div>
<script>
require.config({ paths:{ echarts: 'https://cdn.bootcss.com/echarts/3.6.2/echarts.common.min.js', }});
require(['echarts'],function(ec){
var myChart = ec.init(document.getElementById('chart'));
var option = %s;
myChart.setOption(option);
});
</script>"""%chart.json
HTML(htmlStr)
有个小缺陷就是中文会乱码,还在研究之中。