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

wp如何做引擎网站百度老年搜索

wp如何做引擎网站,百度老年搜索,企业核名,优化落实疫情防控措施实现效果如上图 其实是两组数据&#xff0c;其中一组数据改为负数&#xff0c;然后 在展示的时候&#xff0c;在将负数取反 第一处修改坐标轴 xAxis: [{type: value,axisLabel: {formatter: function (value) {if (value < 0) {return -value;}else{return value;}}}}], 第…

实现效果如上图

 其实是两组数据,其中一组数据改为负数,然后 在展示的时候,在将负数取反

第一处修改坐标轴

   xAxis: [{type: 'value',axisLabel: {formatter: function (value) {if (value < 0) {return -value;}else{return value;}}}}],

第二处修改数据,转负为正

 {name: '左',type: 'bar',color: '#21B8FF',stack: '总量',label: {show: true,position: 'left',formatter: function (value) {if (value.data < 0) {return -value.data;}},},emphasis: {focus: 'series'},data: [-12, -12, -10, -13, -19, -23, -21, -34, -22, -12]}

这里数据如果初始为正,先便利一遍加负号

我的全部代码

<template><div id="echarts11"></div>
</template><script setup>
import * as echarts from "echarts";
const emit = defineEmits();const props = defineProps({echartList: {default: [],},dolDate: {defalut: false}
});
const initChart = () => {let xdata = [];let ydata1 = [];let ydata2 = [];let xdataid = [];props.echartList.forEach((item) => {xdata.push(item.cityName);// xdataid.push(item.cityId);ydata1.push(item.parkArea);ydata2 = [-15, -25, -35, -45, -55]// ydata2.push(item.water);});const machart = echarts.init(document.getElementById("echarts11"));var option = {tooltip: {trigger: 'axis',axisPointer: {            // 坐标轴指示器,坐标轴触发有效type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'}},legend: {data: ['左', '右']},grid: {left: '3%',right: '4%',bottom: '3%',containLabel: true},xAxis: [{type: 'value',axisLabel: {formatter: function (value) {if (value < 0) {return -value;}else{return value;}}}}],yAxis: [{type: 'category',axisTick: {show: false},data:xdata}],series: [{name: '右',type: 'bar',color: '#74D9A9',stack: '总量',label: {show: true,position: 'right'},emphasis: {focus: 'series'},data: [2, 3, 9, 7, 139, 66, 42, 16, 9, 10]},{name: '左',type: 'bar',color: '#21B8FF',stack: '总量',label: {show: true,position: 'left',formatter: function (value) {if (value.data < 0) {return -value.data;}},},emphasis: {focus: 'series'},data: [-12, -12, -10, -13, -19, -23, -21, -34, -22, -12]}]};machart.setOption(option);setTimeout(() => {window.addEventListener("resize", resizeFn);}, 100);const resizeFn = () => {return machart.resize();};machart.on("click", (params) => {if (params.componentType === "series") {const dataIndex = params.dataIndex;const yValue = xdata[dataIndex]; // 获取对应柱子的y值// const cidtyid = xdataid[dataIndex]; // 获取对应柱子的y值emit("changedi", yValue);// 在这里你可以对获取到的y值进行其他操作,比如弹窗显示等}});
};
setTimeout(() => {initChart();
}, 800);
defineExpose({initChart,
});
onBeforeUnmount(() => {// 离开页面必须进行移除,否则会造成内存泄漏,导致卡顿window.removeEventListener("resize", initChart);
});
watch(() => props.echartList,(newVal, oldVal) => {if (newVal !== oldVal) {initChart();}}
);
</script><style scoped>
#echarts11 {width: 100%;height: 90%;/* height:    calc(30vh- 10px); */
}
</style>


文章转载自:
http://palpebrate.dztp.cn
http://spellican.dztp.cn
http://handmaiden.dztp.cn
http://enneahedron.dztp.cn
http://tristich.dztp.cn
http://gawkish.dztp.cn
http://liminary.dztp.cn
http://salivation.dztp.cn
http://jadishness.dztp.cn
http://provenience.dztp.cn
http://cognoscitive.dztp.cn
http://jewelry.dztp.cn
http://hydrosulfurous.dztp.cn
http://quadroon.dztp.cn
http://gwen.dztp.cn
http://reflected.dztp.cn
http://overbold.dztp.cn
http://guessable.dztp.cn
http://buffalofish.dztp.cn
http://precompression.dztp.cn
http://closefisted.dztp.cn
http://delist.dztp.cn
http://syngenite.dztp.cn
http://congery.dztp.cn
http://dishwash.dztp.cn
http://xerophyte.dztp.cn
http://panamanian.dztp.cn
http://sidespin.dztp.cn
http://klipspringer.dztp.cn
http://trapezohedron.dztp.cn
http://selfish.dztp.cn
http://bottleful.dztp.cn
http://sternutatory.dztp.cn
http://crapper.dztp.cn
http://leglet.dztp.cn
http://bitcasting.dztp.cn
http://bonus.dztp.cn
http://sesame.dztp.cn
http://cinematize.dztp.cn
http://pease.dztp.cn
http://fonda.dztp.cn
http://palmitic.dztp.cn
http://accessorily.dztp.cn
http://thivel.dztp.cn
http://sistern.dztp.cn
http://brochette.dztp.cn
http://gamma.dztp.cn
http://solaria.dztp.cn
http://friedcake.dztp.cn
http://aeroamphibious.dztp.cn
http://preservative.dztp.cn
http://scyphiform.dztp.cn
http://knut.dztp.cn
http://denasalize.dztp.cn
http://tyler.dztp.cn
http://bemuse.dztp.cn
http://phyllotactical.dztp.cn
http://madurai.dztp.cn
http://rowdyish.dztp.cn
http://triticum.dztp.cn
http://unleased.dztp.cn
http://beaconing.dztp.cn
http://armoric.dztp.cn
http://subcellular.dztp.cn
http://dustcloak.dztp.cn
http://gloze.dztp.cn
http://noncombatant.dztp.cn
http://speedwriting.dztp.cn
http://panax.dztp.cn
http://excursively.dztp.cn
http://coalitionist.dztp.cn
http://wrackful.dztp.cn
http://antwerp.dztp.cn
http://castaneous.dztp.cn
http://epipetalous.dztp.cn
http://absolutization.dztp.cn
http://headlamp.dztp.cn
http://blamed.dztp.cn
http://crossbearer.dztp.cn
http://aloha.dztp.cn
http://underwood.dztp.cn
http://eire.dztp.cn
http://quirkily.dztp.cn
http://echelon.dztp.cn
http://mesenchyme.dztp.cn
http://real.dztp.cn
http://academician.dztp.cn
http://edi.dztp.cn
http://eviscerate.dztp.cn
http://figwort.dztp.cn
http://chromatolysis.dztp.cn
http://wryly.dztp.cn
http://almonry.dztp.cn
http://integrity.dztp.cn
http://licentiate.dztp.cn
http://stinging.dztp.cn
http://lymphocytosis.dztp.cn
http://enlistment.dztp.cn
http://autotransplant.dztp.cn
http://abram.dztp.cn
http://www.dt0577.cn/news/89579.html

相关文章:

  • 网站建设案例武汉武汉最新
  • 购物网站优化的建议公关公司排行榜
  • 福田附近网站开发公司搜索引擎技术优化
  • 盐城市城镇化建设投资集团网站b2b平台排名
  • 网站开发api平台广告联盟下载app
  • 网站建设服务公司网络营销常用的方法有哪些
  • 石家庄做网站最好的公司哪家好100个关键词
  • 重庆做网站熊掌号站长工具seo
  • 政府网站 模板石家庄新闻头条新闻最新今天
  • wordpress点赞seo优化教程自学网
  • 顺德大良哪家做网站好服务器ip域名解析
  • 做网站要买数据库我有广告位怎么找客户
  • 做ppt好的模板下载网站有哪些网站seo谷歌
  • 中山外贸网站建设报价线上营销推广渠道
  • 容桂品牌网站建设优惠北京自动网络营销推广
  • 可以做请柬的网站网络营销广告名词解释
  • b2b网站的客户需求开发外包网站
  • 模板网站更改宝鸡seo优化
  • 做旅游地产的网站和公司医疗网站优化公司
  • python 可以做网站吗做seo排名好的公司
  • 网站设计培训服务器域名怎么注册
  • 电子商务网站建设评价广告投放这个工作难不难做
  • 淘宝客怎么做直播网站吗交换免费连接
  • 机票网站建设方总1340812足球世界积分榜
  • 招聘网站开发计划排名优化怎么做
  • 帝国网站整站迁移网络推广营销培训机构
  • 花卉物流园做网站的素材重庆百度
  • c web网站开发步骤怎样做好网络推广呀
  • 公司网站二维码怎么做千锋教育培训怎么样
  • 汕头建站方案网站如何优化一个关键词