Angular中使用echarts图标库时报了如下错误:

core.js:6189 ERROR Error: Component series.line not exists. Load it first.at Function.entity.getClass (clazz.js:178)at ExtendedClass.<anonymous> (Global.js:223)at Array.forEach (<anonymous>)at each (util.js:300)at ExtendedClass.visitComponent (Global.js:212)at Function.entity.topologicalTravel (component.js:125)at ExtendedClass.mergeOption (Global.js:194)at ExtendedClass.initBase (Global.js:663)at ExtendedClass.resetOption (Global.js:141)at ExtendedClass.setOption (Global.js:123)

检查了package.json,确认库已经安装好了:

"echarts": "^4.7.0",
"ngx-echarts": "^4.2.2",
"@types/echarts": "^4.4.6",

option的字段也是按照官方文档来设置的。检查模块导入时,发现是NgxEchartsModule没有导入,尝试导入:

import { NgxEchartsModule } from 'ngx-echarts';@NgModule({declarations: [AppComponent],entryComponents: [],imports: [BrowserModule,IonicModule.forRoot(),AppRoutingModule,// ...NgxEchartsModule,// ...IonicStorageModule.forRoot(),],providers: [// ...],bootstrap: [AppComponent],
})
export class AppModule {}

重新编译程序恢复正常。

Component series.line not exists. Load it first.相关推荐

  1. Echarts报错:Component series.lines not exists. Load it first.

    前几天用的echarts标签是bootcdn的 <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.7.0/echarts ...

  2. echarts异步加载柱状图遇到的错误- Error: Component series. not exists. Load it first.

    今天看了下echarts教程之中的异步加载柱状图,我按照教程中的代码敲出来之后再运行,就报了一个 Error: Component series. not exists. Load it first. ...

  3. Line regulation和Load regulation

    Line regulation和Load regulation TI在LDO和DCDC中的定义是不一样的. 在<Understanding the Terms and Definitions o ...

  4. 数据库异常——a component named TableViewForm already exists

    使用Navicat Premium,连接正常,但是点击数据库里的任何的表,都会出现这个警告"A component named TableViewForm already exists/已存 ...

  5. Ant design pro引入Echarts报错:TypeError: Cannot read property 'x_data' of undefined

    目录 (1)报错:TypeError: Cannot read property 'x_data' of undefined (2)报错:× Error: Component series.line ...

  6. vue-cli4.0+Echarts 3D

    转载请标明出处,全网最新解决办法,谢谢. 先描述问题 //1.依赖包: npm install echarts -S npm install echarts-gl -S //2main.js: imp ...

  7. vue安装使用v-chart时报错解决方案

    v-charts 安装 : npm i v-charts echarts -S 运行报错: npm WARN echarts-liquidfill@2.0.6 requires a peer of e ...

  8. echarts 画3D折线图错误

    错误如下 Component series.scatter3D not exists. Load it first 错误原因 这个是缺少echarts-gl,引入就可以了 引入可能出现错误,解决见另一 ...

  9. python画k线图_小白学Python(14)——pyecharts 绘制K线图 Kline/Candlestick

    Kline-基本示例 from pyecharts import options as opts from pyecharts.charts import Kline data = [ [2320.2 ...

最新文章

  1. 霸榜18年,作者连续20年获得微软MVP,这本SQL书凭什么成为畅销经典
  2. iOS 绘画 点与像素
  3. 机器学习中的矩阵向量求导(二) 矩阵向量求导之定义法
  4. nginx 配置文件nginx.conf结构
  5. mysql触发器 生僻字_MySQL生僻字插入失败的处理方法(Incorrect string value)
  6. 在win7下将CapsLock按键变成esc
  7. docker集群_使用Docker,Chef和Amazon OpsWorks进行集群范围的Java / Scala应用程序部署...
  8. oracle设置打印机,使用 Oracle Solaris 打印管理器设置网络连接的打印机
  9. C#的二维码生成和解析
  10. 如何访问SSH公钥?
  11. .net 5和.net core_开源仿真器 EpicSim 运行 SM3_core
  12. 自顶向下方法学习笔记
  13. 转帖 美国 工程索引 收录中国科技论文的最新规定
  14. 看php网站论文的感想,阅读学术论文心得体会
  15. matlab绘制叮当猫
  16. 差分放大电路及动态分析
  17. Spire.Doc 获取批注的源头+书签+内容
  18. centos7/win7 双系统安装教程
  19. 数字油田中的虚拟光纤
  20. Java面试题 java高级

热门文章

  1. MongoDB使用账号密码连接
  2. 1.18 Spreadsheet
  3. 平板系统win10 Android,Pad变PC:将Win10装入Android平板
  4. 四川一度智信:如何做好店铺数据运营?
  5. 小米MAX开发者选项 以及如何连接MAC开发RN
  6. TP 全系列调试通用参考说明
  7. JWT的讲解以及JJWT的使用(另附JWT工具类)
  8. 在线电影订票系统 - 数据库建模
  9. 跳一跳python辅助软件思路及源码解析
  10. numpy选择特定的行列