数据大屏
<!DOCTYPE html> <html lang="zh-CN"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>人员数据大屏</title><script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script><style>body {margin: 0;padding: 0;background-color: #0a1a35;color: #fff;font-family: "Microsoft YaHei", sans-serif;}.dashboard {display: grid;grid-template-columns: repeat(3, 1fr);grid-gap: 20px;padding: 20px;position: relative;overflow: hidden;}.chart {width: 100%;height: 350px;}.chart-container {background: rgba(16, 42, 87, 0.7);border-radius: 10px;padding: 15px;box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);}.chart {width: 100%;height: 400px;}h2 {color: #4fc3f7;text-align: center;margin-top: 0;}#nameList {grid-column: span 2;height: 100px;overflow: hidden;text-align: center;font-size: 24px;line-height: 100px;color: #4fc3f7;}</style> </head> <body><div class="dashboard"><div class="chart-container"><h2>年龄分布柱状图</h2><div id="ageBarChart" class="chart"></div></div><div class="chart-container"><h2>婚姻状态</h2><div id="maritalPieChart" class="chart"></div></div><div class="chart-container"><h2>工作情况</h2><div id="jobBarChart" class="chart"></div></div><div class="chart-container"><h2>子女数量</h2><div id="childrenLineChart" class="chart"></div></div><div class="chart-container"><h2>学历分布</h2><div id="educationPieChart" class="chart"></div></div><div class="chart-container"><h2>年龄段比例</h2><div id="agePieChart" class="chart"></div></div></div><script>// 生成500条人员数据 const people = [];const familyNames = ['王','李','张','刘','陈','杨','赵','黄','周','吴'];const givenNames = ['伟','芳','娜','秀英','敏','静','丽','强','磊','军'];const educations = ['初中','高中','专科','本科','研究生','博士研究生'];const maritalStatuses = ['未婚','已婚','离异','丧偶'];const jobs = ['事业编','公务员','国有企业','民营企业'];for (let i = 1; i <= 500; i++) {const age = Math.floor(Math.random() * 60) + 18;const maritalStatus = maritalStatuses[Math.floor(Math.random() * maritalStatuses.length)];people.push({id: i,name: familyNames[Math.floor(Math.random() * familyNames.length)] + givenNames[Math.floor(Math.random() * givenNames.length)],age: age,education: educations[Math.floor(Math.random() * educations.length)],maritalStatus: maritalStatus,childrenCount: maritalStatus === '已婚' ? Math.floor(Math.random() * 4) : 0,job: jobs[Math.floor(Math.random() * jobs.length)]});}// 初始化图表 const ageBarChart = echarts.init(document.getElementById('ageBarChart'));const maritalPieChart = echarts.init(document.getElementById('maritalPieChart'));const jobBarChart = echarts.init(document.getElementById('jobBarChart'));const childrenLineChart = echarts.init(document.getElementById('childrenLineChart'));const educationPieChart = echarts.init(document.getElementById('educationPieChart'));const agePieChart = echarts.init(document.getElementById('agePieChart'));// 年龄柱状图配置 const ageRanges = ['20-30', '31-40', '41-50', '51-60', '61-70', '71-80'];const ageCounts = ageRanges.map(range => {const [min, max] = range.split('-').map(Number);return people.filter(p => p.age >= min && p.age <= max).length;});const ageBarOption = {tooltip: { trigger: 'axis' },xAxis: {type: 'category',data: ageRanges,axisLabel: { color: '#fff' }},yAxis: { type: 'value',axisLabel: { color: '#fff' }},series: [{data: ageCounts,type: 'bar',itemStyle: { color: '#4fc3f7' }}]};// 婚姻状态饼图配置 const maritalPieOption = {tooltip: { trigger: 'item' },series: [{type: 'pie',radius: '50%',data: [{ value: people.filter(p => p.maritalStatus === '已婚').length, name: '已婚' },{ value: people.filter(p => p.maritalStatus === '未婚').length, name: '未婚' },{ value: people.filter(p => p.maritalStatus === '离异').length, name: '离异' },{ value: people.filter(p => p.maritalStatus === '丧偶').length, name: '丧偶' }],itemStyle: {borderRadius: 5,borderColor: '#0a1a35',borderWidth: 2}}]};// 工作情况柱状图配置 const jobBarOption = {tooltip: { trigger: 'axis' },xAxis: {type: 'category',data: ['事业编', '公务员', '国有企业', '民营企业'],axisLabel: { color: '#fff' }},yAxis: { type: 'value',axisLabel: { color: '#fff' }},series: [{data: [people.filter(p => p.job === '事业编').length,people.filter(p => p.job === '公务员').length,people.filter(p => p.job === '国有企业').length,people.filter(p => p.job === '民营企业').length],type: 'bar',itemStyle: { color: '#4fc3f7' }}]};// 子女数量折线图配置 const childrenLineOption = {tooltip: { trigger: 'axis' },xAxis: {type: 'category',data: ['1个', '2个', '3个'],axisLabel: { color: '#fff' }},yAxis: { type: 'value',axisLabel: { color: '#fff' }},series: [{data: [people.filter(p => p.childrenCount === 1).length,people.filter(p => p.childrenCount === 2).length,people.filter(p => p.childrenCount === 3).length],type: 'line',smooth: true,itemStyle: { color: '#4fc3f7' }}]};// 学历分布饼图配置 const educationPieOption = {tooltip: { trigger: 'item' },series: [{type: 'pie',radius: '50%',data: [{ value: people.filter(p => p.education === '初中').length, name: '初中' },{ value: people.filter(p => p.education === '高中').length, name: '高中' },{ value: people.filter(p => p.education === '专科').length, name: '专科' },{ value: people.filter(p => p.education === '本科').length, name: '本科' },{ value: people.filter(p => p.education === '研究生').length, name: '研究生' },{ value: people.filter(p => p.education === '博士研究生').length, name: '博士研究生' }],itemStyle: {borderRadius: 5,borderColor: '#0a1a35',borderWidth: 2}}]};// 年龄段饼图配置 const agePieOption = {tooltip: { trigger: 'item' },series: [{type: 'pie',radius: '50%',data: ageRanges.map((range, i) => ({value: ageCounts[i],name: range})),itemStyle: {borderRadius: 5,borderColor: '#0a1a35',borderWidth: 2}}]};// 渲染所有图表 ageBarChart.setOption(ageBarOption);maritalPieChart.setOption(maritalPieOption);jobBarChart.setOption(jobBarOption);childrenLineChart.setOption(childrenLineOption);educationPieChart.setOption(educationPieOption);agePieChart.setOption(agePieOption);// 窗口大小变化时重置图表大小 window.addEventListener('resize', function() {ageBarChart.resize();maritalPieChart.resize();jobBarChart.resize();childrenLineChart.resize();educationPieChart.resize();agePieChart.resize();});</script> </body> </html>
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/930328.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!相关文章
K8S上采用helm部署 Prometheus + Grafana
K8S上采用helm部署 Prometheus + Grafanapre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "M…
AI元人文的硅基基石体系:EPU+VPU+WBUC+WAUC深度解析——声明Ai解析
AI元人文的硅基基石体系:EPU+VPU+WBUC+WAUC深度解析
一、引言:硅基生命的人文基因
在2025年阿里云栖大会上,"云智一体,碳硅共生"的主题引发了人们对未来智能形态的深刻思考。随着人工智能技术的迅猛发展…
做熊猫tv网站的目的互联网电子商务网站开发技术
前言 踩着前人的肩膀,努力前行。参考了很多前人的文章。 1.变量声明const和let es6之前声明变量只能用var,var的特点是无论声明在何处,都会被视为声明在函数的最顶部(不在函数内即在全局作用域的最顶部) function test(){if(false){var name …
优秀网站建设哪家专业网页打不开用什么浏览器
引子
网络层能够被分解为两个相互作用的部分:
数据平面和控制平面。
网络层概述
路由器具有截断的协议栈,即没有网络层以上的部分。
如下图所示,是一个简单网络: 转发和路由选择:数据平面和控制平面
网络层的作用…
做画册去什么网站找素材网站建设新闻咨询
官方文档 在前面 文章目录 uboot常见命令学习环境变量网络控制台uboot标准启动其他 升级uboot或内核bin和uimg以及booti和bootm的区别制作uImage更换内核更换uboot后续计划 uboot常见命令学习
环境变量
Environment Variables环境变量 autostart 如果值为yes,则会…
电脑做网站服务器需要什么软件手机网站 侧边栏导航
👑专栏内容:Java⛪个人主页:子夜的星的主页💕座右铭:前路未远,步履不停 目录 一、泛型1、什么是泛型2、泛型的语法 二、泛型类的使用1、泛型类的语法2、泛型如何编译的2.1、擦除机制2.2、为什么不能实例化泛…
详细介绍:VSCode+Cline 安装配置及使用说明
详细介绍:VSCode+Cline 安装配置及使用说明2025-10-07 10:44
tlnshuju
阅读(0)
评论(0) 收藏
举报pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: bl…
淮安软件园哪家做网站建设网站需要有什么特色
当我们谈论编程中的数据结构时,顺序容器是不可忽视的一个重要概念。顺序容器是一种能够按照元素添加的顺序来存储和检索数据的数据结构。它们提供了简单而直观的方式来组织和管理数据,为程序员提供了灵活性和性能的平衡。
Qt 中提供了丰富的容器类&…
看手机的网站叫什么建筑公司经营范围大全
手机从开发出来到现在,已经换了很多代了,从大哥大,小灵通,到诺基亚到山寨机到苹果到华为,几十年过去了。手机从奢侈品一下飞去每个人手里,反正我手机有手机已经快10年了,所以我相信每个人对自己…
有关网站建设的知识招标网站大全
最近接触到一些新人,是真正的网络新人,慢慢理解了新人的困惑。
对于新人,每天获取的信息五花八门,这是好的也是极其不好的。因为他们不知道如何筛选,到底适不适合自己去做。
我一直在劝大家去做一些内容创造性的事情…
题解:P4779 【模板】单源最短路径(标准版)
题目传送门
算法分析
本题要求计算单源最短路径,并且边权非负,适合使用Dijkstra 算法。Dijkstra 算法是一种贪心算法,用于计算带权有向图或无向图中单个源节点到所有其他节点的最短路径。
为什么选择 Dijkstra 算法…
湖南服装网站建设创意做美食视频网站
文章目录 代码实现参考 代码实现
本文实现 ResNet原论文 Deep Residual Learning for Image Recognition 中的50层,101层和152层残差连接。 代码中使用基础残差块这个概念,这里的基础残差块指的是上图中红色矩形圈出的内容:从上到下分别使用…
北京微网站建设公司广州专业做继承案件律师
11月3日-5日,由中国开源软件推进联盟 PostgreSQL 分会主办的中国 PostgreSQL 数据库生态大会在北京中科院软件所隆重举行。大会以”极速进化融合新生”为主题,从线下会场和线上直播两种方式展开,邀请了数十位院士、教授、高管和社群专家&…
高频感应钎焊在制冷行业的应用与优势:高效、绿色、智能的焊接革命!
在追求“双碳”目标与智能制造的时代浪潮下,制冷行业正经历一场静悄悄的技术革命。其中,高频感应钎焊(High-Frequency Induction Brazing)作为一项先进连接工艺,正以其高效、安全、精准的特性,全面取代传统火焰钎…
题解:P12672 「LAOI-8」近期我们注意到有网站混淆视听
题目传送门
题目分析
本题要求我们判断对于给定的字符串,最少需要多少次字符交换操作,使得字符串中不存在同时包含 LGR 子串和 CSP 子串的情况。每次操作可以交换任意两个字符。
关键观察:
若字符串中不同时存在 LG…
详细介绍:基于LangChain构建高效RAG问答系统:向量检索与LLM集成实战
详细介绍:基于LangChain构建高效RAG问答系统:向量检索与LLM集成实战pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: &q…
网站改版 优势php+mysql网站开发
需求:给定两个整数,被除数和除数(都是正数,且不超过int的范围)。
将两数相除,要求不使用乘法、除法和%运算符。
得到商和余数。 被除数 %除数商 ... 余数 #这里%代表除 //1、求商,就是求里…
网站模板后台手机免播看成片
docker迁移容器 将容器保存为镜像 docker commit container-id image-name将保存好的镜像打包(保存到/path文件夹) docker save image-name > /path/image-name.tar将打包好的镜像迁移到新服务器,新服务器执行如下命令 scp -P 22 username旧服务器IP地址:/旧服务…
完整教程:docker创建postgreSql带多个init的sql
pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …