常见的几种echarts类型

一:折线图

let option = {
						tooltip: {},
						animation: false,
						grid: {
							top: "20%",
							bottom: "33%", //也可设置left和right设置距离来控制图表的大小
							left: '5%',
							right: '5%'
						},
						xAxis: {
              boundaryGap:false,
							data: [1,2,3,4,5],
							axisLine: {
								show: true, //隐藏X轴轴线
								lineStyle: {
									color: 'rgba(10,71,62,0.2)'
								}
							},
							axisTick: {
								show: false //隐藏X轴刻度
							},
							axisLabel: {
								show: true,
								margin: 14,
								fontSize: 14,
								textStyle: {
									color: "rgba(0,0,0,1)" //X轴文字颜色
								}
							},

						},
						yAxis: [
							{
                name:"%",
                nameLocation:"end",
                nameTextStyle:{
                  color:"#333",
                  align:"right",
									padding:[0,15]
                },
								type: "value",
								gridIndex: 0,
								splitNumber: 4,
								splitLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)',
										width: 1
									},
								},
								axisTick: {
									show: false
								},
								axisLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)'
									}
								},
								axisLabel: {
									show: true,
									margin: 14,
									fontSize: 14,
									textStyle: {
										color: "#333" //X轴文字颜色
									}
								},
							}
						],
						series: [
            {
              name: 'Fake Data',
              type: 'line',
              symbol: 'none',
              smooth: true,  
              sampling: 'lttb',
              itemStyle: {
                color: '#20C3A7'
              },
              areaStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                  {
                    offset: 1,
                    color: 'rgba(255,255,255,1)'
                  },
                  {
                    offset: 0,
                    color: 'rgb(32,195,167)'
                  }
                ])
              },
              data: [12,2,3,14,5]
            }
							
						]
					};

第二种:柱形渐变图

let workOrderTjChartoption = {
						tooltip: {},
						color:["#FFAE00","#2AADD3","#20C3A7"],
						animation: false,
						grid: {
							top: "23%",
							bottom: "21%", //也可设置left和right设置距离来控制图表的大小
							left: '11%',
							right: '5%'
						},
						xAxis: {
							data: ['周一','周二'],
							axisLine: {
								show: true, //隐藏X轴轴线
								lineStyle: {
									color: 'rgba(10,71,62,0.2)'
								}
							},
							axisTick: {
								show: false //隐藏X轴刻度
							},
							axisLabel: {
								show: true,
								margin: 14,
								fontSize: 14,
								textStyle: {
									color: "rgba(0,0,0,1)" //X轴文字颜色
								}
							},

						},
						yAxis: [
							{
								type: "value",
								gridIndex: 0,
								// min: min1,
								// max: max1,
								// interval: (max1 - min1) / 4,
								splitNumber: 4,
								splitLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)',
										width: 1
									},
								},
								axisTick: {
									show: false
								},
								axisLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)'
									}
								},
								axisLabel: {
									show: true,
									margin: 14,
									fontSize: 14,
									textStyle: {
										color: "#333" //X轴文字颜色
									}
								},
							}
						],
						legend: {
							top: '0%',
							itemWidth:10,
							itemHeight:10,
							data: ["核查测点数", "严重越上限测点数", "越下限测点数"],
						
						},
						series: [
							{
								name: "越下限测点数",
								type: "bar",
								barWidth: 8,
								itemStyle: {
									normal: {
										color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
											offset: 0,
											color: "rgba(29,218,182,1)"
										},
										{
											offset: 1,
											color: "rgba(34,183,160,1)"
										}
										])
									}
								},
								data: [1,2],
								// z: 10,
								// zlevel: 0,

							},
							{
								name: "严重越上限测点数",
								type: "bar",
								barWidth: 8,
								// barGap: '-100%',
								itemStyle: {
									normal: {
										color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
											offset: 0,
											color: "rgba(31,224,247,1)"
										},
										{
											offset: 1,
											color: "rgba(42,173,211,1)"
										}
										])
									}
								},
								data: [1,2],
								// z: 11,
								// zlevel: 1,

							},

							{
								name: '核查测点数',
								type: 'bar',
								barWidth: 8,
								// smooth: true, //是否平滑曲线显示
								// 			symbol:'circle',  // 默认是空心圆(中间是白色的),改成实心圆
								
							

								itemStyle: {
									normal: {
										color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
											offset: 0,
											color: "rgba(255,222,0,1)"
										},
										{
											offset: 1,
											color: "rgba(255,174,0,1)"
										}
										])
									}
								},
								// z: 12,
								// zlevel: 2,

								data:[2,3],
							}
						]
					};

