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

龙华做棋牌网站建设seo搜索引擎优化介绍

龙华做棋牌网站建设,seo搜索引擎优化介绍,缤纷销客crm,公司企业安全文化内容范本通过html实现legend的样式 提供调用echarts的api实现与echarts图表交互的效果 实现饼图element实现类似于legend与echartstu表交互效果 效果图 配置代码 <template><div style"height: 400px; width: 500px;background-color: #CCC;"><v-chart:opti…

通过html实现legend的样式 提供调用echarts的api实现与echarts图表交互的效果

实现饼图element实现类似于legend与echartstu表交互效果

效果图

在这里插入图片描述

配置代码

<template><div style="height: 400px; width: 500px;background-color: #CCC;"><v-chart:option="options"autoresizestyle="width: 100%; height: 100%"ref="chart"/><div style="display: flex; margin-right: 20px"><divv-for="item in dataList":key="item.name"style="display: flex;align-items: center; margin-top: 10px; margin-right: 20px;cursor: pointer"@mouseenter="handleMouseenter(item)"@mouseleave="handleMouseleave(item)"@click="handleClick(item)"><i :style="{'background-color': item.isShow ? item.itemStyle.color: '#CCC'}" style="width: 10px;height:10px;border-radius: 50%;margin-right: 5px"></i><span style="margin-right:10px;">{{item.name}}</span><span>{{item.value}}</span></div></div></div>
</template><script>export default {name: 'AboutView',data() {return{dataList: [{ value: 1048, name: 'Search Engine',isShow: true,itemStyle: {color: '#006699'} },{ value: 735, name: 'Direct',isShow: true,itemStyle: {color: '#009966'}  },{ value: 580, name: 'Email',isShow: true,itemStyle: {color: '#FFCC00'}  },]}},computed: {options() {return {tooltip: {trigger: 'item'},legend:{show: false},series: [{name: 'Access From',type: 'pie',radius: ['45%', '50%'],center: ['50%', '38.5%'],avoidLabelOverlap: false,label: {show: false,position: 'center'},labelLine: {show: false},data: this.dataList}]}}},methods: {handleMouseenter(item){this.$refs.chart.dispatchAction({type: 'highlight',name: item.name,// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},handleMouseleave(item){this.$refs.chart.dispatchAction({type: 'downplay',name: item.name,// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},handleClick(item){item.isShow = !item.isShowthis.$refs.chart.dispatchAction({type: 'legendToggleSelect',name: item.name,// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})}}}
</script><style lang="scss" scoped></style>

通过js实现柱形图同一组数据时 隐藏某一个柱子

效果图

在这里插入图片描述

配置代码

<template><div style="height: 400px; width: 500px;background-color: #CCC;"><v-chart:option="options"autoresizestyle="width: 100%; height: 100%"ref="chart"/><div style="display: flex; margin-right: 20px"><divv-for="item in dataList":key="item.name"style="display: flex;align-items: center; margin-top: 10px; margin-right: 20px;cursor: pointer"@click="handleClick(item)"@mouseenter="handleMouseenter(item)"@mouseleave="handleMouseleave(item)"><i :style="{'background-color': item.isShow ? item.itemStyle.color: '#CCC'}" style="width: 10px;height:10px;border-radius: 50%;margin-right: 5px"></i><span style="margin-right:10px;">{{item.name}}</span><span>{{item.value}}</span></div></div></div>
</template><script>export default {name: 'AboutView',data() {return{dataList: [{ value: 1048, name: 'Search Engine',isShow: true,itemStyle: {color: '#006699'} },{ value: 735, name: 'Direct',isShow: true,itemStyle: {color: '#009966'}  },{ value: 580, name: 'Email',isShow: true,itemStyle: {color: '#FFCC00'}  },]}},computed: {options() {return {tooltip: {trigger: 'item'},legend:{show: false},xAxis: {type: 'category',data: this.computedSeriesData.map(item => item.name)},yAxis: {type: 'value'},series: [{name: 'Access From',type: 'bar',radius: ['45%', '50%'],center: ['50%', '38.5%'],avoidLabelOverlap: false,label: {show: false,position: 'center'},labelLine: {show: false},data: this.computedSeriesData}]}},computedSeriesData() {return this.dataList.filter(item => item.isShow)}},methods: {handleClick(item){item.isShow = !item.isShow},handleMouseenter(item){this.$refs.chart.dispatchAction({type: 'highlight',name: item.name,// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},handleMouseleave(item){this.$refs.chart.dispatchAction({type: 'downplay',name: item.name,// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},}}
</script><style lang="scss" scoped></style>

通过js实现柱形图一组数据的显示隐藏 达到legend的效果

效果图

在这里插入图片描述
在这里插入图片描述

配置代码

<template><div style="height: 400px; width: 500px;background-color: #CCC;"><v-chart:option="options"autoresizestyle="width: 100%; height: 100%"ref="chart"/><div style="display: flex; margin-right: 20px"><divv-for="item in legendList":key="item.name"style="display: flex;align-items: center; margin-top: 10px; margin-right: 20px;cursor: pointer"@click="handleClick(item)"@mouseenter="handleMouseenter(item)"@mouseleave="handleMouseleave(item)"><i :style="{'background-color': item.isShow ? item.color: '#CCC'}" style="width: 10px;height:10px;border-radius: 50%;margin-right: 5px"></i><span style="margin-right:10px;">{{item.name}}</span><span>{{item.value}}</span></div></div></div>
</template><script>export default {name: 'AboutView',data() {return{legendList: [{ name: '测试1', isShow: true, color: '#00BFFF' },{ name: '测试2', isShow: true, color: '#FFD700'},],dataList1: [{ value: 1048, name: 'Search Engine' },{ value: 735, name: 'Direct'},{ value: 580, name: 'Email'},],dataList2: [{ value: 800, name: 'Search Engine' },{ value: 335, name: 'Direct'},{ value: 1580, name: 'Email'},]}},computed: {options() {return {tooltip: {trigger: 'item'},legend:{show: false},xAxis: {type: 'category',data: this.dataList1.map(item => item.name)},yAxis: {type: 'value'},series: [{name: '测试1',type: 'bar',radius: ['45%', '50%'],center: ['50%', '38.5%'],avoidLabelOverlap: false,label: {show: false,position: 'center'},labelLine: {show: false},itemStyle:{color: '#00BFFF'},data: this.dataList1},{name: '测试2',type: 'bar',radius: ['45%', '50%'],center: ['50%', '38.5%'],avoidLabelOverlap: false,label: {show: false,position: 'center'},labelLine: {show: false},itemStyle:{color: '#FFD700'},data: this.dataList2}]}},},methods: {handleClick(item){item.isShow = !item.isShowthis.$refs.chart.dispatchAction({type: 'legendToggleSelect',// 图例名称name: item.name,// // 下列参数自 v5.6.0 起开始支持// // 图例组件ID// legendId: string,// // 图例组件索引// legendIndex: number,// // 图例组件名称// legendName: string})},handleMouseenter(item){this.$refs.chart.dispatchAction({type: 'highlight',seriesName: item.name// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},handleMouseleave(item){this.$refs.chart.dispatchAction({type: 'downplay',seriesName: item.name// seriesIndex: 1// dataIndex: 1// // 用 index 或 id 或 name 来指定系列。// // 可以使用数组指定多个系列。// seriesIndex?: number | number[],// seriesId?: string | string[],// seriesName?: string | string[],// // 数据项的 index,如果不指定也可以通过 name 属性根据名称指定数据项// dataIndex?: number | number[],// // 可选,数据项名称,在有 dataIndex 的时候忽略// name?: string | string[],})},}}
</script><style lang="scss" scoped></style>
http://www.dtcms.com/wzjs/391625.html

相关文章:

  • 只做百度移动端网站可以吗百度一下网页首页
  • html 手机网站开发seo优化seo外包
  • 药品网站如何建设久久seo正规吗
  • wordpress页脚间距代码重庆百度seo排名优化软件
  • 企业网站及信息化建设培训机构网站模板
  • 镜像站wordpress域名注册多少钱
  • 中山网站建设价格网络口碑营销
  • 夏门建设局网站营销型网站建设实训总结
  • 做的网站怎么联网seo外包公司排名
  • 威客做logo的网站公司seo
  • 一键提交网站今日国内新闻摘抄十条
  • 广西城乡和住房建设厅网站百度指数下载手机版
  • 网站建设调查回访表app平台搭建
  • 遂宁市建设银行网站网络平台怎么推广
  • 在海外做网站 卖东西百度搜索网页
  • 移动通信网站建设女生做sem专员的工作难吗
  • 电子商务未来发展趋势前景一键优化大师下载
  • 如何在税务局网站做纳税登记搜索引擎营销的基本流程
  • 自己有网站怎么做点卡?seo公司广州
  • 域名如何指向网站百度seo排名
  • 常用来做网站首业的是广州新闻热点事件
  • 上海网页建站关键词seo优化软件
  • 河南网站建设的公司关于友情链接的作用有
  • 免费html网站模板昆明做网站的公司
  • 企业网站自己可以做吗网络营销师证书含金量
  • 制作网站深圳东莞百度seo
  • 忻州网站建设培训充电宝seo关键词优化
  • 关于企业网站建设的建议seo高级优化技巧
  • 肃州区住房和城乡建设局网站外贸网站如何推广优化
  • 福州企业做网站石家庄手机端seo