当前位置: 首页 > news >正文

文化传播网站建设宝安做网站的公司

文化传播网站建设,宝安做网站的公司,网站销售怎么做,南宁哪家公司建设网站比较好前言#xff1a; 效果图 一. 项目中安装以及引入Echarts 1.1 npm 命令安装echarts库 npm install echarts --save 1.2 yarn命令安装echarts库 yarn add echarts 1.3 引用 a. 在使用页面上引入 在Vue组件的script标签中引入echarts库 使用 echarts import * as echarts f…前言 效果图 一. 项目中安装以及引入Echarts 1.1 npm 命令安装echarts库 npm install echarts --save 1.2 yarn命令安装echarts库 yarn add echarts 1.3 引用 a. 在使用页面上引入 在Vue组件的script标签中引入echarts库 使用 echarts import * as echarts from echarts; b. 全局引用 在main.js中引入echarts库 使用 this.$echarts import echarts from echarts; Vue.use(echarts); Vue.prototype.$echarts echarts; 二. 创建Echarts地图 1. echarts展示的盒子 Echarts父盒子有多大 Echarts就展示多大。 templatediv classlinesboxdiv idlinesecharts stylewidth: 100%; height: 100%/div/div /template 2. 引入地图数据 import testjson from ./../../utils/bj.json; 这个地图数据是北京市各个区边界数据。下载地址https://datav.aliyun.com/portal/school/atlas/area_selector 这地址我们可以下载自己所想要的地图边界数据。或者是找公司给我边界数据。格式必须跟这个一样。 把上面的数据下载下来 并引入我们就可以使用。 3. 飞线数据以及方法 sjfbEcharts: null, // echarts实例// 图片是base64也行 planePath:path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z, linesData: [{fromName: 西城区, // 飞线起始位置toName: 海淀区, // 飞线结束位置coords: [[116.36567, 39.912028], // 飞线起始位置[116.23328, 40.026927] // 飞线结束位置],value: 100},{fromName: 怀柔区,toName: 海淀区,coords: [[116.586079, 40.63069],[116.23328, 40.026927]],value: 100}, ], mounted() {this.initMapEcharts(); }, initMapEcharts() {let zhenjie 海淀区; // 自己命名let data testjson.features;let mapList testjson;// 获取echarts盒子并初始化this.sjfbEcharts this.$echarts.init(document.getElementById(linesecharts)); this.$echarts.registerMap(zhenjie, mapList);let options {geo: {type: map,map: zhenjie, //chinaMap需要与registerMao中的变量名称保持一致raom: false,itemStyle: {normal: {areaColor: rgb(4,46,84),borderColor: #fff,},emphasis: {areaColor: #389bb7, //鼠标指上市时的颜色},},label: {normal: {position: bottom,show: true, //不显示textStyle: {// 地图上散点的字体样式fontSize: 16,fontWeight: 400,color: #fff, // 点上字的颜色},},emphasis: {show: true,},},},series: [// 地图配置{name: 海淀区信息,type: map,map: zhenjie,label: {show: true, //是否显示市normal: {textStyle: {fontSize: 12,fontWeight: bold,color: #fff,},},},zoom: 1.2,data: data,itemStyle: {normal: {label: { show: true },color: #F4F4F4,areaColor: #1E62AC,borderColor: #53D9FF,borderWidth: 1.3,shadowBlur: 15,shadowColor: rgb(58,115,192),shadowOffsetX: 4,shadowOffsetY: 4,},// 鼠标移入地区的样式emphasis: {label: { show: true, color: #fff },borderWidth: 3,borderColor: #1eccc6,areaColor: #07b4af,shadowColor: #1eccc6,shadowBlur: 15,},},},// 飞线配置{type: lines,zlevel: 2,effect: {show: true,period: 5, // 箭头指向速度值越小速度越快trailLength: 0, // 特效尾迹长度[0,1]值越大尾迹越长重symbol: this.planePath, // 飞机图标symbolSize: 15, // 图标大小color: #01AAED,},// 可以配置自己的飞线图标// effect: {// show: true,// period: 5, // 箭头指向速度值越小速度越快// trailLength: 0, // 特效尾迹长度[0,1]值越大尾迹越长重// symbol: this.planePath, // 飞机图标// symbolSize: 15, // 图标大小// color: #01AAED,// },lineStyle: {normal: {width: 0.8, // 尾迹线条宽度opacity: 1, // 尾迹线条透明度curveness: 0.3, // 尾迹线条曲直度},},data: this.linesData,},],};this.sjfbEcharts.setOption(options);setTimeout(() {window.addEventListener(resize, () this.sjfbEcharts.resize());}, 0);}, 三. 完整代码 templatediv classlinesboxdiv idlinesecharts stylewidth: 100%; height: 100%/div/div /templatescript import * as echarts from echarts; import testjson from ./../../utils/bj.json; export default {data() {return {sjfbEcharts: null,//定义散点坐标scatterData: [{ name: 东城区, value: [116.418757, 39.917544] },{ name: 西城区, value: [116.366794, , 39.915309] },],linesData: [{fromName: 西城区,toName: 海淀区,coords: [[116.36567, 39.912028],[116.23328, 40.026927]],value: 100},{fromName: 怀柔区,toName: 海淀区,coords: [[116.586079, 40.63069],[116.23328, 40.026927]],value: 100},],planePath:path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z,};},mounted() {this.initMapEcharts();},methods: {initMapEcharts() {let zhenjie 海淀区;let data testjson.features;let mapList testjson;this.sjfbEcharts this.$echarts.init(document.getElementById(linesecharts));this.$echarts.registerMap(zhenjie, mapList);let options {geo: {type: map,map: zhenjie, //chinaMap需要与registerMao中的变量名称保持一致raom: false,itemStyle: {normal: {areaColor: rgb(4,46,84),borderColor: #fff,},emphasis: {areaColor: #389bb7, //鼠标指上市时的颜色},},label: {normal: {position: bottom,show: true, //不显示textStyle: {// 地图上散点的字体样式fontSize: 16,fontWeight: 400,color: #fff, // 点上字的颜色},},emphasis: {show: true,},},},series: [{name: 海淀区信息,type: map,map: zhenjie,label: {show: true, //是否显示市normal: {textStyle: {fontSize: 12,fontWeight: bold,color: #fff,},},},zoom: 1.2,data: data,itemStyle: {normal: {label: { show: true },color: #F4F4F4,areaColor: #1E62AC,borderColor: #53D9FF,borderWidth: 1.3,shadowBlur: 15,shadowColor: rgb(58,115,192),shadowOffsetX: 4,shadowOffsetY: 4,},// 鼠标移入地区的样式emphasis: {label: { show: true, color: #fff },borderWidth: 3,borderColor: #1eccc6,areaColor: #07b4af,shadowColor: #1eccc6,shadowBlur: 15,},},},{//飞线图参数type: lines,zlevel: 2,effect: {show: true,period: 5, // 箭头指向速度值越小速度越快trailLength: 0, // 特效尾迹长度[0,1]值越大尾迹越长重symbol: this.planePath, // 飞机图标symbolSize: 15, // 图标大小color: #01AAED,},// lineStyle: {// normal: {// width: 0.8, // 尾迹线条宽度// opacity: 1, // 尾迹线条透明度// curveness: 0.3, // 尾迹线条曲直度// },// },// effect: {// show: true,// period: 3, // 箭头指向速度值越小速度越快// trailLength: 0.2, // 特效尾迹长度[0,1]值越大尾迹越长重// symbol: circle, // 箭头图标circle// symbolSize: 4, // 图标大小// color:#fff, // 流动的颜色// },lineStyle: {normal: {width: 0.8, // 尾迹线条宽度opacity:1, // 尾迹线条透明度curveness: 0.3, // 尾迹线条曲直度},},data: this.linesData,}],};this.sjfbEcharts.setOption(options);setTimeout(() {window.addEventListener(resize, () this.sjfbEcharts.resize());}, 0);},}, }; /scriptstyle langless scoped .linesbox {width: 100%;height: 100%; } /style
http://www.zqtcl.cn/news/284636/

