JEPaaS 社区

 找回密码
 立即注册
JEPaaS低代码平台-官网
查看: 2730|回复: 0

APP插件中引用Echarts写法

[复制链接]

54

主题

77

帖子

354

积分

管理员

JEPaaS专家

Rank: 9Rank: 9Rank: 9

积分
354
发表于 2021-6-23 18:08:36 | 显示全部楼层 |阅读模式
1:案例地址
APP插件中引用Echarts写法

  1. initCharts() {
  2.       const echarts = require('echarts');
  3.       // 基于准备好的dom,初始化echarts实例
  4.       this.myChart = echarts.init(document.getElementById(this.id), 'macarons');
  5.       this.myChart.setOption({
  6.             grid: {
  7.                   top: '40',
  8.                   left: '10',
  9.                    right: '10',
  10.                   containLabel: true,
  11.             },
  12.             tooltip: {
  13.                   trigger: 'axis',
  14.                   axisPointer: {
  15.                          type: 'cross',
  16.                          label: {
  17.                                backgroundColor: '#6a7985',
  18.                          },
  19.                   },
  20.              },
  21.             xAxis: {
  22.                 type: 'category',
  23.                 data: this.data.x,
  24.             },
  25.             yAxis: {
  26.                  type: 'value',
  27.                  name: '退款金额(万元)',
  28.                  axisLine: { show: false },
  29.                  axisTick: {
  30.                 show: false,
  31.             },
  32.             splitLine: {
  33.               // show: true,
  34.                   lineStyle: {
  35.                        type: 'dashed',
  36.                   },
  37.              },
  38.         },
  39.         series: [
  40.           {
  41.             data: this.data.y,
  42.             type: 'bar',
  43.             itemStyle: {
  44.              normal: {
  45.                 color: '#2ec7c9',
  46.               },
  47.             },
  48.           },
  49.         ],
  50.       });
  51.     },
  52. 最后编辑: 呼丽华  文档更新时间: 2021-06-04 15:06   作者:呼丽华
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|JEPaaS 低代码平台社区 ( 京ICP备18023569号 )

GMT+8, 2024-5-3 18:22 , Processed in 0.054034 second(s), 20 queries .

Powered by 北京凯特伟业科技有限公司

Copyright © 2001-2021, JEPaaS.COM

快速回复 返回顶部 返回列表