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

商城网站建设特点网站自动秒收录工具

商城网站建设特点,网站自动秒收录工具,seo优化排名教程百度技术,汽车网站建设的目的实现思路 借助echarts.min.js 搭配l-echart进行配置 废话不多说上代码后自己百度了解配置项的意思就好 下面代码是折线图的 &#xff0c;柱状图和它一摸一样&#xff0c;只需要把line换成bar就好 <template><l-echart ref"chart"></l-echart> …

实现思路

借助echarts.min.js 搭配l-echart进行配置

废话不多说上代码后自己百度了解配置项的意思就好

下面代码是折线图的 ,柱状图和它一摸一样,只需要把line换成bar就好

<template><l-echart ref="chart"></l-echart>
</template>
<script>
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min.js'
export default {props: {// 以下注释部分是从父组件传递过来的options 这仅仅是一个示例 可以很好的展示ui效果options: {type: Object,default: () => {return null}}},data() {return {chart: null}},mounted() {this.$nextTick(() => {this.initChart()})},watch: {options: {handler(n) {if (n) {this.$nextTick(() => {this.initChart()})}},deep: true}},methods: {initChart() {const {labelX,data1,data2,legends,tipLegends,legendIcon,legendWidth,legendColor,gridLeft,gridRight,axisColor,splitColor,lineColor1,lineColor2,formatterAfterTextArr// labels} = this.optionsconst series = [{type: 'line',name: (legends && legends[0].name) || tipLegends,data: data1,symbolSize: 6,smooth: true,areaStyle: {color: 'rgba(' + (lineColor1 || '60, 127, 252') + ', 0.2)'},lineStyle: {color: 'rgba(' + (lineColor1 || '60, 127, 252') + ', 1)'},itemStyle: {color: 'rgba(' + (lineColor1 || '60, 127, 252') + ', 1)'}}]if (data2) {series.push({type: 'line',name: legends && legends[1].name,data: data2,symbolSize: 6,smooth: true,areaStyle: {color: 'rgba(' + (lineColor2 || '254, 189, 145') + ', 0.2)'},lineStyle: {color: 'rgba(' + (lineColor2 || '254, 189, 145') + ', 1)'},itemStyle: {color: 'rgba(' + (lineColor2 || '254, 189, 145') + ', 1)'}})}this.$refs.chart.init(echarts, (chart) => {this.chart = chartthis.chart.setOption({animation: false,tooltip: {trigger: 'axis',// 使用mousemove时,左右滑动会导致图表消失triggerOn: 'click',formatter:formatterAfterTextArr && formatterAfterTextArr.length > 0? function (params) {// x轴文字var result = params[0].axisValue + '\n'params.forEach(function (item) {/*** marker:图例样式;* seriesName:series中每一项的name;* value:data数据中value字段* formatterAfterTextArr: value之后需要补充的文字,数组格式* seriesIndex: series数据索引,当有多条series数据时,会自动获取当前选中索引*/result += `${item.marker}${item.seriesName}:${item.value}${formatterAfterTextArr[item.seriesIndex]}`})return result}: null},legend: legends && {top: '5%', // 控制 板块控制器的位置right: 'center',data: legends,icon: legendIcon || 'roundRect',itemWidth: legendWidth || 14,itemHeight: 8,itemGap: 24, //设置两个legend之间的间距textStyle: {fontSize: 12,color: legendColor || '#69748A',padding: [3, 0, 0, 0],rich: {}}},grid: {left: gridLeft || '5%',top: legends ? '20%' : '10%',right: gridRight || '8%',bottom: '5%',containLabel: true},xAxis: [{type: 'category',boundaryGap: false, // 两端空白axisTick: {show: false},axisLine: {show: false},axisLabel: {color: axisColor || '#333333',fontSize: 12,margin: 10},data: labelX || ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],}],yAxis: [{type: 'value',minInterval: 1,axisTick: {show: false},axisLabel: {color: axisColor || '#333333',fontSize: 12,margin: 10},axisLine: {show: false},splitLine: {lineStyle: {type: 'dashed',dashOffset: 20, // 设置虚线的起始偏移量gap: 20, // 设置虚线间的距离color: [splitColor || '#ccc']},},splitArea: { show: false }}],series: series})})}}
}
</script>

饼图和柱状图也基本一样 稍微改改就好,很简单。大家可以自己搜索,我这里放的是四个之中相对复杂的,也是摸索了一整子,下面附上效果图,希望能帮到大家。

http://www.15wanjia.com/news/55986.html

相关文章:

  • 怎么做垃圾网站百度高搜
  • wordpress 只显示一个主题seo排名优化关键词
  • 什么网站可以买世界杯西地那非片的正确服用方法
  • 建立网站的是什么人盘多多网盘资源库
  • 扒wordpress站网络推广优化品牌公司
  • 巴音郭楞网站建设百度seo网站
  • 网站建设推广浩森宇特app拉新平台
  • 做网站要注册第35类商标吗云计算培训
  • 网站首页 seo网络公司取什么名字好
  • 企业网站程序青岛网站推广系统
  • 佛山专业网站建设价格站外推广方式
  • 经典企业网站欣赏网站自然排名怎么优化
  • 番禺网站建设开发怎么自己做一个网站平台
  • vshtml5网站开发首页百度
  • 电子商务平台网站开发全球网站排名
  • ps做景观有哪些素材网站榆林市网站seo
  • 网站正能量不用下载直接进入主页可以吗培训机构咨询
  • 网站后台维护月薪多少关键词seo排名优化
  • 三端网站如何做下载百度安装
  • dedecms 企业网站河南制作网站
  • cms做淘宝客网站适合企业员工培训的课程
  • 外贸电商网站开发价格网站建设山东聚搜网络
  • 手机做网站公司有哪些关键词优化排名seo
  • wordpress 二次元交互企业seo
  • 关于网站建设的网站有哪些浙江百度推广开户
  • 企业建设网站公司简介济南seo网络优化公司
  • 做美甲团购网站企业网站设计价格
  • 邯郸网络运营中心电话号码百度网络优化
  • 合肥建设工程信息网站下载百度卫星导航
  • 做的好的农产品网站重庆网络推广平台