Grafana 如何实现雷达图


程序员的公众号:源1024,获取更多资料, 无加密无套路!

最近整理了一波电子书籍资料,包含《Effective Java中文版 第2版》《深入JAVA虚拟机》,《重构改善既有代码设计》,《MySQL高性能-第3版》,《Java并发编程实战》等等
获取方式: 关注公众号并回复 电子书 领取,更多内容持续奉上


选择Apache ECharts

定义Function:

javascript 复制代码
let name_list = [
  { name: 'Support', max: 6500 },
  { name: 'Administration', max: 16000 },
  { name: 'Information Technology', max: 30000 },
  { name: 'Customer', max: 38000 },
  { name: 'Development', max: 52000 },
  { name: 'Marketing', max: 25000 }
];
let value_list = [
  {
    value: [4200, 3000, 20000, 35000, 40000, 18000],
    name: 'Allocated Budget'
  }
];
return {
  legend: {
    data: ['Allocated Budget', 'Actual Spending'],
    left: 'left',
  },
  radar: {
    // shape: 'circle',
    indicator: name_list
  },
  series: [
    {
      name: 'Budget vs spending',
      type: 'radar',
      data: value_list
    }
  ]
};

效果:

自定义name_list、value_list数据即可;
如果数据源是JSONAPI,接口数据返回对应格式即可。
调试可以用console.log() 打印返回的数据格式自行调试。

相关推荐
博同学2 天前
Nginx + ELK + Grafana 全球访问热力图
nginx·elk·grafana
JAVA拾贝2 天前
Prometheus+Grafana运维监控并实现钉钉告警
运维·钉钉·grafana·prometheus·运维监控
微风◝2 天前
12. grafana-Dashboard的Variable(过滤)使用
grafana
不太聪明的样子16 天前
c++ 项目使用 prometheus + grafana 进行实时监控
c++·grafana·prometheus
Detachym21 天前
CentOS下的运维监控Grafana部署
运维·centos·grafana
南夏一木子22 天前
性能测试——搭建Prometheus+Grafana平台
grafana·prometheus
奈斯ing22 天前
【prometheus+Grafana篇】基于Prometheus+Grafana实现postgreSQL数据库的监控与可视化
运维·数据库·信息可视化·grafana·prometheus
xixingzhe223 天前
docker compose安装Prometheus、Grafana
docker·grafana·prometheus
碧水澜庭25 天前
Prometheus+ Grafana 监控系统入门
grafana·prometheus
遇见火星25 天前
一键部署Prometheus+Grafana+alertmanager对网站状态进行监控
grafana·prometheus