function chartSetInterval()

in components/helper/sandbox.ts [33:55]


  function chartSetInterval(cb: () => void, time: number) {
    const animator = chartInstance
      .getZr()
      .animation.animate({ val: 0 } as any, {
        loop: true
      })
      .when(time, {
        val: 1
      })
      .during((target, percent) => {
        // Please don't fall sleep.
        // TODO Can be configurable.
        chartInstance.getZr().wakeUp()
        if (percent === 1) {
          // NOTE: Must delay the callback. Or zrender flush will invoke the chartSetTimeout callback again.
          // TODO: This is something needs to be fixed in zrender.
          Vue.nextTick(cb)
        }
      })
      .start()

    return animator
  }