需要实现的效果:

官网里面的demo显示数值,都是在拐点处:

【解决】

1、只显示类目

     <div id="mychart" style="width:300px;height:300px;margin:0 auto;"></div>
<script>
var arr1 = [60,73,85,40,60];
var arr2 = [23,90,23,32,67];
var mychart = echarts.init(document.getElementById('mychart'));
var option = {
radar: [
{
indicator: [
{text: '品牌', max: 100},
{text: '内容', max: 100},
{text: '可用性', max: 100},
{text: '功能', max: 100},
{text: '屏幕', max: 100}
],
center: ['50%','54%'],//调整雷达图的位置
radius: 80,//半径,可放大放小雷达图
axisLine: {//坐标轴线相关设置
show: true,
lineStyle: {
color: 'red'
}
},
splitLine : {
show : true,
lineStyle : {
width : 1,
color : 'red' // 图表背景网格线的颜色
}
},
splitArea: {
show: false,
},
name: {
rich: {
a: {
color: 'red',
lineHeight:
},
},
formatter: (a)=>{
return `{a|${a}}`
}
}
},
],
series: [
{
type: 'radar',
symbol: 'none',//去掉拐点的圈
data: [
{
value: arr1,
name: '某软件',
areaStyle: {
normal: {
color: 'blue'
}
},
lineStyle: {
color:"rgba(255,255,255,0)"
},
},{
value: arr2,
name:'jja',
areaStyle: {
normal: {
color: 'red' // 图表中各个图区域的颜色
}
},
lineStyle: {
color:"rgba(255,255,255,0)" // 图表中各个图区域的边框线颜色
},
}
]
},
]
};
mychart.setOption(option);
</script>

实现效果:

2、实现最简单的数值在类目下

<div id="mychart" style="width:300px;height:300px;margin:0 auto;"></div>
<script>
var arr1 = [60,73,85,40,60];
var arr2 = [23,90,23,32,67];
var mychart = echarts.init(document.getElementById('mychart'));
var option = {
radar: [
{
indicator: [
{text: '品牌', max: 100},
{text: '内容', max: 100},
{text: '可用性', max: 100},
{text: '功能', max: 100},
{text: '屏幕', max: 100}
],
center: ['50%','54%'],//调整雷达图的位置
radius: 80,//半径,可放大放小雷达图
axisLine: {//坐标轴线相关设置
show: true,
lineStyle: {
color: 'red'
}
},
splitLine : {
show : true,
lineStyle : {
width : 1,
color : 'red' // 图表背景网格线的颜色
}
},
splitArea: {
show: false,
},
name: {
rich: {
a: {
color: 'red',
lineHeight:
},
b: {
color: '#fff',
align: 'center',
backgroundColor: '#666',
padding: ,
borderRadius:
}
},
formatter: (a,b)=>{
return `{a|${a}}\n{b|}`
}
}
},
],
series: [
{
type: 'radar',
symbol: 'none',//去掉拐点的圈
data: [
{
value: arr1,
name: '某软件',
areaStyle: {
normal: {
color: 'blue'
}
},
lineStyle: {
color:"rgba(255,255,255,0)"
},
},{
value: arr2,
name:'jja',
areaStyle: {
normal: {
color: 'red' // 图表中各个图区域的颜色
}
},
lineStyle: {
color:"rgba(255,255,255,0)" // 图表中各个图区域的边框线颜色
},
}
]
},
]
};
mychart.setOption(option);
</script>

3、实现最终效果

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title></title>
<script src="js/jquery.min.js"></script>
<script src="js/echarts.js"></script>
</head>
<body>
<div id="mychart" style="width:300px;height:300px;margin:0 auto;"></div>
<script>
var arr1 = [,,,,];
var arr2 = [,,,,];
var mychart = echarts.init(document.getElementById('mychart'));
var option = {
radar: [
{
indicator: [
{text: '品牌', max: 100},
{text: '内容', max: 100},
{text: '可用性', max: 100},
{text: '功能', max: 100},
{text: '屏幕', max: 100}
],
center: ['50%','54%'],//调整雷达图的位置
radius: 80,//半径,可放大放小雷达图
axisLine: {//坐标轴线相关设置
show: true,
lineStyle: {
color: 'red'
}
},
splitLine : {
show : true,
lineStyle : {
width : 1,
color : 'red' // 图表背景网格线的颜色
}
},
splitArea: {
show: false,
},
},
],
series: [
{
type: 'radar',
symbol: 'none',//去掉拐点的圈
data: [
{
value: arr1,
name: '某软件',
areaStyle: {
normal: {
color: 'blue'
}
},
lineStyle: {
color:"rgba(255,255,255,0)"
},
},{
value: arr2,
name:'jja',
areaStyle: {
normal: {
color: 'red' // 图表中各个图区域的颜色
}
},
lineStyle: {
color:"rgba(255,255,255,0)" // 图表中各个图区域的边框线颜色
},
}
]
},
]
};
mychart.setOption(option);
var i = -1;
mychart.setOption({
radar: [
{
name: {
rich: {
a: {
color: 'red',
lineHeight:
},
b: {
color: '#fff',
align: 'center',
backgroundColor: '#666',
padding: ,
borderRadius:
}
},
formatter: (a,b)=>{
i++;
return `{a|${a}}\n{b|${arr1[i]}}`
}
}
}
]
})
</script>
</body>
</html>