第三种:柱形图

let option = {
						tooltip: {
							trigger: 'axis',
							axisPointer: {
								type: 'shadow'
							}
						},
						legend: {
							top: '5%',
							itemWidth:10,
							itemHeight:10,
							data: ["7%~10%", "10%~15%", "15以上","-10~-20","-20及以下"],
						},
						grid: {
							left: '3%',
							right: '4%',
							bottom: '3%',
							containLabel: true
						},
						xAxis: [
							{
								type: 'category',
								data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
								axisLine: {
									show: true, //隐藏X轴轴线
									lineStyle: {
										color: 'rgba(10,71,62,0.2)'
									}
								},
								axisTick: {
									show: false //隐藏X轴刻度
								},
								axisLabel: {
									show: true,
									margin: 14,
									fontSize: 14,
									textStyle: {
										color: "rgba(0,0,0,1)" //X轴文字颜色
									}
								},
							}
						],
						yAxis: [
							{
								type: 'value'
							}
						],
						series: [
							
							{
								name: '-20及以下',
								type: 'bar',
								barWidth:15,
								stack: 'Ad',
								emphasis: {
									focus: 'series'
								},
								itemStyle:{
									color:"#20C3A7"
								},
								data: [120, 132, 101, 134, 90, 230, 210]
							},
							{
								// 分隔
								type: "pictorialBar",
								itemStyle: {
									normal: {
										color: "#fff"
									}
								},
								symbolRepeat: "true",
								symbolMargin: 2,
								symbol: "rect",
								symbolClip: true,
								symbolSize: [15, 2],
								symbolPosition: "start",
							// 	symbolOffset: [0, -15],
								symbolBoundingData: [1000, 1000, 1000, 1000, 1000, 1000, 1000],
								data:  [1000, 1000, 1000, 1000, 1000, 1800, 1800],
								width: 25,
								z: 0,
								zlevel: 1,
							},
							{
								name: '-10~-20',
								type: 'bar',
								barWidth:15,
								stack: 'Ad',
								emphasis: {
									focus: 'series'
								},
								itemStyle:{
									color:"#249AEC"
								},
								data: [220, 182, 191, 234, 290, 330, 310]
							},
						
							{
								name: '15以上',
								type: 'bar',
								barWidth:15,
								stack: 'Ad',
								emphasis: {
									focus: 'series'
								},
								itemStyle:{
									color:"#35C03F"
								},
								data: [150, 232, 201, 154, 190, 330, 410]
							},
							{
								name: '10%~15%',
								type: 'bar',
								barWidth:15,
								stack: 'Ad',
								emphasis: {
									focus: 'series'
								},
								itemStyle:{
									color:"#FFAE00"
								},
								data: [150, 232, 201, 154, 190, 330, 410]
							},
							{
								name: '7%~10%',
								type: 'bar',
								barWidth:15,
								stack: 'Ad',
								emphasis: {
									focus: 'series'
								},
								itemStyle:{
									color:"#FF7214"
								},
								data: [150, 132, 101, 254, 190, 330, 410]
							},
						
						
							
						
						]
					};

第四种:柱形图

