Skip to content

Add IPython notebook inline plot #9

Description

@iseekwonderful

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

Activity

  1. self-assigned this
    on Dec 22, 2016
  2. renfengmei commented on Dec 27, 2016

    @renfengmei

    has this issue finished?

  3. yufeiminds commented on Dec 31, 2016

    @yufeiminds
    Owner

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

    If you have implemented, welcome to pull request, 😃

  4. iseekwonderful commented on Dec 31, 2016

    @iseekwonderful
    Author

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

  5. crazychengmm commented on Jan 20, 2017

    @crazychengmm

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

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

    Thanks

  6. thundertrick commented on Feb 21, 2017

    @thundertrick

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

  7. crazychengmm commented on Mar 10, 2017

    @crazychengmm
  8. chengjun commented on May 17, 2017

    @chengjun

    any progress on this issue? thx

  9. crazychengmm commented on May 22, 2017

    @crazychengmm
  10. henan715 commented on Aug 7, 2017

    @henan715

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions