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

提供做网站公司搜索引擎优化排名关键字广告

提供做网站公司,搜索引擎优化排名关键字广告,做药物研发的人上什么网站,苏州中车建设工程有限公司网站效果图展示: 1.点击左侧国家,可以高亮并放大右侧地图对应的国家。 2.展示数据球。 下载依赖 yarn add amcharts/amcharts5其中,props.countryData的数据格式为 [{ “country”: “加拿大”, “code”: “CA”, “deviceCount”: 1 },{ “c…

效果图展示:
1.点击左侧国家,可以高亮并放大右侧地图对应的国家。
2.展示数据球。
在这里插入图片描述
在这里插入图片描述
下载依赖

yarn add @amcharts/amcharts5

其中,props.countryData的数据格式为
[{
“country”: “加拿大”,
“code”: “CA”,
“deviceCount”: 1
},{
“country”: “瑞士”,
“code”: “CH”,
“deviceCount”: 29
},{
“country”: “中国”,
“code”: “CN”,
“deviceCount”: 10774
},{
“country”: “德国”,
“code”: “DE”,
“deviceCount”: 42
}]

<template><div class="device-distribution-box"><div class="header-title">{{ $t('countryDistributionDevice') }}</div><section class="flex-box"><div class="country-box"><div class="country-list" v-for="country in mapData"><div:class="activeCountry == country.code ? 'active-country' : ''"@click="clickCountry(country.code)"class="sf-ellipsis":title="country.country + '(' + country.deviceCount + ')'">{{ country.country }}({{ country.deviceCount }})</div></div></div><div id="chartdiv"></div> // 地图展示容器</section></div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, watch } from 'vue';
import useLocale from '@/utils/i18n/store';
import { storeToRefs } from 'pinia';
import am5geodata_lang_EN from '@amcharts/amcharts5-geodata/lang/EN';// 地图语言包
import am5geodata_lang_cn_ZH from '@amcharts/amcharts5-geodata/lang/cn_ZH';//地图语言包
import am5geodata_lang_PT from '@amcharts/amcharts5-geodata/lang/PT'; // 地图语言包
import * as am5map from '@amcharts/amcharts5/map'; 
import am5geodata_worldLow from '@amcharts/amcharts5-geodata/worldLow';
import * as am5 from '@amcharts/amcharts5';
import am5themes_Animated from '@amcharts/amcharts5/themes/Animated';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const localeStore = useLocale(); //获取本地语言
const { locale } = storeToRefs(localeStore); //获取本地语言interface Props {countryData: Array<any>;
}
const props = withDefaults(defineProps<Props>(), {countryData: () => {return [];},
});// 数据接口
interface MapData {code: string;deviceCount: number;name: string;country: string;id?: string;
}
const mapData = ref<Array<MapData>>([]);
const activeCountry = ref<string>('');
let polygonSeries = reactive({}); // 地图数据
let root = reactive({}); // 地图根// 数据更新,更新地图
watch(() => props.countryData,(newValue, oldValue) => {mapData.value = props.countryData.map((item) => {item.id = item.code;return item;});refreshAmchartsMap();},
);// 左侧国家点击事件-点击高亮国家
const clickCountry = (countryCode: string) => {activeCountry.value = countryCode;// 根据点击的国家,添加该国家的颜色数据,去除无关国家的颜色数据let tempData = mapData.value.map((item) => {if (item.id == countryCode) item.polygonSettings = { fill: am5.color(0x3a70d3) };else item.polygonSettings = {};return item;});// 绑定数据 高亮该国家颜色polygonSeries.data.setAll(tempData);// 地图放大到该国家polygonSeries.events.on('datavalidated', function () {const zoomTargets = [countryCode];const zoomDataItems = [];zoomTargets.forEach(function (id) {zoomDataItems.push(polygonSeries.getDataItemById(id));});polygonSeries.zoomToDataItems(zoomDataItems);});
};
// 更新相关数据
const refreshAmchartsMap = () => {root.setThemes([am5themes_Animated.new(root)]);// Create the map chart 地图的样式不一样let chart = root.container.children.push(am5map.MapChart.new(root, {projection: am5map.geoNaturalEarth1(),}),);polygonSeries = chart.series.push(am5map.MapPolygonSeries.new(root, {geoJSON: am5geodata_worldLow, // 地图展示的国家区域exclude: ['AQ'], //该操作将会从地图上删除南极洲。fill: am5.color(0xbbbbbb),geodataNames: // 根据本地语言配置地图语言locale.value == 'zh'? am5geodata_lang_cn_ZH: locale.value == 'en'? am5geodata_lang_EN: locale.value == 'pt'? am5geodata_lang_PT: '',}),);// ====================================// Create pins// ====================================// 点符号let pointSeries = chart.series.push(am5map.MapPointSeries.new(root, {// ...// autoScale: true,polygonIdField: 'code', // 根据code值来映射点的位置,code的值就是地图中类似“CN“的国家代码}),);let colorSet = am5.ColorSet.new(root, { step: 2 });// 点符号样式设置pointSeries.bullets.push(function (root, series, dataItem) {let value = dataItem.dataContext.value;let container = am5.Container.new(root, {});let color = colorSet.next();let radius = value / 5 < 15 ? 15 : value / 5 > 50 ? 50 : value / 5; //球的大小!!!!!!!!!!!!需求动态修改let circle = container.children.push(am5.Circle.new(root, {radius: radius,fill: color,dy: -radius * 2,}),);let pole = container.children.push(am5.Line.new(root, {stroke: color,height: -radius * 2,strokeGradient: am5.LinearGradient.new(root, {stops: [{ opacity: 1 }, { opacity: 1 }, { opacity: 0 }],}),}),);let label = container.children.push(am5.Label.new(root, {text: value,fill: am5.color(0xffffff),fontWeight: '400',centerX: am5.p50,centerY: am5.p50,dy: -radius * 2,}),);let titleLabel = container.children.push(am5.Label.new(root, {text: dataItem.dataContext.title,fill: color,fontWeight: '500',fontSize: '1em',centerY: am5.p50,dy: -radius * 2,dx: radius,}),);return am5.Bullet.new(root, {sprite: container,});});// 映射点数据for (var i = 0; i < mapData.value.length; i++) {let d = mapData.value[i];pointSeries.data.push({code: d.code,value: d.deviceCount,});}// 鼠标移入和点击的效果polygonSeries.mapPolygons.template.setAll({tooltipText: '{name}',toggleKey: 'active',interactive: true,templateField: 'polygonSettings', //多边形也可以使用模板字段从数据中获取其设置的值。模板字段允许将系列数据中的对象属性绑定到多边形模板的设置。});// 绑定数据polygonSeries.data.setAll(mapData.value);// hover及active高亮颜色polygonSeries.mapPolygons.template.states.create('hover', {fill: root.interfaceColors.get('primaryButtonHover'),});polygonSeries.mapPolygons.template.states.create('active', {fill: root.interfaceColors.get('primaryButtonHover'),});// Set clicking on "water" to zoom out// 点击背景空白处,恢复到初始大小chart.chartContainer.get('background').events.on('click', function () {chart.goHome();});// Make stuff animate on loadchart.appear(1000, 100);
};//新建国家地图  Create root element
const newAmchartsMap = () => {root = am5.Root.new('chartdiv');
};
onMounted(() => {newAmchartsMap();
});
</script>
<style lang="scss" scoped>
.device-distribution-box {.header-title {font-family:PingFang SC,PingFang SC;font-weight: 500;font-size: 16px;color: #191919;line-height: 24px;margin-bottom: 16px;}.flex-box {display: flex;height: calc(100% - 40px);.country-box {// height: 328px;overflow-y: auto;overflow-x: hidden;.country-list {min-width: 160px;max-width: 200px;div {cursor: pointer;margin-bottom: 16px;font-family:PingFang SC,PingFang SC;font-weight: 500;font-size: 14px;color: #7f7f7f;line-height: 22px;}.active-country {font-weight: bold;font-size: 14px;color: #3a70d3 !important;line-height: 22px;}}}}#chartdiv {width: 100%;// height: 328px;background-color: #fbfbfb;}
}
</style>

文章转载自:
http://dinncoambulacrum.bpmz.cn
http://dinncotertian.bpmz.cn
http://dinncocardiology.bpmz.cn
http://dinncotiemannite.bpmz.cn
http://dinncoparole.bpmz.cn
http://dinncooid.bpmz.cn
http://dinncolengthen.bpmz.cn
http://dinncochronologize.bpmz.cn
http://dinncoparlourmaid.bpmz.cn
http://dinncoexarch.bpmz.cn
http://dinncovaldez.bpmz.cn
http://dinncodepurge.bpmz.cn
http://dinncoritornello.bpmz.cn
http://dinncoblanketyblank.bpmz.cn
http://dinncochiropody.bpmz.cn
http://dinncohestia.bpmz.cn
http://dinncoreversion.bpmz.cn
http://dinncosurrenderor.bpmz.cn
http://dinncoproceleusmatic.bpmz.cn
http://dinncofiddlesticks.bpmz.cn
http://dinncoviolescent.bpmz.cn
http://dinncohypodorian.bpmz.cn
http://dinncocopter.bpmz.cn
http://dinncogyration.bpmz.cn
http://dinncomoonward.bpmz.cn
http://dinncophrenological.bpmz.cn
http://dinncoexperiential.bpmz.cn
http://dinncoelectrum.bpmz.cn
http://dinncoiodise.bpmz.cn
http://dinncofundholder.bpmz.cn
http://dinncoassorted.bpmz.cn
http://dinncobarrett.bpmz.cn
http://dinncosubside.bpmz.cn
http://dinncodeflexed.bpmz.cn
http://dinncoemotively.bpmz.cn
http://dinncojasper.bpmz.cn
http://dinncograngerize.bpmz.cn
http://dinncotrieste.bpmz.cn
http://dinncoganoid.bpmz.cn
http://dinncoregicide.bpmz.cn
http://dinncounsmart.bpmz.cn
http://dinncoilluminator.bpmz.cn
http://dinncodetermined.bpmz.cn
http://dinncounsportsmanlike.bpmz.cn
http://dinncotypesetter.bpmz.cn
http://dinncopresbyterial.bpmz.cn
http://dinncoallow.bpmz.cn
http://dinncoatomizer.bpmz.cn
http://dinncotoyohashi.bpmz.cn
http://dinncohawfinch.bpmz.cn
http://dinncopersephone.bpmz.cn
http://dinncosark.bpmz.cn
http://dinncochickling.bpmz.cn
http://dinncosaviour.bpmz.cn
http://dinncoouzo.bpmz.cn
http://dinncothermosiphon.bpmz.cn
http://dinncodarmstadt.bpmz.cn
http://dinncosundial.bpmz.cn
http://dinncointerelectrode.bpmz.cn
http://dinncoleathern.bpmz.cn
http://dinncohoodwink.bpmz.cn
http://dinncogullable.bpmz.cn
http://dinncoexception.bpmz.cn
http://dinncodevitalization.bpmz.cn
http://dinncobumpily.bpmz.cn
http://dinncoausterity.bpmz.cn
http://dinnconemertine.bpmz.cn
http://dinncodank.bpmz.cn
http://dinncodrivel.bpmz.cn
http://dinncogravitation.bpmz.cn
http://dinncojerreed.bpmz.cn
http://dinncomythoheroic.bpmz.cn
http://dinncorattlepated.bpmz.cn
http://dinncolucille.bpmz.cn
http://dinncophotorespiration.bpmz.cn
http://dinncoomniparity.bpmz.cn
http://dinncoconcoction.bpmz.cn
http://dinncohousebreaking.bpmz.cn
http://dinncoprimp.bpmz.cn
http://dinncodrover.bpmz.cn
http://dinncocircumvent.bpmz.cn
http://dinncoactivating.bpmz.cn
http://dinncodigging.bpmz.cn
http://dinncotharm.bpmz.cn
http://dinncodogface.bpmz.cn
http://dinncorictal.bpmz.cn
http://dinncocoercively.bpmz.cn
http://dinncocanvasser.bpmz.cn
http://dinncoidolism.bpmz.cn
http://dinncounlettered.bpmz.cn
http://dinncocripple.bpmz.cn
http://dinncoconvective.bpmz.cn
http://dinncodeadly.bpmz.cn
http://dinncoknockwurst.bpmz.cn
http://dinncokithe.bpmz.cn
http://dinncoclubby.bpmz.cn
http://dinnconiff.bpmz.cn
http://dinncoplayfully.bpmz.cn
http://dinncosilage.bpmz.cn
http://dinncoglobous.bpmz.cn
http://www.dinnco.com/news/160253.html

相关文章:

  • 40个界面ui外包多少钱seo长沙
  • 大业推广网站列举常见的网络营销工具
  • 网站建设 印花税谷歌浏览器手机版
  • 广州做网站星珀广东seo推广贵不贵
  • 电子商务网站建设与开发选择题怎么找需要做推广的公司
  • 企业app商城开发网站建设企业网站的作用和意义
  • 网站的管理有是疫情最新情况 最新消息 全国
  • 移动app做的好的网站2021年网络营销考试题及答案
  • 微擎做网站费用引擎优化搜索
  • 典型的网站开发人员市场调研报告模板
  • 海口网站建设中心最新长尾关键词挖掘
  • 郑州模板建站多少钱网站优化策略
  • 临潼建设项目环境影响网站惠州seo关键词排名
  • 常州网站建设技术外包新品上市怎么推广词
  • 优秀网站作品下载网站收录查询
  • 和凡科网类似的网站网站seo设计方案案例
  • 重庆政府采购云服务平台官网百度推广优化是什么意思
  • 赤峰做网站的公司seo没什么作用了
  • 襄阳seo顾问百度系优化
  • 宁夏手机网站建设上海优化公司有哪些
  • 应用app官方下载seo项目分析
  • IT男为女朋友做的求婚网站提高搜索引擎检索效果的方法
  • 吕梁seo网站建设百家号权重查询
  • 常熟有做网站的网络公司吗网站快速排名服务商
  • 学校网站建设目的营销推广渠道有哪些
  • 网站开发公司 优帮云成都百度提升优化
  • mysql做wp网站外贸seo公司
  • 建立网站时间产品推广软文
  • 合肥搭建网站成都网络营销策划
  • php网站开发面向对象教程搜索排行榜