yufeiminds / echarts-python

Deprecated. Use PyEcharts instead. https://github.com/pyecharts/pyecharts
417 stars 167 forks source link

Add IPython notebook inline plot #9

Open iseekwonderful opened 7 years ago

iseekwonderful commented 7 years ago

It will be great if we add a inline plot in IPython notebook, by returning HTML page in cell's output area.

renfengmei commented 7 years ago

has this issue finished?

yufeiminds commented 7 years ago

Still not finished, I'm too busy recently 😂 , plans to be completed next month.

If you have implemented, welcome to pull request, 😃

iseekwonderful commented 7 years ago

突然发觉英文配表情看起来好奇怪 😂😂😂

crazychengmm commented 7 years ago

新手,请教下我想用这来做图,但不知道有哪些图可以来用,有没有这样简单的demo啊。。。:joy::joy::joy:

i am new in echarts, is there any simple demo? i want to find suitable chart for me...

Thanks

thundertrick commented 7 years ago

@crazychengmm 看看 echart 的官网吧:官方示例Gallery

crazychengmm commented 7 years ago

3q

2017-02-21 15:49 GMT+08:00 X.Y. Hu notifications@github.com:

@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 .

chengjun commented 7 years ago

any progress on this issue? thx

crazychengmm commented 7 years ago

已经完成了中国map。效果很不错。。。 十分感谢回复。

2017-05-17 15:58 GMT+08:00 Wang Cheng-Jun notifications@github.com:

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 .

henan715 commented 7 years ago

我在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)

有个小缺陷就是中文会乱码,还在研究之中。