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() 打印返回的数据格式自行调试。

相关推荐
oMcLin8 小时前
如何在 Rocky Linux 8.7 上通过 Prometheus 与 Grafana 结合,提升大规模容器环境的监控与性能分析?
linux·grafana·prometheus
飞翔沫沫情14 小时前
Prometheus 监控 ESXi 实战
grafana·prometheus·esxi·vcenter 监控·vsphere 监控
goodlook01232 天前
监控平台搭建-日志-alloy篇(八)
grafana·prometheus
goodlook01232 天前
监控平台搭建-日志-springboot直接推送loki篇(九)
java·spring boot·后端·grafana
新钛云服3 天前
Grafana Polystat面板与腾讯云可观测平台的深度融合实践
大数据·云计算·腾讯云·grafana
flying robot4 天前
Prometheus[2.33.3]grafana[12.3.1]监控安装
grafana·prometheus
flying robot4 天前
Grafana对xx-export监控和AlertManager 告警
grafana
一只懒鱼a6 天前
Prometheus和Grafana的安装和使用
grafana·prometheus
YanDDDeat6 天前
Prometheus + Grafana 搭建应用监控体系
java·后端·eureka·grafana·prometheus
goodlook01236 天前
监控平台搭建-日志-loki篇-最新版3.6.3(七)
服务器·grafana·prometheus