function prepare(ecIns) {
    var ecModel = ecIns._model;
    var scheduler = ecIns._scheduler;

    scheduler.restorePipelines(ecModel);

    scheduler.prepareStageTasks();

    prepareView(ecIns, 'component', ecModel, scheduler);

    prepareView(ecIns, 'chart', ecModel, scheduler);

    scheduler.plan();
}
@pubilc
@param {Object} payload
@param {string} [payload.type] Action type
@param {Object|boolean} [opt] If pass boolean, means opt.silent
@param {boolean} [opt.silent=false] Whether trigger events.
@param {boolean} [opt.flush=undefined]
                 true: Flush immediately, and then pixel in canvas can be fetched
                     immediately. Caution: it might affect performance.
                 false: Not flush.
                 undefined: Auto decide whether perform flush.