放大Echarts图

function enlargeEchartsAndOther(params){if ($('body').hasClass('dontEnlargeChart')) {$('body').removeClass('dontEnlargeChart');return;}var $enlargeRootObj = $(params.thisObj);var enlargeIndex = params.enlargeIndex || 1;for(var i = 0; i < enlargeIndex; i++){$enlargeRootObj = $enlargeRootObj.parent();}$("body").append ( //占据整个屏幕Div "

"+        //浮层区        "

" +        "

" +        $enlargeRootObj.html() +        "[关闭]"+        "

" +        "

"    );    $(".floatEchartsBox").find("#" + $(params.thisObj).attr("id")).empty().attr("id", "enlargeEcharts").removeAttr('_echarts_instance_');if(params.chartWidth != undefined) $("#enlargeEcharts").css("width", params.chartWidth);if(params.chartHeight != undefined) $("#enlargeEcharts").css("height", params.chartHeight);    //隐藏浮层    $("#enlargeHide").click(function()    {    tmpChart.dispose();        $(".fullScreen,.floatLayer").remove();    });var tmpChart = echarts.init(document.getElementById('enlargeEcharts'));tmpChart.setOption(params.option);}

你可能感兴趣的:(放大Echarts图)