let option = {
						tooltip: {},
						animation: false,
						grid: {
							top: "25%",
							bottom: "16%", //也可设置left和right设置距离来控制图表的大小
							left: '5%',
							right: '5%'
						},
						xAxis: {
							data: [1,2,3,4],
							axisLine: {
								show: true, //隐藏X轴轴线
								lineStyle: {
									color: 'rgba(10,71,62,0.2)'
								}
							},
							axisTick: {
								show: false //隐藏X轴刻度
							},
							axisLabel: {
								show: true,
								margin: 14,
								fontSize: 14,
								textStyle: {
									color: "rgba(0,0,0,1)" //X轴文字颜色
								}
							},

						},
						yAxis: [
							{
								type: "value",
								gridIndex: 0,
								// min: min1,
								// max: max1,
								// interval: (max1 - min1) / 4,
								splitNumber: 4,
								splitLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)',
										width: 1
									},
								},
								axisTick: {
									show: false
								},
								axisLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)'
									}
								},
								axisLabel: {
									show: true,
									margin: 14,
									fontSize: 14,
									textStyle: {
										color: "#333" //X轴文字颜色
									}
								},
							},
							{
								name: "%",
								type: "value",
								gridIndex: 0,
								// min: min2,
								// max: max2,
								// interval: (max2 - min2) / 4,
								splitNumber: 4,
								splitLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)',
										width: 1
									},
								},
								axisTick: {
									show: false
								},
								axisLine: {
									show: true,
									lineStyle: {
										color: 'rgba(233,242,241,1)'
									}
								},
								axisLabel: {
									show: true,
									margin: 14,
									fontSize: 14,
									textStyle: {
										color: "#333" //X轴文字颜色
									}
								},
							},
						],
						legend: {
							top: '5%',
							data: ["总数", "越限"],
							itemWidth:10,
							itemHeight:10,
							itemGap:20
						},
						series: [
							{
								name: "总数",
								type: "bar",
								barWidth: 15,
								itemStyle: {
									normal: {
										color: "#E8F8F5",
										borderColor: '#22B7A0'
									}
								},
								data: [10,10,10,10],
								z: 10,
								zlevel: 0,

							},
							{
								name: "越限",
								type: "bar",
								barWidth: 15,
								barGap: '-100%',
								itemStyle: {
									normal: {
										color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
											offset: 0,
											color: "rgba(34,183,160,1)"
										},
										{
											offset: 1,
											color: "rgba(29,218,182,1)"
										}
										])
									}
								},
								data: [2,3,4,6],
								z: 11,
								zlevel: 1,

							},

							
						]
					};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/436219.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【常见索引使用】⭐️Mysql中索引的类型以及使用方式和失效场景

