ElemeFE / v-charts

基于 Vue2.0 和 ECharts 封装的图表组件📈📊
https://v-charts.js.org
MIT License
6.8k stars 1.99k forks source link

k线图在vue项目中按需引入页面显示不出来 #519

Open sxMQ opened 6 years ago

sxMQ commented 6 years ago
import` VeLine from 'v-charts/lib/line.common'
import VeRing from 'v-charts/lib/ring.common'
import VeCandle from 'v-charts/lib/candle.common'

Vue.component(VeLine.name, VeLine)
Vue.component(VeRing.name, VeRing)
Vue.component(VeCandle.name, VeCandle)

麻烦请问我的写法有问题吗?同时按需引入了三个图表 `前两个折线图和饼图都可以出来,K线图位置虽然出来了但是上面的折线和柱状详情都没有 不知道为什么

Reproduce 重现示例

xiguaxigua commented 6 years ago

没有重现你遇到的问题,请提供一个重现示例吧 https://codesandbox.io/s/21xlkx5yny

xiaomizhou66 commented 5 years ago

怎么按需引入呀???按照官网的这个方法来个出错了呀

clazz.js?625e:158 Uncaught Error: Component series.line not exists. Load it first.
    at Function.entity.getClass (clazz.js?625e:158)
    at ExtendedClass.eval (Global.js?7e63:203)
    at Array.forEach (<anonymous>)
    at each (util.js?1ee1:298)
    at ExtendedClass.visitComponent (Global.js?7e63:192)
    at Function.entity.topologicalTravel (component.js?8918:105)
    at ExtendedClass.mergeOption (Global.js?7e63:174)
    at ExtendedClass.initBase (Global.js?7e63:643)
    at ExtendedClass.resetOption (Global.js?7e63:121)
    at ExtendedClass.setOption (Global.js?7e63:103)

求解,一直都是提示错误啊,官网的办法也么有说清楚