import EchartPie from './EchartPie/index'
import EchartBar from './EchartBar/index'

const components = [
  EchartPie,
  EchartBar,
]

function install (Vue) {
  components.map = (component => {
    Vue.component(component.name, component)
  })
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
}

export default {
  install,
  EchartPie,
  EchartBar,
}