Echarts 자체 적응 브 라 우 저 크기

3041 단어 ECharts
var myChart = echarts.init(document.getElementById('sitesChar'));

var option = {

    title : {

        text: 'Nodejs       ',

        subtext: '   ',

        x:'center'

    },

    tooltip : {

        trigger: 'item',

        formatter: "{a} <br/>{b} : {c} ({d}%)"

    },

    legend: {

        orient : 'vertical',

        x : 'left',

        data: _ips

    },

    toolbox: {

        show : true,

        feature : {

            mark : {show: false},

            dataView : {show: true, readOnly: false},

            magicType : {

                show: false,

                type: ['pie', 'funnel'],

                option: {

                    funnel: {

                        x: '25%',

                        width: '50%',

                        funnelAlign: 'left'

                        //max: 1548

                    }

                }

            },

            restore : {show: true},

            saveAsImage : {show: true}

        }

    },

    calculable : true,

    series : [

        {

            name:'   IP:   ',

            type:'pie',

            radius : '55%',

            center: ['50%', '60%'],

            data: _data

        }

    ]

};



//  echarts      

myChart.setOption(option);
// window.onresize
= myChart.resize;

좋은 웹페이지 즐겨찾기