效果:

ECharts 雷达图怎么在类目值下面显示数值的更多相关文章

  1. echarts雷达图

    用echarts展现雷达图的定制 <!doctype html> <html> <head> <meta charset="utf-8"& ...

  2. echarts 雷达图的个性化设置

    echarts 雷达图的个性化设置 function test() { let myChart = echarts.init(document.getElementById('levelImage') ...

  3. echarts雷达图点击事件

    最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts配置问题:https://www.douban.com/note/509404582/ <!doctype ...

  4. echarts雷达图点击事件 包含(2.x,3.85,4.02)测试

    最近看见别人问的问题,点击雷达图的拐点,获取点击数据的问题,直接上代码. echarts 2x 的点击事件 echarts配置问题:https://www.douban.com/note/509404 ...

  5. ECharts雷达图详细配置说明

    雷达图表配置说明: // 指定图表的配置项和数据 var option = { backgroundColor: 'rgba(204,204,204,0.7 )', // 背景色,默认无背景 rgba ...

  6. Java生鲜电商平台-生鲜电商中商品类目、属性、品牌、单位架构设计与实战

    Java生鲜电商平台-生鲜电商中商品类目.属性.品牌.单位架构设计与实战 说明:Java生鲜电商平台-生鲜电商中商品类目.属性.品牌.单位架构设计与实战经验分享 凡是涉及到购物,必然是建立在商品的基础 ...

  7. Echarts数据可视化series-radar雷达图,开发全解+完美注释

    全栈工程师开发手册 (作者:栾鹏) Echarts数据可视化开发代码注释全解 Echarts数据可视化开发参数配置全解 6大公共组件详解(点击进入): title详解. tooltip详解.toolb ...

  8. 关于echarts生成雷达图的一些参数介绍

    export const industryFactorOption = { title: { text: '雷达图', textStyle: { color: 'rgba(221,221,221,1) ...

  9. 解决echarts的叠堆折线图数据出现坐标和值对不上的问题

    原文:https://blog.csdn.net/qq_36538012/article/details/88889545 ------------------------------- 说一个小bu ...

随机推荐

  1. 面试题:Java多线程必须掌握的十个问题 背1

    一.进程与线程?并行与并发? 进程代表一个运行中的程序,是资源分配与调度的基本单位.进程有三大特性: 1.独立性:独立的资源,私有的地址空间,进程间互不影响. 2.动态性:进程具有生命周期. 3.并发 ...

  2. 8.INSERT INTO 语句 UPDATE 语句

    1. INSERT INTO 语句 INSERT INTO 语句用于向表格中插入新的行. 语法 INSERT INTO 表名称 VALUES (值1, 值2,....) INSERT INTO Per ...

  3. jquery中children()

  4. MVC复杂类型的模型绑定

    1,属性为引用类型(非集合,非数组) //模型1 public class Contact { public string Name { get; set; } public string Phone ...

  5. 20169219 使用Metaspoit攻击MS08-067实验报告

    MS08-067漏洞介绍 MS08-067漏洞的全称为"Windows Server服务RPC请求缓冲区溢出漏洞",如果用户在受影响的系统上收到特制的 RPC 请求,则该漏洞可能允 ...

  6. Nginx禁止直接通过IP地址访问网站

    介绍下在nginx服务器禁止直接通过IP地址访问网站的方法,以避免别人恶意指向自己的IP,有需要的朋友参考下. 有时会遇到很多的恶意IP攻击,在Nginx下可以禁止IP访问. Nginx的默认虚拟主机 ...

  7. 构建空Datatable

    方法一 DT = new DataTable(); DataRow DR = DT.NewRow(); //构建列(名称,数据类型) DT.Columns.Add("代码", Ty ...

  8. ftp操作方法整理

    1.整理简化了下C#的ftp操作,方便使用    1.支持创建多级目录    2.批量删除    3.整个目录上传    4.整个目录删除    5.整个目录下载 2.调用方法展示, var ftp ...

  9. 【转】c#中@的3种作用

    源地址:https://www.cnblogs.com/linkbiz/p/6380814.html

  10. DRF 的解析器和渲染器

    一.解析器 解析器作用 解析器的作用就是服务端接收客户端传过来的数据,把数据解析成自己可以处理的数据.本质就是对请求体中的数据进行解析. 在了解解析器之前,我们要先知道Accept以及ContentT ...