roseChart.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * @Author: your name
  3. * @Date: 2024-11-19 16:18:07
  4. * @LastEditTime: 2024-11-19 16:58:24
  5. * @LastEditors: bogon
  6. * @Description: In User Settings Edit
  7. * @FilePath: /performance-test/src/assets/js/constants/echarts-config/roseChart.js
  8. */
  9. // 风玫瑰图(Wind Rose Chart)
  10. // 用途:显示不同方向的风速或风力分布。
  11. // 适用场景:风场选址、风资源评估。
  12. // 实现建议:
  13. // ECharts 的极坐标 + 柱状图。
  14. // 使用 polar 和 radiusAxis 配置。
  15. export const option = {
  16. angleAxis: {
  17. type: "category",
  18. data: ["N", "NE", "E", "SE", "S", "SW", "W", "NW"], // 风向
  19. boundaryGap: false,
  20. },
  21. legend: {
  22. top: "bottom",
  23. },
  24. radiusAxis: {},
  25. polar: {},
  26. toolbox: {
  27. feature: {
  28. dataView: { show: true, readOnly: false },
  29. magicType: { show: true, type: ["line", "bar"] },
  30. restore: { show: true },
  31. saveAsImage: { show: true },
  32. },
  33. },
  34. series: [
  35. {
  36. type: "bar",
  37. data: [15, 25, 30, 20, 10, 5, 8, 12], // 风速数据
  38. coordinateSystem: "polar",
  39. name: "风速",
  40. },
  41. ],
  42. tooltip: {
  43. trigger: "item",
  44. },
  45. };