相关文章:

  • 网站建设管理教程视频教程如何建一个电商平台
  • 深圳网络公司做网站wordpress怎么编辑网站
  • 淄博建站网络公司wordpress ldap外部登录认证
  • 南宁网站开发浏览器有哪几种
  • 石家庄哪里能制作网站网站301跳转
  • 网站建设报价浩森宇特wordpress怎样修改字体
  • 网站建设预估费用做品牌推广用什么网站
  • 网站建设风险评估西部数码 空间做2个网站
  • 专业购物网站建设wordpress the7不显示分类页
  • 移动应用开发网站建设网站时的故障分类
  • 网站动态静态软件项目管理案例教程第四版
  • 贵州萝岗seo整站优化鲜花店网站建设的总结
  • 下载做网站的软件建网站做站在
  • 无锡高端网站建设公司WordPress臃肿主题
  • 网站建设与运营财务预算seo下拉优化
  • 重庆铜梁网站建设价格阜城网站建设价格
  • 怎样建置换平台网站公众号开发周期
  • 朝阳建设网站什么是网络设计方案网络设计的原则有哪些
  • 长春商城网站制作二级网站建设 知乎
  • 网站建设的结论沭阳县建设局网站
  • 镇江网站制作价格网络有限公司简介
  • 海淀网站建设哪家公司好wordpress非常卡
  • 门户网站的建设意义交互设计专业就业前景
  • 那里有学做网站的2345网址导航下载官网
  • 房产证查询系统官方网站购买网站域名
  • 高端企业门户网站建设服务公司深圳企业网站怎么做
  • 页游网站如何做推广平面图设计软件有哪些
  • 自建网站有哪些wordpress 评论增加字段
  • 企业网站建设的方案书pc网站 公众号数据互通
  • 东莞设计制作网站制作做的asp网站手机号码