目录 一、前言 二、数据准备 三、索引的分类 四、索引示例 示例1、主键索引(Primary Key Index)与 唯一索引(Unique Index) 示例2、前缀索引(Prefix Index) 示例3、联合索引(复合索引&am…

智能驾驶规划控制理论学习07-规划算法整体框架

一、解耦合策略 1、路径-速度解耦策略概述 路径-速度解耦指的是将车辆的运动分成路径规划和速度规划两部分,对两个部分分别进行研究。 路径规划: 假设环境是“静态的”,将障碍物投射到参考路径上,并规划一条避开它们的路径&…

2024年【安全员-C证】找解析及安全员-C证模拟考试

题库来源:安全生产模拟考试一点通公众号小程序 安全员-C证找解析是安全生产模拟考试一点通总题库中生成的一套安全员-C证模拟考试,安全生产模拟考试一点通上安全员-C证作业手机同步练习。2024年【安全员-C证】找解析及安全员-C证模拟考试 1、【多选题】…

第十二篇 - IAB 标准技术条款和定义-我为什么要翻译介绍美国人工智能科技巨头IAB公司?

前言 这是2021年IAB公司发布的《市场营销人工智能使用案例及最佳实践报告》的最后一篇译文。翻译工作不难,但是非常考验一个人的态度,需要译者忠于自己的初心,严谨对待所有文字、数据、信息、技术和观点。时代变化如此之快,3年前…

【小黑嵌入式系统第十八课】结课总结(二)——软件部分(系统架构调试测试运行系统软件设计)

上一课: 【小黑嵌入式系统第十七课】结课总结(一)——硬件部分(系统&总线&处理器&外设&通信) 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分…

js节点操作

js节点操作 一.DOM节点二.查找节点三.增加节点3.1.创建节点3.2.追加节点3.3.克隆节点 四. 删除节点 一.DOM节点 DOM树里每一个内容都称之为节点 节点类型:元素节点(所有的标签 比如 body,div等,html 是根节点) 属性节…

前缀和+哈希表:联手合击Leetcode 560.和为k的子数组

题目 给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的子数组的个数 。 子数组是数组中元素的连续非空序列。 示例 1: 输入:nums [1,1,1], k 2 输出:2示例 2: 输入:nums [1,2…

C++指针(四)

个人主页:PingdiGuo_guo 收录专栏:C干货专栏 前言 相关文章:C指针(一)、C指针(二)、C指针(三) 本篇博客是介绍函数指针、函数指针数组、回调函数、指针函数的。 点赞破六…

YOLOSHOW - YOLOv5 / YOLOv7 / YOLOv8 / YOLOv9 基于 Pyside6 的图形化界面

YOLOSHOW 是一个基于 PySide6(Qt for Python)开发的图形化界面应用程序,主要用于集成和可视化YOLO系列(包括但不限于YOLOv5、YOLOv7、YOLOv8、YOLOv9)的目标检测模型。YOLOSHOW 提供了一个用户友好的交互界面&#xff…

遥感分析时什么情况下需要做大气校正?

经常会遇到这样的问题:什么情况需要做大气校正产生?这个问题取决于传感器和应用目标,总的来说,如果要做光谱分析,那么大气校正是必须要做的。本文对于在什么情况下选择什么样的大气校正方法,给出了一些依据…

算法48:动态规划专练(力扣221:最大正方形面积)

题目: 在一个由 0 和 1 组成的二维矩阵内,找到只包含 1 的最大正方形,并返回其面积。 示例 1: 输入:matrix [["1","0","1","0","0"],["1","0&quo…

MySQL下实现纯SQL语句的递归查询

需求 有一个部门表,部门表中有一个字段用于定义它的父部门; 在实际业务中有一个『部门中心』的业务; 比如采购单,我们需要显示本部门及子部门的采购单显示出来。 结构 数据如下: 实现方式如下: WITH RECUR…

打造智慧足球社区:Java+SpringBoot实战

✍✍计算机毕业编程指导师 ⭐⭐个人介绍:自己非常喜欢研究技术问题!专业做Java、Python、微信小程序、安卓、大数据、爬虫、Golang、大屏等实战项目。 ⛽⛽实战项目:有源码或者技术上的问题欢迎在评论区一起讨论交流! ⚡⚡ Java、…

【vue3之组合式API及其新特性】

组合式API及其新特性 一、setup1.写法2.如何访问3.语法糖4.同步返回对象 二、reactive()和ref()1.reactive()2.ref() 三、computed四、watch函数1.侦听单个数据2.侦听多个数据3. immediate4. deep5.精确侦听对象的某个属性 五、生命周期函数六、组件通信1.父传子2. 子传父 七、…

vue 总结

1.vue 的生命周期 1. es6 2. vue 基本属性指令 <template><div><!--<h1>vue基本指令的使用方式</h1><a :href"url">v-bind使用链接</a><img :src"srcUrl" /><div>解决闪烁问题<p v-cloak>{{…

【word】引用文献如何标注右上角

一、在Word文档中引用文献并标注在右上角的具体步骤如下 1、将光标移动到需要添加文献标注的位置&#xff1a; 2、在文档上方的工具栏中选择“引用”选项&#xff1a; 3、点击“插入脚注”或“插入尾注”&#xff1a; ①如果选择的是脚注&#xff0c;则脚注区域会出现在本页的…

Object.keys()的用法

1、语法 Object.keys(obj) 参数&#xff1a;要返回其枚举自身属性的对象 返回值&#xff1a;一个表示给定对象的所有可枚举属性的字符串数组 2、处理对象&#xff0c;返回可枚举的属性数组 let person {name:“张三”,age:25,address:“深圳”,getName:function(){}} Obj…

管理 PostgreSQL 中配置参数的各种方法

管理 PostgreSQL 中配置参数的各种方法 1. 概述 PostgreSQL提供了一个配置文件 postgresql.conf 让用户自定义参数。您可能需要更改一些参数来调整性能或在工作环境中部署 PostgreSQL 服务器。在这篇博文中&#xff0c;我们将探索管理这些参数的不同方法。 2. 以不同方式管理…

大语言模型系列-GPT-3

文章目录 前言一、GTP-3的改进二、GPT-3的表现总结 前言 《Language Models are Few-Shot Learners&#xff0c;2020》 前文提到GPT-2进一步提升了模型的zero shot能力&#xff0c;但是在一些任务中仍可能会“胡说”&#xff0c;GTP-3基于此提出了few shot&#xff0c;即预测…
最新文章