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

相关推荐
路由侠内网穿透.1 天前
外网访问可视化工具 Grafana (Linux版本)
linux·运维·服务器·grafana·远程工作
Deamon Tree4 天前
Prometheus和Grafana简介
grafana·prometheus
码界奇点5 天前
Apache IoTDB 架构特性与 PrometheusGrafana 监控体系部署实践
架构·apache·grafana·prometheus·iotdb
Linux-palpitate5 天前
基于Prometheus和Grafana的MySQL监控,服务器监控
服务器·grafana·prometheus
yiqian19897 天前
grafana做状态变化的监控图表
grafana
angushine7 天前
Docker方式安装Prometheus+Grafana+Node Exporter
docker·grafana·prometheus
时空无限8 天前
grafana dashboard 监控 json 文件 uid 长度限制
grafana
q9085447039 天前
Prometheus+Grafana 智能监控告警系统(服务器指标采集、mysql指标采集)
服务器·grafana·prometheus
小小的木头人11 天前
基于Docker 搭建 Prometheus & Grafana 环境
运维·docker·容器·grafana·prometheus
奈斯ing11 天前
【prometheus+Grafana篇】避坑指南:实践中常见问题与解决方案总结整理(持续更新...)
运维·grafana·prometheus·1024程序员节