To get what w

To do a small print function, select Lodopfuncs.js. Examples are relatively complete, feel also ok.

After the operation, I encountered EChats printing. I didn’t read the document carefully. I don’t know the support for Canvas, but I can’t directly identify it.

Converting to is OK.

Just change the canvas to .

How to get

I’m glad I know how to use jQuery

chartObj[eleId] = echarts.init(ele); ChartObj [eleId].on()'finished'.function () {
    transToImg(ele);
});
Copy the code

JQuery shuttles things

function transToImg(ele) {
    var $ele = $(ele);
    var canvas = $ele.find("canvas") [0]; var dataURL = canvas.toDataURL();$ele.html("");
    $ele.append($("<img/>", {
        src: dataURL
    }));
}
Copy the code

The results of

Work, eat