ECharts雷达图详细配置说明
雷达图表配置说明:
// 指定图表的配置项和数据
var option = {
backgroundColor: 'rgba(204,204,204,0.7 )',
// 背景色,默认无背景 rgba(51,255,255,0.7)
title: {
text: '各教育阶段男女人数统计',
link: 'https://www.xxx.com',
target: 'blank',
top: '5%',
left: '3%',
textStyle: {
color: '#fff',
fontSize: 20,
}
}, legend: { // 图例组件
show: true,
icon: 'rect',
// 图例项的 icon。ECharts 提供的标记类型包括 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'也可以通过 'image://url' 设置为图片,其中 url 为图片的链接,或者 dataURI。可以通过 'path://' 将图标设置为任意的矢量路径。
top: '40%',
// 图例距离顶部边距
left: '15%',
// 图例距离左侧边距
itemWidth: 10,
// 图例标记的图形宽度。[ default: 25 ]
itemHeight: 10,
// 图例标记的图形高度。[ default: 14 ]
itemGap: 30,
// 图例每项之间的间隔。[ default: 10 ]横向布局时为水平间隔,纵向布局时为纵向间隔。
orient: 'vertical',
// 图例列表的布局朝向,'horizontal'为横向,''为纵向.
textStyle: { // 图例的公用文本样式。
fontSize: 15,
color: '#fff'
},
data: [{ // 图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name(如果是饼图,也可以是饼图单个数据的 name)。图例组件会自动根据对应系列的图形标记(symbol)来绘制自己的颜色和标记,特殊字符串 ''(空字符串)或者 '\n'(换行字符串)用于图例的换行。
name: '男',
// 图例项的名称,应等于某系列的name值(如果是饼图,也可以是饼图单个数据的 name)。
icon: 'rect',
// 图例项的 icon。
textStyle: { // 图例项的文本样式。
color: 'rgba(51,0,255,1)',
fontWeight: 'bold' // 文字字体的粗细,可选'normal','bold','bolder','lighter'
}
},
{
name: '女',
icon: 'rect',
textStyle: {
color: 'rgba(255,0,0,1)',
fontWeight: 'bold' // 文字字体的粗细,可选'normal','bold','bolder','lighter'
}
}],
}, radar: [{ // 雷达图坐标系组件,只适用于雷达图。
center: ['50%', '50%'],
// 圆中心坐标,数组的第一项是横坐标,第二项是纵坐标。[ default: ['50%', '50%'] ]
radius: 160,
// 圆的半径,数组的第一项是内半径,第二项是外半径。
startAngle: 90,
// 坐标系起始角度,也就是第一个指示器轴的角度。[ default: 90 ]
name: { // (圆外的标签)雷达图每个指示器名称的配置项。
formatter: '{value}',
textStyle: {
fontSize: 15,
color: '#000'
}
},
nameGap: 15,
// 指示器名称和指示器轴的距离。[ default: 15 ]
splitNumber: 4,
// (这里是圆的环数)指示器轴的分割段数。[ default: 5 ]
shape: 'circle',
// 雷达图绘制类型,支持 'polygon'(多边形) 和 'circle'(圆)。[ default: 'polygon' ]
axisLine: { // (圆内的几条直线)坐标轴轴线相关设置
lineStyle: {
color: '#fff',
// 坐标轴线线的颜色。
width: 1,
// 坐标轴线线宽。
type: 'solid',
// 坐标轴线线的类型。
}
},
splitLine: { // (这里是指所有圆环)坐标轴在 grid 区域中的分隔线。
lineStyle: {
color: '#fff',
// 分隔线颜色
width: 2,
// 分隔线线宽
}
},
splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
show: true,
areaStyle: { // 分隔区域的样式设置。
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)'],
// 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
}
},
indicator: [{ // 雷达图的指示器,用来指定雷达图中的多个变量(维度),跟data中 value 对应
name: '高中',
// 指示器名称
max: 15000,
// 指示器的最大值,可选,建议设置
//color: '#fff' // 标签特定的颜色。
},
{
name: '专科',
max: 10000
},
{
name: '本科',
max: 8000
},
{
name: '硕士',
max: 2000
},
{
name: '博士',
max: 500
}]
}],
series: [{
name: '雷达图',
// 系列名称,用于tooltip的显示,legend 的图例筛选,在 setOption 更新数据和配置项时用于指定对应的系列。
type: 'radar',
// 系列类型: 雷达图
itemStyle: { // 折线拐点标志的样式。
normal: { // 普通状态时的样式
lineStyle: {
width: 1
},
opacity: 0.2
},
emphasis: { // 高亮时的样式
lineStyle: {
width: 5
},
opacity: 1
}
},
data: [{ // 雷达图的数据是多变量(维度)的
name: '女',
// 数据项名称
value: [11035, 6013, 5067, 1520, 184],
// 其中的value项数组是具体的数据,每个值跟 radar.indicator 一一对应。
symbol: 'circle',
// 单个数据标记的图形。
symbolSize: 5,
// 单个数据标记的大小,可以设置成诸如 10 这样单一的数字,也可以用数组分开表示宽和高,例如 [20, 10] 表示标记宽为20,高为10。
label: { // 单个拐点文本的样式设置
normal: {
show: true,
// 单个拐点文本的样式设置。[ default: false ]
position: 'top',
// 标签的位置。[ default: top ]
distance: 5,
// 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。[ default: 5 ]
color: 'rgba(255,0,0,1)',
// 文字的颜色。如果设置为 'auto',则为视觉映射得到的颜色,如系列色。[ default: "#fff" ]
fontSize: 14,
// 文字的字体大小
formatter: function(params) {
return params.value;
}
}
},
itemStyle: { // 单个拐点标志的样式设置。
normal: {
borderColor: 'rgba(255,0,0,1)',
// 拐点的描边颜色。[ default: '#000' ]
borderWidth: 3,
// 拐点的描边宽度,默认不描边。[ default: 0 ]
}
},
lineStyle: { // 单项线条样式。
normal: {
opacity: 0.5 // 图形透明度
}
},
areaStyle: { // 单项区域填充样式
normal: {
color: 'rgba(255,0,0,0.6)' // 填充的颜色。[ default: "#000" ]
}
}
},
{
name: '男',
value: [13408, 5065, 5947, 856, 302],
symbol: 'circle',
symbolSize: 5,
label: {
normal: {
show: true,
position: 'top',
distance: 5,
color: 'rgba(51,0,255,1)',
fontSize: 14,
formatter: function(params) {
return params.value;
}
}
},
itemStyle: {
normal: {
borderColor: 'rgba(51,0,255,1)',
borderWidth: 3,
}
},
lineStyle: {
normal: {
opacity: 0.5
}
},
areaStyle: {
normal: {
color: 'rgba(51,0,255,0.5)'
}
}
}]
},
]
};
ECharts雷达图详细配置说明的更多相关文章
- echarts雷达图
用echarts展现雷达图的定制 <!doctype html> <html> <head> <meta charset="utf-8"& ...
- echarts 雷达图的个性化设置
echarts 雷达图的个性化设置 function test() { let myChart = echarts.init(document.getElementById('levelImage') ...
- echarts雷达图点击事件
最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts配置问题:https://www.douban.com/note/509404582/ <!doctype ...
- echarts雷达图点击事件 包含(2.x,3.85,4.02)测试
最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts 2x 的点击事件 echarts配置问题:https://www.douban.com/note/509404 ...
- ECharts 雷达图怎么在类目值下面显示数值
需要实现的效果: 官网里面的demo显示数值,都是在拐点处: [解决] 1.只显示类目 <div id="mychart" style="width:300px;h ...
- Echarts数据可视化series-radar雷达图,开发全解+完美注释
全栈工程师开发手册 (作者:栾鹏) Echarts数据可视化开发代码注释全解 Echarts数据可视化开发参数配置全解 6大公共组件详解(点击进入): title详解. tooltip详解.toolb ...
- echarts细节的修改(2):矩形数图,柱状图,折线图,雷达图等
1.矩形数图的配置,是直接拿饼图的配置 然后将type换成treemap. 修改类型 option.series.type = 'treemap'; 关闭面包屑导航 option.series.bre ...
- 帆软报表(finereport)雷达图钻取详细点新页面展示
添加参数栏,季度下拉框的空间名为combobox0 添加雷达图,通过第三页面做跳转 雷达图钻取.cpt为联动钻取的第三页面 添加纬度(所点击钻取的点) 参数 wd 添加季度参数 jd 值为季 ...
- 关于echarts生成雷达图的一些参数介绍
export const industryFactorOption = { title: { text: '雷达图', textStyle: { color: 'rgba(221,221,221,1) ...
随机推荐
- Elasticsearch 7.x文档基本操作(CRUD)
官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html 1.添加文档 1.1.指定文档ID PUT ...
- (八)UML之状态图
一.概念 状态图(Statechart Diagram)主要用于描述一个对象在其生存期间的动态行为,表现为一个对象所经历的状态序列,引起状态转移的事件(Event),以及因状态转移而伴随的动作(Act ...
- C# WebApi 接口传参详解
这篇文章主要介绍了C# WebApi 接口传参详解,本篇打算通过get.post.put.delete四种请求方式分别谈谈基础类型(包括int/string/datetime等).实体.数组等类型的参 ...
- 网页引用jQuery在Electron运行出现"$ is not defined"
Electron因为开启了node集成才能实现和网页的通信,引入jQuery较高版本它的模块化定义(基于CommonJS)和Electron的内部机制冲突了.目前提供以下两个方案: 1.使用jQuer ...
- Nginx+PHP(FastCGI)高性能服务器加载redis+memcache模块
1)Nginx+FastCGI安装配置: yum install openssl openssl-devel pcre-devel pcre zlib zlib-devel –y #下载Nginx源 ...
- Mongodb: com.mongodb.MongoSocketReadException: Prematurely reached end of stream
saveLocationInfo errorcom.mongodb.MongoSocketReadException: Prematurely reached end of stream at com ...
- Available time
Google Calendar, Outlook, iCal has been banned from your company! So an intrepid engineer has decide ...
- oracle数据库与其他数据库区别
本文用的是Oracle 10g数据库,利用PL/SQL Developer的集成开发环境(安装可以自行百度) Oracle数据库 ---> 数据库实例 ---> 表空间(逻辑单位)( ...
- Linux安装 PostgreSQL
1.在线安装 yum install postgresql-server -y 2.初始化数据库 service postgresql initdb 3.设置自动启动 hkconfig postgre ...
- Word 删除脚注尾注前边的编号
1. 前言 一般我们插入尾注都是有编号的,怎么插入无编号的尾注? 2. 步骤 进入引用选项卡,然后注意不要点插入脚注,而要点脚注最右下方的小方框,出现脚注和尾注的对话框,点符号(Y)...,选第一个格 ...