echarts-python icon indicating copy to clipboard operation
echarts-python copied to clipboard

Add IPython notebook inline plot

Open iseekwonderful opened this issue 7 years ago • 9 comments

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

iseekwonderful avatar Oct 22 '16 01:10 iseekwonderful

has this issue finished?

renfengmei avatar Dec 27 '16 03:12 renfengmei

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

If you have implemented, welcome to pull request, 😃

yufeiminds avatar Dec 31 '16 13:12 yufeiminds

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

iseekwonderful avatar Dec 31 '16 15:12 iseekwonderful

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

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

Thanks

crazychengmm avatar Jan 20 '17 08:01 crazychengmm

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

thundertrick avatar Feb 21 '17 07:02 thundertrick

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 .

crazychengmm avatar Mar 10 '17 11:03 crazychengmm

any progress on this issue? thx

chengjun avatar May 17 '17 07:05 chengjun

已经完成了中国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 .

crazychengmm avatar May 22 '17 09:05 crazychengmm

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

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

henan715 avatar Aug 07 '17 01:08 henan715